Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed-point AMY #50

Closed
14 tasks done
bwhitman opened this issue Nov 26, 2023 · 7 comments
Closed
14 tasks done

Fixed-point AMY #50

bwhitman opened this issue Nov 26, 2023 · 7 comments

Comments

@bwhitman
Copy link
Collaborator

bwhitman commented Nov 26, 2023

@dpwe is making a lot of great headway converting AMY from floating point to fixed point. The branch is currently here https://github.com/bwhitman/amy/tree/fxp and you can see his readme here https://github.com/bwhitman/amy/blob/fxp/src/amy_fixedpoint.h . I assume (and hope) he'll write a big blog post about it when it's done.

WHY: AMY is fast and efficient but really relies on an FPU to do most of its rendering. This was "fine" for our original targets -- ESP32 and desktop, but we'd like to port it to much more, like the RP2040 (#41) or other Cortex M0 types. Even on MCUs with FPUs, they're not usually as fast as using fixed point types, so we'll hopefully have more headroom on things like Alles and Tulip. We couldn't do more than a few sine waves on an RP2040 before; now we can have hundreds. There's not a lot of downside: just the complexity of doing it and perhaps it's slightly harder code to understand if you're not familiar with this.

Here's where we're at, I'll track the merge here as it happens! thanks DAN

TODO

  • Base oscillators
  • FM
  • Envelopes
  • Filters
  • EQ
  • Pan
  • Reverb
  • Chorus
  • Partials
  • Karplus-strong
  • PCM
  • Make RP2040 build multi-core like ESP
  • Port back into Alles
  • Port back into Tulip
@znmeb
Copy link

znmeb commented Nov 27, 2023

This is awesome news!

@bwhitman
Copy link
Collaborator Author

This is done! There may be some small implementation bugs, so please file new issues for them!

@znmeb
Copy link

znmeb commented Dec 10, 2023

Awesome! It'll be the middle of next week before I get a chance to test this but it's at the top of my queue!

@PythonLinks
Copy link

Thank you for doing this. So how many oscillators can I run on an RP2040?

@bwhitman
Copy link
Collaborator Author

bwhitman commented Jan 2, 2024

@PythonLinks I was able to get about 120! 10-11 DX7 patches simultaneously. Check out the Multicore arduino example.

@PythonLinks
Copy link

That is amazing. So even if you wanted to do percussion instruments, #80, you could do 30! How many are needed for a percussion instrument?

@smutax
Copy link

smutax commented Jan 2, 2024

That is amazing. So even if you wanted to do percussion instruments, #80, you could do 30! How many are needed for a percussion instrument?

Hi. If you refer to percussion instruments being PCM waves, so that uses one oscillator each. Not including any modulators obviously. Hopefully #80 doesn't affect here. Unless i misunderstood. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants