Skip to content

Commit

Permalink
CLAP_NOTE velocity is 0..1; adjust auv2 (#182)
Browse files Browse the repository at this point in the history
When auv2 gets raw midi and convertsit to clap notes
make sure the velocity is correct
  • Loading branch information
baconpaul authored Oct 22, 2023
1 parent 78d9888 commit a0679c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/detail/auv2/process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ void ProcessAdapter::addMIDIEvent(UInt32 inStatus, UInt32 inData1, UInt32 inData
n.note.port_index = 0;
n.note.note_id = -1;
n.note.key = (inData1 & 0x7F);
n.note.velocity = (inData2 & 0x7F);
n.note.velocity = 1.f * (inData2 & 0x7F) / 127.f;
n.note.channel = channel;
this->_eventindices.emplace_back((this->_events.size()));
this->_events.emplace_back(n);
Expand All @@ -473,7 +473,7 @@ void ProcessAdapter::addMIDIEvent(UInt32 inStatus, UInt32 inData1, UInt32 inData
n.note.port_index = 0;
n.note.note_id = -1;
n.note.key = (inData1 & 0x7F);
n.note.velocity = (inData2 & 0x7F);
n.note.velocity = 1.f * (inData2 & 0x7F) / 127.f;
n.note.channel = channel;
this->_eventindices.emplace_back((this->_events.size()));
this->_events.emplace_back(n);
Expand Down

0 comments on commit a0679c8

Please sign in to comment.