Остання активність 1748680786

This is a MIDI sequencer supporting variable-length channels.

wryl ревизій цього gist 1748680786. До ревизії

1 file changed, 3 insertions, 2 deletions

sequencer.nv

@@ -89,6 +89,7 @@
89 89 |:: play :: $1 $2 $3 $4 $5 $6 $7 $8 $9 $10?|
90 90 |:: play :loop:?|
91 91 :: replay
92 + |:: play|
92 93
93 94 |:: replay :<: $note|
94 95 :: replay
@@ -114,8 +115,8 @@
114 115 C C _ _ ;
115 116 )
116 117
117 - |::|:: using MIDI output 0 :: play :: a jingle :on loop:
118 + |::|:: using MIDI output 0 :: play :: a jingle
118 119 :blank note symbol: _
119 120 :note velocity: 32
120 121 :BPM: 180
121 - :note length: 1 / 1
122 + :note length: 1 / 2

wryl ревизій цього gist 1748680688. До ревизії

1 file changed, 24 insertions, 9 deletions

sequencer.nv

@@ -34,6 +34,8 @@
34 34 :@math: divide 60000 $x
35 35 :@math: divide $y
36 36
37 + |:on loop:| :loop:
38 +
37 39 |:: play a note on $channel :note number: $note|
38 40 :: play $note on $channel
39 41 |:: play a note on $channel|
@@ -75,6 +77,16 @@
75 77 :: go to the next channel
76 78 :: play
77 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?|
78 90 |:: play :loop:?|
79 91 :: replay
80 92
@@ -92,15 +104,18 @@
92 104 |:: go to the first channel :channel: $x|
93 105 :channel: 0
94 106
95 - |::|:: using MIDI output 0 :: play :loop: :: (
96 - # 5
97 - C C _ _ ;
98 - D _ _ _ ;
99 - G G _ _ ;
100 - E _ _ _ ;
101 - C C _ _ ;
102 - )
107 + |:: a jingle|
108 + :: play :: (
109 + # 5
110 + C C _ _ ;
111 + D _ _ _ ;
112 + G G _ _ ;
113 + E _ _ _ ;
114 + C C _ _ ;
115 + )
116 +
117 + |::|:: using MIDI output 0 :: play :: a jingle :on loop:
103 118 :blank note symbol: _
104 119 :note velocity: 32
105 120 :BPM: 180
106 - :note length: 1 / 1
121 + :note length: 1 / 1

wryl ревизій цього gist 1748680347. До ревизії

1 file changed, 5 insertions, 9 deletions

sequencer.nv

@@ -40,11 +40,6 @@
40 40
41 41 |:: play $note on $channel|
42 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 43 :: set $note on on $channel
49 44 |:: stop $note on $channel|
50 45 :: set $note off on $channel
@@ -63,10 +58,10 @@
63 58 :@midi: set-output $output
64 59
65 60 ||:channel: 0
61 + |:: play? ::# ::$octave :set octave: $old|
62 + :set octave: $octave
66 63 |:: play? ::# ::$octave|
67 64 :set octave: $octave
68 - :<: $octave
69 - :<: #
70 65 |:: play ::; :note delay: $delay?|
71 66 :: sleep $delay milliseconds
72 67 :: turn off all played notes
@@ -79,6 +74,7 @@
79 74 :: play a note on $channel :note: $note :octave: $octave
80 75 :: go to the next channel
81 76 :: play
77 + :<: $note
82 78 |:: play :loop:?|
83 79 :: replay
84 80
@@ -96,7 +92,7 @@
96 92 |:: go to the first channel :channel: $x|
97 93 :channel: 0
98 94
99 - |::|:: using MIDI output 0 :: play :: (
95 + |::|:: using MIDI output 0 :: play :loop: :: (
100 96 # 5
101 97 C C _ _ ;
102 98 D _ _ _ ;
@@ -107,4 +103,4 @@
107 103 :blank note symbol: _
108 104 :note velocity: 32
109 105 :BPM: 180
110 - :note length: 1 / 2
106 + :note length: 1 / 1

wryl ревизій цього gist 1748680292. До ревизії

Без змін

wryl ревизій цього gist 1748679847. До ревизії

1 file changed, 110 insertions

sequencer.nv(файл створено)

@@ -0,0 +1,110 @@
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
Новіше Пізніше