fluid-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [fluid-dev] loading and unloading a SoundFont


From: Felix Krause
Subject: Re: [fluid-dev] loading and unloading a SoundFont
Date: Tue, 12 May 2009 14:20:20 +0200

Hi Kevin,

First I need to load a SoundFont into FluidSynth. I can do this, but only if there are no spaces in the path. For example, this works:

load /test.sf2

but these don't:

load /test 1.sf2
load '/test 1.sf2'
load "test 1.sf2"
load test%20.sf2
load 'test%20.sf2'
load "test%20.sf2"
load test\s.sf2
load 'test\s.sf2'
load "test\s.sf2"

This is a problem I also had when I started using FluidSynth. The command line tool doesn't accept file paths with spaces. I recommend using library calls instead, they have no problems with spaces in paths.

The second thing I can't figure out is how to unload the SoundFont and load a different one into the same ID that the first one was loaded into. My app is only going to be loading a single SoundFont for each FluidSynth daemon. If I unload ID one then load a new SoundFont it is automatically assigned ID two. Is this irrelevant or do I need it to be assigned ID 1 in order to respond the same way to MIDI events? If the daemon functions the same way regardless (the ID is irrelevant) then I'm good as long as FluidSynth won't crash should the ID exceed a certain value (255 would be bad, 65535 would be okay). Any help is much appreciated.

The ID of a SoundFont is pretty irrelevant. The command line tool automatically sets all available channels to the new soundfont when you load it. You only need the ID to identify a soundfont after you loaded it, so you won't need it at all as long if you only load one SoundFont at the same time. I don't know about the ID limit, though.

Afaik GAMBAS is somewhat similar to REALbasic. You might want to look at the code of the REALbasic FluidSynth Wrapper I'm developing on SourceForge if you need help with accessing the FluidSynth library. I didn't make a release yet, but you can get the code via subversion:

http://sourceforge.net/projects/rbfluidwrapper


Cheers,
Felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]