Page 2 of 3

Re: unofficial famitone 4 is done

Posted: Tue Sep 18, 2018 6:23 pm
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".

Re: unofficial famitone 4 is done

Posted: Tue Sep 18, 2018 6:39 pm
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).

Re: unofficial famitone 4 is done

Posted: Wed Sep 19, 2018 9:43 am
by Thecoolestnerdguy
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

Re: unofficial famitone 4 is done

Posted: Wed Sep 19, 2018 12:25 pm
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.

Re: unofficial famitone 4 is done

Posted: Wed Sep 19, 2018 2:39 pm
by Thecoolestnerdguy
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 :)

Re: unofficial famitone 4 is done

Posted: Wed Sep 19, 2018 6:08 pm
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?

Re: unofficial famitone 4 is done

Posted: Wed Sep 19, 2018 9:06 pm
by dougeff
stdafx.h

That's just something Visual Studio uses to speed up compiling. Remove it if you like.

Re: unofficial famitone 4 is done

Posted: Wed Sep 19, 2018 10:06 pm
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.

Re: unofficial famitone 4 is done

Posted: Thu Sep 20, 2018 9:33 am
by Thecoolestnerdguy
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?

Re: unofficial famitone 4 is done

Posted: Thu Sep 20, 2018 1:19 pm
by dougeff
I don't know why your computer isn't outputting correctly.

Re: unofficial famitone 4 is done

Posted: Thu Sep 20, 2018 5:36 pm
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.

Re: unofficial famitone 4 is done

Posted: Thu Sep 20, 2018 7:40 pm
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.

Re: unofficial famitone 4 is done

Posted: Thu Sep 20, 2018 8:00 pm
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.

Re: unofficial famitone 4 is done

Posted: Fri Sep 21, 2018 1:45 am
by Thecoolestnerdguy
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

Re: unofficial famitone 4 is done

Posted: Sun Nov 18, 2018 3:40 pm
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.