Quote:
how to make SFX, export music from famitracker
Use the famitone code (available on Shiru's website
https://shiru.untergrund.net/code.shtml).
Put all songs in one file. Use MODULE/MODULE_PROPERTIES to add another song. Use the text export from famitracker. Use text2data app to convert it to famitone data. Include the famitone.asm code and the music data asm.
In your init code, add this...
lda #0 ;0 for pal, not 0 for NTSC
ldx #LOW(Song) ;low byte, where Song is a label at the start of music data
ldy #HIGH(Song) ;high byte
jsr FamiToneInit
lda #0 ;play the first song
jsr FamiToneMusicPlay
Then, once per frame call famitone update
jsr FamiToneUpdate
Then, write the sound effects on a separate famitracker file. Again, each as a separate song in the same file. Save as nsf file. Use the nsf2data app to generate data. Include that file.
During init code, do this...
ldx #LOW(SFX) ;low byte, where SFX is a label at the start of music data
ldy #HIGH(SFX) ;high byte
jsr FamiToneSfxInit
And to trigger a sound effect, you call this function...
lda #0 ; the first sound effect
ldx #0 ; the priority of the sound effect, from 0-3. 3 highest
jsr FamiToneSfxPlay
_________________
nesdoug.com -- blog/tutorial on programming for the NES