shorepine / amy

AMY - the Additive Music synthesizer librarY

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fixed-point AMY

bwhitman opened this issue · comments

@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

This is awesome news!

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

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!

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

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

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?

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.