How to pitchbend with the pitch wheel in the MIDI Helper Tool?

From my own experience, generators never stops exactly where you want them to stop. If you want to use a generator make sure it stops after the value you want to reach, and clip the pitchbend value to the final value you want to reach when it exceeds it.

I usually prefer using the On TimerTick(ms : double) callback together with the TimeSinceStartup() function which give you an amount of ms since the start up.

1 Like

How would you clip the pitchbend value to the final value you want to reach when it exceeds it, and how would you use the On TimerTick(ms : double) callback together with the TimeSinceStartup() ?

There’s another callback that triggers when the ramp finishes and you could respond to that to send out the final pitch end value you want.

How do you do that?

Modify the currently empty callback GeneratorEndCycle in that scriptlet

On GeneratorEndCycle(time : integer) from r
End 

so that it looks like this

On GeneratorEndCycle(time : integer) from r
var
    newPitchMessage : PitchBendMessage = MakePitchBendMessage(StopPitch)
    SendNow(newPitchMessage);

End 

Have you considered learning a bit of GP Script programming?

1 Like

I hope to have the time to learn it. Thank you SO much in the meantime.

Sorry about this, I thought it is obvious for you if you already have some programming skills.

But using On GeneratorEndCycle is also a very good idea. I forgot about it.

1 Like

It works GREAT ! :tiger:

OK - so your problem is solved completely now?

Yes, GigPerformer is a pleasure to work with and its capabilities and stability are amazing. I wrestled with Forte and Bome Midi Translator Pro and Copperlan etc, etc, etc for years and now I can configure a setup and recall it without holding my breath wondering whether it’s going to work. Thank you! :fireworks:

3 Likes


The Script in the PitchBend Generator Plugin is:

const
   MinPitchBendValue : integer = 0
   MaxPitchBendValue : integer = 16383
   CenterPitch : integer = 8192

var
   StartPitch : parameter MinPitchBendValue  .. MaxPitchBendValue = CenterPitch
   StopPitch : parameter MinPitchBendValue  .. MaxPitchBendValue = CenterPitch + 100
   
   TimeInMS : parameter 10 .. 5000 = 500
   
   Trigger : parameter 0 .. 1 = 0
   
   
  r : Ramp
   
   
  lastValueSent : integer = -99999
  
function Go()
        StopOneShotRamp(r)
        TriggerOneShotRamp(r, TimeInMS , 50)

end
   
   // Called when a parameter value has changed
On ParameterValueChanged matching Trigger
    
   if Trigger > 0
      then
        Go()
        Trigger = 0
   end     
    
End

On GeneratorEndCycle(time : integer) from r
var
    newPitchMessage : PitchBendMessage = MakePitchBendMessage(StopPitch)
    SendNow(newPitchMessage);

End 

// Called by function generators as time passes
On GeneratorRunning(timeX : integer, timeY : double) from r
    
   var
      newValue : integer = Round(Scale(timeX, 0, TimeInMS, StartPitch, StopPitch))
      newPitchMessage : PitchBendMessage = MakePitchBendMessage(newValue)
      
    
      
   if newValue != lastValueSent
      then
        SendNow(newPitchMessage)
         lastValueSent = newValue
          
   end      

End

On NoteOnEvent(m : NoteMessage)
    Go()
End

When the rackspace is opened a popup says :

" Semantic error in “Main” : Line 2, Col 12:

Allowed in rackspace script only. This

Type is only allowed in backspace scripts"
It works fine when I dismiss the popup. And way around it?

Thanks!

Type is only allowed in rackspace scripts"

I don’t understand the problem. The scriptlet compiles fine.

This seems to come from another Scriptlet code, not from the present code.