How DSP intensive is FM Synthesis? Teensy / Raspberry?
- KVRian
- Topic Starter
- 1018 posts since 27 Mar, 2013
I think about realizing an Hardware FM synthesizer and wonder if a decent on could programmed on a Teensy/Raspberry.
With decent I mean an 6 OP FM synthesizer with 16 voices wich is multitimbral. Up to six effects, 2 envelopes and 1 lfo per OP, maybe an arpeggiator. Would be nice to have RM too. The dsp would also need to feed an 7" display for graphical representation.
Is this possible from the power a Teensy/Raspberry can deliver?
Thanks
With decent I mean an 6 OP FM synthesizer with 16 voices wich is multitimbral. Up to six effects, 2 envelopes and 1 lfo per OP, maybe an arpeggiator. Would be nice to have RM too. The dsp would also need to feed an 7" display for graphical representation.
Is this possible from the power a Teensy/Raspberry can deliver?
Thanks
rabbit in a hole
- KVRAF
- 1748 posts since 2 Jul, 2018
FM on the Rasberry is possible. But you'll have to do a compromise when it comes to sound-quality. You'll have to deal with aliasing and oversampling vs CPU.
- KVRAF
- 23103 posts since 7 Jan, 2009 from Croatia
Aliasing with FM is kind of a given, though. You can never get it perfectly clean considering how many sidebands you can get very quickly... DX7 never did any aliasing suppression yet it's a classic. It's just a part of the sound there, digital FM sounds "wrong" if there's no aliasing
One should be able to do a 16 voice 6 operator FM on a RPi, no problem.
One should be able to do a 16 voice 6 operator FM on a RPi, no problem.
- KVRAF
- 23103 posts since 7 Jan, 2009 from Croatia
BTW, the free Dexed synth runs on Zynthian, which is RPi-based.
https://zynthian.org/engines/_engine-list/engine-dexed
https://zynthian.org/engines/_engine-list/engine-dexed
- KVRAF
- 7910 posts since 12 Feb, 2006 from Helsinki, Finland
The basic algorithm for "digital FM" (ie. really "phase modulation") is something like:
Code: Select all
carrierPhase += carrierFreq
carrier=sin(carrierPhase + modIndex*modulatorOut).
For more complex routing, you need to do a few more adds and a few more multiplies/shifts, but for the most part the whole thing is stupidly cheap (which is exactly why it was such a big deal in the 80s) as long as you have a CPU that can do reasonably fast integer multiplies and having a floating point unit is not necessarily even useful (SIMD might be, but scalar floating point is just going to make this slower).
- KVRAF
- 1748 posts since 2 Jul, 2018
That's not true. My synth Nemesis can do aliasfree true FM and aliasfree PM with any waveform. But it's very tricky to do.EvilDragon wrote: ↑Wed May 05, 2021 9:40 am Aliasing with FM is kind of a given, though. You can never get it perfectly clean considering how many sidebands you can get very quickly...
You can directly compare the results within the synth when you select:
neoFM (= aliasfree true FM)
FM/PM (= aliasfree PM/'FM' )
FM/PM vintage (PM/'FM' with aliasing)
- KVRAF
- 23103 posts since 7 Jan, 2009 from Croatia
Oh I guess since FM is entirely analytical, you could use something like DPW to make it alias-free, or something to that extent. Sure.
Sounded way too clean and not "right" to me, tho, when I demoed Nemess. But hey, all good!
Sounded way too clean and not "right" to me, tho, when I demoed Nemess. But hey, all good!
Last edited by EvilDragon on Wed May 05, 2021 2:35 pm, edited 1 time in total.
- Beware the Quoth
- 33227 posts since 4 Sep, 2001 from R'lyeh Oceanic Amusement Park and Funfair
<insert 'smart aliasing' reference here>EvilDragon wrote: ↑Wed May 05, 2021 9:40 am DX7 never did any aliasing suppression yet it's a classic.
my other modular synth is a bugbrand
- KVRian
- 1254 posts since 31 Dec, 2008
I'm thinking you may be able to get very close to aliasing free FM by modulation amount trickery. By precisely calculating and limiting the modulation amount to prevent the highest harmonic from going beyond nyquist with respect to the current pitch. It would be similar to oversampled filtering. It won't give the exact output but I'm thinking it would sound similar. Don't know for sure, never tried it.
On the other hand as the vintage sound it self has aliasing. I bet many musicians don't care, or may like the aliasing.
On the other hand as the vintage sound it self has aliasing. I bet many musicians don't care, or may like the aliasing.
www.solostuff.net
Advice is heavy. So don’t send it like a mountain.
Advice is heavy. So don’t send it like a mountain.
- KVRAF
- 2258 posts since 25 Sep, 2014 from Specific Northwest
I'm pretty sure a Raspberry or Teensy are faster, more powerful than the original DX7 CPU, and have more RAM. Wave LUTs are your friends here, which is what made the magic happen before.
Most of the work has already been done: http://ixox.fr/preenfm2/
Most of the work has already been done: http://ixox.fr/preenfm2/
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better?
- KVRAF
- 2258 posts since 25 Sep, 2014 from Specific Northwest
Oh, and regarding aliasing, it was fixed-point rounding errors that caused any artifacting I heard on my DX21 (4-op sine-only). I don't recall any aliasing, per se, but it's been a few centuries since I used it.
I started on Logic 5 with a PowerBook G4 550Mhz. I now have a MacBook Air M1 and it's ~165x faster! So, why is my music not proportionally better?
- KVRian
- Topic Starter
- 1018 posts since 27 Mar, 2013
Thanks to y'all. Very good first information. I think about kind of a hybrid of preenfm3 and Polyend Tracker.
ATM I try to figure out the hardware specs, layout of the hardware and ui as well as the user handling of the synth itself.
ATM I try to figure out the hardware specs, layout of the hardware and ui as well as the user handling of the synth itself.
rabbit in a hole
-
- KVRist
- 41 posts since 22 Sep, 2019
There's a port of Dexed for Teensy as well. More info here:
https://discourse.zynthian.org/t/microd ... to-go/1989
and here:
https://codeberg.org/dcoredump/MicroDexed
https://discourse.zynthian.org/t/microd ... to-go/1989
and here:
https://codeberg.org/dcoredump/MicroDexed