|
@@ -3,6 +3,9 @@
|
3
|
3
|
|
4
|
4
|
Arguments in curly braces are optional.
|
5
|
5
|
|
|
6
|
+------------------------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+__Hold PWM Duty Cycle__
|
6
|
9
|
|
7
|
10
|
Function | Opcode | Arguments
|
8
|
11
|
-------------------------|--------|---------------------------
|
|
@@ -16,7 +19,6 @@ Arguments | Range | Default | Note
|
16
|
19
|
|
17
|
20
|
PWM frequency and period for each possible (div) setting.
|
18
|
21
|
|
19
|
|
-Reg. | | Base |
|
20
|
22
|
Value | Div | Frequency | Period
|
21
|
23
|
------|------|-------------|-------
|
22
|
24
|
1 | 1 | 16 M | 62.5 n
|
|
@@ -35,6 +37,9 @@ Value | Div | Frequency | Period
|
35
|
37
|
14 | 8192 | 1953.125 Hz | 512 u
|
36
|
38
|
15 |16384 | 976.6625 Hz | 1024 u
|
37
|
39
|
|
|
40
|
+------------------------------------------------------------------------------------------
|
|
41
|
+
|
|
42
|
+__Note-on Velocity__
|
38
|
43
|
|
39
|
44
|
Function | Opcode | Arguments
|
40
|
45
|
-------------------------|--------|---------------------------
|
|
@@ -48,6 +53,9 @@ Execute a note onset.
|
48
|
53
|
The (vel) value is translated to an attack pulse duration
|
49
|
54
|
by looking up the pulse tick count in the velocity table.
|
50
|
55
|
|
|
56
|
+------------------------------------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+__Note-on Microseconds__
|
51
|
59
|
|
52
|
60
|
Function | Opcode | Arguments
|
53
|
61
|
-------------------------|--------|-------------------------------------------------
|
|
@@ -67,6 +75,10 @@ ticks to micoseconds:
|
67
|
75
|
usecs = (pulse-ticks * 1e6)*(256/16e6)
|
68
|
76
|
|
69
|
77
|
|
|
78
|
+------------------------------------------------------------------------------------------
|
|
79
|
+
|
|
80
|
+__Note-off__
|
|
81
|
+
|
70
|
82
|
Function | Opcode | Arguments
|
71
|
83
|
-------------------------|--------|---------------------------
|
72
|
84
|
Note off | 3 | None
|
|
@@ -74,6 +86,10 @@ Note off | 3 | None
|
74
|
86
|
Turn off a sounding note by settting the hold-voltage to 0.
|
75
|
87
|
|
76
|
88
|
|
|
89
|
+------------------------------------------------------------------------------------------
|
|
90
|
+
|
|
91
|
+__Set Read Address__
|
|
92
|
+
|
77
|
93
|
Function | Opcode | Arguments
|
78
|
94
|
-------------------------|--------|---------------------------
|
79
|
95
|
Set read address | 4 | (src) {(addr)}
|
|
@@ -82,34 +98,76 @@ Set the source and address of the next I2C read request.
|
82
|
98
|
|
83
|
99
|
The read can come from one of three memory banks:
|
84
|
100
|
Register File, MIDI velocity table or EEPROM.
|
85
|
|
-See the _Memory Location Id_ table below for the (src) id values.
|
86
|
|
-
|
|
101
|
+See the _Memory Source Id Table_ below for the (src) id values.
|
87
|
102
|
|
88
|
103
|
Arguments | Range | Default | Note
|
89
|
104
|
------------|-------|---------|-------------------------------------------------------
|
90
|
|
-(src) | 0-2 | n/a | Memory location id. See _Memory Location Id_ table.
|
|
105
|
+(src) | 0-2 | n/a | Memory location id. See _Memory Source Id Table_.
|
91
|
106
|
(addr) | 0-255 | n/a | Offset from base address set by (src)
|
92
|
107
|
|
|
108
|
+Memory Source Id Table
|
|
109
|
+
|
|
110
|
+Id | Memory | Note
|
|
111
|
+---|----------------|-------------------------------
|
|
112
|
+ 0 | Register file | See register table file
|
|
113
|
+ 1 | Velocity table | MIDI velocity to pulse ticks lookup table
|
|
114
|
+ 2 | EEPROM | EEPROM data memory
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+------------------------------------------------------------------------------------------
|
|
118
|
+
|
|
119
|
+__Write Memory__
|
|
120
|
+
|
|
121
|
+Function | Opcode | Arguments
|
|
122
|
+-------------------------|--------|--------------------------------------------
|
|
123
|
+Write memory | 5 | (addrFl + dest) {(addr)} (value0) ... (valueN)
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+Arguments | Range | Default | Note
|
|
127
|
+------------|-------|---------|----------------------------------------------------------------
|
|
128
|
+(addrFl) | 0,127 | 0 | Address flag. Set if second byte is an (addr) and not (value0)
|
|
129
|
+(dest) | 0-2 | n/a | Memory destination location. See _Memory Destination Id Table_.
|
|
130
|
+(addr) | 0-255 | n/a | Optional offset from base address set by (dest)
|
|
131
|
+
|
|
132
|
+Memory Destination Id Table
|
|
133
|
+
|
|
134
|
+Id | Memory | Note
|
|
135
|
+---|----------------|-------------------------------
|
|
136
|
+ 4 | Register file | See register table file
|
|
137
|
+ 5 | Velocity table | MIDI velocity to pulse ticks lookup table
|
|
138
|
+ 6 | EEPROM | EEPROM data memory
|
|
139
|
+
|
|
140
|
+------------------------------------------------------------------------------------------
|
|
141
|
+
|
|
142
|
+__Write Velocity Table to EEPROM__
|
93
|
143
|
|
94
|
144
|
Function | Opcode | Arguments
|
95
|
145
|
-------------------------|--------|---------------------------
|
96
|
|
-Write memory | 5 |
|
|
146
|
+Write velocity table | 6 |
|
97
|
147
|
|
|
148
|
+Writes the MIDI velocity table from memory to EEPROM.
|
98
|
149
|
|
99
|
150
|
|
|
151
|
+------------------------------------------------------------------------------------------
|
|
152
|
+
|
|
153
|
+__Set Hold Delay__
|
|
154
|
+
|
100
|
155
|
Function | Opcode | Arguments
|
101
|
156
|
-------------------------|--------|---------------------------
|
102
|
|
-Set hold delay | 6 | { high {low}}
|
|
157
|
+Set hold delay | 7 | { high {low}}
|
103
|
158
|
|
104
|
159
|
Set the length of the delay, in ticks, between when the attack pulse ends and when the
|
105
|
160
|
hold voltage is applied.
|
106
|
161
|
The high and low byte values are calculated identically to the
|
107
|
162
|
attack pulse duration values.
|
108
|
163
|
|
|
164
|
+------------------------------------------------------------------------------------------
|
|
165
|
+
|
|
166
|
+__Set *flags* variable__
|
109
|
167
|
|
110
|
168
|
Function | Opcode | Arguments
|
111
|
169
|
-------------------------|--------|---------------------------
|
112
|
|
-Set flags variable | 7 | (flags)
|
|
170
|
+Set flags variable | 8 | (flags)
|
113
|
171
|
|
114
|
172
|
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
|
115
|
173
|
-----|-----|-----|-----|-----|-----|-----|-----
|
|
@@ -117,8 +175,10 @@ Set flags variable | 7 | (flags)
|
117
|
175
|
|
118
|
176
|
_HOA_ : Set to apply the hold voltage at the beginning of the attack.
|
119
|
177
|
|
|
178
|
+------------------------------------------------------------------------------------------
|
|
179
|
+
|
|
180
|
+## Register File Address
|
120
|
181
|
|
121
|
|
-Register file
|
122
|
182
|
|
123
|
183
|
Address | Label | Note
|
124
|
184
|
--------|-----------------|------------------------------------------------------------------------------------------------
|
|
@@ -144,13 +204,16 @@ Address | Label | Note
|
144
|
204
|
19 | Flags_Addr | Binary variable field.
|
145
|
205
|
|
146
|
206
|
|
147
|
|
-Memory Location Id table.
|
|
207
|
+------------------------------------------------------------------------------------------
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+## Memory Destination Id table
|
148
|
211
|
|
149
|
212
|
Id | Memory | Note
|
150
|
213
|
---|----------------|-------------------------------
|
151
|
|
- 0 | Register file | See register table file
|
152
|
|
- 1 | Velocity table | MIDI velocity to pulse ticks lookup table
|
153
|
|
- 2 | EEPROM | EEPROM data memory
|
|
214
|
+ 4 | Register file | See register table file
|
|
215
|
+ 5 | Velocity table | MIDI velocity to pulse ticks lookup table
|
|
216
|
+ 6 | EEPROM | EEPROM data memory
|
154
|
217
|
|
155
|
218
|
|
156
|
219
|
|