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

Issue / Question with running messages #24

Open
eugeene opened this issue Jul 28, 2023 · 1 comment
Open

Issue / Question with running messages #24

eugeene opened this issue Jul 28, 2023 · 1 comment

Comments

@eugeene
Copy link

eugeene commented Jul 28, 2023

Hello and thank you for this library! I am currently working on a project where i have a code like this:

`
void onNote(uint8_t channel, uint8_t note, uint8_t velocity, uint16_t timestamp)
{
if (channel == 9) return;

buffer[note] = velocity;

}
`

It basically makes a simple map of notes played in any off the channels except drums (channel 9).

Then let's say I have a simple two track song. One track with a simple hihat running on the drum track and a second track with a simple bass.

When I solo the drums, my buffer dos not get filled, because of the condition. When my bass channel is playing solo. My buffer fills up as it supposed to. Great.

Now when BOTH of the channels play. I always get a 'bleed' from the drum channel into my buffer. The buffer note sometimes get filled by the playing hihat from the drum channel.

I am aware that there is something such as running midi messages, when the message is just 2 bytes long and so the channel stays the same. I looked into your code and presume this is handled very well in your library. I just don't know how to properly debug this. And I don't even know if this might be the issue.

Could you help in any way? Thank you.

@eugeene
Copy link
Author

eugeene commented Jul 30, 2023

Maybe I found the problem. The incoming MIDI data gets often mangled into the 0 channel. For example:

Computer MIDI OUT:
13448518 132:2 Note on 0 55 80
13448518 132:2 Note on 1 60 80
13448518 132:2 Note on 2 51 80

ESP32 MIDI IN:
Note on, channel 0, note 55, velocity 80
Note on, channel 0, note 60, velocity 80
Received data : 92 e1 92 33 50
Note on, channel 2, note 51, velocity 80

Any idea what might cause that?

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

1 participant