fluid-dev
[Top][All Lists]
Advanced

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

[fluid-dev] Changing sequencer time-scale


From: Jeroen Neve
Subject: [fluid-dev] Changing sequencer time-scale
Date: Wed, 23 Dec 2020 21:59:51 +0000

Hello All,

 

 

In my proof of concept, I have the following code:

 

/* callback of the sequencer */

void sequencer_callback(unsigned int time, fluid_event_t* ev, fluid_sequencer_t* seq, void* pdata) {

 

       printf("%d\n", fluid_sequencer_get_tick(seq));

 

       fluid_sequencer_set_time_scale(seq, 500.0); // 500 ticks per second - i.e.: slow down

 

       printf("time-scale changed!\n");

 

       printf("%d\n", fluid_sequencer_get_tick(seq));

}

 

The sequencer runs at the default 1000 ticks/s (of rendered sound-output), and in the call-back I scheduled at 2400 ticks, I change the time-scale (representing a tempo change in the music)

 

The output here is:

2400

time-scale changed!

1200

 

It looks like that when the I change the time-scale that this also impacts the current tick of the sequencer.

Is there a way around this?

 

This may be relevant: fluid_sequencer_set_time_scale causes timing problems · Issue #195 · FluidSynth/fluidsynth · GitHub

 

 

Regards,

Jeroen Neve

 


reply via email to

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