Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: converting .sf2 soundfonts to audio library-compatible files

  1. #1

    converting .sf2 soundfonts to audio library-compatible files

    I found decoder.py on Paul's github, but I can not seem to get it to output anything. It reads an .sf2 file just fine and parses all the sample sets, but fails when I try to output anything:

    Traceback (most recent call last):
    File "../decoder.py", line 519, in <module>
    main(sys.argv[1:])
    File "../decoder.py", line 230, in main
    decode_selected(path, instrument, selected_bags, global_bag_index)
    TypeError: decode_selected() missing 1 required positional argument: 'user_dir'
    Alexs-MacBook-Pro-156:gm_1.471 alex$ python3 ../decoder.py -i gm.sf2 -o /Users/alex/Downloads/gm_1.471/converted/test.out

    Anyone know why this is? It has no trouble with using the current working dir for the input, and I provide the full path to the output. The output path is writeable.

    I'd love to add some more sounds to my synth project.

  2. #2
    Senior Member
    Join Date
    Feb 2015
    Posts
    119
    There's a GUI in there that you probably want to run rather than the actual decoder.py script.

    First you'll need to install sf2utils though. If you have pip on your system you'd do "pip install sf2utils" or "pip3 install sf2utils".

    Then you can run the GUI with "python controller.py" or "python3 controller.py"

  3. #3
    I was able to do it using sox and hexdump but with adventure kidís single-cycle wav files vs a soundfont.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •