package vecosek-scene

  1. Overview
  2. Docs
type bpm_operation = Scene_format_t.bpm_operation
type midi_event = Scene_format_t.midi_event = {
  1. port : int;
  2. status : int;
  3. channel : int;
  4. data1 : int;
  5. data2 : int option;
}
type event = Scene_format_t.event =
  1. | Track_ends of id
  2. | Track_starts of id
  3. | Midi_input of midi_event
type action = Scene_format_t.action =
  1. | Raw_midi of midi_event
  2. | Track_on of id * int
  3. | Track_off of id
  4. | Bpm_operation of bpm_operation
  5. | Add_event_handler of event_handler
  6. | Remove_event_handler of event_handler
  7. | Remove_event_handler_by_event of event
  8. | All_tracks_off
  9. | Stop
and event_handler = Scene_format_t.event_handler = {
  1. name : string;
  2. events : event list;
  3. actions : action list;
}
type ticked_action = Scene_format_t.ticked_action = {
  1. tick : int;
  2. action : action;
}
type track = Scene_format_t.track = {
  1. id : id;
  2. events : ticked_action list;
  3. length : int;
  4. name : string;
}
type scene = Scene_format_t.scene = {
  1. active : id list;
  2. handlers : event_handler list;
  3. bpm : int;
  4. ppqn : int;
  5. tracks : track list;
}
val write_bpm_operation : Bi_outbuf.t -> bpm_operation -> unit

Output a JSON value of type bpm_operation.

val string_of_bpm_operation : ?len:int -> bpm_operation -> string

Serialize a value of type bpm_operation into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_bpm_operation : Yojson.Safe.lexer_state -> Lexing.lexbuf -> bpm_operation

Input JSON data of type bpm_operation.

val bpm_operation_of_string : string -> bpm_operation

Deserialize JSON data of type bpm_operation.

val write_id : Bi_outbuf.t -> id -> unit

Output a JSON value of type id.

val string_of_id : ?len:int -> id -> string

Serialize a value of type id into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

Input JSON data of type id.

val id_of_string : string -> id

Deserialize JSON data of type id.

val write_midi_event : Bi_outbuf.t -> midi_event -> unit

Output a JSON value of type midi_event.

val string_of_midi_event : ?len:int -> midi_event -> string

Serialize a value of type midi_event into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

Input JSON data of type midi_event.

val midi_event_of_string : string -> midi_event

Deserialize JSON data of type midi_event.

val write_event : Bi_outbuf.t -> event -> unit

Output a JSON value of type event.

val string_of_event : ?len:int -> event -> string

Serialize a value of type event into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

Input JSON data of type event.

val event_of_string : string -> event

Deserialize JSON data of type event.

val write_action : Bi_outbuf.t -> action -> unit

Output a JSON value of type action.

val string_of_action : ?len:int -> action -> string

Serialize a value of type action into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

Input JSON data of type action.

val action_of_string : string -> action

Deserialize JSON data of type action.

val write_event_handler : Bi_outbuf.t -> event_handler -> unit

Output a JSON value of type event_handler.

val string_of_event_handler : ?len:int -> event_handler -> string

Serialize a value of type event_handler into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_event_handler : Yojson.Safe.lexer_state -> Lexing.lexbuf -> event_handler

Input JSON data of type event_handler.

val event_handler_of_string : string -> event_handler

Deserialize JSON data of type event_handler.

val write_ticked_action : Bi_outbuf.t -> ticked_action -> unit

Output a JSON value of type ticked_action.

val string_of_ticked_action : ?len:int -> ticked_action -> string

Serialize a value of type ticked_action into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

val read_ticked_action : Yojson.Safe.lexer_state -> Lexing.lexbuf -> ticked_action

Input JSON data of type ticked_action.

val ticked_action_of_string : string -> ticked_action

Deserialize JSON data of type ticked_action.

val write_track : Bi_outbuf.t -> track -> unit

Output a JSON value of type track.

val string_of_track : ?len:int -> track -> string

Serialize a value of type track into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

Input JSON data of type track.

val track_of_string : string -> track

Deserialize JSON data of type track.

val write_scene : Bi_outbuf.t -> scene -> unit

Output a JSON value of type scene.

val string_of_scene : ?len:int -> scene -> string

Serialize a value of type scene into a JSON string.

  • parameter len

    specifies the initial length of the buffer used internally. Default: 1024.

Input JSON data of type scene.

val scene_of_string : string -> scene

Deserialize JSON data of type scene.

OCaml

Innovation. Community. Security.