Monophonic issue

I find that is possible selecting both lower an higher note at the same time.
But i want only the lower one not the last one :slight_smile:

1 Like

Yeah, you could probably write a scriptlet that uses the note tracker to automatically send the previously played note off when you play a new note

I’m not much of a programmer.
Well, I guess, I’ll do without, but if anyone do a script or find a VST that can do that let me know.

I’m not sure if this will help you but it is how I add bass to my songs. I play a digital guitar mostly but add instrumental solos when needed using a 49 note USB keyboard. For bass, I use Ujam
V bass triggered from either the digital guitar or the USB keyboard. You can play the Ujam V basses in manual note mode, or you can use the auto mode which follows LH chord input from either the digital guitar or keyboard. The Ujam basses are great and sound really good with lots of patterns to suit many styles. There is a video demo on “From the trenches” of me showing how it works. Ujam have free demos to download. There are five V Bases, and if you are keen to try it out, I would start with “Dandy”. Cheers.

Just for fun, I wrote two scriptlets for only passing thru the lowest or highest note, but remembering all other notes, so when the current passing note is released an other one (still being held) is played.

The scriplets are channel aware, but not multichannel. For processing multiple channels, use a scriptlet per channel

Apologies if there are already tons of examples doing the same thing.

This is one for playing the lowest note:

var nt : NoteTracker

var NoteVelocities: integer[128]
var NoteChannels: integer[128]
var CurrentNote: int = 128
var CurrentChannel : int = 0

/*
 * This scriptlet filters out all notes except the lowest. All the notes, however, are
 * tracked and when the current lowest note is released the next lowest note from
 * the tracker starts. If all notes are released, of course no note is send
 *
 * The midi channels are recorded, but this scriptlet is not multichannel capable:
 * If first a D3 on channel 1 is tracked and after that a D3 on channel 3 is coming in,
 * the D3 on channel 1 is lost.
 * To solve this, use a separate scriptlet for each channel
 */


Initialization
    SetInfoMessage("MIDI Filter for only playing the lowest note")
    SetDisplayMessage("MIDI Filter for only playing the lowest note")
End

On NoteOnEvent(m : NoteMessage)
var heldNotes : integer array
var newLowestNote: int
var noteOff : NoteMessage

    NoteVelocities[GetNoteNumber(m)] = GetVelocity(m)
    NoteChannels[GetNoteNumber(m)]=GetChannel(m)

    NoteTracker_GotNote(nt, m)
    
    heldNotes = NoteTracker_GetHeldNotes(nt)
    newLowestNote = SmallestInt(heldNotes)
    
    if newLowestNote != CurrentNote
    then
        if CurrentNote < 128
        then
            noteOff = MakeNoteMessageEx(CurrentNote, 127, CurrentChannel)
            SendNow(ReinterpretAsNoteOffMessage(noteOff))
        end
        SendNow(MakeNoteMessageEx(newLowestNote, NoteVelocities[newLowestNote], NoteChannels[newLowestNote]))
        CurrentNote = newLowestNote
        CurrentChannel = NoteChannels[newLowestNote]
        SetDisplayMessage("Current: " + NoteNumberToNoteName(newLowestNote))
    end
End

On NoteOffEvent(m : NoteMessage)
var heldNotes : integer array
var newLowestNote: int
var noteOff : NoteMessage

    NoteTracker_GotNote(nt, m)
    heldNotes = NoteTracker_GetHeldNotes(nt)
    
    if Size(heldNotes) > 0 
    then
        newLowestNote = SmallestInt(heldNotes)
        if newLowestNote != CurrentNote
        then
            noteOff = MakeNoteMessageEx(CurrentNote, 127, CurrentChannel)
            SendNow(ReinterpretAsNoteOffMessage(noteOff))
            SendNow(MakeNoteMessageEx(newLowestNote, NoteVelocities[newLowestNote], NoteChannels[newLowestNote]))
            CurrentNote = newLowestNote
            CurrentChannel = NoteChannels[newLowestNote]
            SetDisplayMessage("Current: " + NoteNumberToNoteName(newLowestNote))
        end
    else
        SendNow(m)
        CurrentNote = 128
        SetDisplayMessage("MIDI Filter for only playing the lowest note")
    end
end

On ControlChangeEvent(m : ControlChangeMessage)
    SendNow(m)
End

On PolyTouchEvent(m : PolyTouchMessage)
    NoteVelocities[GetPolyTouchNoteNumber(m)] = GetByte(m, 2)    
    if GetPolyTouchNoteNumber(m) == CurrentNote
    then
        SendNow(m)
    end
End

On AfterTouchEvent(m : AfterTouchMessage)
    SendNow(m)
End

This gig file holds scriptlets for playing the lowest note and the highest note as well

MonoPhonicMidi.gig (16.9 KB)

Maybe someone can use it/alter it/burn it :stuck_out_tongue:

5 Likes

Thank so much!!!
It does exactly what I needed :slight_smile:
Really really thank you!

Nice — when we implemented the original “highest”, in our implementation we deliberately did not want the lower held note to be triggered when releasing the highest. The idea was to be able to play a solo at the top and having other notes trigger every time a solo note was released seemed like it would be very odd and we applied to same thinking to the “lowest”.

Good to know though that the alternative can be done with a scriptlet. Thanks for that.