Hi Andrew! Just circling back to learn about how to implement MIDI programs and banks into my laser synth, now that I have fully functional image generators running a preset array and controllable via custom mapping to an OTC APC40 MIDI desk. Both connect to Cakewalk via PocketMIDI. Using PureData for a touchscreen GUI and visual feedback for frequencies, gains, etc. Thanks again for your great MIDI series. 👍😎
If I understood correctly, Poly pressure is relevant for those keyboards, controllers that have a triple sensor, electric pianos, etc. It is connected to the After touch control, for each key separately! Andrew, correct me if I'm wrong!
Great series! Are you going to discuss NRPNs? I’m working on a controller with encoders and really like the NRPN increment and decrement messages. Unfortunately I can’t find much info on this. Seems like a great fit to send inc/dec for an encoder (a stateless controller) as opposed to an absolute value for a pot.
I know this is an old video, but as I get more into the nuts and bolts of midi specifications I have this one thought pop up. If Poly Pressure existed from the beginning, why isn't it ever really used and why is MPE needed? I love MPE and I think it's incredible that this is still being used and updated, but damn they intended that 40 years ago lol
I think it's more of a "we want to invent something brand new!" situation. MIDI has never been fully exploited, and I wish the MIDI 2.0 people had extended MIDI 1.0 instead of designing a huge and complex new standard.
For those of you using a yamaha keyboard to control its built in soumds from a DAW, from my experience fast control change messages go through smoothly. Just figured id share that becuase some people actually use their keyboard as a sound module like I do.
Hey there, I built an iOS-game that takes MIDI note on and note off messages as its input. Recently users of Yamaha 775 and 785 reported that my app is not working correctly. After building a tool that reads out MIDI information on their pianos I noticed they send poly pressure instead of note on messages... Additionally they send control changes on controllers 19 and 88. How would you interpret this data? Help is much appreciated. Thanks!
I have a problem. I am working on a very simple Arduino-based MIDI sending device. I wanted it to be microtonal so I've implemented it based only on the note on/off and pitch bend. The analog input 1st bends the pitch until it's high enough that a next note is triggered. In order to have a continuous sound I've used a loop with the constant note on/off cycles in 5ms intervals. This clearly isn't the ideal solution... My DAW (Pro Tools) sometimes gets lost in the on/off flood and sometimetimes misses that a note has been turned off. It quickly changes into a cacophonic polyphony of all the possible notes playing together. Is there a better solution for a continuous, monophonic signal that changes the notes and pitchbends more or less in a smooth manner? Im at the very begginning level so I'd appreciate something simple.
Yes, it's called CV. :) Although you shouldn't really be losing MIDI messages, it's a bit tricky to use MIDI for what you're doing. Make sure you send your data at a reasonable rate so you don't overload the receiving side, or even your arduino internally.
@@shiftedphase Thanks! :) Im not really going to switch to CV with my project due to the compatibility issues. As long as I stay monophonic I should be able to do with pitch bends. I guess the 5ms message intervals shouldnt really oversaturate the DIN MIDI so the issue must be hiding somewhere in my code or on the DAW side perhaps. Right now I kinda suspect it might be that Arduino by default doesn't keep the signal cable on 5V while idle (??). If this is the case then maybe some of the messages lose their header bit and thus are not recognized. If this is true though one thing confuses me. Wouldn't that mean, that all my messages were inverted so far? Like all the 0s were 1s etc. How would any message be understood then? I need to investigate that.
@@bzqp2 If you get any reliable communication at all the signal is not inverted. If you're using the default Arduino stuff then you need to watch out for how big the internal buffers are, etc. Their setup works fine for simple projects but real MIDI gear is not made like this... there is usually a timer that runs all the important stuff at a very fixed rate. I use intervals of 1ms, or 250us or similar in my projects. Having a fixed interval makes it possible to not only throttle sending speed accurately, but also do stuff like filtering of analog data. Digital filters rely on having a fixed samplerate. As I'm sure you're learning, the basic concepts are pretty easy to implement, but the tweaking and details like I mention are really the time-consuming part of making stuff that "feels" good. Keep going and you'll get it working like you want!
0x9n what values does "x" take? Is that the value of the note? If the notes have a value of 0-127, then it is in HEX code 00-7FG? My question is what does the "x" stand for?
Great series thank you. Any chance you could briefly illustrate (byte string) composed of a Program Change using Bank Select MSB and Bank Select LSB then PC? What would the midi byte stream look like? 3bytes + 3bytes + 2 bytes? Once the MSB/LSB are set, then PC 0-127 can inc/dec though selected bank until new Bank Select (LSB or MSB) is sent? Thank you.
Hi Andrew thanks tons for your videos ! can you tell me what using an inputhandler call back does that is different from the standard way midi apps handle inbound messages? - can you pretend I'm dumb as shit and explain accordingly because I don't get it at all? Thanks!
There is no standard way to receive messages in a program. This is broader than just MIDI btw. The two ways of handling input are polling and interrupt. (callbacks) If you use a callback the system will call your chosen function when there is new data. With polling you just check periodically to see if there is anything new. If you give me more info of what you are doing I can probably explain it in more detail.
@@shiftedphase I am using blender, which allows me to run python scripts, I can run a script in blender to see inbound midi data in the blender console, that works fine. The problem is if you loop either polling or callback it locks the blender UI till the script finishes, which of course doesn't happen when your forever waiting for inbound midi messages. I think maybe I was under the misconception the callback method which is called non-blocking would not lock the blender UI. If you have any thoughts please let me know? I'm guessing I have to do something with threading but I dont really have a clue- onward ho! Thanks for getting back to me
@@stephen285 I highly suspect you cannot block in your script. Web works this way too... you need to think about designing your code to do something with the MIDI data and return right away. If you need to do something regularly (not only when you get MIDI data) you can probably register a timer callback also. Use some variables or a proper type of state machine to keep track of the state of your program so that every time MIDI data comes in, or your timer gets called you can check things and decide what to do. A lot of modern programming works this way so good to get familiar with it!
@@shiftedphase Thanks Andrew - I appreciate the help, I will let you know if I figure it out. I know it can be done because there is an addon out there for blender / inbound midi that works without freezing the UI - I'm just not experienced enough in Python to unravel how it was done. Anyway, it will yield if I bang my head on it long enough:) Your a good man Charley Brown - great series!
Pitch bend doesn't work in "cents" it just has a range from centre (no bend), and max up or down. The actual amount of bend depends on the synth that receives the signal. Most synths allow the bend range to be set from 1-12 semitones or more. If you had it set for 1 semitone, you could guess that a value of +2047 (about 1/4 of the full value of +8191) would be 25 cents... but it's not really guaranteed that every synth will respond perfectly like this.
Hello, dear friend,thanks for your information. Now I have a problem so I would like to know if you are willing to help me. I am working with Sibelius software. I use a "Midisport uno" interface. The problem happens when I try to assign midi channels to a different sounds of a Roland GR-20. When I open Sibelius configuration mode and then I assign the numbers of bank and program change number to channel number 1, everything is ok, but when I try to assign the next sound to channel 2, it doesn´t sound any sound when I activate the test function, however, the interface lights, indicating that the message has passed through the interface and get the GR-20, but no sound. The only sound I can get from the GR-20 is the one of channel1. Sorry for my English, my native language is Spanish.
@@rafaeldominguez58 I haven't used either of those products but I would suspect that your GR-20 is not set up for multi-timbral mode. Check to see that it can receive MIDI on multiple channels at the same time. Not all synths can do this, so best to check the manual. Also, if you have another synth you can test it with that.
Explain how a computer is able to play multiple instruments at the same time on an external synth if you need a program change to play another instrument
@@bigblackbadger1 It would be fair to say it receives data for all channels, but only responds to the ones it is programmed to use. Two common cases are: a monotimbral synth (think 80s polysynths) that only makes one kind of a sound at once would only respond on a single channel at a time. Compared with a multi-timbral synth (most 90s and 2000s synth modules and keyboards) which can respond on all 16 channels at once and play different sounds on each channel.
Hello greetings from Chile ... I like your explocatives .per I still can't understand why when I touch the controller keyboard at some point any note is playing indefinitely. As frozen. And the only solution for me so far is reset. Could you guide me?
It sounds like maybe a bad cable. If it's a USB controller, check that first. I've seen that happen a few times over the years only to replace the cable and the problem goes away.
Hi, is it possible you could help me? I have a Boss VF-1 rack unit and would like to control the parameters of the delay patch with my Roland A300-Pro. I'm looking at the MIDI implementation chart for the VF-1, but don't know which hex number represents the CC number I should assign to the MIDI controller in order to control the parameters of the delay time and such...
Try something like this: www.binaryhexconverter.com/hex-to-decimal-converter to convert the numbers from hex to decimal. Some computer calculators have a "programmer" mode that also does this. As for just confirming your understanding, I use this program to quickly test MIDI stuff: www.midiox.com/ You can send and receive messages easily. A quick tip that many devices that can be controlled by MIDI also send those same messages when you turn their knobs. So if you connect the MIDI OUT port to a program like MIDI-OX you can just look at what gets sent for each control and then use that when programming your other device. Hope this helps!
Another great video! When will you post the next one? Also, I have a question about those hexadecimal values for sending note on and ccs: like you said, the first bit for a note on is always 9 and the second bit is the channel number. 0x90 is a note on in channel one as I understand it. How is the specific note conveyed to the controller if it is not specified to the device receiving the MIDI? Say I wanted to send a note on A4 to channel one at velocity 127: I would send the data in hex as 0x90 0x45 0x7F?
Yes, you've got it right! There are sometimes some discrepancies between products regarding octave numbers, but that's pretty easy to sort out by just testing your setup.
Thanks! I've been messing around with rtmidi library and have been making a little program that reads note input and interprets what chord was played. This video was extremely helpful!
Thank for the wonderful series
Excellent Video - Strong, complete, and very clear explanation of this part of the protocol.
Hi Andrew!
Just circling back to learn about how to implement MIDI programs and banks into my laser synth, now that I have fully functional image generators running a preset array and controllable via custom mapping to an OTC APC40 MIDI desk. Both connect to Cakewalk via PocketMIDI. Using PureData for a touchscreen GUI and visual feedback for frequencies, gains, etc.
Thanks again for your great MIDI series. 👍😎
Glad my videos helped you!
Hey Andrew, just wanted to say thank you for taking the time to make these videos. This helps me a lot.
So good! Thank you, kind sir!
Your list saved me from making a list. Thanks.
Glad I could help!
Best video out there I’ve seen on this topic. Thanks for spending the time to make this video dude.
You're welcome! I'll do more when I have time.
Very helpful information! Thanks
Great explanation 🙂
It was really intresting! I was looking for this informations for a long time. Thank you!
If I understood correctly, Poly pressure is relevant for those keyboards, controllers that have a triple sensor, electric pianos, etc.
It is connected to the After touch control, for each key separately!
Andrew, correct me if I'm wrong!
Most pianos and synths do not have poly pressure. More experimental keyboards and a very rare number of synths from the 80s had it.
Thanks for these tutorials. Is it possible to get pdf versions of the custom MIDI-spec pages that you've created in this episode and possibly others?
great video! Thanks for your time and hard work putting these videos together for us! :)
Glad you like them!
Tanks a milion :) Its so useful !!!
You're welcome!
Great series! Are you going to discuss NRPNs? I’m working on a controller with encoders and really like the NRPN increment and decrement messages. Unfortunately I can’t find much info on this. Seems like a great fit to send inc/dec for an encoder (a stateless controller) as opposed to an absolute value for a pot.
Maybe when I have time I will do something about that. Been busy lately. :)
@@shiftedphase We just arrived at Knobcon in Chicago. I was wondering if you were here?
@@legosteveb Sorry I'm not going to be there this time.
Thanks again !
I know this is an old video, but as I get more into the nuts and bolts of midi specifications I have this one thought pop up. If Poly Pressure existed from the beginning, why isn't it ever really used and why is MPE needed? I love MPE and I think it's incredible that this is still being used and updated, but damn they intended that 40 years ago lol
I think it's more of a "we want to invent something brand new!" situation. MIDI has never been fully exploited, and I wish the MIDI 2.0 people had extended MIDI 1.0 instead of designing a huge and complex new standard.
Absolutely Awesome 💯🙌🏽🙌🏽🙌🏽
For those of you using a yamaha keyboard to control its built in soumds from a DAW, from my experience fast control change messages go through smoothly. Just figured id share that becuase some people actually use their keyboard as a sound module like I do.
Good stuff. Thanks Andrew.
0 thumbs down!!! Is this a first? Perfect information, thank you very much
Glad you found it useful!
Hey there, I built an iOS-game that takes MIDI note on and note off messages as its input. Recently users of Yamaha 775 and 785 reported that my app is not working correctly. After building a tool that reads out MIDI information on their pianos I noticed they send poly pressure instead of note on messages... Additionally they send control changes on controllers 19 and 88. How would you interpret this data?
Help is much appreciated. Thanks!
I have a problem. I am working on a very simple Arduino-based MIDI sending device. I wanted it to be microtonal so I've implemented it based only on the note on/off and pitch bend. The analog input 1st bends the pitch until it's high enough that a next note is triggered.
In order to have a continuous sound I've used a loop with the constant note on/off cycles in 5ms intervals. This clearly isn't the ideal solution... My DAW (Pro Tools) sometimes gets lost in the on/off flood and sometimetimes misses that a note has been turned off. It quickly changes into a cacophonic polyphony of all the possible notes playing together.
Is there a better solution for a continuous, monophonic signal that changes the notes and pitchbends more or less in a smooth manner? Im at the very begginning level so I'd appreciate something simple.
Yes, it's called CV. :) Although you shouldn't really be losing MIDI messages, it's a bit tricky to use MIDI for what you're doing. Make sure you send your data at a reasonable rate so you don't overload the receiving side, or even your arduino internally.
@@shiftedphase Thanks! :) Im not really going to switch to CV with my project due to the compatibility issues. As long as I stay monophonic I should be able to do with pitch bends. I guess the 5ms message intervals shouldnt really oversaturate the DIN MIDI so the issue must be hiding somewhere in my code or on the DAW side perhaps. Right now I kinda suspect it might be that Arduino by default doesn't keep the signal cable on 5V while idle (??). If this is the case then maybe some of the messages lose their header bit and thus are not recognized.
If this is true though one thing confuses me. Wouldn't that mean, that all my messages were inverted so far? Like all the 0s were 1s etc. How would any message be understood then? I need to investigate that.
@@bzqp2 If you get any reliable communication at all the signal is not inverted. If you're using the default Arduino stuff then you need to watch out for how big the internal buffers are, etc. Their setup works fine for simple projects but real MIDI gear is not made like this... there is usually a timer that runs all the important stuff at a very fixed rate. I use intervals of 1ms, or 250us or similar in my projects. Having a fixed interval makes it possible to not only throttle sending speed accurately, but also do stuff like filtering of analog data. Digital filters rely on having a fixed samplerate.
As I'm sure you're learning, the basic concepts are pretty easy to implement, but the tweaking and details like I mention are really the time-consuming part of making stuff that "feels" good. Keep going and you'll get it working like you want!
0x9n what values does "x" take?
Is that the value of the note?
If the notes have a value of 0-127, then it is in HEX code 00-7FG?
My question is what does the "x" stand for?
X means "hexidecimal"
Great series thank you. Any chance you could briefly illustrate (byte string) composed of a Program Change using Bank Select MSB and Bank Select LSB then PC? What would the midi byte stream look like? 3bytes + 3bytes + 2 bytes? Once the MSB/LSB are set, then PC 0-127 can inc/dec though selected bank until new Bank Select (LSB or MSB) is sent? Thank you.
I will try to make a video about this.
@@shiftedphase Wow, that would be very useful to your viewers and very generous of you.
Hi Andrew thanks tons for your videos ! can you tell me what using an inputhandler call back does that is different from the standard way midi apps handle inbound messages? - can you pretend I'm dumb as shit and explain accordingly because I don't get it at all? Thanks!
There is no standard way to receive messages in a program. This is broader than just MIDI btw. The two ways of handling input are polling and interrupt. (callbacks) If you use a callback the system will call your chosen function when there is new data. With polling you just check periodically to see if there is anything new.
If you give me more info of what you are doing I can probably explain it in more detail.
@@shiftedphase I am using blender, which allows me to run python scripts, I can run a script in blender to see inbound midi data in the blender console, that works fine. The problem is if you loop either polling or callback it locks the blender UI till the script finishes, which of course doesn't happen when your forever waiting for inbound midi messages. I think maybe I was under the misconception the callback method which is called non-blocking would not lock the blender UI. If you have any thoughts please let me know? I'm guessing I have to do something with threading but I dont really have a clue- onward ho! Thanks for getting back to me
@@stephen285 I highly suspect you cannot block in your script. Web works this way too... you need to think about designing your code to do something with the MIDI data and return right away. If you need to do something regularly (not only when you get MIDI data) you can probably register a timer callback also. Use some variables or a proper type of state machine to keep track of the state of your program so that every time MIDI data comes in, or your timer gets called you can check things and decide what to do. A lot of modern programming works this way so good to get familiar with it!
@@shiftedphase Thanks Andrew - I appreciate the help, I will let you know if I figure it out. I know it can be done because there is an addon out there for blender / inbound midi that works without freezing the UI - I'm just not experienced enough in Python to unravel how it was done. Anyway, it will yield if I bang my head on it long enough:) Your a good man Charley Brown - great series!
@@stephen285 Good luck and keep at it!
As an example of pitch bend, could you give me the channel message of something like c4 uptuned by 25 centitones?
Pitch bend doesn't work in "cents" it just has a range from centre (no bend), and max up or down. The actual amount of bend depends on the synth that receives the signal. Most synths allow the bend range to be set from 1-12 semitones or more. If you had it set for 1 semitone, you could guess that a value of +2047 (about 1/4 of the full value of +8191) would be 25 cents... but it's not really guaranteed that every synth will respond perfectly like this.
Hello, dear friend,thanks for your information. Now I have a problem so I would like to know if you are willing to help me. I am working with Sibelius software. I use a "Midisport uno" interface. The problem happens when I try to assign midi channels to a different sounds of a Roland GR-20. When I open Sibelius configuration mode and then I assign the numbers of bank and program change number to channel number 1, everything is ok, but when I try to assign the next sound to channel 2, it doesn´t sound any sound when I activate the test function, however, the interface lights, indicating that the message has passed through the interface and get the GR-20, but no sound. The only sound I can get from the GR-20 is the one of channel1. Sorry for my English, my native language is Spanish.
In other words, I just can use only one sound at a time
@@rafaeldominguez58 I haven't used either of those products but I would suspect that your GR-20 is not set up for multi-timbral mode. Check to see that it can receive MIDI on multiple channels at the same time. Not all synths can do this, so best to check the manual. Also, if you have another synth you can test it with that.
@@shiftedphase Thank you so much. I appreciate your prompt reply! I will check it out as you suggest. Have a nice time!
cool! thank you for so clear explanation
Explain how a computer is able to play multiple instruments at the same time on an external synth if you need a program change to play another instrument
MIDI supports up to 16 channels on each cable. You can have each channel set to a different program.
@@shiftedphase So a synth listens to all channels right?
@@bigblackbadger1 It would be fair to say it receives data for all channels, but only responds to the ones it is programmed to use. Two common cases are: a monotimbral synth (think 80s polysynths) that only makes one kind of a sound at once would only respond on a single channel at a time. Compared with a multi-timbral synth (most 90s and 2000s synth modules and keyboards) which can respond on all 16 channels at once and play different sounds on each channel.
Hello greetings from Chile ... I like your explocatives .per I still can't understand why when I touch the controller keyboard at some point any note is playing indefinitely. As frozen. And the only solution for me so far is reset. Could you guide me?
It sounds like maybe a bad cable. If it's a USB controller, check that first. I've seen that happen a few times over the years only to replace the cable and the problem goes away.
Hi, is it possible you could help me? I have a Boss VF-1 rack unit and would like to control the parameters of the delay patch with my Roland A300-Pro. I'm looking at the MIDI implementation chart for the VF-1, but don't know which hex number represents the CC number I should assign to the MIDI controller in order to control the parameters of the delay time and such...
Try something like this: www.binaryhexconverter.com/hex-to-decimal-converter to convert the numbers from hex to decimal. Some computer calculators have a "programmer" mode that also does this. As for just confirming your understanding, I use this program to quickly test MIDI stuff: www.midiox.com/ You can send and receive messages easily. A quick tip that many devices that can be controlled by MIDI also send those same messages when you turn their knobs. So if you connect the MIDI OUT port to a program like MIDI-OX you can just look at what gets sent for each control and then use that when programming your other device. Hope this helps!
Another great video! When will you post the next one?
Also, I have a question about those hexadecimal values for sending note on and ccs:
like you said, the first bit for a note on is always 9 and the second bit is the channel number. 0x90 is a note on in channel one as I understand it.
How is the specific note conveyed to the controller if it is not specified to the device receiving the MIDI? Say I wanted to send a note on A4 to channel one at velocity 127:
I would send the data in hex as 0x90 0x45 0x7F?
Yes, you've got it right! There are sometimes some discrepancies between products regarding octave numbers, but that's pretty easy to sort out by just testing your setup.
Thanks! I've been messing around with rtmidi library and have been making a little program that reads note input and interprets what chord was played. This video was extremely helpful!
Cool, RtMidi is quite useful... I use it for Linux projects.
I don’t understand how, for example, 0xCn translates into ones and zeros
You should read about binary and hexidecimal.
Good info. Thanks
Very useful!
♡
learn new things