Program music from Famitracker into game?
Moderator: Moderators
- JWinslow23
- Posts: 30
- Joined: Mon Apr 24, 2017 5:52 am
- Location: West Allis, WI
Program music from Famitracker into game?
I created a song in Famitracker that I plan to put in a new game I'm making. How would I put it in a game that I'm making in 6502 asm? I tried generating a .asm file with the "Create .nsf" dialog, but I'm unsure how to play it. I will have sound effects playing with the music, as well.
Re: Program music from Famitracker into game?
Re: Program music from Famitracker into game?
But, you forget, Shiru made a full famitracker driver that is compatible with famitone2. And, it is what I'm using for my Ninja game.
It's also complicated, and cc65. And needs lots of ROM space for music data.
It's also complicated, and cc65. And needs lots of ROM space for music data.
nesdoug.com -- blog/tutorial on programming for the NES
- JWinslow23
- Posts: 30
- Joined: Mon Apr 24, 2017 5:52 am
- Location: West Allis, WI
Re: Program music from Famitracker into game?
I'm not using any effects except Cxx (halt song), and my instruments only have volume changes. Thanks for pointing me to Famitone2, I might use that. Is that compatible with NESASM3?
Re: Program music from Famitracker into game?
Why don't you download it and check it out?JWinslow23 wrote:Is that compatible with NESASM3?
As dougeff already said: Shiru made two versions of it.
The regular FamiTone2 v1.15 is the one that he created as a minimalistic sound driver for NES development.
And because he got frustrated by people who complained that certain things don't work in FamiTone, he created neslib + FamiTracker player which uses the original FamiTone only for sound effects while the music is done with the native FamiTracker driver:
So, it's your choice which one you want to use.Since release of FamiTone I was getting complaints on how restricted it is, and
how missing features not allowing to create good music with it. It gets as far
as people now trying to expand the engine to support more FamiTracker features,
for some reason - rather pointless to me, as the very idea of FamiTone was to be
that restricted, the design was never intended to be expandable, and it would be
easier to just write another engine from scratch.
With neslib + FamiTracker player, you can do everything that FamiTracker can do. But it will probably require a lot of ROM space and I assume calling the functions would also require a lot of the precious CPU time (which, unlike ROM space, cannot be added with mappers).
For my game, I used the regular FamiTone, i.e. the limited, but small one.
I don't understand the problem many people have. I myself don't know much about making music. But I would say my composer did a pretty neat soundtrack, even with FamiTone's restrictions:
https://iyamwhatiyam.bandcamp.com/releases
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
- JWinslow23
- Posts: 30
- Joined: Mon Apr 24, 2017 5:52 am
- Location: West Allis, WI
Re: Program music from Famitracker into game?
I'm having a problem in the first step. When I'm using the text2data tool that comes with Famitone, it always crashes. There is no error message, it just freezes for a second, and then my computer says "text2data.exe has stopped working". I'm on Windows 10, and the .txt file FamiTracker generates is attached. How do I fix this?
- Attachments
-
- WalRush_Main_Theme.txt
- (9.09 KiB) Downloaded 112 times
Last edited by JWinslow23 on Thu Apr 27, 2017 3:35 pm, edited 1 time in total.
Re: Program music from Famitracker into game?
What happens when you just call the program without any parameters? Does the error appear as well?
If yes, you might have to install the Visual C++ Runtime (version 2008 or later) first.
Edit: The problem happens on my PC as well, but only with your FamiTracker file.
Did you use the regular FamiTracker or that beta version?
I assume you have to use FamiTracker 0.4.6.
If yes, you might have to install the Visual C++ Runtime (version 2008 or later) first.
Edit: The problem happens on my PC as well, but only with your FamiTracker file.
Did you use the regular FamiTracker or that beta version?
I assume you have to use FamiTracker 0.4.6.
Last edited by DRW on Thu Apr 27, 2017 3:38 pm, edited 1 time in total.
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
- JWinslow23
- Posts: 30
- Joined: Mon Apr 24, 2017 5:52 am
- Location: West Allis, WI
Re: Program music from Famitracker into game?
Without any parameters, it just gives me usage information.
Re: Program music from Famitracker into game?
I added some text to my previous post.
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Re: Program music from Famitracker into game?
Alright, I see now: Your file is created from FamiTracker 0.4.2. I'd suggest to download the latest version (0.4.6):
www.famitracker.com/downloads.php
www.famitracker.com/downloads.php
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
- JWinslow23
- Posts: 30
- Joined: Mon Apr 24, 2017 5:52 am
- Location: West Allis, WI
Re: Program music from Famitracker into game?
I did get FamiTracker v0.4.6. That's what it says in the "About FamiTracker" information. I also have the latest version of Famitone.
I'm confused. :\
Here is my actual FamiTracker project, if it's something to do with that. (It has two songs: the main theme, and a "flap" sound-effect.)
I'm confused. :\
Here is my actual FamiTracker project, if it's something to do with that. (It has two songs: the main theme, and a "flap" sound-effect.)
- Attachments
-
- WalRush_Main_Theme.ftm
- (3.6 KiB) Downloaded 113 times
Re: Program music from Famitracker into game?
O.k., looks like the problem is with your FTM file somehow since it has exactly the same symptoms on my PC.
In the past, we've had this as well, that some dirty stuff was somewhere inside the binary file that was also put into the text file and made it semi-invalid.
My suggestion:
Open a clean new file (with the latest FamiTracker version).
Open the current file in another FamiTracker instance.
Put everything from the dirty file to the clean file via copy & paste.
And then save the clean file.
Whatever dirty stuff is in the old file should be gone. (You can do a file compare of the text export from the new and the old file to see where they differ.)
In the past, we've had this as well, that some dirty stuff was somewhere inside the binary file that was also put into the text file and made it semi-invalid.
My suggestion:
Open a clean new file (with the latest FamiTracker version).
Open the current file in another FamiTracker instance.
Put everything from the dirty file to the clean file via copy & paste.
And then save the clean file.
Whatever dirty stuff is in the old file should be gone. (You can do a file compare of the text export from the new and the old file to see where they differ.)
Last edited by DRW on Thu Apr 27, 2017 4:09 pm, edited 1 time in total.
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Re: Program music from Famitracker into game?
Unrelated hint, but this has nothing to do with the error: Sound effects have to be created with nsf2data and therefore go into a separate file.
Unfortunately, sound effects in FamiTone cannot use an infinite loop. If you want an infinite sound effect, you either have to time the sound effect call in code or you have to do it as a song after all. But doing it as a song means that you cannot have another background song while the effect is played.
Unfortunately, sound effects in FamiTone cannot use an infinite loop. If you want an infinite sound effect, you either have to time the sound effect call in code or you have to do it as a song after all. But doing it as a song means that you cannot have another background song while the effect is played.
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
- JWinslow23
- Posts: 30
- Joined: Mon Apr 24, 2017 5:52 am
- Location: West Allis, WI
Re: Program music from Famitracker into game?
I do not want an infinite loop. I actually made it stop with Cxx, but apparently Famitone doesn't support that. What effect would do this?DRW wrote:Unrelated hint, but this has nothing to do with the error: Sound effects have to be created with nsf2data and therefore go into a separate file.
Unfortunately, sound effects in FamiTone cannot use an infinite loop. If you want an infinite sound effect, you either have to time the sound effect call in code or you have to do it as a song after all. But doing it as a song means that you cannot have another background song while the effect is played.
Also, I got text2data working now, thanks!
Re: Program music from Famitracker into game?
I had no problems. (note, I removed the 2nd song before exporting from 0.4.6).
(leaving it on crashes text2data for some reason).
(leaving it on crashes text2data for some reason).
- Attachments
-
- WalRush.asm
- (2.01 KiB) Downloaded 105 times
Last edited by dougeff on Thu Apr 27, 2017 4:35 pm, edited 1 time in total.
nesdoug.com -- blog/tutorial on programming for the NES