; print ("" + @make_all_events_tab()) ; print "position of end" (@event_label_position("end")) tempo 0 antescofo::suivi 0 @proc_def PlayUpTo($stop) @exclusive { if (@is_playing_on() || @is_fastforward()) { abort $MYSELF } @local $endpos := @event_label_position($stop), $part := @make_all_events_tab(@current_event(), false, $endpos, true) if (!$part.is_tab()) { @print("====>> ERROR unknown label", $stop, "<<====") abort $MYSELF; } @print("•• PlayUpTo from beatpos ", $RNOW, " = ", @event_name(), " to beatpos ", $part.last()[0], "=", $part.last()[5], " included") @local $dur := [$e[2] * $e[3] | $e in $part], $i := 0 ; @print("sscore between index ", @current_event(), " and ", $endpos, ": ", $part) ; @print("successive durations ", $dur) loop $dur[$i] s { @local $k := $i $i := $k + 1 ($dur[$k]) s antescofo::nexteventany } during [($dur.size() - 1)#] ==> if ($stop != "end") { ($dur.last()) s @print("•• Frozen at beatpos ", $RNOW, " ", $LAST_EVENT_LABEL, ", waiting a clic to go to ", @event_name(1 + @current_event())) } } BPM 60 print Origin at $NOW print "wait clic to start new section" §new_section §0 DEBUT ; ---------------- $dateSection := $NOW print section DEBUT at ($NOW - $dateSection) ::PlayUpTo("NS2") NOTE A2 §0 rrr print rrr at ($NOW - $dateSection) BPM 120 CHORD (D3 C3 A7) §1 "chord" print chord at ($NOW - $dateSection) Trill (B1 B4 C2) §4 "trill" print trill at ($NOW - $dateSection) §new_section §6 NS1 ; ------------------ $dateSection := $NOW print section NS1 at ($NOW - $dateSection) NOTE C1 §0 "c1" print C1 at ($NOW - $dateSection) BPM 90 §new_section §2 NS2 ; ------------------ print section NS2 at ($NOW - $dateSection) NOTE C2 §0 "c2" $dateSection := $NOW print C2 at ($NOW - $dateSection) print "play to end from C2 (not a section)" ::PlayUpTo("end") NOTE C3 §3 "c3" print C3 at ($NOW - $dateSection) print DONE §end §4 /* timing avec play antescofo~: Sequence playback from beat position 0.000000... print: Origin at 0. print: "wait clic to start new section" print: section DEBUT at 0. print: rrr at 0. print: chord at 1. print: trill at 2.5 print: section NS1 at 0. print: C1 at 0. print: section NS2 at 0. print: C2 at 0. print: "play to end from C2 (not a section)" print: C3 at 2. print: DONE */