package vecosek-engine
Module Make.StateSource
Source
type track = {name : string;mutable active : int option;(*The starting tick.
*)length : int;events : Ticked_action_sequence.t;
}Source
val make_track :
length:int ->
name:string ->
?active:int ->
events:Ticked_action_sequence.t ->
unit ->
trackSource
type t = {mutable bpm : int;mutable ppqn : int;tracks : track Id_map.t;handlers : Handlers_table.t;
}Source
val current_tick :
t ->
current_date:float ->
previous_date:float ->
previous_tick:int ->
[> `Tick of int ] * [> `Elapsed of float ] * [> `Pulse of float ]Returns the current “tick” by counting how many of them should have happened since the previous iteration.
It also returns the readjusted “elapsed” time, that accounts for int_of_float imprecisions.
The pulse_length is just for debug display.
Source
val interesting_events_at_tick :
t ->
tick:int ->
[> `Action of Vecosek_scene.Scene_format_t.action
| `Event of Vecosek_scene.Scene.Event.t ]
list
list