News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

Music Hackers, PLEASE HELP!

Started by Tekra, November 30, 2021, 12:28:39 PM

Previous topic - Next topic

Tekra

So I am literally trying to put custom music in Super Metroid but I am getting stuck. How do I put custom sample data for instruments in the game. I had some help from reading Kejardon's documents. This is the assembly I am running:


lorom


main() {

org $8FE82C
   DL NewSongMusic    ;Adds a new pointer to end of original song data pointer table
                      ;New pointer index is 4B.
                      ;The start of the debug room is overwritten by this



org $DED1C0                ;Free space at end of the rom, with the rest of music data.
NewSongMusic:



DW InstEnd-InstStart,$6C90    ;6CD2 points to instrument 18 definition.
   
InstStart:
   DB $0A : DB %10010110 : DB %01000000 : DB %11000111  : DW $AA04
InstEnd:



DW SampEnd-SampStart,$B516

SampStart:
   db 02,00,00,00,00,00,00,00,00, 6A,12,00,CF,25,02,FF,E0,02, 6A,1D,B0,36,30,DC,F0,40,00, 6A,CF,3F,FB,D0,F1,1E,22,0F, 6A,1D,FB,B0,17,11,32,2E,C0, 6A,EF,EF,31,2B,42,42,2F,EF, 6A,ED,DD,C0,26,02,C0,01,30, 6A,30,3B,CD,01,EC,45,61,12, 6A,00,0F,CE,BD,01,E2,F3,03, 6A,12,10,01,54,0D,BC,12,0E, 6A,D2,23,46,60,EC,01,DA,01, 7A,2F,0E,FF,0F,11,3F,12,40, 7A,EC,DF,FF,F1,1F,11,52,2F, 7A,10,ED,BE,E0,0F,F3,20,10, 6A,2F,ED,32,BC,CE,14,03,0F, 6A,E1,45,0B,EF,10,EC,01,5D, 6A,21,EB,CE,24,40,F0,10,02, 6A,FF,EF,3F,FF,0D,21,25,51, 7A,F1,FF,FF,EF,E0,CF,01,12, 6A,42,11,FF,1F,00,ED,FD,03, 6A,44,20,F1,31,33,1C,AC,CF, 6A,FE,F1,D0,63,62,CD,F1,E1, 6A,1D,BC,EF,46,41,EE,11,46, 7A,21,ED,DB,DC,20,33,32,01, 7A,1F,10,FD,FF,1F,FE,F2,04, 6A,42,02,21,0B,BB,FC,BA,D4, 7A,02,23,2F,ED,14,1D,DB,F2, 6A,F3,21,05,12,20,DD,11,DF, 7A,FD,DD,FF,00,34,31,00,01, 7A,1F,FE,E0,01,20,00,14,32, 7A,10,22,FD,FE,CD,03,33,F1, 6A,25,1F,A0,D1,DE,FF,0F,14, 7A,11,0F,03,EE,0F,1F,FF,DC, 6A,D1,30,0E,01,2D,22,21,0D, 6A,FA,0E,12,EB,10,33,00,36, 7A,22,1D,FB,BD,F2,21,01,31, 6A,42,31,E1,EC,BF,0C,ED,43, 7A,21,20,03,01,FE,EC,CD,12, 6A,23,CC,21,12,43,51,0A,DD, 7A,01,FE,C1,12,11,11,33,FF, 7A,0B,ED,EE,0E,11,12,F0,10, 7A,52,12,CC,E0,00,DE,F2,24, 7A,33,22,1F,0D,BB,D0,F2,F0, 6A,02,63,66,43,0E,BA,DD,D4, 7A,DE,03,34,23,11,1F,FC,DC, 6A,AF,07,FE,52,FF,25,01,DB, 7A,FE,DF,02,F1,01,F0,00,40, 7A,1C,B0,1F,0D,0F,00,00,F0, 7A,03,52,FE,F1,21,00,3C,FF, 7A,13,32,41,FF,DE,E0,00,21, 6A,03,23,CB,9F,43,1C,D0,22, 7A,00,00,00,11,EE,F2,6F,DA, 6A,F2,50,E4,CD,F2,C9,F1,04, 7A,40,F0,12,12,F2,EF,01,0F, 6A,01,3E,FD,D2,2F,F3,50,F0, 6A,0D,AA,F1,10,FE,36,74,26, 7A,2E,EE,00,ED,E0,00,F0,34, 7A,02,2D,FD,CC,D0,D1,F3,32, 7A,14,3F,10,0D,FF,EF,10,00, 7A,EF,F1,62,11,00,EF,DF,BD, 6A,CC,57,5C,01,27,53,C0,9D, 7A,C1,D0,02,30,CC,F2,44,1E, 7A,EF,FE,E0,F0,32,3F,21,22, 7A,2F,DF,00,FF,EF,12,21,EC, 6A,B1,54,3D,CD,2E,71,BE,A2, 7A,11,0F,F1,30,0E,FC,00,0F, 7A,1F,4E,1C,FF,F1,10,DD,F0, 7A,34,12,02,01,EF,00,E1,00, 6A,01,41,43,F2,CD,EC,F0,1E, 7A,00,1F,11,44,21,FE,CF,11, 7A,1D,FF,11,2E,DD,21,41,1D, 7A,BB,BF,21,10,FE,E0,44,22, 7A,00,3F,DD,EE,01,F1,10,F3, 7A,33,20,02,FB,BE,E2,F0,32, 7A,33,45,01,01,FF,DB,E0,E1, 8A,11,00,00,01,00,F0,FC,FF, 7A,FF,1E,30,1F,23,21,00,12, 7A,CD,0E,13,10,FD,C2,36,30, 7A,DE,FF,EE,F0,0F,44,30,F2, 6A,F1,12,E2,AC,C1,2E,15,14, 7A,DC,1E,20,00,1D,BF,21,2F, 7A,11,0F,C0,10,1F,00,2E,02, 8A,12,10,FF,DD,FF,01,11,01, 6A,F3,16,5E,AF,FD,FE,C0,B3, 7A,66,2F,D0,44,2E,BC,DC,0F, 7A,FE,02,52,FE,21,11,CE,D0, 7A,ED,E0,11,02,21,F1,46,32, 7A,EB,CE,CE,FE,EF,43,51,35, 7A,34,F1,DB,CB,DE,EF,03,63, 7A,11,F2,33,0D,BB,AA,EF,20, 7A,44,21,01,53,FD,ED,EB,BF, 7A,12,03,14,23,32,30,ED,EC, 7A,CC,F0,31,21,20,14,54,EF, 7A,F0,DD,BE,0F,13,33,0E,F1, 7A,35,01,CA,BB,02,10,03,01, 7A,F2,24,0B,EF,00,FE,E0,03, 7A,3F,FD,04,45,1F,DB,FE,00, 7A,12,E1,22,FE,25,41,FF,1D, 7A,CA,EE,14,02,1E,01,34,2D, 7A,CF,EE,DD,EE,10,42,0D,03, 7A,53,DF,CF,DF,F0,F1,01,40, 7A,F0,14,20,0F,FC,00,FF,DF, 7A,23,12,F2,74,0E,0D,ED,F0, 7A,DF,F0,20,FE,45,42,FF,ED, 7A,CD,EF,1F,E0,0E,22,40,0F, 7A,21,EC,E0,11,0D,1F,FF,E3, 7A,42,10,32,1D,E0,DD,E0,1F, 7A,0E,54,41,10,0F,CF,02,F0, 7A,0E,EC,13,43,0F,01,DD,A0, 6A,54,10,FC,EF,60,FE,05,CA, 7A,CF,14,3F,10,EE,E0,30,FD, 7A,20,01,13,1F,02,1F,EB,F4, 7A,21,01,12,FD,F1,31,21,EC, 7A,00,41,FB,E0,2F,E0,13,EF, 6A,AF,F2,0F,2A,2F,CD,A1,25, 6A,4D,E1,14,31,FD,CD,02,EC, 7A,02,44,02,24,DC,E1,30,F1, 6A,2F,CD,F6,22,42,E1,0F,21, 7A,EE,30,2A,B1,43,CD,C1,22, 7A,01,1E,FE,CE,D0,04,4F,F0, 7A,24,FF,E0,2F,20,CB,DF,34, 7A,31,20,01,02,FE,E0,20,0F, 7A,DE,33,32,11,D0,F3,3F,EE, 7A,D0,1F,0F,FE,00,2E,B1,21, 6A,FB,CA,14,F0,1E,D0,01,E1, 7A,14,51,E0,EF,EE,CD,F1,12, 7A,41,02,41,2F,0F,D0,DC,21, 6A,25,24,03,03,35,0E,BC,9A, 7A,A0,11,01,01,E1,65,2C,AC, 7A,E0,09,FF,34,44,22,2E,21, 7A,1D,C9,CD,E2,21,D0,35,53, 7A,23,3F,0E,BC,DB,02,33,23, 7A,32,21,3F,1D,0A,B9,9C,E3, 7A,30,23,02,40,0F,CF,0F,EC, 8A,D0,14,01,01,30,10,0E,FF, 7A,DD,CF,01,21,14,32,30,12, 8A,F0,F0,FE,00,15,10,0F,10, 8A,1E,F0,12,FF,DD,01,30,0E, 7A,D0,20,3F,CE,0E,40,F2,24, 7A,0E,DC,2F,ED,C0,35,22,DC, 7A,F3,4E,FF,EE,21,01,0F,23, 7A,51,20,04,13,ED,CD,F0,12, 7A,10,00,11,F0,2F,EE,CB,FF, 7A,01,1F,03,11,20,B2,21,0C, 7A,CC,EE,F4,12,13,0F,0C,EE, 7A,12,2F,DE,12,13,D0,23,53, 7A,D1,F2,10,DB,00,11,10,3F, 6A,0F,ED,12,BE,CB,3E,10,32, 7A,1E,2E,03,01,E2,10,3D,CE, 7A,C2,22,FF,F1,5E,0E,ED,00, 7A,F0,1F,D2,13,3D,F0,26,2F, 7A,BD,03,0F,BD,43,41,FB,2F, 7A,3F,DC,D0,01,DF,F2,26,2C, 7A,CE,02,46,CD,C0,54,EB,B1, 7A,45,0D,D1,12,2E,CF,EE,2F, 7A,D2,34,3D,F2,04,23,1E,DC, 7A,F2,3F,CD,13,40,2E,FC,FF, 7A,1A,BD,31,31,0E,01,0E,F2, 7A,14,21,0F,00,FF,22,00,DE, 6A,7F,FB,E0,41,0C,F6,3E,DB, 7A,03,E0,D1,07,75,0F,F0,0F, 7A,CE,0E,CD,03,33,0D,EF,F0, 8A,00,0F,DD,02,1F,DF,13,42, 7A,50,CF,51,AC,AE,32,0D,2F, 7A,12,22,1F,10,1E,BC,FF,1D, 7A,F1,51,56,64,FD,C0,D1,CB, 6A,A0,63,3D,F4,66,5C,DA,00, 7A,ED,AE,10,0D,02,33,23,3F, 6A,BF,C0,DB,DC,1F,F4,DF,63, 7A,2E,DF,15,0F,EF,0E,FE,22, 7A,33,22,1E,D0,FE,10,E0,1C, 6A,E2,4E,FC,E1,24,04,F0,D0, 7A,11,1B,CF,E4,51,0E,E2,33, 6A,0E,FB,4D,AB,F2,61,1E,15, 7A,F1,10,4F,EB,13,E0,D0,32, 7A,30,EF,F1,FF,0C,E1,0F,F0, 6A,D2,E1,30,04,4D,FC,0C,92, 8A,F1,30,00,02,10,DE,F0,11, 7A,CF,00,33,22,2E,DD,E0,32, 7A,EC,03,21,FD,35,44,0E,FF, 7A,CD,DC,0E,1E,53,31,32,1E, 7A,E0,CC,C0,EE,00,24,21,F3, 8A,23,0E,EF,0F,FE,EE,01,33, 7A,2F,11,21,0F,DB,BC,22,10, 7A,1F,32,17,71,F0,F0,E9,BB, 7A,CF,3E,33,30,14,43,DF,CE, 7A,EE,FD,C1,00,23,02,55,43, 7A,FE,DC,AB,0D,1F,EF,30,35, 7A,65,ED,CF,E1,BF,D0,32,10, 7A,F0,34,62,1F,CC,CF,1C,FC, 7A,C2,33,F1,25,FF,EF,10,2E, 7A,FC,F3,43,FC,F4,56,1D,00, 7A,D0,EC,EC,20,11,F1,00,23, 7A,0F,CC,04,11,FF,D0,4F,12, 6A,21,0E,CE,FB,FF,22,0B,14, 7A,0D,0F,0D,0F,00,12,64,0E, 6A,AF,55,10,0D,EE,A1,A0,31, 7A,11,02,00,CD,F0,FE,CB,04, 8A,22,21,12,10,FD,DF,12,10, 7A,BD,F3,24,61,EF,C1,0D,BC, 7A,FD,FD,03,63,50,43,1E,1D, 7A,9D,F4,33,EE,01,12,61,0B, 7A,C2,40,C9,AF,22,F1,1F,44, 7A,01,3E,F0,9D,12,10,FE,11, 8A,13,10,FD,FF,22,0D,CF,12, 7A,10,EE,36,21,EB,F3,F2,0F, 7A,24,01,31,ED,1F,21,CF,EF, 7A,23,20,FD,BF,00,2F,2D,EB, 7A,F6,50,3E,23,20,F3,AD,0E, 8A,10,11,ED,01,33,FD,C0,00, 7A,1F,CE,30,12,FE,02,44,12, 7A,F1,FD,0E,2F,D1,22,20,F1, 7A,1F,CC,EE,FF,DE,11,25,CD, 8A,02,34,01,DF,F0,10,3E,ED, 7A,15,62,DE,E3,F1,FD,C1,00, 8A,0E,0F,11,FE,34,21,FF,01, 7A,3C,BC,D2,01,13,22,22,0F, 8A,FE,CC,EF,02,0F,F0,22,44, 7A,51,EC,CF,20,F9,D1,03,0E, 8A,23,22,1C,E0,FF,EE,E1,01, 7A,10,02,37,55,1E,EA,CD,31, 8A,FE,E0,31,11,20,1F,FE,CD, 7A,DC,FE,EF,13,56,42,14,04, 7A,FC,CA,E1,23,CF,13,34,21, 7A,14,DE,CC,DF,DE,02,31,12, 7A,24,24,1F,CB,C2,F1,D0,11, 7A,30,02,30,FB,BF,1D,BB,F0, 8A,21,FF,12,10,FE,CE,DF,14, 7A,1E,12,F2,31,11,22,B9,E3, 7A,2E,FF,12,F3,61,FF,EE,12, 7A,FC,CE,36,09,E3,13,FC,F3, 8A,22,ED,E1,23,EF,00,F0,11, 86,00,FD,CF,FF,EC,D2,43,20, 7A,05,30,F0,0F,FE,0F,F1,2F, 7A,F1,00,31,F3,2D,DE,B1,30, 7A,11,ED,F1,22,EA,F4,11,4D, 7A,D0,F2,43,FA,9E,77,FD,CF, 7A,23,FD,D2,43,EA,F4,32,1D, 7A,F3,32,2E,CE,F2,41,DC,E1, 8A,33,21,FD,CF,12,1F,F0,0F, 7A,11,F0,1F,E0,04,3E,B1,11, 7A,32,CD,EC,36,11,FE,FE,04, 7A,1D,BD,31,F1,F0,23,34,10, 7A,0D,B2,20,DA,02,03,53,32, 7A,FD,AC,03,3E,AB,21,22,D0, 7A,40,0D,C5,51,FC,DF,04,1D, 8A,EE,24,0F,F1,22,FB,C0,22, 8A,FC,F2,32,0F,03,31,FE,E1, 7A,4F,AA,D1,46,63,DD,23,21, 8A,FD,DE,02,0D,E2,23,2E,CF, 8A,34,2F,EE,F0,0F,EF,02,21, 8A,F0,13,3F,DC,DF,01,0E,F1, 8A,11,22,32,FF,02,1F,DD,E0, 8A,E0,12,33,EE,34,20,DA,DF, 7A,02,EA,F2,26,4F,03,33,00, 8A,FE,FD,E0,FE,23,1F,E1,54, 7A,FD,AA,DD,EE,DB,F7,63,0F, 8A,36,4F,DE,01,0C,CE,02,3F, 8A,00,14,61,ED,EF,FF,FD,DE, 8A,03,21,10,05,5F,FE,EF,0F, 8A,DB,E2,42,FE,04,61,ED,EE, 8A,0F,EC,E0,02,22,10,46,2E, 8A,FF,00,DC,D0,F0,22,10,F2, 8A,54,1E,CD,EE,F1,0B,D2,32, 8A,21,03,42,ED,E0,FE,DE,EE, 8A,34,40,DE,45,30,BC,CD,01, 8A,1F,DF,23,45,32,0E,01,0E, 8A,DB,E1,FF,12,33,11,42,FE, 8A,ED,CD,E1,3F,D0,13,42,F0, 8A,32,0E,EC,EE,D1,00,22,12, 8A,10,43,0C,CD,E0,0D,F1,01, 8A,32,02,46,3C,CF,0F,EC,BE, 8A,13,22,11,24,41,0C,BD,EE, 8A,1F,EE,03,42,00,13,40,AD, 8A,EF,0F,BD,24,33,00,F2,44, 8A,FC,AD,12,FC,D0,13,61,12, 8A,04,3F,EF,CC,FF,F0,FE,24, 8A,32,22,22,0D,CC,DF,11,EF, 8A,E1,44,11,F0,10,DE,EE,F0, 7A,E0,FF,57,32,21,F3,1B,CD, 7A,CE,ED,01,03,55,44,FF,43, 8A,FD,CC,02,0F,EE,15,32,1F, 8A,14,2C,DD,E0,0E,EF,11,21, 8A,12,1F,0E,CF,00,0E,E1,0F, 8A,13,23,1F,FF,01,1E,CE,10, 8A,EF,E2,53,01,F0,31,EE,EF, 8A,00,EF,FF,14,22,30,F3,2E, 7A,CC,CB,E0,00,CE,55,13,20, 8A,1D,BF,22,2D,A0,20,03,32, 9A,00,01,0F,01,0F,DD,F2,11, 8A,11,01,23,20,CD,E0,2F,BD, 7A,05,45,33,53,23,0C,01,CA, 8A,DA,F2,00,11,23,20,FE,EF, 8A,21,0A,A0,23,20,02,33,10, 8A,0F,F0,0D,BA,F0,23,21,22, 8A,21,21,EC,E0,0D,CE,11,33, 8A,24,31,00,11,FD,DE,DC,E0, 8A,01,12,44,0E,11,00,ED,CE, 8A,F0,00,12,45,3F,01,30,DC, 8A,D0,FA,9F,46,30,13,33,FE, 8A,F0,CB,EF,FF,01,25,64,0D, 8A,04,4F,CB,BF,1D,BD,F3,64, 8A,20,00,33,FC,BC,00,DC,03, 8A,55,41,F1,34,0D,DC,CF,EA, 8A,D2,23,32,42,11,10,EC,CF, 8A,EE,EF,13,34,32,14,31,EC, 8A,CE,0F,C9,B2,64,20,10,34, 8A,1F,DD,FF,DE,BD,45,22,42, 8A,12,32,0E,CB,CD,FF,DE,12, 8A,36,40,01,12,FE,CB,BD,02, 8A,21,22,53,22,10,1F,DC,CA, 8A,B0,20,0D,15,55,2E,E2,21, 9A,FC,CF,11,00,02,32,00,12, 8A,2E,AB,DF,FE,AC,14,66,0F, 8A,23,42,FC,BB,CF,FE,03,34, 8A,52,11,32,2E,A9,CE,FE,CE, 8A,24,33,12,33,42,DA,AF,FE, 8A,DD,05,23,43,34,10,EE,CD, 8A,DE,DC,B0,44,31,23,65,0D, 8A,BB,D0,ED,CE,25,42,21,44, 8A,2F,FD,BC,ED,CE,E1,22,32, 8A,24,41,2E,CE,FD,BD,FF,24, 8A,31,22,34,3F,ED,CC,EE,DE, 8A,D1,21,24,47,51,BC,FF,0D, 8A,AB,EF,46,31,46,40,0E,ED, 9A,ED,EE,10,FE,03,42,12,01, 8A,FF,EB,CE,CE,FF,46,42,02, 8A,33,2F,DB,BB,E0,1D,C1,34, 8A,43,34,20,FD,BC,DD,FE,00, 8A,15,54,31,02,2F,CA,AD,01, 8A,CC,E1,56,34,41,F1,FE,EB, 8A,CE,DF,24,33,22,12,22,1E, 9A,EE,DF,11,DE,F2,43,0F,12, 8A,4E,BD,0E,EB,9E,57,4F,02, 8A,47,3F,D9,B0,0D,EC,C1,31, 8A,53,13,42,EB,C0,5F,AA,D0, 9A,34,1E,F0,33,1F,EE,F0,10, 8A,C9,E3,51,00,04,41,EC,A0, 9A,21,EC,C0,45,1F,F0,32,0E, 8A,0E,EE,CC,02,11,FE,13,55, 9A,0E,DF,02,2F,DE,F2,42,EF, 8A,21,21,EE,E1,3F,DB,F4,32, 8A,0B,F3,33,2A,9F,03,3E,BC, 9A,12,31,DF,33,1F,CE,42,EC, 8A,A0,77,2C,BE,36,4E,DD,CF, 8A,F1,52,DF,01,56,0E,CD,12, 7A,EF,E0,DF,12,36,21,1B,E1, 8A,F1,FB,DF,F2,1F,FF,13,43, 8A,00,0E,EF,F0,00,EE,C0,57, 8A,5E,AC,34,3F,BA,D0,22,11, 8A,11,11,33,00,FB,E0,F1,3F, 8A,DD,04,53,2F,0F,F1,EE,EC, 8A,DF,E3,42,0C,E4,73,0E,DD, 8A,03,1C,DF,F1,00,35,2E,E0, 8A,20,E0,DC,F0,11,02,41,EF, 8A,24,1E,FD,F2,0E,1E,F1,E1, 8A,63,11,EE,02,DD,FF,FD,F3, 8A,2E,FE,23,42,EF,FE,00,E0, 7A,30,CD,D0,64,20,FD,D1,00, 7A,ED,D3,41,00,17,FA,03,22, 86,31,FE,F2,20,DB,99,D4,61, 86,DC,E1,0E,EE,DC,D1,32,0F, 7A,13,42,FB,D2,25,1C,F2,10, 8A,FD,F1,30,0E,CD,14,21,0F, 7A,F1,36,4F,AA,F4,22,09,E6, 8A,34,0C,E0,01,22,0C,DF,01, 7A,11,10,DD,14,1E,D0,01,23, 8A,1F,DE,11,F1,42,FD,CE,13, 9A,20,EC,E1,31,0F,0F,F3,41, 8A,9A,F6,4F,EE,F2,11,10,0F, 7A,00,0E,F3,22,DB,F2,F3,0A, 7A,ED,F6,2D,FF,05,55,0A,B0, 8A,23,FE,10,F0,DC,05,51,BB, 8A,02,30,BE,10,11,11,F1,10, 7A,21,35,F1,2E,12,CD,DA,E2, 7A,46,3F,DF,24,3E,9A,EE,BD, 7A,DE,32,25,64,43,0E,BE,23, 8A,0D,CE,EF,22,33,0E,FF,20, 8A,FD,CC,12,10,00,10,14,54, 8A,EC,15,2E,AA,FF,F3,0F,13, 8A,35,2E,DE,F0,FC,AE,11,0E, 8A,F5,53,42,F0,0F,21,DC,BE, 8A,EC,25,33,10,1F,0E,E0,FB, 7A,A2,1F,1D,26,45,75,44,32, 8A,FD,ED,DD,D0,13,4F,E3,65, 8A,2B,9E,0F,EC,BD,01,24,52, 9A,12,20,EE,11,1F,DC,EF,24, 8A,4E,E1,21,1E,CD,E0,00,DD, 8A,F0,36,31,11,23,2F,FF,DE, 8A,FE,F0,1F,11,03,64,0A,AE, 8A,21,EC,BE,11,23,33,12,11, 8A,00,10,EE,ED,E1,E1,43,01, 7A,DF,0C,C0,DB,C0,11,D1,35, 8A,31,32,DE,13,40,BB,03,21, 8A,ED,F1,21,21,0F,EF,0E,CF, 8A,F0,1F,01,21,33,10,ED,14, 7A,5F,D9,A2,30,00,00,BC,01, 8A,10,CD,11,11,F0,21,20,D2, 8A,10,0E,13,21,0E,F3,1F,ED, 8A,E2,31,0E,FF,F2,20,CD,F3, 8A,30,CD,03,53,FF,01,41,ED, 8A,E2,40,CC,D2,20,FD,E1,02, 8A,3E,CF,24,4F,BD,02,40,E0, 8A,13,21,0F,01,10,EB,F1,12, 7A,1F,03,0F,1D,BE,DF,4E,A0, 7A,33,63,D0,65,40,AC,24,1F, 8A,CB,E1,11,0F,E0,02,31,EB, 8A,D3,34,FB,D0,45,1D,C0,55, 8A,FC,E1,41,DA,E4,51,EF,01, 7A,31,BF,FB,ED,E2,32,ED,47, 8A,43,EE,12,1F,DD,02,1E,EE, 7A,15,1F,EC,E4,1F,EC,C2,56, 8A,2E,BF,46,3E,BC,03,40,CC, 8A,04,4F,CF,35,1F,FF,EE,EF, 8A,0E,D0,F2,62,FD,03,21,2F, 7A,FE,CD,F0,62,CA,E0,64,0D, 7A,AC,F3,0C,EA,D6,55,50,AF, 8A,35,2C,9C,34,FE,D0,42,0F, 8A,03,61,FD,ED,F2,FD,CC,05, 8A,61,CF,05,50,EF,FF,3F,BD, 9A,F1,42,FD,F1,31,FE,D0,11, 8A,ED,DF,34,4F,FF,03,40,DE, 8A,EF,0E,D0,22,21,0F,04,52, 9A,FE,EF,01,1E,BE,14,31,FF, 8A,E1,44,0D,CD,11,1F,F1,12, 7A,5D,9E,24,1B,9C,14,4C,9F, 8A,24,3E,FF,33,FC,F0,F0,FD, 8A,E0,35,20,EE,43,2F,CD,10, 8A,0F,0D,D1,33,20,0F,12,EF, 7A,F3,2D,DD,22,06,70,CC,BD, 8A,11,EF,EF,11,3E,D3,53,1D, 8A,D1,42,CB,D1,22,BA,13,46, 7A,4F,BC,04,2C,9D,F1,FF,CD, 8A,02,33,31,FE,F0,F0,EC,F2, 8A,01,31,02,20,0F,EC,CE,30, 8A,EF,F2,21,0F,36,30,DD,23, 8A,0C,AC,F2,1D,D0,47,61,DE, 8A,F3,2E,EC,BD,12,2F,E1,65, 8A,30,E1,1F,ED,F0,DD,D1,32, 8A,23,21,1F,F0,EB,CE,01,EF, 8A,13,33,23,22,2E,FE,EF,ED, 8A,CC,E0,22,11,45,31,0E,DD, 8A,0F,DA,B0,53,21,13,64,1F, 8A,FC,DE,DE,DD,F1,22,33,11, 8A,21,0F,DB,CC,F0,F0,34,23, 8A,34,21,FF,1F,FD,BC,CE,11, 8A,00,23,33,33,1F,BA,EF,EE, 8A,EF,23,45,31,22,11,0F,DC, 8A,DE,CD,E0,43,31,13,43,2C, 9A,CD,F1,FE,F1,13,32,1F,02, 8A,42,EB,BC,00,9A,02,54,1F, 9A,02,32,FE,CD,00,0F,FF,12, 8A,63,40,F3,42,FB,AB,FF,BD, 9A,1F,23,30,FF,22,0E,DD,0F, 8A,FF,02,32,35,53,0E,F2,2D, 9A,CD,E0,10,F0,23,1F,F1,22, 8A,EC,AB,E0,E0,12,43,34,51, 9A,F0,01,0E,BE,00,00,10,02, 9A,31,0F,00,FF,ED,F0,00,01, 9A,22,12,32,FD,F1,2E,BC,F0, 8A,54,41,0F,02,51,EC,BD,0F, 8A,FF,EE,14,45,10,54,0E,DD, 8A,EF,CC,DE,14,63,00,14,1D, 8A,CE,0F,CA,C2,32,11,22,15, 9A,32,FD,D0,1F,DD,01,11,22, 8A,2F,F0,FF,10,DB,BE,33,1F, 8A,E1,57,1F,12,FF,FD,DD,F1, 8A,0E,11,46,3F,EE,1E,D1,FE, 8A,FB,E2,31,0F,24,41,13,FD, 8A,EF,FE,AB,16,62,10,D0,23, 8A,0B,AF,30,DE,03,2F,F0,23, 8A,20,0F,11,FD,EF,DF,03,41, 8A,02,30,F0,DC,DD,33,0C,E1, 8A,21,2F,0F,F3,62,ED,E1,0E, 8A,CE,24,42,0E,E1,10,DC,01, 8A,20,DF,13,00,20,0F,D0,44, 7A,F9,9C,56,1F,FE,26,54,2C, 8A,BD,F0,2F,FE,01,32,2E,EF, 7A,04,20,FE,FF,13,1F,EF,47, 7A,41,0E,DF,DD,CC,F0,12,00, 8A,34,1F,FE,01,ED,E0,01,22, 8A,FF,01,32,1F,01,0E,CC,CF, 8A,31,FF,F0,56,2F,ED,01,FE, 8A,ED,D1,33,21,1F,14,51,DC, 8A,C0,FF,EA,C6,21,31,03,33, 8A,FF,FE,ED,BE,F1,33,11,32, 8A,23,20,FF,DD,DC,DE,F2,20, 8A,12,45,32,FE,0B,CF,ED,EF, 8A,03,55,21,F2,43,0E,B9,CE, 8A,1F,DF,F2,64,33,11,22,DA, 8A,AD,F0,DE,02,36,31,41,01, 9A,00,FF,DC,E0,01,00,12,14, 8A,6F,EE,EE,D9,C0,1F,01,26, 8A,50,13,11,0F,CC,CB,DF,F1, 8A,23,32,14,62,ED,FF,EC,CC, 8A,F0,02,35,33,11,21,FF,FE, 9A,DC,E1,10,00,11,23,30,FE, 8A,E2,FA,AD,F1,22,14,43,31, 9A,00,F0,FF,ED,EF,11,00,13, 8A,23,30,F2,FD,DB,CE,F0,12, 8A,14,51,F1,22,1F,CE,DC,EE, 8A,E0,02,44,22,11,00,FE,EE, 8A,BB,F0,24,43,2F,22,10,00, 8A,DB,DE,E0,0F,F2,43,12,21, 8A,10,DE,00,EB,C1,F1,55,20, 8A,1F,E2,32,EA,BD,25,1B,A1, 9A,44,0E,EF,33,FD,E0,00,E0, 8A,21,24,20,01,20,DD,02,0C, 8A,CF,11,01,21,1F,01,22,0E, 8A,EE,ED,02,FD,24,21,ED,24, 8A,1F,FD,F0,0F,30,AE,24,6F, 8A,AE,34,1D,DF,02,FF,ED,05, 8A,31,1E,F1,11,10,DB,D2,32, 8A,DC,13,40,CE,36,4E,CD,E2, 8A,2C,CE,15,30,EF,22,10,0F, 8A,0F,01,1F,DB,05,3F,DE,26, 8A,5F,DD,E0,3D,AD,04,40,F1, 8A,43,0C,E2,2F,CE,F1,FC,D3, 8A,54,0D,F4,42,0D,CC,F0,ED, 8A,11,31,EF,35,2E,D1,41,DD, 7A,AE,3F,AD,22,47,45,42,0D, 8A,CD,0F,DC,C0,47,30,E0,23, 8A,20,DF,DE,FF,DD,F3,43,F0, 8A,14,54,FD,CC,E0,EE,D0,22, 8A,21,22,22,0F,F1,1F,DC,CF, 7A,32,3F,07,75,43,0F,AB,E9, 8A,CE,F1,11,21,12,11,32,0D, 8A,CD,FF,DE,00,11,14,42,11, 8A,11,ED,ED,CD,F0,11,10,14, 7A,74,22,1E,CD,BB,AD,21,FD, 8A,04,64,1F,F2,0F,DA,C0,0F, 8A,FF,22,11,23,31,0E,DF,FD, 8A,EE,FF,F0,23,53,12,43,FB, 8A,BE,01,DA,D0,23,32,12,63, 8A,0F,EE,FD,EF,CE,F1,35,20, 8A,04,44,0C,AC,F1,EC,B0,23, 8A,21,01,46,3F,AD,0D,EF,EE, 8A,DF,32,44,22,23,1E,DE,CD, 8A,FD,C0,00,23,34,33,11,FD, 8A,EF,DD,DD,02,10,24,42,22, 8A,00,EB,BE,FE,DF,02,31,12, 8A,33,41,DC,EF,DC,DF,02,31, 8A,23,43,20,0F,DC,F1,DA,B1, 8A,44,20,21,35,3F,CC,D0,1E, 8A,DE,F2,31,34,30,00,0F,EB, 8A,B0,0F,F0,01,12,32,11,10, 8A,FD,DD,EE,F0,03,63,F1,22, 8A,10,EE,DD,E1,EB,03,23,00, 8A,32,22,FE,CE,00,EE,D0,54, 8A,10,13,31,0E,CD,DE,00,FF, 7A,BF,55,41,12,44,0D,C9,CB, 8A,D1,1F,04,56,1F,11,00,FD, 8A,BE,0F,EF,03,30,13,33,0D, 8A,DE,01,FD,CD,23,34,12,32, 7A,41,DC,C9,9A,DF,FE,14,2F, 8A,12,44,2D,CD,0F,DC,DF,01, 8A,46,22,32,20,FF,0D,DC,BD, 8A,13,1E,F2,35,60,EE,F1,FD, 8A,CC,E0,00,15,54,2F,F3,41, 8A,DA,AE,F0,DC,02,22,12,43, 8A,2F,E0,DC,DC,DF,F1,35,44, 8A,02,33,20,DC,DE,DE,ED,02, 8A,22,22,43,21,EB,D1,1C,9B, 8A,F4,64,12,12,44,0E,CC,FF, 8A,EB,BF,21,21,04,53,1F,ED, 8A,DF,DC,DC,F3,46,41,11,32, 8A,21,EA,CE,E0,FD,F0,23,43, 8A,32,FE,FF,FF,CB,DF,22,23, 8A,11,43,30,DF,FE,0D,AC,03, 8A,1E,F2,55,2E,FF,0F,ED,DC, 8A,C1,22,34,31,11,22,1F,DD, 8A,DD,01,EF,01,22,34,21,FD, 8A,DF,FE,EE,00,00,22,33,21, 7A,FF,3E,AE,BA,CE,23,F0,13, 8A,43,0F,FF,FF,ED,DF,F1,11, 8A,12,35,2F,F0,00,FD,DE,F0, 8A,EF,14,31,11,12,2E,CB,DF, 8A,20,F0,E0,33,12,11,12,EE, 8A,EF,EE,FF,02,F0,21,14,10, 8A,FC,CF,01,0D,E0,22,11,31, 7A,04,33,E9,CE,CE,0D,D1,46, 7A,42,45,0B,E1,D9,B1,3F,BD, 7A,16,51,F1,20,26,1C,AA,D0, 7A,22,00,DE,35,53,0B,BE,21, 8A,EC,02,20,F0,11,31,00,01, 7A,FC,DF,BE,EF,63,E0,14,55, 7A,29,9F,F0,1E,DF,E0,41,E0, 7A,12,11,12,0E,EC,CF,23,3F, 7A,CE,24,12,0C,EF,FF,DF,24, 7A,1E,11,F2,31,12,21,BA,D2, 7B,3F,FE,12,02,52,0F,DE,12
SampEnd:

DW STblEnd-STblStart,$6D60, $B516, $BD2C, ;$18
                     $FFFF, $FFFF, ;$19
                     $FFFF, $FFFF,
                     $FFFF, $FFFF,
                     $FFFF, $FFFF,
                     $FFFF, $FFFF,
                     $FFFF, $FFFF,
                     $FFFF, $FFFF



;=====================================================================================
;Instrument that shows ADSR - found at $6C00 in ARAM   first byte is instrument number  comes in 6 bytes ($000000)

;Pointers to sample begin (two bytes, $0000) and end (two bytes, $0000) - start at $6D00 being the 0th sample in hex.
;=====================================================================================




DW DataEnd-DataStart,$5828
   
base $005828

DataStart:

   DW Song1
   
   
Song1:
   DW Song1Pattern,$00FF,Song1
   

Song1Pattern:
   DW Song1Chan1,Song1Chan2,Song1Chan3,$0000,$0000,$0000,$0000,$0000



Song1Chan1:   ;First channel's song instructions.
;   DB $E5,$C0 ;Song volume: C0. Default
;   DB $E7,$20 ;Song speed: 20. Default
;   DB $E1,$0A ;Channel panning: 0A (center). Default
;   DB $E9,$00 ;Transpose song: 00. Default
;   DB $EA,$00 ;Transpose channel: 00. Default
;   DB $ED,$FF ;Channel volume: FF. Default
;   DB $F4,$00 ;Channel cents adjustment: 00. Default

;I put the above values in just as a sort of note to myself of what the default values are when
;a new track is loaded.

   DB $E5,$FF    ;Song volume: FF
   DB $F6        ;Disable echo.

   DB $E0,$18    ;Instrument: String bounce with decay. This is the first instrument I defined
   DB $E1,$0A    ;Panning:
   DB $ED,$C0    ;Slightly lower channel volume

   DB $1A,$7F    ;Note length 24, sound length 8/8, volume percent 8/8
   DB $EF : DW S1C1Loop1 : DB $02  ;Play the first song loop twice
   DB $EF : DW S1C1Loop2 : DB $02  ;Play the first song loop twice
   DB $00        ;This section of the song is done. Tell the conductor to go on to the next.
                 ;Of course, in this case, the conductor just tells everyone to loop to their
                 ;starts.

S1C1Loop1:
   DB $8C,$C8,$C8,$C8
   DB $C8,$C8,$C8,$C8
   DB $00             ;Loop / Return from loop
   
S1C1Loop2:
   DB $83,$C8,$C8,$C8
   DB $C8,$C8,$C8,$C8
   DB $00             ;Loop / Return from loop
   
   
;====================================================================================================

Song1Chan2:   
   DB $E0,$18 ;Instrument: String bounce with decay
   DB $E1,$0A ;Panning: Somewhat left
   DB $ED,$C0 ;Lower channel volume

   DB $1A,$7F
   DB $EF : DW S1C2Loop1 : DB $02
   DB $EF : DW S1C2Loop2 : DB $02
   DB $00

S1C2Loop1:
   DB $98,$C8,$C8,$C8
   DB $96,$C8,$C8,$C8
   DB $00

S1C2Loop2:
   DB $9B,$C8,$C8,$C8
   DB $99,$C8,$C8,$C8
   DB $00
   

;====================================================================================================
   
Song1Chan3:   
   DB $E0,$18 ;Instrument: String bounce with decay
   DB $E1,$0A ;Panning: Somewhat left
   DB $ED,$C0 ;Lower channel volume

   DB $1A,$7F
   DB $EF : DW S1C3Loop1 : DB $02
   DB $EF : DW S1C3Loop2 : DB $02
   DB $00

S1C3Loop1:
   DB $C8,$C8,$99,$C8
   DB $C8,$C8,$C8,$C8
   DB $00

S1C3Loop2:
   DB $C8,$C8,$9C,$C8
   DB $C8,$C8,$C8,$C8
   DB $00



DataEnd:
   DW $0000  ;No more data to transfer. Stick in a 0000 to signify that.
}