Changes

Locomotive BASIC

5 bytes added, 07:39, 21 August 2012
/* SOUND */
(Bit 7) &x10000000 = 128 = Flush
</pre>
:'''P:''' the period number can be a figure between 0 and 4095 (2^12-1... 12 means that we have 12 tones (inclusive half-tones) in nine octaves on the CPC in sum and their distance between is the twelves square root of twelvetwo), where 8 octaves are available. E.g. Octave 0 starts on middle C with number 478.
: To calculate the period you can use following formula: '''period=1,000,000/(16*frequency)''' or in short '''period=(65,000/frequency)'''
: (e.g. the note "A" with the frequency 440 Hz has the period 142 on the CPC)
205
edits