use calculation in class member

main
Georg Krause 2018-04-02 22:09:59 +02:00
parent 61b162cd30
commit 56fcb8a7c0
3 changed files with 8 additions and 3 deletions

View File

@ -546,8 +546,7 @@ void GenericMIDI::midi(unsigned char* midi)
jack->getLogic()->tapTempo();
break;
case Event::TIME_BPM:
// FIXME: quick-fix for "ZeroOne" type value -> BPM range
jack->getLogic()->setBpm( value * (MAX_TEMPO - MIN_TEMPO) + MIN_TEMPO );
jack->getLogic()->setBpmZeroOne( value );
break;
case Event::METRONOME_ACTIVE:
jack->getLogic()->metronomeEnable( b->active );

View File

@ -41,6 +41,11 @@ void Logic::setBpm(float bpm)
jack->getTimeManager()->setBpm( bpm );
}
void Logic::setBpmZeroOne(float bpm)
{
jack->getTimeManager()->setBpmZeroOne( bpm );
}
void Logic::metronomeEnable(bool b)
{
jack->getMetronome()->setActive(b);

View File

@ -42,7 +42,8 @@ public:
Logic();
void tapTempo();
void setBpm(float bpm); /// 0-1 input
void setBpm(float bpm); // actual BPM input
void setBpmZeroOne( float bpm ); /// 0-1 input
void metronomeEnable(bool b);