Skip to content

DIN MIDI AND BLE MIDI use at the same time #310

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

Closed
vamix2012 opened this issue Nov 23, 2022 Discussed in #309 · 3 comments
Closed

DIN MIDI AND BLE MIDI use at the same time #310

vamix2012 opened this issue Nov 23, 2022 Discussed in #309 · 3 comments

Comments

@vamix2012
Copy link

Discussed in #309

Originally posted by vamix2012 November 23, 2022
I use the MIDI Library with my midi controller and I am using esp32, I tried hard to achieve
DIN MIDI OUT and BLE MIDI OUT at the same time,
One is working and the second one is not, can you guide me please maybe I understood something wrong, is that even possible?

I tried to use this

MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, SERIAL_MIDI_OUTPUT);
BLEMIDI_CREATE_INSTANCE("Midi Fun", MIDI);

on the setup....

  MIDI.begin(MIDI_CHANNEL_OMNI);
  SERIAL_MIDI_OUTPUT.begin(MIDI_CHANNEL_OMNI);

and then used it in the code like this

    MIDI.sendControlChange(CC_Expression, expression, 3);
SERIAL_MIDI_OUTPUT.sendControlChange(CC_Expression, expression, 3);

The BLE works well but the serial midi is not outputting anything

can you please help me with that? maybe is something simple, I am stuck on this.

Thanks in advance
Cristian

@franky47
Copy link
Member

Maybe look into #290 ? Looks like you may need to use Serial2.

@vamix2012
Copy link
Author

I've tried to use the Serial2 but it still does not work, the BLE is working fine while I get no output from the Serial Port, I have to mention that I tried also reassigning the TX pin but that didn't work as well, do you think is there some way to set the Serial Midi out on it's original TX

Like MIDI_CREATE_DEFAULT_INSTANCE();

And configure the ble instance on other way?

I have to mention that I use the wrover-e module which does not have the pins for rx1,tx1 and rx2,tx2 exposed....

@vamix2012
Copy link
Author

vamix2012 commented Nov 24, 2022

I inverted the two lines where the midi instances are initialized as following:

MIDI_CREATE_DEFAULT_INSTANCE();
BLE_CREATE_INSTANCE("NAME", BLMIDI);

Sidenote: BLEMIDI does not work because some naming conflicts I guess, that's why is BLMIDI

THEN

MIDI.begin();
BLMIDI.begin();

It works like this when serial midi is default initialized and the BLE or USB are initialized with something other than MIDI.

Thanks for the tips, helped me to look at the problem from other perspective.

Best Regards
Cristian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants