245
edits
(Merging of the SCI documentation) |
m (Formatting fix) |
||
Line 201: | Line 201: | ||
;Cx p | ;Cx p | ||
:Program change: Set program (patch / instrument / ect.) to p for channel x. This is a simple instrument change.< | :Program change: Set program (patch / instrument / ect.) to p for channel x. This is a simple instrument change.<br>Channel 15, however, includes two special cases of this status. The first relates to communication with the game interpreter. If p is less than 127 then the signal property for the game interpreter's Sound object gets set to p, triggering a non-cumulative cue.<br>If p is equal to 127, then the current position within the sound resource is remembered as the loop point. Normally the driver loops to the beginning of the sound when the sequence ends. If an explicit loop point is set, the sound will be replayed from the marked point instead.<br>The actual time of the loop point is better explained with a short diagram:<br><br><tt>0x10 0x91 0x20 0x20 play a note on channel 1<br>0x05 0x91 0x20 0x00 stop the previous note<br>0x00 0x92 0x30 0x10 play a note on channel 2<br> [restart here]<br>0x00 0xCF 0x7F set loop point<br>0x00 0xC8 0x05 change to program 5 on channel 8<br>0x00 0xCF 0x13 set signal to 19<br>0x20 0xFC end of file, loop to marked location</tt><br><br>In both situations (p < 127 and p = 127), no actual program change takes place. Channel 15 is used for control, not playing music. | ||
;Dx p | ;Dx p | ||
Line 217: | Line 217: | ||
;FC | ;FC | ||
:Stop Sequence: This is a system real-time message which tells the sound driver to stop the current sound. The sound object's signal property gets set to <tt>FFFFh</tt> and the position moves to the loop point, which defaults to the beginning. Drivers allow this message to occur without a delta time, but I haven't seen any examples. | :Stop Sequence: This is a system real-time message which tells the sound driver to stop the current sound. The sound object's signal property gets set to <tt>FFFFh</tt> and the position moves to the loop point, which defaults to the beginning. Drivers allow this message to occur without a delta time, but I haven't seen any examples. | ||
==Digital samples== | ==Digital samples== |
edits