Startsidan  ▸  Texter  ▸  Teknikblogg

Anders Hesselbom

Programmerare, skeptiker, sekulärhumanist, antirasist.
Författare till bok om C64 och senbliven lantis.
Röstar pirat.

Making music in Basic 7.0 part 3

2012-03-08

When you use the other synthesizer control characters (O, T, U and X), they apply no matter of what voice (V) you have chosen. So when you for example use O to set the octave (0 to 6), all the following notes, regardless of voice, will be played in that octave. This example will play the notes C, D and E in voice 1, octave one. C, D E in voice 1, octave 2, and finally C (at the same time as the previous E), D and E in voice 2, octave 2.

PLAY "V1O1 CDE O2 CDE V2 CDE"

T (0 to 9) lets you chose from 10 predefined envelopes. The predefined envelopes emulates different instruments (0 is piano, 1 is accordion and so on). Envelopes differ in attack rate, decay rate, sustain level, release rate and waveform. This song uses a harpsichord bass (T6), a drum (T3) and some xylophone (T9).

10 FOR I=1 TO 4
20 PLAY "V1O2T6QCCT3O5CO2T6C"
30 PLAY "V2O5T9CV3G"
40 NEXT

U (0 to 15) controls the volume, but not on the next note, but also on any playing note. This will therefore play both C notes using volume 2.

PLAY "U15 C U2 C"

Finally, X (0 or 1) is used to turn the frequency filter on (1) or off (0).

Categories: Geeky

Tags: C128, SID Music

Leave a Reply

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



En kopp kaffe!

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

Bjud på en kopp kaffe!

Om...

Kontaktuppgifter, med mera, finns här.

Följ mig

Twitter Instagram
GitHub RSS

Public Service

Folkbildning om public service.

Hem   |   linktr.ee/hesselbom   |   winsoft.se   |   80tal.se   |   Filmtips