[Coco] Lyra file format

Robert Gault robert.gault at att.net
Thu Jun 25 18:29:31 EDT 2020


You can read about Lyra, get several versions of the program, and get music disks @
https://sites.google.com/site/dabarnstudio/lyra

Regards the file formats here is some info.

*************************************
* The Lyra File Format              *
* From the Notes from Robert Gault, *
* My notes, & Lester's Delphi post  *
*************************************

**********************
* Lyra File Header
**********************
* Offset #Bytes Type Label
******************************************************************************
* $0000	1	A	Version	fcc	"2"	* Lyra version
* $0001	1	A	Magic	fcc		"Z"	* Lyra format ID
* $0002	2	A	KeySig	fcc	"0S"	* Key signature - Number of sharps or flats
* $0004	2	A	TimeSig	fcc	"44"	* Time signature - numer/denom
* $0006	2	B	MasTemp	fdb	$0020	* Master tempo
* $0008	8	B	DspMode	fcb	01,00,00,00	* display modes
*						fcb	00,00,00,00	* 00=Off 01=On 02-Grey
* $0010	2	B	VoicPtr	fdb	$0000	* Pointer to start of voice 1 data
* $0012	2	B			fdb	$0000	* Pointer to start of voice 2 data
* $0014	2	B			fdb	$0000	* Pointer to start of voice 3 data
* $0016	2	B			fdb	$0000	* Pointer to start of voice 4 data
* $0018	2	B			fdb	$0000	* Pointer to start of voice 5 data
* $001A	2	B			fdb	$0000	* Pointer to start of voice 6 data
* $001C	2	B			fdb	$0000	* Pointer to start of voice 7 data
* $001E	2	B			fdb	$0000	* Pointer to start of voice 8 data
* $0020	2	B	InstPtr	fdb	$0000	* Not Used
* $0022	2	B	Offset1	fdb	endcode	* Pointer to end of voice data, beginning of footer
* $0024	14	A	Patch00	fcc	"0:000 NAM7BYT "	* Intrument list
* $0031	1	A			fcc	" "
* $0032	13	A	Patch01	fcc	"1:000        "
* $003F	1	B			fcb	$0C
* $0040 14	A	Patch02	fcc	"2:000         "
* $004E	13	A	Patch03	fcc	"3:000        "
* $005B	1	B			fcb	$0C
* $005C	14	A	Patch04	fcc	"4:000         "
* $006A	13	A	Patch05	fcc	"5:000        "
* $0077	1	B			fcb	$0C
* $0078	14	A	Patch06	fcc	"6:000         "
* $0086	13	A	Patch07	fcc	"7:000        "
* $0093	1	B			fcb	$0C
* $0094	14	A	Patch08	fcc	"8:000         "
* $00A2	13	A	Patch09	fcc	"9:000        "
* $00AF	1	B			fcb	$0C
* $00B0	14	A	Patch0A	fcc	"A:000         "
* $00BE	13	A	Patch0B	fcc	"B:000        "
* $00CB	1	B			fcb	$0C
* $00CC	14	A	Patch0C	fcc	"C:000          "
* $00DA	13	A	Patch0D	fcc	"D:000         "
* $00E7	1	B			fcb	$0C
* $00E8	14	A	Patch0E	fcc	"E:000          "
* $00F6	13	A	Patch0F	fcc	"F:000         "
* $0103	1	B			fcb	$00
* $0104	28	A	SynthD	fcc	"              "	* Midi Synth description (28 chars + null)
*						fcc	"              "
* $0120	1	B			fcb	$00
* $0121	8	B	MidiChn	fcb	$00,$00,$00,$00		* Midi channels assigned to each voice
*						fcb	$00,$00,$00,$00
* $0129	8	B	MidiVol	fcb	16,32,48,64			* Binary values of volumes
*						fcb	80,96,112,127		* ordered "ppp" to "fff"
* $0131	15	A	NotFrac	fcc	"8/8 8/8 8/8 8/8"	* Fractional note lengths per channel (default)
* $0140	1	B			fcb	$0C
* $0141	15	A			fcc	"8/8 8/8 8/8 8/8"
* $0150	1	B			fcb	$00
*
* Pointers to the beginning of each voice block
* $0151	2	B	Voice1	fdb	$0000	* Voice Block Data offset for each voice
* $0153	2	B	Voice2	fdb	$0000	* Data stores each voice complete
* $0155	2	B	Voice3	fdb	$0000	* before starting the next voice
* $0157	2	B	Voice4	fdb	$0000
* $0159	2	B	Voice5	fdb	$0000
* $015B	2	B	Voice6	fdb	$0000
* $015D	2	B	Voice7	fdb	$0000
* *015F	2	B	Voice8	fdb	$0000
*
* Data Block, All music and controls go here, one voice at a time.
* $0160	XX	B	VocData	fdb	$XXXX	* Voice Data - V1-V8 Each Complete
*
* Event Table Address = Offset1+0
* $O+$0000	4	A	EvnTab	fcc	"EVNT"
* $O+$0004	1	B			fcb	$00
* $O+$0005	1	B			fcb	$E0	&??
* $O+$0006	27	A	Evnt00	fcc	"0:NAME8BYT 0-00 00 00 00 00"	* Event table 0 (55b+cr)
* $O+$0021	1	B			fcb	$0D
* $O+$0022	27	A			fcc	" 00 00 00 00 00 00 00 00 00"
* $O+$003D	1	B			fcb	$0D
* $O+$003E	27	A	Evnt01	fcc	"0:NAME8BYT 0-00 00 00 00 00"	* Event table 1 (55b+cr)
* $O+$0059	1	B			fcb	$0D
* $O+$005A	27	A			fcc	" 00 00 00 00 00 00 00 00 00"
* $O+$0075	1	B			fcb	$0D
* $O+$0076	27	A	Evnt02	fcc	"0:NAME8BYT 0-00 00 00 00 00"	* Event table 2 (55b+cr)
* $O+$0091	1	B			fcb	$0D
* $O+$0092	27	A			fcc	" 00 00 00 00 00 00 00 00 00"
* $O+$00AD	1	B			fcb	$0D
* $O+$00AE	27	A	Evnt03	fcc	"0:NAME8BYT 0-00 00 00 00 00"	* Event table 3 (55b+cr)
* $O+$00C9	1	B			fcb	$0D
* $O+$00CA	27	A			fcc	" 00 00 00 00 00 00 00 00 00"
* $O+$00E5	1	B			fcb	$00
*
* Annotation Address = Offset1+230
* $O+$00E6	5	A	Annot		fcc	"ANNOT"
* $O+$00EB	1	B			fcb	$00
* $O+$00EC	1	B			fcb	$74	*??
* $O+$00ED	28	A			fcc	"                            "	* Title & Notes (28b+cr)
* $O+$0109	1	B			fcb	$0D
* $O+$010A	28	A			fcc	"                            "	*   "       "       "
* $O+$0126	1	B			fcb	$0D
* $O+$0127	28	A			fcc	"                            "	*   "       "       "
* $O+$0143	1	B			fcb	$0D
* $O+$0144	28	A			fcc	"                            "  *   "       "   (28b+null)
* $O+$0160	1	B			fcb	$00
endcode	equ		*

*************************************************
* Voice Block Data format, repeats on each voice
* Can contain any number of the blocks below
*************************************************

* Note Block - 2 bytes = Note Type+Note Value
NoteBlk	fdb	$0000		* note block

* Note Length Table
*************************************************
* $01=Whole				* Note+$08=Rest
* $02=Half				* Note+$10=Triplet
* $03=Quarter			* Note+$20=Tied
* $04=Eighth			* Note+$40=Dotted
* $05=Sixteenth
* $06=Thirtysecond
* $07=Sixtyfourth

* Note Value Table $06-$26 = E5-A1 = $58-$21
*                     +$40=#  +$80=b
**************************************************
*  Lyra * Note * Midi   *   Lyra * Note * Midi
**************************************************
*  $00  =  D6  =  $62		$13  =  F3  =  $41
*  $01  =  C6  =  $60		$14  =  E3  =  $40
*  $02  =  B5  =  $5F		$15  =  D3  =  $3E
*  $03  =  A5  =  $5D		$16  =  C3  =  $3C
*  $04  =  G5  =  $5B		$17  =  B2  =  $3B
*  $05  =  F5  =  $59		$18  =  A2  =  $39
*  $06  =  E5  =  $58		$19  =  G2  =  $37
*  $07  =  D5  =  $56		$1A  =  F2  =  $35
*  $08  =  C5  =  $54		$1B  =  E2  =  $34
*  $09  =  B4  =  $53		$1C  =  D2  =  $32
*  $0A  =  A4  =  $51		$1D  =  C2  =  $30
*  $0B  =  G4  =  $4F		$1E  =  B1  =  $2F
*  $0C  =  F4  =  $4D		$1F  =  A1  =  $2D
*  $0D  =  E4  =  $4C		$20  =  G1  =  $2B
*  $0E  =  D4  =  $4A		$21  =  F1  =  $29
*  $0F  =  C4  =  $48		$22  =  E1  =  $28
*  $10  =  B3  =  $47		$23  =  D1  =  $26
*  $11  =  A3  =  $45		$24  =  C1  =  $24
*  $12  =  G3  =  $43		$25  =  B0  =  $23
*
* Note Block Bit-Wise Identifiers
****************************************************************************
* Byte 1 - Note Identifier
* Bits 0 0 0 0 0 0 0 0
*      | | | | | |_|_|_____bits 0-2 = 0-7 Note Length (See Note Length Table)
*      | | | | |___________0(clr)=Note  1(set)=Rest
*      | | | |_____________0(clr)=Not Effected  1(set)=Triplet
*      | | |_______________0(clr)=Not Effected  1(set)=Tied to previous note
*      | |_________________0(clr)=Not Effected  1(set)=Dotted
*      |___________________0(clr)=Note or Rest [<128]  1(set)=Event [>=128]
*
* Byte 2 - Note Value
* Bits 0 0 0 0 0 0 0 0
*      | | |_|_|_|_|_|_____bits 0-5 represent Notes of C Major scale
*      | |                          or position on staff if Rest
*      | |_________________0(clr)=Normal 1(set)=Sharp #
*      |___________________0(clr)=Normal 1(set)=Flat  b
*
****************************************************************************
* Event Block Bit-Wise Identifiers
****************************************************************************
* Byte 1 - Event Type   Tempo & MidiByte Events ALWAYS in Voice 1
* Bits 0 0 0 0 0 0 0 0
*      | | | | | | | |     bits 0-3 are only used in Inst Type & Volume
*      | | | | |_|_|_|_____Patch Number $00-$0F or Volume $00-$07
*      | | | |
*      |_|_|_|_____________Event Type - $80=Event	$90=Instr
*                                       $A0=Tempo	$B0=MidiByt
*					$C0=Octave+-	$D0=Loco
*					$E0=Volume	$F0=Clock
* Byte 2 - Event = Position on staff
* Byte 2 - Insrtument = Position on staff
* Byte 2 - Tempo = Actual Tempo
* Byte 2 - Midi Byte = Actual Midi Event Byte
* Byte 2 - Octave - Position on Staff - (-12)=High (+32)=Low
* Byte 2 - Loco - Position on Staff (Cancels Octave above)
* Byte 2 - Volume - Position on staff
* Byte 2 - Clock - $00=ClockOff, $FE=ClockOn
*
** EOF - End of Format notes

Robert

Allen Huffman wrote:
> Is this available? Someone wrote me via cocopedia.com asking about it. They have some old WinLyra files.
>
> --
> Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT only)
> http://www.subethasoftware.com - https://www.facebook.com/subethasoftware
> http://www.PayPal.me/AllenHuffman.  http://swagbucks.com/refer/allenhuffman
>


More information about the Coco mailing list