[Old topic; discussion continues here]
This is a continuation of General music and sound solution thread, started by me about two weeks ago. I know very well that if you want something, one of the best ways is to do it yourself, so of course I've started work on my custom solution too, which I want to release to the public.
This is WIP of my custom solution named FamiTone (the name suggested by Memblers). This is not finished, currently it only plays music, without sound effects. It has no DPCM as well, because currently there is no export of DPCM data in FamTracker.
So, what we have:
- Plain 2A03, very limited capabilites, enough to make some game/demo music, however.
- Easy way to make music. You just use FamiTracker following certain limitations, then you use a text exporter plug-in, then a converter, and get an assembly file with data you can use. It is not very comfortable, but currently needed to simplify testing. In future exporter and converter could be merged.
- The player hopefully fast. I haven't compared it with anything, and I'm absolutely not good in 6502 code optimization (so far I've made like ~1500 lines of 6502 code total), but it is very short and simple.
- The code currently NESASM only.
- The code is free to use for any purposes, credit/donate/whatever optional, not obligatory.
- The player uses 7 bytes in zero page and 127 bytes in a RAM page.
- Music data format and converter aren't the most optimal ever, improvements are possible.
Now about limitations:
- Notes C-1..B-5 and Note Cut
- Only Volume, Arpeggio and Pitch envelopes (no Pitch for noise channel), loops are supported
- Pitch envelope accumulate the offset only at conversion time, thus it can't go further -64..63 and can't accumulate the offset with loop
- Only first step of Duty envelope for pulse and noise channels
- No volume column
- No effects except Fxx, tempo is not supported (fixed at 150)
- Bxx (for looping without an intro) and D00 (for shorter patterns) at conversion time
Yes, these are very limited features compared to FamiTracker capabilities, however if you want feature-complete player for FT, you have it already with FT itself, more features means more complex and slower code. So this is a tradeoff. You should not worry, though, because this feature set is about the same that some early chip trackers had, and there was a lot of good music made with them.
Also, I've made a demonstration song within these limitations, compiled ROM is provided (if you run it in Nintendulator or other good emulator, you'll see jumping color area at the top of the screen, it is the time the player takes). The music compiled into NSF with FamiTracker takes ~9K with player, ~5K without, and compiled for FamiTone takes ~6K with player, and ~5K without (so the player is ~1K, and the data compression rate is about the same as with FT).
Download FamiTone WIP
Thanks goes to Gradualore, without the plugin system in FamiTracker it would take a lot of additional time.
Edit: Here is the original post, player was updated since, so information above is not entirely valid (check the thread for updates). Download link is to the latest WIP, though.
This is a continuation of General music and sound solution thread, started by me about two weeks ago. I know very well that if you want something, one of the best ways is to do it yourself, so of course I've started work on my custom solution too, which I want to release to the public.
This is WIP of my custom solution named FamiTone (the name suggested by Memblers). This is not finished, currently it only plays music, without sound effects. It has no DPCM as well, because currently there is no export of DPCM data in FamTracker.
So, what we have:
- Plain 2A03, very limited capabilites, enough to make some game/demo music, however.
- Easy way to make music. You just use FamiTracker following certain limitations, then you use a text exporter plug-in, then a converter, and get an assembly file with data you can use. It is not very comfortable, but currently needed to simplify testing. In future exporter and converter could be merged.
- The player hopefully fast. I haven't compared it with anything, and I'm absolutely not good in 6502 code optimization (so far I've made like ~1500 lines of 6502 code total), but it is very short and simple.
- The code currently NESASM only.
- The code is free to use for any purposes, credit/donate/whatever optional, not obligatory.
- The player uses 7 bytes in zero page and 127 bytes in a RAM page.
- Music data format and converter aren't the most optimal ever, improvements are possible.
Now about limitations:
- Notes C-1..B-5 and Note Cut
- Only Volume, Arpeggio and Pitch envelopes (no Pitch for noise channel), loops are supported
- Pitch envelope accumulate the offset only at conversion time, thus it can't go further -64..63 and can't accumulate the offset with loop
- Only first step of Duty envelope for pulse and noise channels
- No volume column
- No effects except Fxx, tempo is not supported (fixed at 150)
- Bxx (for looping without an intro) and D00 (for shorter patterns) at conversion time
Yes, these are very limited features compared to FamiTracker capabilities, however if you want feature-complete player for FT, you have it already with FT itself, more features means more complex and slower code. So this is a tradeoff. You should not worry, though, because this feature set is about the same that some early chip trackers had, and there was a lot of good music made with them.
Also, I've made a demonstration song within these limitations, compiled ROM is provided (if you run it in Nintendulator or other good emulator, you'll see jumping color area at the top of the screen, it is the time the player takes). The music compiled into NSF with FamiTracker takes ~9K with player, ~5K without, and compiled for FamiTone takes ~6K with player, and ~5K without (so the player is ~1K, and the data compression rate is about the same as with FT).
Download FamiTone WIP
Thanks goes to Gradualore, without the plugin system in FamiTracker it would take a lot of additional time.
Edit: Here is the original post, player was updated since, so information above is not entirely valid (check the thread for updates). Download link is to the latest WIP, though.