background image

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 breakpoint of each 
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.

Summary of Contents for K150 - APPENDIX 1

Page 1: ...nary 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 part...

Page 2: ...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 Progr...

Page 3: ...ollowed 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 argum...

Page 4: ...he 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 p...

Page 5: ...ple rate of the sound generator This rate is exactly 19531 25Hz which is exactly equal to a 51 2 uS period It is derived in the hardware by dividing a 20MHz clock by 1024 Frequency units are based on...

Page 6: ...ey are represented by an unsigned 8 bit integer in units of 3 8 of a decibel This gives a range of 0dB to 95 625dB In most cases the dB value is an amplitude which means that 0 is silence and 255 is m...

Page 7: ...partial sawtooth Of course the whole issue of phase is moot for sounds with intended inexact harmonics 1 6 MODEL PARAMETERS Model parameters affect the entire sound model in some fashion 1 6 1 Model N...

Page 8: ...ant byte at the lower even address The symbolic names given to the various fields come from the Apple II version of the S M P and are shown here simply as mnemonic aids To make reading easier decimal...

Page 9: ...E 3 Update 3 228 9dB S BYTE 0 Wait 20mS BYTE 2 Update 2 171 7dB S BYTE 0 Wait 30mS BYTE 1 Update 1 143 0dB S BYTE 0 Wait 100mS BYTE 1 2 Update I 80 5dB S Update 2 114 4dB S BYTE 0 Wait 50mS BYTE 3 Upd...

Page 10: ...portant All of the model headers must follow the voice header A field in the voice header specifies how many models follow so the K150FS knows when it reaches the end of the model header list The data...

Page 11: ...r 7F ACK positive acknowledge OK Only Dump Voice Load Voice Block Data Transfer NAK and ACK are described in this document The others are described in a document titled K150FS Version 1 6 Software app...

Page 12: ...the voice data such as an odd number of data nybbles Otherwise it will a NAK Only the simplest errors are checked for Erroneous voice data will likely cause the K150FS software to crash when a key is...

Reviews: