Pitch bend to note?

Hi

I’m looking for something almost exactly like midi hub but I also need it to do something specific: convert pitch bends to notes. Can midihub do this? I imagine it would need some kind of variable pipe and a maths pipe to be able to do that?

Cheers

Hi, what is the end result you intend to achieve?

Pitch bends are actually always based on some base note, then depending on how the sound producing module is configured, pitch bend shifts the frequency some fraction from the base note frequency to the depth of total pitch bend, as configured in the sound producer. Depending on the device and its config, the depth may be a single semitone, 2 semitones, 12 semitones for whole octave pitch bends, or whatever else is set up. A single semitone would allow for the highest accuracy, as pitch bend messages have only 14 bits of precision, and this includes the sign bit.

Of course it’d be technically possible to know when a regular note’s pitch is passed through (the depth would have to be specified ahead of time), and convert that into a note event. Is this the intended effect you’re after?

Hi. Thanks for your reply. I have Suzuki QChord and it’s MIDI implementation is a bit funky. There is a strum plate which is split into 3 midi channels and only outputs the note C plus or minus 12 semitones. If I connect it to an external sound module it sounds fine. But if I record the output I only get Cs. So what I’d like is to remap the pitch bend range of a note to new notes. So a C with a pitch bend of +2 semitones should output a D.
Can this be done?

Cheers

Does it always produce the exact pitches of MIDI notes? If it’s something detuned, it wouldn’t work.

Always the exact pitches. There is a pitch bend wheel on top of that which works as a regular one would for the in-between tones. I think the pitch bend values generated by the strum plate range from -8192 to 8191 representing +/- 12 semitones. I read “pitch bend is transmitted using 2x7bit data bytes, forming a signed 14 bit number.”

If so, I could perhaps get away with it using the existing midihub pipes? I could filter out the pitch bend values based on specific values (at intervals of (8192*2)/24) and then transform them to notes starting from C2. That would take ages though and make changing things also time consuming.

Otherwise a pipe that could remap from CC to notes would be great. Or perhaps 2 new pipes: a variable pipe and a maths pipe? Either option would not only be useful for the odd QChord user but would also allow other midihub users to do more complex generative sequencing.

Edit: here is a thread on midi for the late model omnichords: https://www.kvraudio.com/forum/viewtopic.php?f=102&t=245656

Interesting. I guess it could be called an ‘Auto Tune’ pipe which would quantize the bent notes to the regular frequencies. :slight_smile: I’ll add this to the list of suggestions for a future update.

I don’t think it’d be possible to achieve this using currently available pipes in Midihub. A Midiboy sketch could be written for such a function, if you know how to write code. :slight_smile:

1 Like

Cheers! I do know how to write code so will check out midiboy. That autotune pipe would be super cool - especially when chained with a rescale pipe! That would add great new functionality to pitch bend / modulation wheels and strips on keyboards.

1 Like

Oddly enough the qchord works fine with General Midi Synths (like SoundCanvas or the original Gaia 1) but not so great on other non GM synths. You are correct in that the qchord generates C notes in several octaves and then pitchbends those notes to the correct pitch for each guitar string across ch 14,15, and 16. Unfortunately it takes floating point math to convert the pitchbend data into midi notes which I’m not sure is possible with midihub. Here is a Pure Data implementation which should work on Pisound:

qc1

2 Likes

Hey @jboyd welcome to Midihub forum.

I think this is now possible with Midihub…

(back in 2020 when OP @bleurgh was inquiring, Transform was much less sophisticated)

…but it’s way less elegant than in PD, mainly because Rescale only works on 7bit “values”

So, AFAI can see you’d need a whole bunch of Transforms based on the 16384/24 cutoffs:
Screen Shot 2024-02-24 at 10.14.37

so MSB 0-4, 6-9, 11-16, etc would be a simple Use LSB in Range 0-127
but MSB 5, 10, 21, etc would have two Transforms ‘splitting’ the LSB range.

If my arithmetic is correct for once, I reckon this tallies to 56 Transforms!

Doable – and at least the LSB pattern (42, 85) means pipes can be duplicated – but a bit clunky.


Makes me hanker for arithmetic pipes again :smiley: