In audio player on GP3 I loaded a backing track. Can I set automation program changes for example crunch sound on verse and lead sound on chorus to this audio track? Thanks!
What sound are you playing in AudioPlayer?
You can put plugins after the audioplayer and mute/unmute them with variations.
The variations you can switch manually or by sending corresponding PC messages.
It’s a full backing track of a song.
So I do not understand, what do you mean by crunch sound on verse and lead sound on chorus?
Do you want to change plugin sounds when the audioplayer plays the verse and switch to another sound when the audioplayer plays the chorus?
With this script you can switch variations automatically:
var vbar : integer
DISP : Widget
on BeatChanged (bar : integer, beat : integer, subbeat : integer)
if beat == 0 then
vbar = 0
end
if beat % 4 == 0
then vbar = vbar +1
end
DISP.SetWidgetLabel(IntToString(vbar)+"."+IntToString((beat%4)+1))
if vbar == 1 then
SetVariation(0)
elsif vbar == 5 then
SetVariation(1)
elsif vbar == 9 then
SetVariation(2)
end
BeatChanged.gig (4.7 KB)
Yes. Change sound as you mentioned. Thanks. I will try the script.
Hi Paul! What if I need to change it before the beat? Can I use something like beat 4.5?
You could double the tempo
Good idea! thanks
I am working on a more sophisticated version, but doubling the time is a good workaround.
As a guitarist I need to push it ahead of beat sometimes.
Here you go
Automate_Variation.gig (11.8 KB)
var nm : NoteMessage
VTRIGGER :MidiInBlock
TVAR : MidiInBlock
vbpm : double
BEAT_DISP : Widget
vnn : Integer
initialization
nm = MakeNoteMessage(C3, 100)
vbpm = GetBPM()
end
on BeatChanged(bar : integer, beat : integer, subbeat : integer)
BEAT_DISP.SetWidgetLabel(beat+1)
if beat == 0 then
SendNow(VTRIGGER, nm)
elsif beat == 3 then
SendLater(VTRIGGER, Transpose(nm,1), 60.0/vbpm*1000/4)
elsif beat == 16 then
SendNow(VTRIGGER, Transpose(nm,2))
elsif beat == 22 then
SendNow(VTRIGGER, Transpose(nm,3))
elsif beat == 28 then
EnablePlayhead(false)
end
end
On NoteEvent(m : NoteMessage) from TVAR
vnn = GetNoteNumber(m)-C3
SetVariation(vnn)
End
The trick is to use virtual Midi.
The on BeatChanged callback sends midi message just in time or later to the virtual midi out.
On mac you can use IAC on windows there is similar.
You have to enable this MIDI Ports in the options window so Gig Performer can see that Midi Ports.
In the OnNoteEvent callback this received note number is parsed and the corresponding Variation is set.
The secret is in using SendLater() to schedule a Midi Event in milliseconds.
Because the bpm is detected it is working with different bpm values.
This expression determines how much later it is sent
60.0/vbpm*1000/4
You are GENIUS!