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

Newb question: How to change instruments? #82

Closed
anchpop opened this issue Mar 20, 2021 · 1 comment
Closed

Newb question: How to change instruments? #82

anchpop opened this issue Mar 20, 2021 · 1 comment

Comments

@anchpop
Copy link

anchpop commented Mar 20, 2021

I've been reading this page and getting quite confused.

The concept of channels is central to how most MIDI messages work. A channel is an independent path over which messages travel to their destination. There are 16 channels per MIDI device. A track in your sequencer program plays one instrument over a single channel. The MIDI messages in the track find their way to the instrument over that channel.

What does this mean in terms of Midir? MidiOutputConnection doesn't seem to have any way of switching channels, so my first thought was that I just needed to make 16 calls to midi_out.connect(out_port, channel_name) to get 16 connections to send notes through. But connect consumes midi_out so that doesn't seem to work.

Sorry for asking such a newb question in here but I'm really confused, haha. Any help?

@anchpop
Copy link
Author

anchpop commented Mar 21, 2021

Oh I see, the first nybble of 0x90 represents the channel (NOTE_ON_MSG in the example)

@anchpop anchpop closed this as completed Mar 21, 2021
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