-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathKIT.F
executable file
·140 lines (122 loc) · 3.55 KB
/
KIT.F
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
\ $Workfile: kit.f $
\
needs b0b b0b.f
needs __CHET&FARLEY chet&far.f
needs __DRUMVOL drumvol.f
Forth
ifdef __KIT forget __KIT
ifend create __KIT
:ap Kick ( -- )
BothDrumsMC useDV dvRand- to $volume
\ 35 84 85 3 $n
35 $
;ap
:ap Snare ( -- )
BothDrumsMC useDV
$volume dvStep + dvMax min to $volume \ need LOUD snare
86 88 2 $n
;ap
:ap Rim ( -- )
BothDrumsMC useDV 37 $
;ap
:ap Stick ( -- )
CardDrumsMC useDV 39 $
;ap
:ap Hat_c ( -- )
U110DrumsMC useDV 42 z$
CardDrumsMC useDV 90 $
;ap
\ :ap ohh1 U110DrumsMC 46 z$ ;ap
\ :ap ohh2 U110DrumsMC 44 z$ ;ap
\ :ap ohh3 CardDrumsMC 46 z$ ;ap
\ :ap ohh4 CardDrumsMC 44 z$ ;ap
:ap Hat_o ( -- )
U110DrumsMC useDV dvRand- to $volume 44 z$
CardDrumsMC useDV dvRand- to $volume 44 $
;ap
59 constant hiRd 94 constant midRd 51 constant loRd
quan lastRd midRd to lastRd
\ Ride cymbal is usually played mid, but sometimes goes low or hi
:ap Ride ( -- )
U110DrumsMC useDV $volume dvStep - to $volume
2 Rand if midRd
else lastRd midRd =
if brnd
if loRd
else hiRd
then
else lastRd \ hi or low
then
then
dup to lastRd $
;ap
:ap lt1 BothDrumsMC useDV ." lt1 " 41 $ ;ap
\ :ap ltx U110DrumsMC useDV ." ltx " 41 43 2 $n ;ap
\ :ap lt2 U110DrumsMC useDV ." lt2 " 43 $ ;ap
\ :ap lt3 U110DrumsMC useDV ." lt3 " 89 $ ;ap
\ :ap mt1 U110DrumsMC useDV ." mt1 " 45 $ ;ap
\ :ap mt2 U110DrumsMC useDV ." mt2 " 47 $ ;ap
:ap mtx U110DrumsMC useDV ." mtx " 47 45 2 $n ;ap
\ :ap mt3 U110DrumsMC useDV ." mt3 " 91 $ ;ap
:ap ht1
U110DrumsMC ." ht1 " 48 z$
CardDrumsMC useDV 48 $
;ap
\ :ap ht2 U110DrumsMC useDV ." ht2 " 50 $ ;ap
\ :ap htx BothDrumsMC useDV ." htx " 48 50 2 $n ;ap
\ :ap ht3 U110DrumsMC useDV ." lt1 " 93 $ ;ap
:ap Tom_low lt1 ;ap
:ap Tom_mid mtx ;ap
:ap Tom_hi ht1 ;ap
\ here's a test program
variable Drumming
:sg ~/18 1|18 & ;sg \ eighteenth note
:ap /18 ::tsg begin ~/18 again ;;sg ;ap
:sg ~/9 1|9 & ;sg \ ninth note
:ap /9 ::tsg begin ~/9 again ;;sg ;ap
:ap test
Drumming on
60 127 SetDrumVolumeRange
::ap /12
begin Drumming @
while Accent Kick |3| Uncent Kick
repeat
Accent Kick
;;ap
::ap /12
begin Drumming @
while Ride rest Ride
Accent Ride rest Ride
Ride Ride Ride
Accent Ride Ride Ride
Accent Hat_o rest Hat_c
Hat_c rest Hat_c
Hat_o rest Hat_c
Accent Hat_c Hat_c Hat_c
repeat
;;ap
::ap /4 rest /2
begin Drumming @
while brnd if Accent else Uncent then
brnd if Snare Snare
else Rim Rim
then
repeat
;;ap
::ap /24
begin Drumming @
while brnd
if 18 0 do rest loop
else brnd if 4 0 do Uncent Tom_hi loop
4 0 do Uncent Tom_mid loop
4 0 do Uncent Tom_low loop
else 4 0 do Tom_low loop
4 0 do Tom_mid loop
4 0 do Tom_hi loop
then cr
then
repeat
;;ap
;ap
formula
: x Drumming off ;