Skip to content

Instantly share code, notes, and snippets.

@bradygaster
Last active December 21, 2021 23:47
Show Gist options
  • Save bradygaster/c2ff5b2b0a4e6c73dbde5f1e7f41c2c0 to your computer and use it in GitHub Desktop.
Save bradygaster/c2ff5b2b0a4e6c73dbde5f1e7f41c2c0 to your computer and use it in GitHub Desktop.
#include <RK002.h>
RK002_DECLARE_INFO("BeatStep Pro to Digitakt 1.3","[email protected]",".1","01bbe92b-f211-46e0-b635-c591254251b6")
boolean RK002_onNoteOn(byte channel, byte key, byte velocity)
{
if(channel == 0)
{
if(key == 24)
{
RK002_sendNoteOn(0, key+14, velocity);
}
if(key == 25)
{
RK002_sendNoteOn(1, key+14, velocity);
}
if(key == 26)
{
RK002_sendNoteOn(2, key+14, velocity);
}
if(key == 27)
{
RK002_sendNoteOn(3, key+14, velocity);
}
if(key == 28)
{
RK002_sendNoteOn(4, key+14, velocity);
}
if(key == 29)
{
RK002_sendNoteOn(5, key+14, velocity);
}
if(key == 30)
{
RK002_sendNoteOn(6, key+14, velocity);
}
if(key == 31)
{
RK002_sendNoteOn(7, key+14, velocity);
}
return false; // changed midi output so mute original
}else{
return true; // forward original midi
}
}
boolean RK002_onNoteOff(byte channel, byte key, byte velocity)
{
if(channel == 0)
{
if(key == 24)
{
RK002_sendNoteOff(0, key+14, velocity);
}
if(key == 25)
{
RK002_sendNoteOff(1, key+14, velocity);
}
if(key == 26)
{
RK002_sendNoteOff(2, key+14, velocity);
}
if(key == 27)
{
RK002_sendNoteOff(3, key+14, velocity);
}
if(key == 28)
{
RK002_sendNoteOff(4, key+14, velocity);
}
if(key == 29)
{
RK002_sendNoteOff(5, key+14, velocity);
}
if(key == 30)
{
RK002_sendNoteOff(6, key+14, velocity);
}
if(key == 31)
{
RK002_sendNoteOff(7, key+14, velocity);
}
return false; // changed midi output so mute original
}else{
return true; // forward original midi
}
}
void setup()
{
}
void loop()
{
}
/*
* c1 24 c3 48
* c#1 25 c#3 49
* d1 26 d3 50
* d#1 27 d#3 51
* e1 28 e3 52
* f1 29 f3 53
* f#1 30 f#3 54
* g1 31 g3 55
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment