Home › Forums › Macros › Macros qui marchent pas › Répondre à: Macros qui marchent pas
// Perpetual Hamster
// Initialize the direction at the call first
// It is zero by default, which is not good for us
Set $inc$ = 0.05
// Increment the panner value
Set $pan$ = “$pan$ + $inc$”
// Check if panner hit -1 or +1
If “$pan$ > 1”
Set $pan$ = -2+$pan$
EndIf
// Why 40 ???
// Because 0.05*40 = 2
// If we change 0.05 to something else, then also change 40
// We must always have INC * Y = 2, Y = 2 / INC
TrackPan trk1 = $pan$
// -2+($pan$+0.5)
TrackPan trk2 = “-(($pan$ > 0.5) ? -1.5+$pan$ : $pan$ + 0.5)”
// -2+($pan$+1)
TrackPan trk3 = “(($pan$ > 0) ? -1+$pan$ : $pan$ + 1)”
// -2+($pan$-0.5)
TrackPan trk4 = “-(($pan$ < -0.5) ? 2+($pan$-0.5) : $pan$ – 0.5)"
Sleep 75
RestartMacro