package vecosek-scene

  1. Overview
  2. Docs

Source file scene_format_t.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
(* Auto-generated from "scene_format.atd" *)
[@@@ocaml.warning "-27-32-33-35-39"]

type bpm_operation = [
    `Set of int
  | `Incr of int
  | `Decr of int
  | `Mul of float
]

type id = string

type midi_event = {
  port: int;
  status: int;
  channel: int;
  data1: int;
  data2: int option
}

type event = 
    Track_ends of id
  | Track_starts of id
  | Midi_input of midi_event


type action = 
    Raw_midi of midi_event
  | Track_on of (id * int)
  | Track_off of id
  | Bpm_operation of bpm_operation
  | Add_event_handler of event_handler
  | Remove_event_handler of event_handler
  | Remove_event_handler_by_event of event
  | All_tracks_off
  | Stop


and event_handler = {
  name: string;
  events: event list;
  actions: action list
}

type ticked_action = { tick: int; action: action }

type track = {
  id: id;
  events: ticked_action list;
  length: int;
  name: string
}

type scene = {
  active: id list;
  handlers: event_handler list;
  bpm: int;
  ppqn: int;
  tracks: track list
}
OCaml

Innovation. Community. Security.