Merge pull request #211 from georgkrause/sanitycheck

found two more hard coded bpm limits, thanks @georgkrause!
This commit is contained in:
Harry van Haaren 2018-04-02 01:02:19 +01:00 committed by GitHub
commit 61b162cd30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -82,7 +82,7 @@ void TimeManager::setBpm(float bpm)
void TimeManager::setBpmZeroOne(float b)
{
setBpm( b * 160 + 60 ); // 60 - 220
setBpm( b * (MAX_TEMPO - MIN_TEMPO) + MIN_TEMPO ); // 60 - 220
}