; Sample envelope file for MidiJoy ; use for example MADS to compile, e.g. ./mads.macosx-intel -o:envelope.mje envelope.txt ; then simply load the resulting envelope.mje binary from DOS prior to starting MidiJoy or the player org $4F00 ; use $4F00 for single envelope and/or for playback ; relocate to $3400 ... $3B00 for using as selectable envelope block .byte ADS1-ADS1, ADS2-ADS1, ADS3-ADS1, ADS4-ADS1, EndADSR-ADS1 ; index bytes to the beginning of the four ADSR blocks and the end of the last block ADS1 .byte Rel1-ADS1-1 .byte 15,15,14,14,13,13,12,12,11,11,10,10,9,9,8,8,7,7,6,6,5,5,4,4,3,3,2,2,1,1,0,0,6 ; slowly ascending ADS phase, then continue with vibrato by repeating the last 6 bytes Rel1 .byte 6,6,5,5,4,4,3,3,2,2,1,1,0,0 ; short Release phase ADS2 .byte Rel2-ADS2-1 .byte 0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,7,7,6,6,5,5,4,4,3,3,2,2,1,1,0,0,0 ; begin with full volume and slowly decrease Rel2 .byte 0,15,0 ; in Release phase, hit full volume once very shortly ADS3 .byte Rel3-ADS3-1 .byte 0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,0 ; begin with full volume, decrease for a while, then continue with full voulme during Sustain phase Rel3 .byte 6,6,5,5,4,4,3,3,2,2,1,1,0,0 ; short release phase ADS4 .byte Rel4-ADS4-1 .byte $80+0,0,15,15,3 ; fast change between full volume and mute creates a buzzing sound, intensified by changing distortion parameter to $80 on the first note of the pattern Rel4 .byte 6,6,5,5,4,4,3,3,2,2,1,1,0,0 ; slow Release phase EndADSR