It is currently Sat Sep 22, 2018 1:10 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Wed Jul 11, 2018 7:52 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
I had this 99% done for a few months, but was getting a bug with the nesasm3 version. Turns out that copy pasting from asm6 code to nesasm3 is dangerous. Had to do a byte by byte comparison of the output.

This little guy. lda (FT_TEMP_PTR),y
turns into lda FT_TEMP_PTR,y
and needed to be lda [FT_TEMP_PTR],y

Anyway.
Added effects 1xx,2xx,4xx. Vibrato speed is permanently set to 8. Vibrato depth is limited from 0-A. Only 1 fx column per channel. You can do 1xx(2xx) and 4xx on the same note, but the fx must be on different lines in the famitracker file.
(as with my version 3.2, also has volume column and all notes supported)


https://github.com/nesdoug/famitone4.1

(source included)
Let me know if there are any bugs.

(note)
This music engine was used in Flappy Jack (fx really only noticable on the end song ... well you can hear vibrato on the title song too), and an unfinished project that I shelved, and will be used on the upcoming Full Quiet.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Last edited by dougeff on Tue Sep 18, 2018 6:41 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Jul 11, 2018 8:58 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1955
Location: Fukuoka, Japan
I'm getting interested in this version of famitone :)

What I would like to know is, how do I figure out if a song is compatible or not and how do I convert it for this engine? I have some old songs that are not made by me but doesn't work with the current version. I didn't have time yet to analyze which effect are missing but will do once required.

Now that this engine exist, I may be inclined to start checking earlier for research purpose.


Top
 Profile  
 
PostPosted: Wed Jul 11, 2018 9:44 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
Quote:
how do I figure out if a song is compatible or not


From famitracker, do a text export. Then drop that in the same folder as text2vol4.exe. From the command line, type "text2vol4 [filename of text]". It will give an error message, if unsupported fx are used.

Requires a famitracker file. It will not process any other kind (like nsf).

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Wed Jul 11, 2018 10:17 am 
Offline
Formerly WheelInventor

Joined: Thu Apr 14, 2016 2:55 am
Posts: 1778
Location: Gothenburg, Sweden
Thanks for doing this, dougeff. :beer: It looks like very useful. Also good to have a broader selection of drivers.

_________________
http://www.frankengraphics.com - personal NES blog


Top
 Profile  
 
PostPosted: Sat Sep 08, 2018 11:59 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
I believe there is a bug, possibly in every version of famitone, but I haven't looked.

If you put more than 1 D00 effect in the same frame (you won't be able to see it in famitracker, since the higher D00 will shift everything up, hiding the lower ones), it will calculate the end of the frame wrong. (possibly the lower one overwriting the upper one when text2data parses it).

Sadly, many Bothans died to bring us this information. :(

I don't have the time to work on this issue right now, but I thought you would like a bug warning.


***
I forgot to mention, in any of my documents, that I added a command line switch.
-allin

to prevent it from removing unused instruments. This allows you to process 1 song at a time, and cut and paste them back together later, and the instruments still match.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Fri Sep 14, 2018 5:12 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
And another bug, if you put a Bxx effect on the same frame, below a D00 effect. In famitracker, you won't see the Bxx (the D00 will hide everything below it), but text2data WILL see the Bxx effect hidden under it, and make that the loop point.

And a 3rd bug, related to the Bxx effect, that I don't understand. (I am getting wrong instrument at the loop point, but only if Bxx effect is there).

I never touched the Dxx or Bxx effects, and I didn't write the source code, so I'm not sure how to fix these.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Fri Sep 14, 2018 10:45 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
Nevermind the last one. I think I fixed it.

line 1103
if (chn<4) insloop[chn] = ins;

just copies the last instrument from the last pattern and saves it to insert to the loop point. Which is wrong. ie. when we loop back the loop point, we don't want to overwrite the instrument THERE with an instrument at the end of the song.

Now I have it look for the first instrument in pattern at the loop start (pos == song_original.order_loop) && (ch->instrument >= 0), and save that, once, to insloop[chn].

Need to test it some more, and plan to try to fix some more bugs before resubmitting for use.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sun Sep 16, 2018 12:42 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
I think I've fixed the "multiple D00" bugs (which, by the way, only triggered if the 2 D00 effects were on different rows on different channels). Need to test more.

I might add a command line switch to ignore unsupported effects, rather than fail to process altogether.

I'm working on a large project with lots of unsupported effects, and every time I'm sent an updated file I have to go line by line in the text export and remove unsupported effects.

It might be faster just to write it into the source code to ignore them.

..

Should I call the switch "-force" or "-ignore"? Or perhaps "Wno" or "Woff"? .. EDIT, went with "-Wno"

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Tue Sep 18, 2018 3:51 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 741
Location: Denmark (PAL)
Haven't read the thread in details, but I hope it's ok for me to ask these questions - at least to get the info out there (I could research most of it myself)

1. What exactly do the supported effects do?
2. What happened to Famitone 3? Was that also an unofficial release by you?
3. How does performance and storage (of tracks) compare to Famitone 2?
4. Does the converter (text2vol4/text2data?) support converting files that use unsupported effects? It would be really nice to have the option of simply ignoring them, but with a warning that it will be ignored during conversion. It's a feature I really missed in Famitone2.


Top
 Profile  
 
PostPosted: Tue Sep 18, 2018 4:05 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
Famitone 3 added volume column and all notes.

Famitone 4 added 1xx,2xx,4xx effects. That's pitch rise, pitch fall, and vibrato.

I just put all the bug fixes and new switches in all 3 versions of famitone. 2,3, and 4, and will post them on github soon.

There is a loss of efficiency. At least 25% bigger files. More if you heavily use the volume column. I estimated the efficiency difference in the usage.txt files.

And, yes. One of the switches tells the program to ignore unsupported effects and process the song anyway.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Tue Sep 18, 2018 4:19 am 
Offline
User avatar

Joined: Thu Sep 15, 2016 6:29 am
Posts: 741
Location: Denmark (PAL)
What can I say, you're a hero.


Top
 Profile  
 
PostPosted: Tue Sep 18, 2018 6:41 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
Here, they are posted...

https://github.com/nesdoug/famitone2d

https://github.com/nesdoug/famitone3.3

https://github.com/nesdoug/famitone4.1

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Tue Sep 18, 2018 7:53 am 
Offline
User avatar

Joined: Tue Jun 24, 2008 8:38 pm
Posts: 1955
Location: Fukuoka, Japan
Will be interested in famitone 4 for my real project, that's for sure. Using a combo of famitracker/famitone is memory intensive but for now it's more than enough.

Good work :D


Top
 Profile  
 
PostPosted: Tue Sep 18, 2018 8:18 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 2262
Location: DIGDUG
Thanks. I'm glad I could make a useful contribution to the nesdev community.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Tue Sep 18, 2018 3:44 pm 
Offline

Joined: Mon Aug 01, 2016 4:01 am
Posts: 16
Location: Brinstar, Zebes
Hey!

I was trying to build a simple ROM to test this out. However, the playback doesn't seem to match what I intended.
Specifically, seems like noise arpeggio sequences and volume column sequences on both noise and pulse channels sound kinda weird.

Maybe I'm missing something obvious here, but any help is appreciated :lol:
I am assuming it is possible to use volume envelopes and the volume column at the same time, right?


Attachments:
play_song.nes [64.02 KiB]
Downloaded 4 times
Song.ftm [6.77 KiB]
Downloaded 5 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 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