Hi everybody
Imagine we have a ‘midi effect’ plug-in, Is there a way to change the pitch of an individual midi note without changing the pitch bend for all the notes?
Lets say we want to detune a specific note by 50 cent up or down. Is this possible with standard MIDI, VST and JUCE?
Ahh… We’ve spent so much time, effort and money around this question over the last few years!
Short answer: Nope.
Long answer: You might want to do some research into MPE, and look at these classes: https://github.com/julianstorer/JUCE/tree/master/modules/juce_audio_basics/mpe
Hi Jules, I have been thinking about this one a bit too lately.
I looked up MPE which looks cool but so many of my soft synths wont deal with it. I want to turn a 2 octave keyboard into a polyphonic pitch bend sender. Bottom octave bends by a 1/2 step and top octave a whole step. You set the time for the pitch bend and a note on bends all the notes with that name up. Note off bend them back. I was thinking of splitting the chords to different midi channels and then using regular midi pitch bend to do it. Has anyone done this ? I expect there are versions of this out there already … Has anyone written the midi polyphonic channel splitter already in JUCE ? Sean
It is unclear what you want to achieve. Do you want to implement Auto Pitch Bend like I was when I got my new steel guitar ? Or do you want to transpose certain notes like the pedals on a harp do to play in all keys from a set of diatonic strings/keys ? Which direction do you want to bend ? Up ? Why not down ? What if I want to bend three half steps ? Do I need a new, bigger keyboard ? And are you sure you want to sacrifice an entire keyboard just to control this ?
If I press a C on my keyboard in the lower octave I want all sounding C notes to bend up by a half step. If I press a C in the upper octave I would like all notes to bend up by a whole step. 12 1/2 steps in the bottom octave and 12 whole steps in the upper octave. I could set the bottom 2 octaves of my keyboard to do it or another keyboard it doesn’t matter. Time for the ramp up ( and down ) could be set. Bending up would be fine. No desire to bend 3 half steps. I don’t know if you need a new, bigger keyboard.
Well, that’s what you stated already. Do you want the C to simply sound as C# or do you want to hear the pitch rising from C to C# ?
I want to hear the pitch rising
Pitch Bend is global per MIDI Channel, so you need to branch out a 5 note chord into 5 MIDI channels, add Pitch Bend to the channels which have notes matching your conditions set by the keyboard and then use these notes with their respective bends to steer 5 parts/channels of a multi-timbral synth. Since Pitch Bend goes from -100% to 100%, all sounds on the synth need to be set to a Pitch Bend Range of 2 semitones and you need to send 50% for a half step.
Many DAWs can/will reset any Pitch Bend values when you hit Stop and chasing any previously active Pitch Bend events will make your chord go ooiiinng when you hit Play.
Thanks yes that’s how I was thinking of doing it have you written any JUCE code to create the midi notes on each channel or send continuous pitch bend messages with a ramp up?
No, but that portion of code isn’t JUCE-specific anyway. It is plain C++, where you have a variable that counts the sounding notes and copies that value to the Note On’s MIDI Channels. This gives you one channel per sounding note.
Then you check if a Note On is in a specific octave and if it is you check if any of the sounding notes matches that Note On or an octave of that Note On, and if it is, you start your Pitch Bend Generator on that matching Note On’s MIDI Channel, which is a counter that ramps up in a specific speed to a specific value. Pitch Bend is a 14bit value sent in two MIDI bytes so you count to either 4096 for a half step or to 9192 for a whole step, albeit twice as fast.
If a Note On outside that specified octave matches a held note in that octave, you start the PBG as well.
If a Note Off comes in that specified octave and there is that note sounding in another octave (i.e. a Note Off for a bent note), you count down Pitch Bend on that MIDI Channel from either 4096 or 9192 to 0, then you decrement the count of sounding notes by 1.
All this is pretty fragile, as a) it relies on having a multitimbral synth to talk to, b) the synth’s pitch bend ranges must all be 2, regardless of chosen preset, and c) you must not touch the keyboard’s pitch bend wheel during all this as it will interfere with the pitch of whatever note is active on MIDI Channel 1. Also, the fact that playing two C notes at the same time will result in C# sounding will cost you a couple brain cells each time this occurs.
thanks . looks like I will have to code it all up myself !!
Well, you have a pretty unique use case, but neither of the above is rocket science…
Yes. MIDI real-time per-note tuning standard (which Roli spent much time, effort and money reinventing ). Note however some instruments do not support MIDI microtuning.
http://www.microtonal-synthesis.com/MIDItuning.html
P.S. MIDI 2.0 also supports per-note pitch control. However support for MIDI 2 is not yet widespread.
https://www.midi.org/articles-old/details-about-midi-2-0-midi-ci-profiles-and-property-exchange
Don’t hate me, but can you name a few that do ? The number of these defines the likeliness for the OP to get a working solution up and running.
Yes nothing in this manual about midi 2.0 or mpe
Without a system that is widely supported it would be an academic exercise to use it at this point.