setting up fluidsynth the Linux sound generator

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

setting up fluidsynth the Linux sound generator

Louis B.
Administrator

How do I hear the sound on Linux (Ubuntu)?

To hear the sound Piano Booster needs a MIDI sound generator, there are two different General Midi sound generators avalable on Linux, 'fluidsynth' and 'timidty'. To install fluidsynth you must install the following packages 'fluidsynth' 'fluid-soundfont-gm' and 'fluid-soundfont-gs' using your favourite package manager. To start the fluidsynth sound generator type the following on the command line.

fluidsynth -C0 -R0 -r22050 -l -o midi.alsa_seq.id=fs /usr/share/sounds/sf2/FluidR3_GM.sf2 /usr/share/sounds/sf2/FluidR3_GS.sf2

If you have a fast machine then you can leave out the flags ' -C0 -R0 -s 22050' which turn off the reverbe and chorus an reduce the sample rate.

I have had some luck using qsyth to control fluidsyth but again I had to turn of reverbe and chorus and reduce the sample rate

Also see these instructions from Dan in another thread.

In addition to that I had to edit /etc/libao.conf to read

default_driver=pulse

Then reboot or you can just restart ALSA with

sudo /etc/init.d/alsa-utils restart

The package names for the GM soundfonts under Ubuntu are fluid-soundfont-gm and fluid-soundfont-gs so if you don't have an external hardware MIDI synth such as a keyboard with MIDI IN you can get all the apps required for a softsynth under Ubuntu with the command:

sudo apt-get install fluidsynth fluid-soundfont-gm fluid-soundfont-gs

then I could start fluidsynth using a command like:

fluidsynth -s -i /usr/share/sounds/sf2/FluidR3_GM.sf2 /usr/share/sounds/sf2/FluidR3_GS.sf2

You will then have a softsynth option available named something like 'Synth input Port (23566)' under the the MIDI ouput device drop-down when you start Pianobooster.

Reply | Threaded
Open this post in threaded view
|

Re: setting up fluidsynth the Linux sound generator

OwenW
OK, I've followed these instructions above.  However there may be a problem with 0.6.1 beta as it behaves differently to 0.5.1.

In 0.5.1 I see the 'Synth Input port (8580:0)' in the drop down but its not there in 0.6.1.  The drop down only has 'None' and 'Midi through:0'.

My version of 0.6.1 beta was taken off trunk yesterday or day before.

Bug?
Reply | Threaded
Open this post in threaded view
|

Re: setting up fluidsynth the Linux sound generator

Louis B.
Administrator
Please start fluidsynth before pb and then retest. (it only checks the midi list when the  midi dialog is first opened) thanks.
CRP
Reply | Threaded
Open this post in threaded view
|

Re: setting up fluidsynth the Linux sound generator

CRP
That's funny, the behaviour on Mac OSX (pb v0.6.1) is different. If I start pianobooster the output device is empty, then I start SimpleSynth and go to the Midi Setup dialog, and SimpleSynth appears in the dropdown box...
Reply | Threaded
Open this post in threaded view
|

Re: setting up fluidsynth the Linux sound generator

OwenW
The plot thickens.  

My problem was 'no midi out' in drop down for 0.6.1 beta...

It's definitely not an issue of starting fluidsynth first - but I think I've worked out what it is.

I added some debug printf's to MidiDevice.cpp and can see that rtmidi just isn't returning the fluidsynth port.  I noticed that Louis moved from 1.0.7 to 1.0.8 of rtmidi somewhere between 0.5.1 and 0.6.1, so I rolled back to the previous version of rtmidi and recompiled.  Boom, I have midi out!  My c is poor so I can't see what the problem is, doing a diff between 1.0.7 and 1.0.8 - it does look as if RtMidiIn and RtMidiOut now take a string arg to constructor called 'clientName'.  This could be the problem.

(Thanks Louis for fixing the timing marks, they now appear to the right).
Reply | Threaded
Open this post in threaded view
|

Re: setting up fluidsynth the Linux sound generator

OwenW
Hmm,

I've tried swapping from fluidsynth to timidity softsynth.  And 0.6.1 finds timidity midi out for both 1.0.7 and 1.0.8 of rtmidi.

I think I'll stick with timidity for the time being.

BTW, I use this to start timidity:
timidity -iA -Os -EFreverb=0 -B2,8 --realtime-priority=4 -N=5 --sequencer-ports=1 &

Owen
Reply | Threaded
Open this post in threaded view
|

Re: setting up fluidsynth the Linux sound generator

Louis B.
Administrator
Hi All,

I have just updated the PB FAQ page with important information on running with low latency delay see:

http://pianobooster.sourceforge.net/faq.html#how-do-i-hear-the-sound-on-linux-ubuntu