fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] fluid_player_add(synth, '-')


From: Peter Billam
Subject: Re: [fluid-dev] fluid_player_add(synth, '-')
Date: Tue, 2 Sep 2014 18:24 +1000

Greetings.

fluidsynth.lua is now at 1.6:
   http://www.pjb.com.au/comp/lua/fluidsynth.html
and
   http://www.pjb.com.au/midi/fluadity.html
now has a  fluadity -d  option, which starts it running
as a daemon eg: from /etc/rc.local.  It's now my
  export ALSA_OUTPUT_PORTS=Fluidity
and should get a good road-test.

I noticed after I call new_fluid_synth and new_fluid_audio_driver
then it starts eating about 7% of my CPU, even though nothing is
being input or output, no midi_player is running, and no SoundFonts
have even been loaded.  I suppose there's a reason for this...

(so, to save CPU, my fluadity daemon only runs
its synth while it has input-connections...)

> > ... in fluadity I detect '-' and slurp into a tmp file ...
> To avoid the tmp file, you can just load it into memory and use
> fluid_player_add_mem.

Yes ! :-)  I now do this at the fluidsynth.lua level, which also
lets me load a midi 'file' from in-memory, like might arise from:
  http://www.pjb.com.au/comp/lua/MIDI.html#opus2midi
So I'll also want to rewrite MIDI.play_score() to use fluidsynth.lua
(perhaps if  ~/.fluidsynth  exists) ...

> if you feel motivated, feel free to write a patch, should be easy
> to implement in src/midi/fluid_midi.c, function fluid_player_load.

I'll give it a look at some stage, but I am a hopeless C programmer,
I've been writing in high-level languages for decades :-(

Again: many thanks for your help,
Peter Billam

http://www.pjb.com.au      address@hidden     (03) 6278 9410
"Follow the charge, not the particle."  --  Richard Feynman
 from The Theory of Positrons, Physical Review, 1949




reply via email to

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