Hi guys,
For an automatic accompaniment patch I’m trying to restrict the backing track to a certain tempo range, so that if the performer slows down or speeds up too far beyond the scored BPM, the accompaniment will hit a ceiling, forcing the performer to adapt.
I tried to achieve this behaviour using whenever and @tempo_var (see http://forumnet.ircam.fr/user-groups/antescofo/forum/topic/synchronization-strategies-examples/ )
BPM 140
@tempovar $midi_tempo(140, 1)
whenever ($RT_TEMPO) {
switch {
case $RT_TEMPO > 150:
$midi_tempo.tempo := 150 ; causes an error
print tempo larger than 150
case $RT_TEMPO < 130:
setvar $midi_tempo.tempo 130 ; same error
print tempo smaller than 130
default:
setvar $midi_tempo $RT_TEMPO ; no error, but not what we want (doesn’t control .tempo)
print new tempo is ($midi_tempo.tempo)
}
}
NOTE B1 1/2 measure1
group G2 @local @target[20] @sync $midi_tempo
{
0.0 mnote 36 95 @beat2ms(0.5)
…
… but that’s not what tempo_var actually does, it still uses the listening machine to set the tempo.
Even if this were to work, I would expect a problem: say the performer dips under 130BPM, then in order to catch up to the 130BPM accompaniment they would have to speed up, which would produce a higher $RT_TEMPO and lead to a vicious spiral. So this needs to be considered too…
It would be perfect if this was controllable by a simple Antescofo attribute. I noticed antescofo::bpmtolerance, which is undocumented – is this what I’m looking for?