Control-Surface icon indicating copy to clipboard operation
Control-Surface copied to clipboard

Switching presets Roland FP-30X

Open Wallirec opened this issue 1 year ago • 2 comments

`Hello! Please tell me how to use your library and a two-button controller to switch piano presets, there are not many of them, 56 in total. I couldn’t find examples to transfer |MSB|LSB|PC

Wallirec avatar Dec 04 '23 17:12 Wallirec

You could use something like this:

#include <Control_Surface.h>

USBMIDI_Interface midi;

void setup() {
  Control_Surface.begin();
  // Example: select “Ballad piano”
  Control_Surface.sendControlChange(MIDI_CC::Bank_Select, 16);
  Control_Surface.sendControlChange(MIDI_CC::Bank_Select_LSB, 67);
  Control_Surface.sendProgramChange(1); // Or zero, depends on Roland's convention
}

void loop() {
  Control_Surface.loop();
}

tttapa avatar Dec 11 '23 20:12 tttapa

So you want to cycle through the 56 presets using two buttons?
You'll have to use an integer variable that you update whenever a button is pressed: one button increments the variable (or resets it to zero after hitting the maximum setting), the other decrements it (or resets it to the maximum setting when going below zero). Then you look up the corresponding bank and program number in an array, using your variable as index.

tttapa avatar Dec 14 '23 22:12 tttapa