Skip to content

Commit

Permalink
-Fixed #76 Metro disable by MIDI mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
harryhaaren committed Aug 30, 2014
1 parent d4f74b6 commit 8835947
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

-> Fixed metronome MIDI mapping
-> Added metronome volume

1.0.1: Saturday 30th August 2014

-> Updated header graphics
-> CLang static analysis
-> Icon updated & shows
Expand Down
9 changes: 8 additions & 1 deletion src/controller/genericmidi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -842,8 +842,14 @@ Binding* GenericMIDI::setupBinding( cJSON* binding )
tmp->data = dataJson->valueint;

// gets the Action type from the JSON string
tmp->action = Event::getTypeFromName( actionJson->valuestring );
cJSON* activeJson = cJSON_GetObjectItem( binding, "active" );
if ( activeJson )
{
tmp->active = activeJson->valueint;
}

// gets the active bool from the JSON
tmp->action = Event::getTypeFromName( actionJson->valuestring );

// check what our send value should be:
cJSON* sendJson = cJSON_GetObjectItem( binding, "send" );
Expand Down Expand Up @@ -908,6 +914,7 @@ Binding* GenericMIDI::setupBinding( cJSON* binding )
}
else if ( strcmp( actionJson->valuestring, "metronome:active" ) == 0 ) {
tmp->action = Event::METRONOME_ACTIVE;
LUPPP_NOTE("binding metro active event, tmp->active == %i", tmp->active );
}

// check for valid event: otherwise pass
Expand Down

0 comments on commit 8835947

Please sign in to comment.