home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
files
/
music
/
songdump
/
songdump.doc
< prev
next >
Wrap
Text File
|
1987-07-03
|
3KB
|
89 lines
SONGDUMP.TTP songdump.c
Dump a music studio song, playing the notes as they occur.
The source is provided so a true player can be made, or a better dumper or
converter for different sequencer formats. Read the source for some details
which will not be documented here.
Song dump:
key:xx, key signature
tempo, quarter note = n, tempo marking (M.M.)
time:x/x, time signature
loud=xx loudness, pp 15-127 ff
n*[ begin n times repeat
] end repeat
| bar
{instrument:note(marks) duration(marks)}
note is not pitch, if no incidentals #,(nat),b adjust for key.
( begin tie
) end tie
- rest
> accent
. dotted note
(3) triplet
lines correspond to vertical columns in the normal display
Things that don't work well (yet), mainly in the player
The pause does not compensate for processing time, so 32nd notes will
go slower.
Ties aren't supported, it sounds as discrete notes.
accents are not supported
all notes are quieted at the end of the bar's duration, so if it has
both a half and a quarter note, it will cut the half note off when
the quarter note ends.
I am using my own pause routine compatible with Micro RTX from
Beckemeyer Development Tools
---------------------------------------------------------------------------
Song file structure
512 byte header structure:
10 byte header CD,'Mstudio',CD,02
15*10 byte atari instrument names (null terminated)
15*8 byte atari instrument settings
15*10 byte casio instrument names (null terminated)
15 bytes casio settings
15 bytes casio settings
5 pointers (file displacement) to lyric lines
32 byte null terminated title string
after the 512 byte header (hexadecimal unless noted):
track 1-4 bitmap (4 * 1 word)
instrument active, [15:14:13...2:1:track enable]
00:80:01:key
1= C G D A E B F# C# F Bb Eb Ab Db Gb Cb =15
83:time
1= 2/2 3/2 2/4 3/4 4/4 5/4 6/8 =7
81:tempo
quarternote = tempo, 57..200
84:01:volume
0F pianissimo .. fortissimo 7F
music, 00 delimits beginning of column data, 0xff marks end of music info
82
bar
85:number
repeat number of times
86
end repeat
note format
0 : tie start : tie end : rest(not note) : [instrument:4]
[0=inkey 1=nat 2=sharp 3=flat :2] : accent : [duration:5]
pitch in C major midi coding (18(24d)=C2)
duration: 12d = quarter note, (+2 for dotted(*3/2) , -2 for triplet (*2/3) )
9d = 1/8th , 6d = 1/16th 15d = half, 18d = whole, etc.
pitch is always the natural note, later adjusted for key, or explicit sharp,
natural, or flat.
d means decimal. all other numbers in hex.