package vecosek-engine

  1. Overview
  2. Docs
module Id_map : sig ... end
module Ticked_action_sequence : sig ... end
module Handlers_table : sig ... end
type track = {
  1. name : string;
  2. mutable active : int option;
    (*

    The starting tick.

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

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
val set_track_on_off : t -> id:Id_map.M.key -> int option -> unit
val set_all_tracks_off : t -> unit
val all_active_tracks : t -> (Id_map.M.key * int) list
OCaml

Innovation. Community. Security.