-
Notifications
You must be signed in to change notification settings - Fork 164
Closed
Description
Hi Pieter,
I cannot receive data on a virtual cable_2. I can send on all virtual cables but only receive on cable_1.
I have a pi pico with MIDI over USB (with Adafruit TinyUSB-Stack). It works fine. Now I want to use a second virtual port on the device. So I found this to activate the second cable:
midi.backend.backend.setCables(2);
I can send Values over the cable_2. For example:
midi.sendNoteOn({MCU::PLAY, Cable_2}, 0x7F);
But I don't get anything back. I tried with NoteValue:
NoteValue playObj{ {MCU::PLAY, Cable_2} };
To reproduce it I tried the examples sketch: 9. Note-FastLED.ino. Again: Works with cable_1 and doesn't with cable_2
#include <FastLED.h>
// Must be before Control Surface to enable FastLED features of Control Surface
#include <Control_Surface.h>
// Define the array of leds.
Array<CRGB, 8> leds {};
// The data pin with the strip connected.
constexpr uint8_t ledpin = 22;
USBMIDI_Interface midi;
// Create a MIDI input element that listens to all notes in the range C4 - G4
// (the range starts at C4 and has a length equal to `leds.length` == 8).
NoteRangeFastLED<leds.length> midiled {leds, {MIDI_Notes::C[4], Channel_1, Cable_2}};
void setup() {
midi.backend.backend.setCables(2);
// See FastLED examples and documentation for more information.
FastLED.addLeds<NEOPIXEL, ledpin>(leds.data, leds.length);
FastLED.setCorrection(TypicalPixelString);
midiled.setBrightness(128);
Control_Surface.begin();
}
void loop() {
Control_Surface.loop();
if (midiled.getDirty()) { // If the colors changed
FastLED.show(); // Update the LEDs with the new colors
midiled.clearDirty(); // Clear the dirty flag
}
}
Can you help me?
Metadata
Metadata
Assignees
Labels
No labels