sequencer.nv
· 2.9 KiB · Text
原始檔案
Playground
|:@math: $x :@math: $op $y| :@math: $op $x $y
|:note: C | :note number: 0
|:note: C#| :note number: 1
|:note: Db| :note number: 1
|:note: D | :note number: 2
|:note: D#| :note number: 3
|:note: Eb| :note number: 3
|:note: E | :note number: 4
|:note: F | :note number: 5
|:note: F#| :note number: 6
|:note: Gb| :note number: 6
|:note: G | :note number: 7
|:note: G#| :note number: 8
|:note: Ab| :note number: 8
|:note: A | :note number: 9
|:note: A#| :note number: 10
|:note: Bb| :note number: 10
|:note: B | :note number: 11
|:note: $x| :note number: $x
|:note number: _|
|:note number: $note :@math: $actual-note|
:note number: $actual-note
|:note number: $note? :octave: $octave|
:@math: multiply $octave 12
:@math: add $note
|:note number: $note? :note basis: $basis|
:@math: add $note $basis
|:BPM: $x :@math: $n|
:note delay: $n
|:BPM: $x? :note length: 1 / $y?|
:@math: divide 60000 $x
:@math: divide $y
|:on loop:| :loop:
|:: play a note on $channel :note number: $note|
:: play $note on $channel
|:: play a note on $channel|
|:: play $note on $channel|
:played notes: $note $channel
:: set $note on on $channel
|:: stop $note on $channel|
:: set $note off on $channel
|:: set $note $state on $channel :note velocity: $velocity?|
:@midi: note $state $note $velocity $channel
|:: turn off all played notes? :played notes: $note $channel|
:: set $note off on $channel
|:: turn off all played notes|
|:: sleep $duration $unit|
:@time: sleep $duration $unit
|:: using MIDI output $output|
:@midi: set-output $output
||:channel: 0
|:: play? ::# ::$octave :set octave: $old|
:set octave: $octave
|:: play? ::# ::$octave|
:set octave: $octave
|:: play ::; :note delay: $delay?|
:: sleep $delay milliseconds
:: turn off all played notes
:: go to the first channel
:: play
:<: ;
|:: play? :: $note :blank note symbol: $note?|
:<: $note
|:: play :: $note :channel: $channel? :set octave: $octave?|
:: play a note on $channel :note: $note :octave: $octave
:: go to the next channel
:: play
:<: $note
|:: play :: $1?|
|:: play :: $1 $2?|
|:: play :: $1 $2 $3?|
|:: play :: $1 $2 $3 $4?|
|:: play :: $1 $2 $3 $4 $5?|
|:: play :: $1 $2 $3 $4 $5 $6?|
|:: play :: $1 $2 $3 $4 $5 $6 $7?|
|:: play :: $1 $2 $3 $4 $5 $6 $7 $8?|
|:: play :: $1 $2 $3 $4 $5 $6 $7 $8 $9?|
|:: play :: $1 $2 $3 $4 $5 $6 $7 $8 $9 $10?|
|:: play :loop:?|
:: replay
|:: play|
|:: replay :<: $note|
:: replay
:: $note
|:: replay|
:: play
|:: go to the next channel :@math: $x|
:channel: $x
|:: go to the next channel? :channel: $x|
:@math: add $x 1
|:: go to the first channel :channel: $x|
:channel: 0
|:: a jingle|
:: play :: (
# 5
C C _ _ ;
D _ _ _ ;
G G _ _ ;
E _ _ _ ;
C C _ _ ;
)
|::|:: using MIDI output 0 :: play :: a jingle
:blank note symbol: _
:note velocity: 32
:BPM: 180
:note length: 1 / 2
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 | |:on loop:| :loop: |
38 | |
39 | |:: play a note on $channel :note number: $note| |
40 | :: play $note on $channel |
41 | |:: play a note on $channel| |
42 | |
43 | |:: play $note on $channel| |
44 | :played notes: $note $channel |
45 | :: set $note on on $channel |
46 | |:: stop $note on $channel| |
47 | :: set $note off on $channel |
48 | |
49 | |:: set $note $state on $channel :note velocity: $velocity?| |
50 | :@midi: note $state $note $velocity $channel |
51 | |
52 | |:: turn off all played notes? :played notes: $note $channel| |
53 | :: set $note off on $channel |
54 | |:: turn off all played notes| |
55 | |
56 | |:: sleep $duration $unit| |
57 | :@time: sleep $duration $unit |
58 | |
59 | |:: using MIDI output $output| |
60 | :@midi: set-output $output |
61 | |
62 | ||:channel: 0 |
63 | |:: play? ::# ::$octave :set octave: $old| |
64 | :set octave: $octave |
65 | |:: play? ::# ::$octave| |
66 | :set octave: $octave |
67 | |:: play ::; :note delay: $delay?| |
68 | :: sleep $delay milliseconds |
69 | :: turn off all played notes |
70 | :: go to the first channel |
71 | :: play |
72 | :<: ; |
73 | |:: play? :: $note :blank note symbol: $note?| |
74 | :<: $note |
75 | |:: play :: $note :channel: $channel? :set octave: $octave?| |
76 | :: play a note on $channel :note: $note :octave: $octave |
77 | :: go to the next channel |
78 | :: play |
79 | :<: $note |
80 | |:: play :: $1?| |
81 | |:: play :: $1 $2?| |
82 | |:: play :: $1 $2 $3?| |
83 | |:: play :: $1 $2 $3 $4?| |
84 | |:: play :: $1 $2 $3 $4 $5?| |
85 | |:: play :: $1 $2 $3 $4 $5 $6?| |
86 | |:: play :: $1 $2 $3 $4 $5 $6 $7?| |
87 | |:: play :: $1 $2 $3 $4 $5 $6 $7 $8?| |
88 | |:: play :: $1 $2 $3 $4 $5 $6 $7 $8 $9?| |
89 | |:: play :: $1 $2 $3 $4 $5 $6 $7 $8 $9 $10?| |
90 | |:: play :loop:?| |
91 | :: replay |
92 | |:: play| |
93 | |
94 | |:: replay :<: $note| |
95 | :: replay |
96 | :: $note |
97 | |:: replay| |
98 | :: play |
99 | |
100 | |:: go to the next channel :@math: $x| |
101 | :channel: $x |
102 | |:: go to the next channel? :channel: $x| |
103 | :@math: add $x 1 |
104 | |
105 | |:: go to the first channel :channel: $x| |
106 | :channel: 0 |
107 | |
108 | |:: a jingle| |
109 | :: play :: ( |
110 | # 5 |
111 | C C _ _ ; |
112 | D _ _ _ ; |
113 | G G _ _ ; |
114 | E _ _ _ ; |
115 | C C _ _ ; |
116 | ) |
117 | |
118 | |::|:: using MIDI output 0 :: play :: a jingle |
119 | :blank note symbol: _ |
120 | :note velocity: 32 |
121 | :BPM: 180 |
122 | :note length: 1 / 2 |