It is currently Fri Oct 19, 2018 5:43 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: music in asm
PostPosted: Fri Oct 05, 2018 9:48 am 
Offline

Joined: Fri Sep 21, 2018 4:00 pm
Posts: 4
Bonjour
je voudrai savoir si il est possible d inclure un fichier nsf cree avec famitracker
pour pouvoir l inclure dans un programme asm

juste pour faire une melodie sur un jeu basique

pour l instant j ai juste reussi en recuperant des infos
a avoir un background
un personnage qui se deplace
un flip du personnage

ainsi que des ennemi qui se deplacent horizontalement ou verticalement

les prochaines etapes seront une petite melodie comme indique
et surtout la gestion des collisions

in english

Hello
I want to know if it is possible to include a file nsf created with famitracker
to be included in an asm program

just to make a melody on a basic game

for now I just managed to recover some information
to have a background
a moving character
a flip of the character

as well as enemies moving horizontally or vertically

the next steps will be a little melody as indicated
and especially collision management

thank you all
Thierry


merci a tous
Thierry


Top
 Profile  
 
 Post subject: Re: music in asm
PostPosted: Fri Oct 05, 2018 9:53 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 20674
Location: NE Indiana, USA (NTSC)
Do you have the FTM or 0CC file? If so, there are a few audio drivers that can play music converted from FamiTracker, such as Pently, FamiTone2, FamiTone4, and GGSound. Each of these drivers has limits on which FamiTracker effects it supports: FamiTone2 and GGSound are more basic, whereas Pently and FamiTone4 are more full featured.


Top
 Profile  
 
 Post subject: Re: music in asm
PostPosted: Fri Oct 05, 2018 10:27 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6893
Location: Canada
If the NSF is small enough and doesn't bankswitch, you can embed it directly in your assembly program. The NSF header has three fields, LOAD, INIT and PLAY that are needed for doing this. LOAD is where to put the data in the ROM. INIT is the address of the routine to set up a track to be played. PLAY is called once per frame.

If you need sound effects as well, this can be a bit of a problem to implement on top of an NSF. The sound effect code should need to cooperate with the music code, not just run on top of it. For that case one of tepples' suggested alternatives might help.

There is also "NSF driver" assembly source code for Famitracker, which would let you build the NSF data yourself as part of the program. If you used that you could place the data anywhere (not just the INIT address) and modify the source code as needed for sound effect cooperation.


Top
 Profile  
 
 Post subject: Re: music in asm
PostPosted: Mon Oct 08, 2018 2:48 pm 
Offline

Joined: Fri Sep 21, 2018 4:00 pm
Posts: 4
can you explain more
and example
please
Thierry


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group