by: ◦ Temporal objects: are sound, video, lights, etc. ◦ Temporal relations: provide a partial order for the execution of the temporal objects. ◦ Interactive objects: allow to control the start and the end of temporal objects. • They are equipped with hierarchy. 2M. Toro-Bermudez, “Structured Interactive Scores: From a Simple Structural Description of a Multimedia Scenario to a Real-Time Capable Implementation with Formal Semantics,” Université de Bordeaux 1, Bordeaux, 2012. Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 3/26 . . . 3/26
of the functional language Ocaml (without objects, labels and functors). • The language is based on the reactive model introduced by Boussinot3. ◦ It is based on the synchronous model. • It is founded on the ideal zero delay. • They forbidden important features like recursion. ◦ The reaction to absence of signals is delayer (a signal cannot be presented and absent during an instant). ◦ Programs are causal by construction. ◦ Dynamic creation of processes since the system cannot react instantaneously to the absence of an event. 3Boussinot F., de Simone R., « The SL Synchronous Language », Software Engineering, vol. 22, n. 4, p. 256-266, 1996. 4http://rml.lri.fr Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 7/26 . . . 7/26
of logical instants. ◦ Ocaml functions are considered to be instantaneous. ◦ Processes may last over several logical instants. • Behavioral semantics à la Esterel. Defines what is a valid reaction no matter how this reaction is actually computed. • Communication between parallel processes is made by broadcasting signals. Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 8/26 . . . 8/26
interfaces ◦ Simulators • Recently the Antescofo language was embedded in ReactiveML. Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 9/26 . . . 9/26
2 let next = ref (Unix.gettimeofday() +. period) in 3 loop 4 let current = Unix.gettimeofday() in 5 if current >= !next then begin 6 emit tic; 7 next := !next +. period 8 end; 9 pause 10 end 11 ;; Program code 2: Clock Generator Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 11/26 . . . 11/26
of the box wait for the start time of the box no prede wait for the predecessors of the box wait for the interactive point prede ip ip Start the external process no ip no ip ip Wait the duration of the box no ip Stop the external process is start is end Schedule the successors boxes Behavior of a box Figure : A simple representation with finite automata Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 15/26 . . . 15/26
clock signal period: float tic: signal process: clock translate a clock signal into time period: float time: signal(float) tic: signal Figure : Clock Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 16/26 . . . 16/26
process: plan add a signal 's' to the scheduler date: signal(float) add_queue: signal(float,signal) dur: float s: signal process: wait generate a delay period: float tic: signal duration: float process: send send a signal scheduled for the current time date: signal(float) queue_pop: function process: update schedule a signal add_queue: signal queue_push: function date: signal(float) add_queue: signal process: plan date: signal(float) add_queue dur s process: schedule Figure : Scheduler Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 17/26 . . . 17/26
host: string client_port: int osc_messages: signal process: osc_server OSC server (async) server_port: int listen: signal process: mem_to_sig Send messages of a thread in a signal process: read_message (rec) Execute the server in a thread m: share_mem s: signal server: RLO.server Figure : OSC Client/Server Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 18/26 . . . 18/26
wait for the predecessors boxes pred: list (predecessors) process: successors_end (rec) schedule the successors boxes succe: list (succesors) process: exec (rec) execute a score score: list (boxes) process: exec_box_begin execute the start of a box (predecessors, no predecessors) box: box process: exec_ip wait for interactive events or execute a process 'proc' ip: list(interactive_point) proc: process process: exec_box execute the body of a box box: box process: end_box execute the end of a box (successors, no successors) box: box iscore: score plan: function listen: signal osc_messages: signal relations: signal array events: signal tic: signal period: float Figure : Score Player Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 19/26 . . . 19/26
for the design of Interactive Augmented Music Scores. • Synchronize ReactiveML with INScore via OSC messages !. • INScore observes the execution of the score. • Build the scenario dynamically. Figure : Graphical Interface in INScore 5http://inscore.sourceforge.net Jaime E. ARIAS ALMEIDA Execution of Interactive Scores using ReactiveML 21/26 . . . 21/26