awesome. thanks. That site was great. I found it a while back while looking to code a sample rate/bit rate reducer.
That reminds me, I started a decimator effect but apparently got distracted
Are there any other good sites or books to read about coding in C for music applications such as the PreenFM2?
Other than musicdsp, I think there's a bunch of stuff in the kvr-audio forums, but I've mostly been picking specific parts (oscillator, envelope) and googling my way through the softsynths and VSTs that pop up...
Are there any differences when coding for an ARM vs the ATMega?
You can get pretty far in C/C++ without worrying about the platform, but there are different pitfalls on each (e.g. memory access, FPU or not) if you have performance goals.
E.g. the ARM instructions only work on registers, not directly on memory, so often you have to force the compiler's hand by loading to a temporary variable, processing, and moving back.
How much ram do we have remaining in the PreenFM2?
I think the 64k CCM was pretty full, but I suspect there's still a good chunk of the 112k (?) RAM left. IIRC the code lives in flash.
There shouldn't be any run-time allocations, so there might be a map file or output from the linker that shows usage? Haven't checked...