< Back to IRCAM Forum

Gotolabel playfromlabel and the use of whenever

When I use the gotolabel to move between different sections, a whenever in my code stops functioning. For some reason the playfromlabel doesn’t have this issue, but then Antescofo mainly works as a sequencer which also has its own problems. Any ideas for solutions?

I have a piece in which I vary between the use of the score follower and a MIDI pedal to trigger several things, so any solutions for that would be greatly appreciated.


Hello Mathieul.

When you move with gotolabel, you jump from one position in the score to another, without doing any action. Using playfrom, you stop the current actions and you start from the beginning is fastforward mode (i.e. actions are executed but the messages are not sent) at target position, the execution mode change to “ply”. This may explain the difference of behavior.

Recently, I add additional information on transport operations at this page :

To switch between the score follower and a midi pedal can be achieved in this way:

  • at some event you can shutdown the score following with “suivi off”.
  • just after (or before) this action, you launch a whenever that listen a variable $pedal
  • this variable is external set when you receive a midi pedal event in Max, using message “setvar $pedal 1” to Antescofo (or if your midi event are received via OSC, you can open an OSC port in Antescofo)
  • in the body of the whenever, you use a command antescofo::nextevent to advance in the score.

The command antescofo::nextevent preserves the inference of the tempo, so everything is “as if” the score following was in operation, but the advancement and the detection of the musical event are now subordinated to the midi pedal.

To switch back to the score following, You have just to execute “suivi on” at some event. And to start the whole process, you use “start” as usual.

Hope it helps,

Aha that makes more sense.

I had been using the whenever to look at a pedal variable which had all my events. Putting them locally as you mention might be a very good, simple and safe solution. I’ll try that in the next few days.

Thanks a lot for the information.