fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Sending commands for fast renderer


From: David Henningsson
Subject: Re: [fluid-dev] Sending commands for fast renderer
Date: Tue, 15 Nov 2011 23:00:43 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1

On 11/14/2011 12:35 PM, Matt Giuca wrote:
I'm just coming to terms with how to send commands to FluidSynth to
control things like reverb (specifically, I want to control reverb).

I'm under the impression that while a few things can be controlled from
the command-line (such as gain), most things (such as reverb) cannot be.
There are a few other ways to control these things:

- Using the interactive shell, you can type in commands manually.
- You can also use Unix pipes to send the same shell commands (e.g.,
'echo "rev_setlevel 10" | fluidsynth' or 'fluidsynth < commands.txt').*
- Using -s, FluidSynth listens for TCP connections and accepts the same
shell commands via network input.
- Using the API, you can programmatically change the settings.
- Graphically using QSynth (which I imagine uses the API).

*Note this was mentioned earlier this year by David:
http://lists.gnu.org/archive/html/fluid-dev/2011-03/msg00036.html

Any that I missed?

The problem is that none of these methods seem to work in conjunction
with the -F fast renderer feature. -F is a way to tell FluidSynth
"forget about TCP servers, MIDI servers, output devices, command shells,
etc -- just convert a MIDI input into a digital audio file as fast as
you can and quit." Which is a fantastic feature -- I have makefiles set
up so that I can just go "make" and FluidSynth renders all of my music
(it's one thing I love about FluidSynth as it lets me export all of my
music with a single command).

The problem is that as far as I can tell, ALL of the above options for
changing settings require that you are running FluidSynth either in
server mode or via the API, which means they are incompatible with -F.
In fact, I can't find a way to change reverb when using the fast
renderer at all. Note that I have tried using -F and not -i, and piping
a text file in to stdin, but FluidSynth seems to ignore stdin when -F is
supplied. Is there a way?

The only way I can think of is only available to me because I've hacked
on FluidSynth in the past:

- Edit include/fluidsynth/synth.h FLUID_REVERB_DEFAULT_LEVEL and friends
and recompile the program.

Obviously not the cleanest solution :) As I am coming up on a deadline,
if there is no simple solution, I'll do that for now. But in the future,
I would like to propose a feature (which I'm willing to work on) where
you can specify on the command-line:

--settings <settings-file>

This would read in <settings-file> and execute it as if it was supplied
to stdin, but it would always work (even when FS refuses to read from
stdin, such as with -F). This should be pretty trivial to implement, I
would imagine.

The long-term visionary thought is that we have too many ways of controlling the server: through settings, through command line, through the shell, through the API - all these have different semantics, and as a result some configuration is available one way but not the other, leading to problems like these.

It would be great if we could unify these approaches so that everything is available everywhere. It seems to me like the settings is the most competent one here, and they are read/write from both command line and shell.

So how about turning the reverb parameters into settings?

// David




reply via email to

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