Kurzweil K150 - APPENDIX 1, K150FS Appendix

APPENDIX 1 - K150FS SYSTEM EXCLUSIVE FORMATS
This section describes in detail the MIDI system exclusive message formats used by the K150FS and Sound Modeling Program to exchange voice information. An additional document titled: K150FS Version 1.6 Software by Ralph Muha describes additional system exclusive messages that are available for program dump and restore, master parameter block (global parameters such as MIDI mode) dump and restore, and remote front panel operation. The K150 User’s Manual describes general operating features of the K150 which are equally applicable to the K150FS.
1. DETAILED DESCRIPTION OF CONTOURED SOUND MODELING
Elsewhere in this manual is a generalized description of the Contoured Sound Modeling process used by the K150FS detailed to the extent needed for effective use of the Sound Modeling Program (.S.M.P.). This section will detail the process to the level needed for understanding the actual MIDI system exclusive messages used to represent sound models.
Sounds in the K150FS are actually a hierarchy of data structures as shown below:
PROGRAM
VOICE(S)
MODEL(S)
PARTIAL-PARAMETERS CONTOURS ATTACK-FUNCTION RELEASE-SLOPES
Programs are the highest level and consist of one or more Voices layered together. Voices are the basic sounds from the user’s point of view and cover the full range of the keyboard. Voices usually consist of several Models each of which covers a limited pitch range. Models are the basic sounds from the sound designer’s point of view and consist of Partial Parameters and Contours which define the overall timbre, an Attack Function that modifies that timbre according to MIDI note-on velocity, and Release Slopes that define the sound’s release. Each of these entities has a corresponding binary data structure which is communicated via system exclusive messages. A bottom-up approach will be used in describing these structures.
1.1 PARTIAL PARAMETERS
A sound model may have from 1 to 64 partials (additive synthesis components). Partial parameters give information about these partials as follows:
1.1.1 Partial Type
There are 4 types of partials available for constructing models. Relative relative partial is a MULTIPLE times the fundamental frequency of the note being played. This multiple may have a fractional part and may be less than 1. Absolute partials are also available. The frequency of an absolute partial is a fixed number of Hertz regardless of the note being played. Two types of noise partials are available, "low" and "high". Each causes the partial hardware to scan through a short noise table the difference being in the table that is used.
1.1.2 Partial Frequency
Every partial has a frequency which is a 16-bit value. The frequencies of relative partials are given as a multiple of the fundamental pitch being played. The frequencies of absolute partials are given as a multiple (much less than one) of the highest frequency that can be produced. The frequency field of noise partials varies the scan rate through the noise tables and thus varies the noise spectrum. The relation between noise "frequency" and the spectrum is extremely complex and best determined by trial and error.
1.1.3 Optional Partial Flag
This flag marks the partial as being less important to the sound’s timbre than unmarked partials. In a playing situation that calls for more notes than there are partials available (but still less than the 16-note limit), optional partials are not sounded. Thus in voices that use many partials, one should attempt to mark the less important ones optional. When actual partial stealing is required, the higher numbered partials of presently sounding notes are stolen first.
partials are the most common. The frequency of a
1.2 CONTOURS
0
-16
-32
-48
-64
-80
-96
dB
0 50 100 150 200 250 300 350 400 450 msec
40,0
100,0
200,-16
310,-24
40ms 2400 dB/s
60ms 0 dB/s
100ms
-160 dB/s
110ms
-72.7 dB/s
0 dB/s
0
-16
-32
-48
-64
-80
-96
dB
0 50
100 150
200 250 300 350 400 450 msec
30,
-16
70,-8
200,-32
330,-48
450,-56
30ms 2667 dB/s
40ms 200 dB/s
130ms
-184.6 dB/s 130ms
-123 dB/s
120ms
-66.7 dB/s
0
-16
-32
-48
-64
-80
-96
dB
0
50
100 150
200 250 300
350 400
450 msec
20,
-32
50,-8
250,-56
450,-96
20ms 3200 dB/s
30ms 800 dB/s
200ms
-240 dB/s
200ms
-200 dB/s
Contours are arbitrarily shaped amplitude envelopes, one for each partial in the model. A contour always starts from silence (-95.6dB), follows a curve approximated by straight-line segments, and either returns to silence (model of a decaying sound), ends at some finite value, or loops upon itself (sounds that may be indefinitely sustained). There is no upper limit to the duration of a contour but accumulated error in generating the contours gives a practical limit in the low minutes range. The Apple II Sound Modeling Program imposes a limit of 65 seconds.
Contours are effectively represented by a series of breakpoints with straight lines between them. Plotted on a normal graph, every breakpoint has a time and an amplitude. Amplitude values between breakpoint times lie along a straight line connecting the breakpoints. Breakpoint times may be unequally and arbitrarily spaced and specified to a precision of 51.2uS. The breakpoint times of each contour are completely independent and need have no relation with each other. However, voice memory may be saved and loading of the K150FS’s internal processor reduced if some of the breakpoint times coincide.
Whereas the Sound Modeling Program stores breakpoint data in absolute time (16-bit milliseconds) and amplitude (8-bit fraction of maximum), breakpoints must be communicated to the K150FS in delta-time breakpoint is specified relative to the previous breakpoint and the amplitude is specified as the slope of the line segment connecting to the next breakpoint. Thus everything is relative to the first breakpoint which is always zero time and zero amplitude. The example below should be studied to understand this.
and slope format. Thus the time of a
A data structure for representing all of the contours of a model would normally be a rather complex two-dimensional array with variable-length rows. Interpreting such an array would involve a lot of searching. For efficiency in playing the contours, the K150FS requires the breakpoint data to be sorted into a one-dimensional vector of update commands which can then be interpreted sequentially as time passes. There are four types of commands: Update Slope, Wait, End of Contour, and End of Note. Note that End of Contour indicates that the partial is no longer needed and thus can be used by some other note. It should be issued when a partial’s contour has decayed to silence and will remain there. End of Note indicates that no more commands or arguments are present. The contours not already terminated by End of Contour will continue along whatever slopes were last specified until the note is actually released. The three contour example above would be encoded into the update command string listed below.
Command Argument Command Argument Command Argument
UPD#1 2400 dB/s WAIT 30 ms UPD#1 0 dB/s UPD#2 2667 dB/s UPD#2 -184.6 dB/s WAIT 20 ms UPD#3 3200 dB/s WAIT 30 ms UPD#2 -48 dB/s WAIT 20 ms UPD#1 -160 dB/s WAIT 120 ms UPD#3 1200 dB/s WAIT 100 ms UPD#2 0 dB/s WAIT 10 ms UPD#1 -72.7 dB/s END#3 UPD#2 200 dB/s UPD#2 -123 dB/s END-0F-NOTE WAIT 10 ms WAIT 50 ms UPD#1 0 dB/s UPD#3 -56 dB/s UPD#3 -240 dB/s WAIT 60 ms
Encoding of the command string above can be accomplished by allocating one byte for the partial number and command code combined followed by two bytes for the argument. However, since the K150FS’s internal 68000 processor requires 16­bit quantities to be at even addresses, the string is split into a command code vector and an argument vector. When a model is being played, a pointer into each vector is maintained and is incremented to the next element as each element is read. This makes memory dumps difficult to read but is efficient and compact for the microprocessor. Coding for the command code bytes is as follows:
CODE ARGUMENT COMMAND MEANING
0 Time Wait Wait before executing next command 0 0 End-of-note No more commands follow
N Slope Update Update partial #N where 1 <= N <= 64
-N none End-of-partial Contour for partial N is complete, can reuse it.
-128 Destination Loopback See below
Actually, there is a fifth type of command; Loopback. This is used for looping contours. The command code byte is $80 (-
128). Its two arguments simply specify how many commands and how many arguments (times 2) the corresponding pointers must be backed up before continuing. Since all of the contours are encoded into one pair of command and argument strings, the loop affects all partials which have update commands inside the loop.
1.3 ATTACK FUNCTION
As mentioned earlier, the first breakpoint of all contours is at zero amplitude and zero time. The second contour is actually specified by a table called the Attack Function. The third and subsequent breakpoints are specified by the command and argument lists described above in section 1.2. Since an entire contour in delta-time-slope format is relative to the amplitude of the second breakpoint, its overall amplitude can be shifted up or down simply by altering the amplitude of the second breakpoint. This is illustrated below.
breakpoint of each
0
-16
-32
-48
-64
-80
-96
dB
0 50 100 150 200 250 300 350 400 450
msec
3200 dB/s
2400 dB/s
30ms 800 dB/s
200ms
-240 dB/s
200ms
-200 dB/s
Original Contour
Second BP shifted down 16 dB.
Hardware clips at -95.6 dB
The K150FS operating system considers a host of variables in setting the absolute second breakpoint amplitude of each partial when a note is started (actually it is setting the slope away from the first breakpoint). These include the attack function table to be described, the MIDI velocity, the overall loudness of the model, the MIDI volume controller, and the "graphic equalizer" layer parameters in the sound program. However, once the contours are launched.from the second breakpoint, their evolution is predestined except for the Release Rates to be discussed later.
The Attack Function is a rectangular array with columns corresponding to partials and rows corresponding to attack levels
. Each attack level specifies a different spectral modification of the model. A particular attack level is selected according to the MIDI note-on velocity. There may be as few as one or as many attack levels as desired and they can be arbitrarily spaced. The entries in this main part of the attack function array are absolute amplitudes of second breakpoints. A zero entry will suppress the corresponding partial in notes played at the corresponding attack level.
An additional row in the Attack Function gives the times of the second breakpoints, one for each partial (column). An additional column specifies the MIDI velocity (after translation to amplitude according to the current velocity map) for each of the attack levels. The last array element at the extra row and column intersection gives the earliest second breakpoint time which is when interpretation of the update command list should begin.
To make it easier on the processor in the K150FS, the second breakpoint times in the additional row are given as a special code, not in milliseconds or samples. The codes are drawn from the following table:
TIME CODE TIME CODE TIME CODE TIME CODE TIME CODE
2 53 20 8 55 19 92 30 145 41 3 54 22 9 60 20 95 31 150 42 4 0 25 10 62 21 100 32 160 43 5 55 30 11 65 22 105 33 170 44 6 1 32 12 70 23 110 34 180 45
8 2 35 13 72 24 115 35 190 46 10 3 40 14 75 25 120 36 200 47 12 4 42 15 80 26 125 37 210 48 14 5 45 16 82 27 130 38 220 49 16 6 50 17 85 28 135 39 230 50 18 7 52 18 90 29 140 40 240 51
250 52
Note that only those times listed in the above table are available for the second breakpoint time. The Sound Modeling Program rounds off the second breakpoint times when a model is compiled but retains millisecond accuracy for the third and succeeding breakpoints. In cases where the user specified second breakpoint time is greater than 250mS, the .S.M.P. actually inserts a phantom second breakpoint during compilation at 250mS that resides on the line segment connecting the user specified first and second breakpoints.
Below is an example of an attack function for the earlier 3 partial example with 3 attack levels. The middle attack level, which is used when the MIDI velocity maps into a loudness between -12 and -6dB, specifies the model unaltered. The highest level, used for loudnesses above -6dB, has the first partial left alone but the second boosted by 3dB and the third boosted by 6dB thus making the sound brighter. The lowest level, used for loudness below -12dB, cuts the third partial by 3dB while leaving the first and second alone.
Loading...
+ 8 hidden pages