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
- Error when compiling for ESP32 S3 HOT 3
- Metronome Led HOT 3
- BANKS WITH MULTIPLE BUTTON FUNCTION HOT 1
- Using Control Surface with Teensy 4.1 board HOT 3
- BTstackBackgroundBackend connection issue HOT 6
- Map on Filtered Analog HOT 3
- Setting CCPotentiometer range HOT 3
- Piezoelectric velocity pads HOT 1
- Sticky On Note HOT 1
- Pitch Bend Doesn't Send Zero At Center (Sends +8) HOT 4
- Setting the range of the pitch bend joystick
- Пример CCIncrementDecrementButtons.ino HOT 10
- Select bank HOT 2
- MIDI-монитор-OLED HOT 3
- Arduino Giga R1 Wifi support HOT 3
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.