unofficial famitone 4 is done

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: unofficial famitone 4 is done

Post by dougeff »

However, the playback doesn't seem to match what I intended.
Although it's not stated in the readme... I believe arpeggio sequences have to be "absolute" and not "relative".
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: unofficial famitone 4 is done

Post by dougeff »

Sounds ok when I process it, with "absolute". Not sure what you're doing different that the volumes don't sound right. Are you using the newest versions of the famitone 4 asm code and the newest text2vol4?

(this is a test file that I gutted and put your song in, don't touch any buttons, they won't do anything usefull).
Attachments
SONG2.nes
(40.02 KiB) Downloaded 646 times
nesdoug.com -- blog/tutorial on programming for the NES
Trirosmos
Posts: 50
Joined: Mon Aug 01, 2016 4:01 am
Location: Brinstar, Zebes
Contact:

Re: unofficial famitone 4 is done

Post by Trirosmos »

dougeff wrote: I believe arpeggio sequences have to be "absolute" and not "relative".
Ah, noted! That still didn't seem to fix it for me, unfortunately :/
dougeff wrote:Sounds ok when I process it, with "absolute".
It does, indeed! That's intriguing...
Maybe I just didn't assemble the files correctly? I'm not super familiar with ld65, but the cfg file I was using seemed to work.
dougeff wrote:Are you using the newest versions of the famitone 4 asm code and the newest text2vol4?
Yes, I'm using the version linked previously on this very thread! Weird...
Oh... now that I think about it, I am running text2vol4 through Wine, since I'm on Linux... maybe that's the source of conversion errors?
I'm including the Song.s file I generated so we can hopefully compare them.
Thank you for the help, btw. This seems like it could very well be one of the best sound engines to use right now, as it would make composing considerably more straightforward for someone used to " normal " Famitracker :D
Attachments
Song.s
(5.75 KiB) Downloaded 635 times
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: unofficial famitone 4 is done

Post by dougeff »

I'm getting different data. I don't know why. My Song.s looks somewhat different.

Use the files from the github, if you aren't.
nesdoug.com -- blog/tutorial on programming for the NES
Trirosmos
Posts: 50
Joined: Mon Aug 01, 2016 4:01 am
Location: Brinstar, Zebes
Contact:

Re: unofficial famitone 4 is done

Post by Trirosmos »

dougeff wrote:Use the files from the github, if you aren't.
I re-downloaded the files just to be sure, but, alas, still the same issue.
dougeff wrote:I don't know why. My Song.s looks somewhat different.
Wine gives me a bunch of errors when running text2vol4, but since it still outputs the files, I assumed it was working properly.
Unfortunately, seems like it must use some API call Wine doesn't implement or something. Oh, well... guess I'll have to awaken my Windows VM.
Any chance of a Python converter happening? :P

Thanks for trying to figure this out with me :)
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: unofficial famitone 4 is done

Post by Banshaku »

@Thecoolestnerdguy

Since text2vol4 is a cpp it could be compiled on other platforms (I did it once for famitone 2) but right now I did a quick test and stdafx.h is missing and it uses conio.h too, both are usually windows specific (conio is ms-dos specific) so to make it work on linux it requires a little bit of work. I could always re-test it again and adapt it for other platforms.

@dougeff

What is included in stdafx.h?
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: unofficial famitone 4 is done

Post by dougeff »

stdafx.h

That's just something Visual Studio uses to speed up compiling. Remove it if you like.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: unofficial famitone 4 is done

Post by Banshaku »

@Thecoolestnerdguy

If you remove conio.h, which is not used in that file and change the top with this:

Code: Select all

#if defined(WIN32) || defined(WIN64) 

#include "stdafx.h"
#define _CRT_SECURE_NO_WARNINGS

#else

#define _stricmp strcasecmp

#endif
it should now compile on linux. It should compile on mac too.
Trirosmos
Posts: 50
Joined: Mon Aug 01, 2016 4:01 am
Location: Brinstar, Zebes
Contact:

Re: unofficial famitone 4 is done

Post by Trirosmos »

Banshaku wrote:it should now compile on linux. It should compile on mac too.
Indeed, it does! :D
Its output seems to match the one generated by the Windows executable, while being a bit smaller, somehow..? Maybe that's just down to Windows handling .txt files differently?

Either way, the problem with playback still persists :/

@dougeff, can you send my the Song.s file you generated so I can test whether the issue is somewhere else in my build process?
Attachments
Song_win.s
(5.87 KiB) Downloaded 639 times
Song_linux.s
(5.68 KiB) Downloaded 634 times
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: unofficial famitone 4 is done

Post by dougeff »

I don't know why your computer isn't outputting correctly.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: unofficial famitone 4 is done

Post by Banshaku »

It it's a formatting bug it could be some locale that impact how the data is parsed (this is a very far fetched guess but possible).

I think there is a file that you did that is supposedly fine so I could try to do a diff with my linux box to see if there is any difference. If not, then something is influencing the conversion in some way on his machine, somehow.

edit:

@dougeff
it's not in the thread. If you could include your result data I could test it against a version on my linux box to see if there result is the same.
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: unofficial famitone 4 is done

Post by dougeff »

Sorry for the delay.

I double checked. You data IS the same as mine. The only difference that I see besides changing the arpeggio to "absolute" I also changed the arpeggio sequence to match the original...

so the instrument definition (closed hat) are slightly different, due to my changes in famitracker.

mine...

@env4:
.byte $c1,$c2,$c4,$00,$02

yours...

@env4:
.byte $c1,$c1,$c0,$00,$02

The rest of the data is the same.

The word "FamiTone4.1" at the top is different in the linux version. I changed it to just say "FamiTone4" so that I don't have to edit this line every time I do an update. Which tells me that the linux version is an older version of text2vol4.

So, whatever "Song_win.s" was made with seems to be correct. Use that.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
Banshaku
Posts: 2417
Joined: Tue Jun 24, 2008 8:38 pm
Location: Japan
Contact:

Re: unofficial famitone 4 is done

Post by Banshaku »

ok! No need to test then ;)

Maybe we could check later how to make them easy to compile on multiple platform. That was one issue with the original version and I think it doesn't require much, like the quick edit I shared yesterday. I have access to 3 platform (win/mac/linux) so I could test all of them.

How to compile could be explained in the file directly or a simple makeFile could do the job too. But it's not that difficult, just g++ nameOfFile.cpp -o nameOfFile does the job so maybe there is no need for a makeFile after all. Or it could be useful to compile all of them in 1 shot.
Trirosmos
Posts: 50
Joined: Mon Aug 01, 2016 4:01 am
Location: Brinstar, Zebes
Contact:

Re: unofficial famitone 4 is done

Post by Trirosmos »

dougeff wrote: The word "FamiTone4.1" at the top is different in the linux version. I changed it to just say "FamiTone4" so that I don't have to edit this line every time I do an update. Which tells me that the linux version is an older version of text2vol4.
Song_win.s was generated using the text2vol4 Windows executable that is on GitHub through Wine. The Linux version is from the native binary I compiled making the changes @Banshaku suggested.
dougeff wrote: So, whatever "Song_win.s" was made with seems to be correct. Use that.
Nice!
I guess that isolates the issue down to something with my code, then... Well, I'll have to figure it out.
Thanks for the help, y'all :D
User avatar
dougeff
Posts: 3078
Joined: Fri May 08, 2015 7:17 pm

Re: unofficial famitone 4 is done

Post by dougeff »

I don't know if anyone would be interested, but I made a map of every famitone variable.

https://github.com/nesdoug/famitone2d/b ... mitone.txt

I did this because I plan to port famitone2 to gameboy. This was part of me trying to understand the code better.
nesdoug.com -- blog/tutorial on programming for the NES
Post Reply