Dernière activité 1748680786

This is a MIDI sequencer supporting variable-length channels.

Révision 397d2a982d67d833331cc766e5dca8763566b4c0

sequencer.nv Brut Playground
1|:@math: $x :@math: $op $y| :@math: $op $x $y
2
3|:note: C | :note number: 0
4|:note: C#| :note number: 1
5|:note: Db| :note number: 1
6|:note: D | :note number: 2
7|:note: D#| :note number: 3
8|:note: Eb| :note number: 3
9|:note: E | :note number: 4
10|:note: F | :note number: 5
11|:note: F#| :note number: 6
12|:note: Gb| :note number: 6
13|:note: G | :note number: 7
14|:note: G#| :note number: 8
15|:note: Ab| :note number: 8
16|:note: A | :note number: 9
17|:note: A#| :note number: 10
18|:note: Bb| :note number: 10
19|:note: B | :note number: 11
20|:note: $x| :note number: $x
21
22|:note number: _|
23|:note number: $note :@math: $actual-note|
24 :note number: $actual-note
25|:note number: $note? :octave: $octave|
26 :@math: multiply $octave 12
27 :@math: add $note
28|:note number: $note? :note basis: $basis|
29 :@math: add $note $basis
30
31|:BPM: $x :@math: $n|
32 :note delay: $n
33|:BPM: $x? :note length: 1 / $y?|
34 :@math: divide 60000 $x
35 :@math: divide $y
36
37|:: play a note on $channel :note number: $note|
38 :: play $note on $channel
39|:: play a note on $channel|
40
41|:: play $note on $channel|
42 :played notes: $note $channel
43 :<: $note
44 :: set $note on on $channel
45|:: play $note on $channel|
46 :played notes: $note $channel
47 :<: $note
48 :: set $note on on $channel
49|:: stop $note on $channel|
50 :: set $note off on $channel
51
52|:: set $note $state on $channel :note velocity: $velocity?|
53 :@midi: note $state $note $velocity $channel
54
55|:: turn off all played notes? :played notes: $note $channel|
56 :: set $note off on $channel
57|:: turn off all played notes|
58
59|:: sleep $duration $unit|
60 :@time: sleep $duration $unit
61
62|:: using MIDI output $output|
63 :@midi: set-output $output
64
65||:channel: 0
66|:: play? ::# ::$octave|
67 :set octave: $octave
68 :<: $octave
69 :<: #
70|:: play ::; :note delay: $delay?|
71 :: sleep $delay milliseconds
72 :: turn off all played notes
73 :: go to the first channel
74 :: play
75 :<: ;
76|:: play? :: $note :blank note symbol: $note?|
77 :<: $note
78|:: play :: $note :channel: $channel? :set octave: $octave?|
79 :: play a note on $channel :note: $note :octave: $octave
80 :: go to the next channel
81 :: play
82|:: play :loop:?|
83 :: replay
84
85|:: replay :<: $note|
86 :: replay
87 :: $note
88|:: replay|
89 :: play
90
91|:: go to the next channel :@math: $x|
92 :channel: $x
93|:: go to the next channel? :channel: $x|
94 :@math: add $x 1
95
96|:: go to the first channel :channel: $x|
97 :channel: 0
98
99|::|:: using MIDI output 0 :: play :: (
100 # 5
101 C C _ _ ;
102 D _ _ _ ;
103 G G _ _ ;
104 E _ _ _ ;
105 C C _ _ ;
106)
107:blank note symbol: _
108:note velocity: 32
109:BPM: 180
110:note length: 1 / 2