[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [fluid-dev] File output with FluidSynth API
From: |
Felix Krause |
Subject: |
Re: [fluid-dev] File output with FluidSynth API |
Date: |
Thu, 11 Mar 2010 13:14:11 +0100 |
On 06.03.2010, at 19:09, David Henningsson wrote:
> Felix Krause wrote:
>> On 04.03.2010, at 09:21, David Henningsson wrote:
>>> So the FS command (fluidsynth -a file -i -n -T wav -o
>>> audio.file.name=output.wav soundfont.sf2 midifile.mid) still just
>>> produces a 4 KB file? It works here.
>>
>> Yes, I still get a 4KB file.
>
> Does it exit immediately or after the midi file has completed? That is,
> if the midi file is two minutes long, does it wait two minutes before
> exiting?
Good point, I totally forgot to mention this: fluidsynth never stops.
At least it takes much longer than the midi file actually is, so I have to stop
it with ^C.
> I think either something is wrong with fluid_curtime on MacOSX, or with
> libsndfile. Could you try building it without libsndfile and see if it
> works better?
Without libsndfile, FluidSynth creates a 0KB file.
> For the former problem I think a debug print in fluid_file_audio_run_s16
> might be helpful, something like:
>
> /.../
> sample_time = (unsigned int) (dev->samples / dev->sample_rate * 1000.0);
> fprintf(stderr, "Sample_time = %d, clock_time = %d\n", sample_time,
> clock_time);
>
> if (sample_time > clock_time) {
> return 1;
> }
> /.../
>
> A debug print of the delay variable in fluid_timer_run might also be
> helpful (just before the call to g_usleep).
Here's what I got as debug output when rendering to a wave file with libsndfile:
Sample_time = 0, clock_time = 0
delay = 1
Sample_time = 1, clock_time = 0
delay = 2
Sample_time = 1, clock_time = 0
delay = 3
Sample_time = 1, clock_time = 0
delay = 4
Sample_time = 1, clock_time = 0
delay = 5
Sample_time = 1, clock_time = 0
delay = 6
Sample_time = 1, clock_time = 0
delay = 7
Sample_time = 1, clock_time = 0
delay = 8
Sample_time = 1, clock_time = 0
delay = 9
Sample_time = 1, clock_time = 0
delay = 10
... and so on
I hope this helps.
Cheers,
Felix
- Re: [fluid-dev] File output with FluidSynth API, Felix Krause, 2010/03/02
- Re: [fluid-dev] File output with FluidSynth API, David Henningsson, 2010/03/04
- Re: [fluid-dev] File output with FluidSynth API, Felix Krause, 2010/03/05
- Re: [fluid-dev] File output with FluidSynth API, David Henningsson, 2010/03/06
- Re: [fluid-dev] File output with FluidSynth API,
Felix Krause <=
- Re: [fluid-dev] File output with FluidSynth API, David Henningsson, 2010/03/11
- Re: [fluid-dev] File output with FluidSynth API, Felix Krause, 2010/03/11
- Re: [fluid-dev] File output with FluidSynth API, Pedro Lopez-Cabanillas, 2010/03/17
- Re: [fluid-dev] File output with FluidSynth API, David Henningsson, 2010/03/17