Updated SoundFontDecoder

manicksan

Well-known member
Updated SoundFontDecoder + standalone windows .exe

Hi
I Have created a github repository which contains a updated version of the SoundFontDecoder
https://github.com/manicken/SoundFontDecoder
that means it's compatible with the updated version of the library.

and I have also compiled it as a standalone version (no python required and Windows only)
as a request from a member of this forum

https://github.com/manicken/SoundFontDecoder/raw/master/dist/SoundFontDecoder.exe


the updated version includes teensy 4.0 & 4.1 (only used for flash memory usage)
 
Last edited:
I remember having to make local mods to my own copy to cater for putting the output into flash for 4.0 and 4.1 - presumably this is the same modification?
 
yes it uses the progmem syntax

static const PROGMEM uint32_t sample_0_Backsaw_BACKSAW[20864]

and contains
AudioSynthWavetable::SAMPLES_PER_MSEC

which was only
SAMPLES_PER_MSEC
in the old version
that did make it not compile as the name was not found.


But there is still some problems with this tool
i.e some files cannot be converted.


and gives the following error:
cooked_loop_end= 100892
decode
ERROR: End loop index is larger than sample end indexOBIE1.WAV


even after have downloaded the latest version of sf2utils v.0.9.0


I have plans to write a own converter in javascript
so that it can be implemented in the DesignTool

when i'm finished with everything else
 
Hi manicksan - thank you for implementing this fix for the 4.x teensy. Can you provide an example of how to use the decoder in python? I'm on a mac and keep getting the following error when trying to run it:

decode_selected() missing 1 required positional argument: 'user_dir'

Thanks!
 
Can you provide an example of how to use the decoder in python?
The thing you actually "run" is the .py file called "controller.py". Using Python 3 I simply type:
Code:
python controller.py
and this appears:
sf2.png

PS if you were trying to use decoder.py then note that the way controller.py invokes the decode_selected() function is:
Code:
        success = decoder.decode_selected(
            inFile,
            curr_inst.getOriginalIndex(),
            selected_bags,
            curr_inst.getGlobalBag(),
            self.model.out_dir,
            user_title=out_name,
        )

But really you want to use the GUI controller program. See the manual:

https://teensyaudio.github.io/Wavet..._additional_pages_soundfontDecoder.html#about
 
Back
Top