@tempovar $pos_to_play(85,1) := 100 $graincurvesduration := 50 $t := [] $tt := [] $pos := [] $rpos := [] $rcpos := [] $tpo := [] $ftpo := [] $xx := [] $top_x := [] $top_t := [] $top_tempo := [] $top_delta := [] whenever ($pos_to_play == $pos_to_play) @exclusive { @local $x := 0 _ := $tt.push_back($NOW) _ := $ftpo.push_back(60./$p) Loop L $graincurvesduration ms @sync $pos_to_play @Abort { $top_x.push_back(60. * $x) $top_t.push_back($NOW) $top_tempo.push_back(@local_tempo()) } { $x += $graincurvesduration/1000. _ := $t.push_back($NOW) _ := $pos.push_back($pos_to_play.position) _ := $rpos.push_back($pos_to_play.rnow) _ := $rcpos.push_back($pos_to_play.rcnow) _ := $tpo.push_back($pos_to_play.tempo) _ := $xx.push_back(60.*$x) } } $p := 1 Loop $p s { $ref_tempo := 60./$p $old_p := $p if ($p > 0.5) { $p *= 0.9 } $pos_to_play := 1 } during [20#] 11 s $gnuplot_path := "/usr/local/bin/gnuplot" ; $gnuplot_linestyle := "lines" _ := @gnuplot( "tempo", $t, $tpo, "tempo2", $top_t, $top_tempo, "forced tempo", $tt, $ftpo, "position", $t, $pos, "rnow", $t, $rpos, "curveX", $t, $xx, "maxX", $top_t, $top_x ) @_sleep(5) antescofo::stop