package vecosek-engine

  1. Overview
  2. Docs

Module Make.StateSource

Sourcemodule Id_map : sig ... end
Sourcemodule Ticked_action_sequence : sig ... end
Sourcemodule Handlers_table : sig ... end
Sourcetype track = {
  1. name : string;
  2. mutable active : int option;
    (*

    The starting tick.

    *)
  3. length : int;
  4. events : Ticked_action_sequence.t;
}
Sourceval make_track : length:int -> name:string -> ?active:int -> events:Ticked_action_sequence.t -> unit -> track
Sourcetype t = {
  1. mutable bpm : int;
  2. mutable ppqn : int;
  3. tracks : track Id_map.t;
  4. handlers : Handlers_table.t;
}
Sourceval make : bpm:int -> ppqn:int -> tracks:track Id_map.t -> handlers:Handlers_table.t -> t
Sourceval of_scene : Vecosek_scene.Scene.t -> t
Sourceval 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.

Sourceval interesting_events_at_tick : t -> tick:int -> [> `Action of Vecosek_scene.Scene_format_t.action | `Event of Vecosek_scene.Scene.Event.t ] list list
Sourceval set_track_on_off : t -> id:Id_map.M.key -> int option -> unit
Sourceval set_all_tracks_off : t -> unit
Sourceval all_active_tracks : t -> (Id_map.M.key * int) list