Stuck notes when transposing MIDI

EyingLies
EyingLies Member Posts: 2 Newcomer

Hey there,


I'm trying to make a simple MIDI transposer with increment and decrement buttons for transposing. I have it working for the most part, however when transposing, previous note ons get stuck.


This behaviour is also present in the bundled "Controller_Voice_Tranpose" macro found in "utility/display"


Any help much appreciated!


Ryan


Comments

  • Quietschboy
    Quietschboy Member Posts: 45 Helper
    edited July 2022

    Hi Ryan,

    i checked the ens without MIDI output, so i can´t comprehend when notes stuck. But i noticed that when changing transpose, the Note Module gets pitch information. Possibly this is the problem.

    In general, and maybe this solves your problem, it is quite often good to latch values. I added a value module (latch) and an order module into your ens. Please try this:

    Ens attached

    Edit: PS: i changed the voice count to 1 in the ens. So you have to set it back to 16.

  • colB
    colB Member Posts: 762 Guru

    I think your approach cannot work!

    MIDI does not understand what a note is!

    There is no C# semiquaver that you can add a half tone to turn into a D semiquaver.

    Instead, MIDI understands events that start a note at a specific pitch and events that end a note at a specific pitch.

    If you hit a C# key, your structure will send out a start event for a C# (MIDI note-on), if you then turn a knob to transpose up a halftone, and release the key, it will sent out an end event for a D (MIDI note-off)... the problem here is that there is no active D note to turn off, but there is a C# note that will never receive a matching note-off... unless you devise a way to send one...

    There are possibly different ways to work around this, but they will depend on how the device receiving the midi behaves... Maybe some midi cc can be used to represent transpose? or use pitch bend? or some midi cc for glissando or portamento... but stuff like that is not universally supported. Even note off can be done in two different ways that are not always both supported by all devices!

    You could immediately send a C# note-off and then a D note on... but that would also trigger envelopes etc. so not ideal.

  • colB
    colB Member Posts: 762 Guru

    Depending on what this is for, you could devise a way to prevent the transpose taking effect (per polyphonic note) while the note is active. That way, it will never try to transpose an active note, so they won't hang.

    Not sure the best way to achieve that in Primary.

  • colB
    colB Member Posts: 762 Guru

    Maybe something like this (untested) sketch:

    The idea here is that the transpose values are applied polyphonically, but only at gate-on, so gate-off should still be at the same pitch value. Needs testing of course :)

  • Paule
    Paule Member Posts: 1,328 Expert
    edited July 2022

    For a note off you can use Dieter Zobels macro

    Please wire it in front of P/G MIDI out. And set it to poly phone.

  • EyingLies
    EyingLies Member Posts: 2 Newcomer

    Hey thanks ColB, this ended up working out really well! Also super insightful 😊

Back To Top