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 > Bug Reports & Feature Requests > Instrument macro for hardware register sweep Owner: Patashu New post
Page 1 of 1 Sort:  
Instrument macro for hardware register sweep Posted: 2013-03-14 02:38 Reply | Quote
Patashu

Avatar

Member for: 3749 days
Location: Sydney, Australia
Status: Offline

#45432
So I was watching this TAS of a gameboy game, Croc 2 ( [url=http://www.youtube.com/watch?v=pjbGdoh_krY]http://www.youtube.com/watch?v=pjbGdoh_krY ) and thinking about the music. Specifically I was thinking 'that rapid speed popping sound I hear at the start of a note, how do you do that?' So I pop open Famitracker and try some things.

-Is it an arpeggio of 0 -12 0 -12 0? Nope.
-Is it a duty cycle of 1 0 1 0 1? Nope. 1 2 1 2 1? Nope.
-Is it both at once? It's kinda similar but... nope.

Oh, wait - I know what it's doing! That pop is a phase reset, I've heard them before. So I realized that if I wanted an instrument like this in my ftms I would have to use speed 1 and place four H00s (which forces a phase reset) in a row on the field, because I can't make it as an instrument macro.

Would adding hardware register sweeps to the instrument editor be feasible to allow something like this? Or is there a nicer solution?

Posted: 2013-03-14 09:54 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#45452
It's not the sweep that causes the pop. It's writing the high bits of the pitch register, which famitracker happens to do when you use an Hxx/Ixx effect.

On the actual NES these two things are separate. You can hardware sweep without writing the high bits of the pitch register, and you can write high without triggering a hardware sweep.

Posted: 2013-03-14 11:04 Reply | Quote
Patashu

Avatar

Member for: 3749 days
Location: Sydney, Australia
Status: Offline

#45454
[quote=rainwarrior]It's not the sweep that causes the pop. It's writing the high bits of the pitch register, which famitracker happens to do when you use an Hxx/Ixx effect.

On the actual NES these two things are separate. You can hardware sweep without writing the high bits of the pitch register, and you can write high without triggering a hardware sweep.[/quote]

It is my understanding that H00 does nothing except cause the pop, right? And if you DID have Hxx running, re-Hxxing will cause the pop?

Posted: 2013-03-14 19:31 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#45466
Hxx writes $xx to the sweep register, and also writes the full pitch value to both pitch registers.

So, H00 writes $00 to the sweep register (disabling sweep), and by writing to the high pitch register it causes a phase reset.


I suggested a while ago that a Hxx with the high bit set could be used to specify not to rewrite pitch, allowing things like vibrato to be done with alternating H/Ixx.

Posted: 2013-03-14 23:05 Reply | Quote
Patashu

Avatar

Member for: 3749 days
Location: Sydney, Australia
Status: Offline

#45470
Ah! So it's a famitracker thing not a NES thing.

Posted: 2013-03-20 08:35 Reply | Quote
Slimeball

Avatar

Member for: 3719 days
Status: Offline

#45646
Not entirely related, but... :P

I wonder if writing any N163 pitch register resets the phase of an N163 channel. It would be quite useful to prevent unwanted popping.

Posted: 2013-03-20 15:37 Reply | Quote
za909

Avatar

Member for: 3962 days
Location: Hungary
Status: Offline

#45654
While we're at it, I think it's safe to say that many would like to see an effect command that resets the phase of any channel that can be reset. (I believe VRC6 can be reset as well, just all 3 channels at once)

_______________________
Rectangular sh*t ©
Posted: 2013-03-21 00:55  (Last Edited: 2013-03-21 08:28) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#45672
Why do you believe that VRC6 can be reset?

As far as I know the only things that can be reset are 2A03 squares, and N163 waves (supported by very few emulators).

Slimeball there should be no phase resetting on Famitracker N163 tracks, since Famitracker doesn't reset phase, so I don't know what you mean about having to "prevent" unwanted popping.

Posted: 2013-03-21 07:51  (Last Edited: 2013-03-21 07:51) Reply | Quote
Slimeball

Avatar

Member for: 3719 days
Status: Offline

#45686
I was thinking that this popping is actually caused by the phase not resetting.

Some of the notes randomly pop in this .ftm and I'm a hoping a phase reset command could fix that. (Assuming the pop is caused by the volume being set to 15 while the waveform is at a random position.)


Attachments:
beards_breads.ftm (1 Kb)
Posted: 2013-03-21 08:01  (Last Edited: 2013-03-21 08:18) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#45687
Resetting phase is almost never going to eliminate a pop. Generally it will just create a consistent pop instead of a random one.

Though, I guess what you want to do is a gradual fade to 0, and then you want to start a new waveform at volume 15, right? For starters, it won't work with the waveform you're using, because the N163 (and most PSGs with the Famicom) are using unsigned samples, not signed samples, meaning 0 volume outputs a 0, not an 8 or whatever you think a sample at half height it supposed to be. You would need to reposition your wave to start at the lowest point of the waveform, not the middle.

However, even if you accomplished this, you would likely discover there is still a pop anyway. It would be a little duller than the pops you're already getting, but there will still be a pop no matter what. You can't make an attack smooth enough to eliminate it entirely.

Posted: 2013-03-24 22:46 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#45820
Actually combining a wave that starts at zero with phase resets would prevent that kind of popping, so an option for that would be useful, but it would only be supported by very few emulators.

---

Regarding hardware sweeps, the reason both period registers are rewritten on sweep commands (which causes the pop, and not actually the sweep itself) is that I had big problems with getting a consistent behavior between the tracker and exported NSFs (and NSF players?) back when I first added the sweep effects. This was how it ended up when I got it working.

_______________________
Programmer and developer
Posted: 2013-04-06 10:00  (Last Edited: 2013-04-06 10:07) Reply | Quote
kfaraday

Avatar

Member for: 3690 days
Status: Offline

#46332
bump for phase resetting in instrument settings

_______________________
[url=http://bitpuritans.eu]http://bitpuritans.eu ~ [url=http://soundcloud.com/kayfaraday]http://soundcloud.com/kayfaraday
Posted: 2013-04-07 20:13 Reply | Quote
poodlecock

Avatar

Member for: 3398 days
Location: !wow
Status: Offline

#46357
^ I second this motion. Also, jsr, could you please remove the pop, or, even better, have the pop and the actual sweep separated?

_______________________
"im going to continue making this crazy stuff then after a while my style will be so sick that you will be like damn suuun that shit is so sick i dont even get it. i will be like bro its ok.. you dont have to." -omgdonut
Page 1 of 1 Sort: