[fluid-dev] How to change settings (Reverb, Chorus, Gain, Bank) while Fluidsynth is running as a server (no shell)?

2013-08-11 Thread fcare...@tiscali.it
Hello everyone,

first of all: a BIG, BIG THANK YOU to everyone here for Fluidsynth.
It's a wonderful application, I 
like and use it a lot!

I'm running Fluidsynth 1.1.6 on a small Arm board running Linux (something
like a Cubieboard. 
Say a RaspPi on steroids).
I recompiled everything to gain as much performances as possible, and
am really happy about 
it (175 MB of SF2, 128 voices, 21ms latency and
hardly breaks a sweat!).

My question. hoping not to waste too much of 
your time.

I'm running Fluidsynth in unattended Server mode ( -s ): the ARM board
is headless and connected to a MIDI 
input (master keyboard and/or
sequencer).

I'd like to change some Fluidsynth settings "on the fly":

- without 
resorting to the integrated shell (because I can't use it: headerless
board without keypad)
- without having to send 
MIDI commands using my MIDI keyboard (because it's very
complicated with my model)
- without restarting Fluidsynth

In 
particular, I'd like to change:
gain (-g)
reverb (-R)
chorus (-C)
General MIDI bank

So I was thinking of a shell 
script or C program I may write,
triggered by an appropriate physical input (I can do that, I have
plenty GPIOs on the 
board).
The program/script should "talk" to Fluidsynth server and change some
settings in realtime, without restarting 
it (a brief pause is OK).

I've read the documentation, and from what I gather, it should be somehow 
possible using 
Fluidsynth API via libfluidsynth.
But every example I've found creates a new Synth before setting parameters, etc.
I 
don't want to create a new synth: I only want to change the settings of the 
Fluidsynth server which is already running.


Is it possible?
Any hint, code fragment...?

Thanks a lot for your patience. :-)

Best regards,

Fernando


Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di 
uno spot in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui! Un 
amico al mese e parli e navighi sempre gratis: http://freelosophy.tiscali.it/

___
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev


[fluid-dev] R: Re: How to change settings (Reverb, Chorus, Gain, Bank) while Fluidsynth is running as a server (no shell)?

2013-08-11 Thread fcare...@tiscali.it
Hello, thanks a lot for your support!

>The first thing that comes to mind, without having to do any programming,
>is 
to use the built in FluidSynth TCP/IP server (a command line switch
>enables this).

My board has no network, but I 
could use the internal localhost: fluidsynth tcp server would listen on 
127.0.0.1 and my script, running locally, could 
use netcat to talk to the appropriate port. A dummy network, that is.
But, I did not find any documentation about 
fluidsynth tcp server: nothing in the man page, nothing in the html document. :(
So I don't know about commands, 
message formats, settings, etc. :(

I was hoping that, for example (libfluidsynth doc):

  fluid_settings_setstr
(settings, "some_parameter", "some_value");

could apply to an existing (running) synth, without having to do

 synth = 
new_fluid_synth(settings);

But it seems that there's nothing like a synth = open_running_fluid_synth()  :-(

>Nice to 
hear about your results with the ARM platform you are using.  I've
>been wanting to create a stand alone FluidSynth 
device for a while myself.
>It's great that embedded systems have reached a high enough level, power
>wise, to work as 
well as you are reporting and with floating point units to
>make this possible.

Yes, these new dev boards are really 
powerful.
The one I'm using has a Allwinner A20 (dual-CortexA7 @ 900MHz) and 1GB of DDR3 
RAM.

I found it's useful to 
recompile everything with GCC 4.7.2, because it supports specific ARM Cortex 
optimizations and auto-vectorialization 
using the NEON SIMD unit; you can gain a nice speed boost.
My CFLAGS are 
'-march=armv7-a -mtune=cortex-a7 -ffast-math -
mfpu=neon-vfpv4 -Ofast'

Fernando


>On Aug 11, 2013 8:16 AM, "fcare...@tiscali.it"  wrote:
>
>> 
Hello everyone,
>>
>> first of all: a BIG, BIG THANK YOU to everyone here for Fluidsynth.
>> It's a wonderful 
application, I
>> like and use it a lot!
>>
>> I'm running Fluidsynth 1.1.6 on a small Arm board running Linux 
(something
>> like a Cubieboard.
>> Say a RaspPi on steroids).
>> I recompiled everything to gain as much performances 
as possible, and
>> am really happy about
>> it (175 MB of SF2, 128 voices, 21ms latency and
>> hardly breaks a 
sweat!).
>>
>> My question. hoping not to waste too much of
>> your time.
>>
>> I'm running Fluidsynth in unattended 
Server mode ( -s ): the ARM board
>> is headless and connected to a MIDI
>> input (master keyboard and/or
>> 
sequencer).
>>
>> I'd like to change some Fluidsynth settings "on the fly":
>>
>> - without
>> resorting to the 
integrated shell (because I can't use it: headerless
>> board without keypad)
>> - without having to send
>> MIDI 
commands using my MIDI keyboard (because it's very
>> complicated with my model)
>> - without restarting Fluidsynth
>>

>> In
>> particular, I'd like to change:
>> gain (-g)
>> reverb (-R)
>> chorus (-C)
>> General MIDI bank
>>
>> So I was 
thinking of a shell
>> script or C program I may write,
>> triggered by an appropriate physical input (I can do that, I 
have
>> plenty GPIOs on the
>> board).
>> The program/script should "talk" to Fluidsynth server and change some
>> 
settings in realtime, without restarting
>> it (a brief pause is OK).
>>
>> I've read the documentation, and from what 
I gather, it should be somehow
>> possible using
>> Fluidsynth API via libfluidsynth.
>> But every example I've found 
creates a new Synth before setting
>> parameters, etc.
>> I
>> don't want to create a new synth: I only want to change 
the settings of
>> the Fluidsynth server which is already running.
>>
>>
>> Is it possible?
>> Any hint, code 
fragment...?
>>
>> Thanks a lot for your patience. :-)
>>
>> Best regards,
>>
>> Fernando
>>
>>
>> Invita i tuoi amici 
e Tiscali ti premia! Il consiglio di un amico vale più
>> di uno spot in TV. Per ogni nuovo abbonato 30 € di premio per 
te e per lui!
>> Un amico al mese e parli e navighi sempre gratis:
>> http://freelosophy.tiscali.it/
>>
>> 
___
>> fluid-dev mailing list
>> fluid-dev@nongnu.org
>> https://lists.
nongnu.org/mailman/listinfo/fluid-dev
>>
>




Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di 
uno spot in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui! Un 
amico al mese e parli e navighi sempre gratis: http://freelosophy.tiscali.it/

___
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev


[fluid-dev] R: Re: How to change settings (Reverb, Chorus, Gain, Bank) while Fluidsynth is running as a server (no shell)?

2013-08-11 Thread fcare...@tiscali.it
>All of these things can be controlled via MIDI messages, so why don't you
>use the amidi command line app to script 
the messages, and just develop
>your little app to take input from your GPIOs and fire those scripts?

That's another 
great idea!
Two great suggestions in a few minutes, thanks Graham and Element Green.

Now I just have to look for the 
appropriate MIDI commands.
Just a doubt: are you sure fluidsynth's "internal gain" ( -g [0.2-1000.0]) is 
controlled by 
a MIDI command? I thought it was an internal setting, like a pre-amplification 
of the mixed voices just before sending 
the result to the audio device.

Thanks again, people. :-)

Fernando


>
>On Sunday, August 11, 2013, fcarello@tiscali.
it wrote:
>
>> Hello everyone,
>>
>> first of all: a BIG, BIG THANK YOU to everyone here for Fluidsynth.
>> It's a 
wonderful application, I
>> like and use it a lot!
>>
>> I'm running Fluidsynth 1.1.6 on a small Arm board running 
Linux (something
>> like a Cubieboard.
>> Say a RaspPi on steroids).
>> I recompiled everything to gain as much 
performances as possible, and
>> am really happy about
>> it (175 MB of SF2, 128 voices, 21ms latency and
>> hardly 
breaks a sweat!).
>>
>> My question. hoping not to waste too much of
>> your time.
>>
>> I'm running Fluidsynth in 
unattended Server mode ( -s ): the ARM board
>> is headless and connected to a MIDI
>> input (master keyboard and/or
>> 
sequencer).
>>
>> I'd like to change some Fluidsynth settings "on the fly":
>>
>> - without
>> resorting to the 
integrated shell (because I can't use it: headerless
>> board without keypad)
>> - without having to send
>> MIDI 
commands using my MIDI keyboard (because it's very
>> complicated with my model)
>> - without restarting Fluidsynth
>>

>> In
>> particular, I'd like to change:
>> gain (-g)
>> reverb (-R)
>> chorus (-C)
>> General MIDI bank
>>
>> So I was 
thinking of a shell
>> script or C program I may write,
>> triggered by an appropriate physical input (I can do that, I 
have
>> plenty GPIOs on the
>> board).
>> The program/script should "talk" to Fluidsynth server and change some
>> 
settings in realtime, without restarting
>> it (a brief pause is OK).
>>
>> I've read the documentation, and from what 
I gather, it should be somehow
>> possible using
>> Fluidsynth API via libfluidsynth.
>> But every example I've found 
creates a new Synth before setting
>> parameters, etc.
>> I
>> don't want to create a new synth: I only want to change 
the settings of
>> the Fluidsynth server which is already running.
>>
>>
>> Is it possible?
>> Any hint, code 
fragment...?
>>
>> Thanks a lot for your patience. :-)
>>
>> Best regards,
>>
>> Fernando
>>
>>
>> Invita i tuoi amici 
e Tiscali ti premia! Il consiglio di un amico vale più
>> di uno spot in TV. Per ogni nuovo abbonato 30 € di premio per 
te e per lui!
>> Un amico al mese e parli e navighi sempre gratis:
>> http://freelosophy.tiscali.it/
>>
>> 
___
>> fluid-dev mailing list
>> fluid-dev@nongnu.org 
>> 
https://lists.nongnu.org/mailman/listinfo/fluid-dev
>>
>




Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di 
uno spot in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui! Un 
amico al mese e parli e navighi sempre gratis: http://freelosophy.tiscali.it/

___
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev


[fluid-dev] R: Re: Re: How to change settings (Reverb, Chorus, Gain, Bank) while Fluidsynth is running as a server (no shell)?

2013-08-11 Thread fcare...@tiscali.it
>If you run FluidSynth with the -s switch it will start up the TCP/IP
>server on port 9800 by default (the shell.port 
setting controls this).
> When making connections to this port (using telnet, netcat, a TCP/IP
>socket, etc) it has the 
same format as the standard FluidSynth console
>shell.

Excellent!

Many thanks to everyone!!

Fernando


Invita i tuoi amici e Tiscali ti premia! Il consiglio di un amico vale più di 
uno spot in TV. Per ogni nuovo abbonato 30 € di premio per te e per lui! Un 
amico al mese e parli e navighi sempre gratis: http://freelosophy.tiscali.it/

___
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev