Wavetable synthesis of large soundfonts

Status
Not open for further replies.

llwynog

New member
Hello,
I am new here, this is my first post. I hesitated between posting here and the specific "Audio" forum.

I have building a digital musical instrument which currently works with an arduino ProMicro to generate midi data and send it to a Raspberry Pi running FluidSynth for audio output.
I have a working prototype but I am running into the memory constraints on the ProMicro when I try to add in new features so I decided to upgrade to a Teensy 3.5 (my first time using this platform).
I found out about the audio board so I also bought one and was excited by the possibility to perform wavetable synthesis. I started to hope that I might be able to get rid of the Raspberry Pi which is not convenient and takes an eternity to boot.

Now that I have received the audio board and the Teensy, I tried to play around with the wavetable synthesis but the only examples I found extract the data from the sf2 file and compile it with the rest of the program. This means that only very small samples can be used while the samples from my instrument take several tens of megabytes. (it needs to fit into the flash memory of the Teensy)

Is anyone aware of a way to do wavetable synthesis straight from the sf2 file on a SD card? Or do I need to give up on trying to perform the synthesis on the Teensy and resort to using the Raspi as a synthetizer?

Thank you very much in advance,

Louis
 
It sounds an overkill to have several tens of megabytes for an instrument. Do you have a separate wavetable for every single note on the instrument?

FYI, I posted to this another thread about wavetable synthesis on Teensy, which might be of interest to you.

Generally my understanding is that mixing several instruments directly from SD card isn't feasible because you need to be accessing data too randomly for the synthesis.

Cheers, Jarkko
 
Last edited:
Thank you JarkkoL

Thank you for link. The videos on that thread will definitely be helpful.


The size of the soundfonts may be overkill but they are the only freely available soundfonts of hurdy gurdies (the instrument I am basing my project on) that I could find...
For some strings, there seems to be a sample per note indeed but even the simpler sounds like key clicking noises are still very big samples of several megabytes.

I guess I have two options then : either keep working on the Raspi for synthesis or find a way to reduce the quality of the soundfont to make it fit on the Teensy.

Cheers,

Louis
 
Hurdy gurdy sounds like quite a simple instrument which should easily fit in Teensy 4 flash, but you would need to do some work to set it up properly, i.e. setup sample loops and potentially volume envelopes. Also lowering the sample bit depth and frequency, make sure it's mono sample and reduce the number of individual samples (even a sample per octave is probably excessive) might get you there.
 
Thank you for this encouraging advice.
Would you have a toolchain/program to recommend for me to try and edit the existing soundfonts?
 
You could use free OpenMPT to do some basic sample editing, setup sample loops (forward/bidi), resample & adjust note pitch, convert to mono & bit depth and also setup instruments (note-sample mapping, volume envelopes, etc.), and test it all works. Once you have instruments properly setup on PC, you could use my project to play them on Teensy.
 
Last edited:
Thanks to your help and some youtube tutorials, I could put together a soundfont which was small enough to compile on the Teensy.
The quality is reduced from the original soundfont but now my instrument will be able to output sound directly for practicing while still outputting Midi data through USB when I need to use the high-quality soundfont. The best of both worlds!

Thanks a lot !
 
Status
Not open for further replies.
Back
Top