Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching presets Roland FP-30X #981

Closed
Wallirec opened this issue Dec 4, 2023 · 2 comments
Closed

Switching presets Roland FP-30X #981

Wallirec opened this issue Dec 4, 2023 · 2 comments

Comments

@Wallirec
Copy link

Wallirec commented Dec 4, 2023

`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

@tttapa
Copy link
Owner

tttapa commented Dec 11, 2023

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
Copy link
Owner

tttapa commented Dec 14, 2023

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.

@Wallirec Wallirec closed this as completed Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants