fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] fluidsynth as server won't load config file


From: Srijan Deshpande
Subject: Re: [fluid-dev] fluidsynth as server won't load config file
Date: Mon, 15 Feb 2016 15:06:47 +0530

Hello,

Sorry about replying to this so late! I had to travel suddenly and had to put my project on hold for a while. I'm back on it now, though.

Thanks for your suggestions. I'm going to try using a crontab to see if that solves the problem. To answer your question, yes I've set the $FSCONFIG variable. The funny thing is that if I run the script manually from the shell after boot, everything works fine! It just doesn't load the config file at boot. And no, fslog.txt has nothing useful :(

So I had another unrelated question that I'm wondering if you can help me with

My setup is like this: 

I've defined multiple tunings in the configuration file using the following commands: 
tuning TuningOne 0 0
tuning TuningTwo 0 1
This creates two tunings, 'TuningOne' on bank 0, prog 0 and 'TuningTwo' on bank 0, prog 1.
Now I can select the tuning I want using settuning. So eg: 
settuning 0 0 0 will select the tuning on prog 0, bank 0, for channel 0;
settuning 0 0 1 will select the tuning on prog 1, bank 0, for channel 0;


Now, my sound font has two presets, one is set to bank 0, prog 0 and the other to bank 0, prog 1.
In the fluidsynth shell, I can use the select command to correctly select the preset I need to use. The command is [select chan sfont bank prog]. 
So 'select 0 1 0 0' selects preset 0 on bank 0 for sfont 1 on channel 0;
So 'select 0 1 0 1' selects preset 1 on bank 0 for sfont 1 on channel 0; 

BUT, using the select command to change the preset DOES NOT change the tuning. If I use the select command to select preset 1, shouldn't the tuning already assigned to preset 1 be selected as well? Are there two sets of of banks/progs? How does all this fit together?

Or have I not understood how this works at all?

Thanks!
Srijan




On 3 February 2016 at 22:21, Ben Gonzales <address@hidden> wrote:
Hi Srijan.

Your project sounds challenging! Is latency an issue for you? Everyone says it will be, but I haven't found it to be a problem. Maybe wind players expect some anyway? It may be different for a keyboard.

A few suggestions:

1. Starting from /etc/rc.local means that the script runs as root. I don't know if that is causing the problem, but I use crontab (as user pi) to set up a cron job with the following line:
@boot /home/pi/<my_script>

2. In the line from your script:
fluidsynth --verbose --server --no-shell --audio-driver=alsa --load-config=$FSCONFIG /home/pi/soundfont.sf2 &>/home/pi/fslog.txt &
I assume you're setting the variable $FSCONFIG somewhere? It is not in the script.

3. Your config file has # comments. Are they allowed in a fluidsynth config file?? Although, I note that you say you have had it running, so maybe they are ok.

4. Does the fslog.txt have any useful info?

Ben


On 04/02/16 00:09, Srijan Deshpande wrote:
Dear Ben, 

Thank you for your email and sorry about the delayed response.
I tried using the syntax you've used, but the problem persists. Everything works except the loading of the configuration file. The funny thing is, if I run the same script manually after boot, the config file loads fine! I tried it with and without sudo, but it just doesn't work.

I have a feeling this has something to do with the way the script is executed. I'm running it by putting its path in /etc/rc.local
Do you think that's where the problem could be? 

Incidentally, the config file I'm using is a tuning file which I'm using to load a specific tuning into fluidsynth. I'm attaching both the script and the config file for your reference.

To answer your question, I'm using a korg microkey keyboard controller and a HiFiberry DAC+. I looked at your EWI-Pi project and it looks awesome! This is actually similar to what I'm trying to do. I'm trying to build a similar self-contained instrument capable of playing certain custom tunings. I'm using a  keyboard instead of an EWI, of course.

Thanks for your help!
Srijan



On 2 February 2016 at 09:31, Ben Gonzales <address@hidden> wrote:
Hi Srijan

I use the the following options and it works well on my Rpi:
fluidsynth --server  --no-shell --audio-driver=alsa -o audio.alsa.device=hw:$CARDNO  --load-config=$CONFIG --portname="$SYNTHPORT" &>/tmp/fluidsynth.out &

$CARDNO and $SYNTHPORT re variables I set.

Any reason you're running it sudo? I run as pi and it's fine.

If you put the --verbose option in, you can more easily see if there are problems. Maybe there's a problem with the config file syntax??

You can kill the synth with
(sudo) killall fluidsynth

What instrument are you using to control the synth, and what soundcard?

Ben

http://projects.gonzos.net


On 02/02/16 14:11, Srijan Deshpande wrote:
Hello, 

I'm using a script to run fluidsynth at boot as a server and without the shell (using -is) on my raspberry pi. I'm also giving it a configuration file using the -f flag. 

Fluid synth starts properly and loads the sound font just fine, but whatever I do, it just doesn't load the config file. 

My script is like this:
#!/bin/bash
# Script to start FluidSynth & aconnect
echo Attempting to start FluidSynth
sudo fluidsynth -f /home/pi/config.txt -a alsa -is /home/pi/soundfont.sf2 &
sleep 10
aconnect 20:0 128:0

How do I get it to load the config file? Any suggestions?

Another question: In this case, I can only access the fluidsynth shell using telnet. So how do I quit fluidsynth? If I use the 'quit' command, it quits telnet, but fluid synth keeps running!

Thanks!
Srijan


_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev




_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev


_______________________________________________
fluid-dev mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fluid-dev



reply via email to

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