I am in the process of replacing my MODX with a VST-only soluiton with Gig Performer and am pretty happy so far.
There is one thing I am not getting around and hope for someone to guide me in the right direction:
When setting up e.g. a layer of piano and pad and rhythmically playing a chord, the same notes of the pad stack up and get louder. I want to create like a “polyphonic legato” mode where already triggered notes just continue and ignore being retriggered until sustain pedal is released.
Do you know if this is possible in Gig Performer? Many thanks!
It’s possible but you’d have to create a Scriptlet to do it - it would have to keep track of all notes that are still “on”. The NoteTracker object could be used to do this.
var active : boolean[128]
keyDown : boolean[128]
sustainOn : boolean
n : integer
ccnum : integer
ccval : integer
i : integer
On NoteOnEvent(m : NoteMessage)
n = GetNoteNumber(m)
if active[n] then
if keyDown[n] then
else
if sustainOn then
else
active[n] = true
keyDown[n] = true
SendNow(m)
end
end
else
active[n] = true
keyDown[n] = true
SendNow(m)
end
End
On NoteOffEvent(m : NoteMessage)
n = GetNoteNumber(m)
keyDown[n] = false
SendNow(m)
if !sustainOn then
active[n] = false
end
End
On ControlChangeEvent(m : ControlChangeMessage)
ccnum = GetCCNumber(m)
if ccnum == 64 then
ccval = GetCCValue(m)
if ccval < 64 then
for i = 0; i < 128; i = i + 1 do
active[i] = false
end
sustainOn = false
else
sustainOn = true
end
end
SendNow(m)
End
That said, if you use the NoteTracker object, you will be able to simplify that code significantly more. Basically, you just feed all incoming notes (on and off) into it and query the count to see if it’s greater than 1