Re: [cc65] abc music specification

From: Karri Kaksonen <karri1sipo.fi>
Date: 2004-12-27 06:36:30
On Fri, 24 Dec 2004, Groepaz wrote:
> what about a tune that uses 3 voices and is about 2 minutes long?

I have a very sweet kantele-tune that I used as a background for my
Othello port. It looks like this. Sorry about the asm-syntax. It was
written for the early cc65 compiler that had severe limitations in
string handling. So I used asm defines at that time.
In this tune all channels need a clear string sound, a bit like a
harp. The kantele is a Finnish national instrument.
The length is about 2 minutes when played at tempo 18 frames/note.

Voice 1
            db "e","d","e","5","A","f","e","f","5","e","d","c"
            db "B","3","A","G","2","e","d","e","5","e","d","c"
            db "c","3","A","c","2","e","2","d","5","c","B","A"
            db "A","4","A","c","B","A","B","4","z","2","c","B"
            db "c","3","B","c","d","e","f","g","5","g","f","e"
            db "f","3","d","c","B","c","d","e","6","e","d"
            db "e","5","A","f","e","f","5","e","d","c"
            db "B","3","A","G","2","e","d","e","5","e","d","c"
            db "c","3","A","c","2","e","2","d","5","f","e","d"
            db "c","2","d","e","E","2","E","2","A","6","z","P",0

Voice 2
            db "z","2","A","8","D","8","G","8","C","8"
            db "F","8","D","8","D","8","E","8"
            db "F","8","F","8","D","8","E","8"
            db "A","8","D","8","G","8","C","8"
            db "F","8","D","8","A","4","E","4","A","6","z","P",0

Voice 3

            db "z","2","A","c","e","c","A","c","e","c"
            db "D","F","A","F","D","F","A","F"
            db "G","B","d","B","G","B","d","B"
            db "C","E","G","E","C","E","G","E"
            db "F","A","c","A","F","A","c","A"
            db "D","F","A","F","D","F","A","F"
            db "D","F","A","F","D","F","A","F"
            db "E","G","B","G","E","z","3"
            db "F","A","c","A","F","A","c","A"
            db "E","G","B","G","E","G","B","G"
            db "D","F","A","F","D","F","A","F"
            db "E","=","G","B","=","G","E","=","G","B","=","G"
            db "A","c","E","c","A","c","e","c"
            db "D","F","A","F","D","F","A","F"
            db "G","B","d","B","G","B","d","B"
            db "C","E","G","E","C","E","G","E"
            db "F","A","c","A","F","A","c","A"
            db "D","F","A","F","D","F","A","F"
            db "A","c","e","c","E","=","G","B","=","G"
            db "A","c","e","c","A","c","e","c","z","P",0

In a real abc syntac you can specify voices as

V: 1
ABCDEFG...
V: 2
ABC...
V: Drums
ABC...

So the parameter after V: can be anything.

> mmmh...doesnt that abc format involve some kind of "generic instruments" which need to
> be "emulated" by the driver? i would think that this is the part where things might
> get complicated and slow.

The abc format does not have any instruments. It is really up to us if we
want to have a concept of a flute or drums. The abc just deals with
melodies.

In the Lynx I divided the sound into 3 parts. "Attack" while I increment
the volume in steps until the desired volume is reached. "Hold" while I
keep the volume steady. "Fade" while I decrease the volume in steps until
it reaches zero. This brings just a few lines of extra code there.

--
Cheers,

Karri

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Mon Dec 27 06:36:48 2004

This archive was generated by hypermail 2.1.8 : 2004-12-27 06:36:59 CET