Comments (6)
Hi Paul,
I added the necessary classes and a simple example. The four buttons select four piano voices when the first bank is selected, four organ voices when the second bank is selected, and four guitar/bass voices when the third bank is selected. Did I understand your question correctly?
from control-surface.
Hi tttapa,
thank you very much for making that possible and for the fast response. So thats almost what I was looking for. The only other thing now what I don't understand is, how can I send a serial PC command? I understood how to Set the Midi Output to serial but I didn't understand how to send a PC Command in Serial and how to Set the MIDI Channel for that PC command. Sorry for asking so silly questions.
from control-surface.
You can change the channel like this:
Bankable::ManyAddresses::PCButton<3> pcbuttons[]{
{bank,
2, // pin
{{
{Acoustic_Grand_Piano, CHANNEL_7},
{Church_Organ, CHANNEL_4},
{Acoustic_Guitar_Nylon, CHANNEL_11},
}}},
{bank,
3, // pin
{{
{HonkyTonk_Piano, CHANNEL_13},
{Rock_Organ, CHANNEL_1},
{Distortion_Guitar, CHANNEL_16},
}}},
// ...
};
To manually send PC commands, you can do the following:
#include <Control_Surface.h>
HardwareSerialMIDI_Interface midi(Serial1, MIDI_BAUD);
using namespace MIDI_PC;
const uint8_t programs[] = {
Acoustic_Grand_Piano,
Church_Organ,
Electric_Bass_Pick,
};
void setup() {
midi.begin();
}
void loop() {
for (uint8_t program : programs) {
midi.sendPC(CHANNEL_1, program);
delay(500);
}
}
from control-surface.
Thank you again for the quick response. I don't know if you understood my second question. I want to use the PCButton command to send a PC (0,1,2,3...) on a specific Channel over Serial Midi. I tried to change the code that way. Will that code work ?
#include <Control_Surface.h>
HardwareSerialMIDI_Interface midi(Serial, MIDI_BAUD);
Bank<3> bank(4);
IncrementDecrementSelector<3> bankSelector = {bank, {A0, A1}, Wrap::Wrap};
using namespace MIDI_PC;
Bankable::ManyAddresses::PCButton<3> pcbuttons[] = {
{bank,
2, // pin
{{
{0, CHANNEL_1},
{1, CHANNEL_1},
{2, CHANNEL_1},
}}},
{bank,
3, // pin
{{
{3, CHANNEL_1},
{4, CHANNEL_1},
{5, CHANNEL_1},
}}},
{bank,
4, // pin
{{
{6, CHANNEL_1},
{7, CHANNEL_1},
{8, CHANNEL_1},
}}},
{bank,
5, // pin
{{
{9, CHANNEL_1},
{10, CHANNEL_1},
{11, CHANNEL_1},
}}},
};
void setup() {
Control_Surface.begin();
}
void loop() {
Control_Surface.loop();
}
from control-surface.
That looks fine, at first glance.
from control-surface.
Okay, thank you for your help.
from control-surface.
Related Issues (20)
- Bankable::ManyAddresses::CCAbsoluteEncoder HOT 2
- Time Display does not work.
- Does it's support ESP32-S3/C3 via USB port? HOT 7
- How to use 1 shift button to change bank:
- The sketch compiles, but doesn't work HOT 3
- Arduino UNO R4 support and testing HOT 3
- Arduino Yun HOT 2
- Trying to setVelocity for all notebutton values in mux with piezo device HOT 1
- External app/webpage to change CC and Channel values HOT 1
- Hi, I would like to see the USBMIDI_Interface adapted so that you can specify the fixed cablenumber. This would it make possible to use pipes and filters connecting serial ports with virtual usb ports
- Support for MCP23S17 SPI
- error: 'SelectorPC' does not name a type HOT 2
- Switching presets Roland FP-30X HOT 2
- TYPO IN DOCUMENTATION HOT 1
- Error running on M1 Mac Sonoma with Teensy 4.0 HOT 4
- Arduino Nano 33 BLE Support? HOT 3
- Пример CCIncrementDecrementButtons.ino HOT 10
- Select bank HOT 2
- MIDI-монитор-OLED HOT 3
- Arduino Giga R1 Wifi support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from control-surface.