Advertisement
retrokits

RK002 SP404 test

Jul 7th, 2022
1,817
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. RK002_DECLARE_PARAM(DRUMCHANNEL,1,1,16);
  3.  
  4. byte bankselect=0;
  5.  
  6. boolean RK002_onNoteOn(byte channel, byte key, byte velocity)
  7. {
  8.   if(channel==RK002_paramGet(DRUMCHANNEL)-1){
  9.     RK002_sendNoteOn(channelbank, key, velocity);
  10.     return false;
  11.   }else{
  12.     return true;
  13.   }
  14. }
  15.  
  16. boolean RK002_onNoteOff(byte channel, byte key, byte velocity)
  17. {
  18.   if(channel==RK002_paramGet(DRUMCHANNEL)-1){
  19.     RK002_sendNoteOff(channelbank, key, velocity);
  20.     return false;
  21.   }else{
  22.     return true;
  23.   }
  24. }
  25. boolean RK002_onControlChange(byte channel, byte ccnum, byte ccvalue)
  26. {
  27.   if(channel==RK002_paramGet(DRUMCHANNEL)-1){
  28.     if(ccnum==1){
  29.       channelbank=ccvalue/14;// selects bank 0-9
  30.     }
  31.   }
  32. }
  33.  
  34. void setup()
  35. {
  36. }
  37.  
  38. void loop()
  39. {
  40. }
  41.        
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement