-Fixed BPM session load issue
This commit is contained in:
parent
840d0710d9
commit
a4b216f9a1
3 changed files with 8 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
|||
static void gmastertrack_tempoDial_callback(Fl_Widget *w, void *data)
|
||||
{
|
||||
Avtk::Dial* b = (Avtk::Dial*)w;
|
||||
float bpm = b->value();
|
||||
float bpm = b->value() * 160.f + 60;
|
||||
EventTimeBPM e = EventTimeBPM( bpm );
|
||||
writeToDspRingbuffer( &e );
|
||||
}
|
||||
|
|
|
@ -38,16 +38,19 @@ int TimeManager::getFpb()
|
|||
return fpb;
|
||||
}
|
||||
|
||||
|
||||
void TimeManager::setBpm(float b)
|
||||
void TimeManager::setBpm(float bpm)
|
||||
{
|
||||
float bpm = b * 160 + 60; // 60 - 220
|
||||
#ifdef DEBUG_TIME
|
||||
LUPPP_NOTE("%s %f","setBpm()",bpm);
|
||||
#endif
|
||||
setFpb( samplerate / bpm * 60 );
|
||||
}
|
||||
|
||||
void TimeManager::setBpmZeroOne(float b)
|
||||
{
|
||||
setBpm( b * 160 + 60 ); // 60 - 220
|
||||
}
|
||||
|
||||
|
||||
void TimeManager::setFpb(float f)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,7 @@ class TimeManager
|
|||
|
||||
int getFpb();
|
||||
void setBpm(float bpm);
|
||||
void setBpmZeroOne(float bpm);
|
||||
void setFpb(float f);
|
||||
|
||||
void registerObserver(TimeObserver* o);
|
||||
|
|
Loading…
Reference in a new issue