Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
lynx:abcmusic [2021/01/25 12:17] – Karri Kaksonen | lynx:abcmusic [2023/01/26 06:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 61: | Line 61: | ||
When we combine these three sounds we get an irritating background tune that will annoy you just as much as the Flappy Bird game. | When we combine these three sounds we get an irritating background tune that will annoy you just as much as the Flappy Bird game. | ||
- | In Atari Lynx we use proprietary ABC codes to set the hardware for the tune. I try to describe the recognized operators. | + | In Atari Lynx we use proprietary ABC codes to set the hardware for the tune. You can use these codes for changing an instrument on the fly also. Perhaps the first phrase is played by a flute and the 2nd by piano. I try to describe the recognized operators |
'' | '' | ||
T10 - Tempo - number of VBL interrupts that makes up a single time slot. The smaller you set this number, the faster the music plays. | T10 - Tempo - number of VBL interrupts that makes up a single time slot. The smaller you set this number, the faster the music plays. | ||
Line 68: | Line 67: | ||
I0 - a letter I plus zero means a square wave, a one means a triangle wave. Triange has a smoother sound. | I0 - a letter I plus zero means a square wave, a one means a triangle wave. Triange has a smoother sound. | ||
V100 - volume. Max is 127, min is 0 | V100 - volume. Max is 127, min is 0 | ||
- | O2 - octave from 0 to 5. 5 is very low and 0 very high. You can also change octave in the middle of the tune. O2 A is the same as O3 a. | + | O2 - octave from 0 to 5. 5 is very low and 0 very high. |
R0 - envelope ramp up | R0 - envelope ramp up | ||
H0 - envelope hold note | H0 - envelope hold note | ||
Line 75: | Line 74: | ||
'' | '' | ||
In ABCmusic we need to code every one of these 3 melodies to a string. You can omit white space and bar lines without repeats to save space. | In ABCmusic we need to code every one of these 3 melodies to a string. You can omit white space and bar lines without repeats to save space. | ||
- | + | '' | |
- | '' | + | char *melody = " |
char *bass = " | char *bass = " | ||
char *percussion = " | char *percussion = " | ||
'' | '' | ||
After this we can play the combined tune by making a call to abcplay() | After this we can play the combined tune by making a call to abcplay() | ||
- | + | '' | |
- | '' | + | abcplay(0, melody); |
abcplay(1, bass); | abcplay(1, bass); | ||
abcplay(2, percussion); | abcplay(2, percussion); | ||
'' | '' | ||
- | This is how the note part works. But we still have to choose the instrument, the tempo and the volume of the music. | + | The abcmusic drivers are available in different flavours: |
+ | * bll | ||
+ | * cc65 | ||
+ | * newcc65 | ||
+ | * in C-code | ||
+ | [[https:// | ||
{{ : | {{ : |