The oddities: GO64 and sound

GO64
In some ways, GO64 behaves as a command (GO) with one argument (64). For example, you can type GO64, GO 64 or even GO 70-6 and all will set the C128 in C64 mode. But in some ways, GO64 behaves as a command on its own. For example, from the fact that GO 60+4 does the job, you would perhaps expect GO 65 to generate a ?ILLEGAL QUANTITY ERROR, but it generates a ?SYNTAX ERROR. The fact that typing GO 8*8 sets the machine in C64 mode is strange enough.

Sound
The PLAY command plays notes and the SOUND command audio in any frequency. PLAY can deal with notes and volume envelopes but not pitch bending. SOUND can pitch bend but not deal with volume envelopes. This plays three notes, C, D and E, with a volume envelope that emulates a piano:

PLAY "CDE"

This plays a C-maj chord:

PLAY "V1 C V2 E V3 G"

This plays a pitch bending sound without a volume envelope:

SOUND 1, 8000, 40, 2, 7000, 100

The arguments are channel, frequency, duration, direction (2 means oscillate) and stepvalue.

If I make a program with a PLAY command that is directly followed by a SOUND command that plays a sound in the same voice channel, they are combined! This gives a pitch bending sound with a volume envelope! T5 means that I use the predefined guitar volume envelope, and HC means half note of C (two quarters long C).

10 SOUND 1, 8000, 50, 7000, 100
20 PLAY "V1 T5 HC"

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll:

Bjud mig på en kopp kaffe (20:-) som tack för bra innehåll!

Comments

Important information: If you have not commented before, your comment will be reviewed before it is published. This means that you will not see it immediately, but I have received it. This is not because I want to filter comments, but because I want to prevent spam and advertising.

Leave a Reply

Your email address will not be published. Required fields are marked *