Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > FamiTracker Talk > Sweep macro experiment Owner: rainwarrior New post
Page 1 of 1 Sort:  
Sweep macro experiment Posted: 2013-05-20 09:03  (Last Edited: 2013-05-21 18:53) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#47827
[url=https://dl.dropboxusercontent.com/u/883356/FamiTrackerSweepHack.zip]https://dl.dropboxusercontent.com/u/883356/FamiTrackerSweepHack.zip
[b]Updated:[/b] 5/21/2013

This is an experiment, replacing the Hi-pitch macro with a sweep unit macro usable on 2A03 squares only.

A value of 0 in the macro works like H00, causes a phase reset.

A non-zero value with the low 3 bits clear (e.g. 8, 16, 24, 32...) is treated as a "do nothing" for one tick, useful for spacing out 0 phase resets.

Any other value will be written directly to the sweep register with the high bit set. 1-7 are good for sweep down, 9-15 for sweep up. Using the higher bits will slow the sweep unit down (updating less often).

Examples:

Sloppy vibrato: | 7 8 8 8 15 8 8 8
Constant phase reset: | 0
Phase reset every 4 frames: | 0 8 8 8

Any pitch related effects, arpeggio macros, or pitch macros will reset the pitch, causing an in-progress sweep to restart.


Notes:

- NSF export will not work with this feature, don't bother trying.
- This build will not automatically register the FTM file extension.

This is intended as a fun experiment only. It is not a properly made change that could easily be integrated into Famitracker.


Included source is an overlay onto famitracker 0.4.2 source, and inherets the GPL license from it.

Posted: 2013-05-20 09:57  (Last Edited: 2013-05-21 17:55) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#47831
Not sure why the high bits don't seem to function correctly. Sweep macro 33, and the equivalent I21 aren't doing the correct thing. Wondering if Famitracker's APU emulation is doing something funky with the $4017 write? I'm not sure how my changes broke this.

Edit: seems to be fixed now with the update.

Posted: 2013-05-20 10:06 Reply | Quote
za909

Avatar

Member for: 3962 days
Location: Hungary
Status: Offline

#47832
I just made a quick test intrument to see how vibrato works, and on one channel it's slowly lowering in pitch, but on the other it's a constant vibrato.
Not sure why this is, I'v heard things about the two sweep units not working quite in the same way, but it could be just inaccurate emulation.

Also now that hardware-based features have come up, I should also mention that I'd really like to see The hardware envelopes and frame counters again, I now it's an inferior method compared to software controlled sound, but I believe these should be included for the sake of completion.

_______________________
Rectangular sh*t ©
Attachments:
sweepdiff.ftm (1 Kb)
Posted: 2013-05-20 10:09  (Last Edited: 2013-05-20 10:19) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#47833
Yes, the two sweep units are supposed to be slightly different.

However, Famitracker 0.4.2's sweeps are slightly off as well: [url=http://famitracker.com/forum/posts.php?id=4467]http://famitracker.com/forum/posts.php?id=4467.

Posted: 2013-05-20 23:56 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#47845
The sweep code was fixed, you can copy square.cpp from SVN to add it.

_______________________
Programmer and developer
Posted: 2013-05-21 17:55  (Last Edited: 2013-05-21 17:55) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#47858
Okay, I integrated that change. Somehow this also seemed to solve my other problem that I'd broken H21, etc. Redownload the zip for a new version!

Page 1 of 1 Sort: