CigarroPuro

Untitled

Mar 2nd, 2021
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Control_Surface.h>  //Program--include library-- then select "control surface" library..Vamos a programar el codigo con la librería Control Surface
  2. USBMIDI_Interface usbmidi;    //initializes device as usb_midi interface...see other examples like hardwareserial,hairles etc
  3.  
  4. Bank<2> bank(3); // A bank with three channels, and 2 bank settings..creamos dos bancos con dos ajustes distintos..el intervalo de cambio entre los valores sera de +-3
  5. Bank<2> bank2(3);
  6.  
  7.  
  8. CCPotentiometer potentiometer6 = { A4, {42, CHANNEL_6} };
  9. CCPotentiometer potentiometer7 = { A5, {43, CHANNEL_7} };
  10. CCPotentiometer potentiometer8 = { A6, {44, CHANNEL_8} };
  11. CCPotentiometer potentiometer9 = { A7, {45, CHANNEL_9} };
  12. CCPotentiometer potentiometer10 = { A8, {46, CHANNEL_10} };
  13. CCPotentiometer potentiometer11 = { A9, {47, CHANNEL_11} };
  14. CCPotentiometer potentiometer12 = { A10, {48, CHANNEL_12} };
  15. CCPotentiometer potentiometer13 = { A11, {49, CHANNEL_13} };
  16. CCPotentiometer potentiometer14 = { A12, {50, CHANNEL_14} };
  17. CCPotentiometer potentiometer15 = { A13, {51, CHANNEL_15} };
  18. CCPotentiometer potentiometer16 = { A14, {MIDI_CC::Channel_Volume, CHANNEL_16} };
  19.  
  20. /*CCButtonLatched buttons[] {  
  21.  {5, 90},
  22.  {6, 91},  
  23. };*/
  24.  
  25. CCButtonLatched button7 = { 7, {30, CHANNEL_1}, };  
  26. CCButtonLatched button8 = { 8, {31, CHANNEL_1}, };
  27. CCButtonLatched button9 = { 9, {32, CHANNEL_1}, };  
  28. CCButtonLatched button10 = { 10, {33, CHANNEL_1}, };
  29. CCButtonLatched button11 = { 11, {34, CHANNEL_1}, };    
  30. CCButton button12 = { 12, {MIDI_CC::General_Purpose_Controller_8, CHANNEL_1}, };
  31.  
  32. Bankable::CCPotentiometer pots[] = {
  33.  
  34.   {bank, A0, 67},
  35.   {bank, A1, 68},
  36.   {bank, A2, 69},
  37.   };
  38. //IncrementSelector<2> selector { bank, 2, };
  39.  
  40.  
  41.  
  42.  
  43. Bankable::CCButtonLatched<2> button5 { bank2, 5, 90, };
  44. Bankable::CCButtonLatched button6 { bank2, 6, 91, };
  45. IncrementDecrementSelector<2> bankselector = {bank, {2, 3}};
  46. IncrementDecrementSelector<2> bankselector2 = {bank2, {2, 3}};
  47. void setup() {
  48.   Control_Surface.begin();
  49. }
  50. void loop() {
  51.   Control_Surface.loop();
  52. }
  53.     
Advertisement
Add Comment
Please, Sign In to add comment