fluid-dev
[Top][All Lists]
Advanced

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

Re: [fluid-dev] Fluid_synth_write and sequencer queries


From: sqweek
Subject: Re: [fluid-dev] Fluid_synth_write and sequencer queries
Date: Fri, 2 May 2014 08:31:12 +0800

On 30 April 2014 23:38, David Henningsson <address@hidden> wrote:
>> I have it working, but I haven't quite grasped _which_ samples the
>> fluid_synth_write call returns.
>
> Well, if you first call fluid_synth_note_on, and after that call
> fluid_synth_write_s16, then the note you added will sound from the
> beginning. Does that answer your question?
>
>
>> Secondly, my crude implementation results in some midi events being
>> triggered up to 4095 frames too early or too late; the plan is to use
>> fluid-synth's sequencer API to fix this.
>
>
> Right, you can do this because the sequencer supports "sample timers" which
> is an internal concept that makes it possible for the sequencer to insert
> note events "in the middle" of calls to fluid_synth_write_*.
>
> However, it's probably easier for you to just call fluid_synth_write_* with
> just 64 samples at a time, and start your notes between the right two calls
> to fluid_synth_write_*. That would give you the same granularity as is being
> used internally in fluidsynth.

Ah, very interesting! Does this imply that the samples aren't
synthesized until fluid_synth_write is called?

Is 64 samples just an example number or is there something special
about this block size? If so, is that 64 total samples including both
channels (ie. 32 frames) or 64 samples per channel?

Thanks for the suggestion, I would never have thought of this approach!
-sqweek



reply via email to

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