VRC7 slide up bug

Please post about bugs here.
Forum rules
When making a bug report, please try to be as specific as possible. Include information on how to reproduce the bug and an example file if possible.
If the application crashed, please include the generated memory dump file as well.
Roflo
Posts: 292
Joined: Thu May 07, 2015 3:51 pm
Location: Germany
Contact:

VRC7 slide up bug

Postby Roflo » Thu Jan 14, 2016 6:27 pm

Listen to the ftm; at row 18h the slide up stops (I don't know whether it's intentional). Furthermore the 'display active effects' option displays porta up instead of down and vice versa.
This also applies to 0.5b/5.
Attachments
bug.ftm
(516 Bytes) Downloaded 27 times
Last edited by Roflo on Thu Jan 14, 2016 7:32 pm, edited 1 time in total.

User avatar
HertzDevil
Posts: 475
Joined: Thu Apr 23, 2015 7:39 pm
Location: Hong Kong SAR
Contact:

Re: VRC7 slide up bug

Postby HertzDevil » Thu Jan 14, 2016 7:31 pm

The first bug occurs since official 0.3.7.

Unlike the 3xx/Qxy effects, slide effects do not update the octave register of the VRC7 chip, so the frequency register clips at 0x1FF, the maximum value permitted. Here is what a smooth pitch slide may look like:

Code: Select all

     # : FM Channel 5 fx2 : FM Channel 6 fx2
ROW 00 : C-3 00 . 108 ... : C-3 00 . 108 ...    # frequency register is 0xAC
ROW 01 : ... .. . ... ... : ... .. . ... ...
ROW 02 : ... .. . ... ... : ... .. . ... ...
ROW 03 : ... .. . Q2C G06 : ... .. . ... ...
ROW 04 : ... .. . 104 G01 : ... .. . Q0C 104    # frequency register is 0x6E
ROW 05 : ... .. . ... ... : ... .. . ... ...
ROW 06 : ... .. . ... ... : ... .. . ... ...
ROW 07 : ... .. . Q1C G06 : ... .. . ... ...
ROW 08 : ... .. . 102 G01 : ... .. . Q0C 102    # frequency register is 0x43
ROW 09 : ... .. . ... ... : ... .. . ... ...
ROW 0A : ... .. . ... ... : ... .. . ... ...
ROW 0B : ... .. . Q0C G06 : ... .. . ... ...
ROW 0C : ... .. . 101 G01 : ... .. . Q0C 101    # frequency register is 0x27
ROW 0D : ... .. . ... ... : ... .. . ... ...
ROW 0E : ... .. . ... ... : ... .. . ... ...
ROW 0F : ... .. . ... ... : ... .. . ... ...
The Q0C commands are used to raise the octave register by 1 at any time during the pitch slide, and the 1xx commands immediately apply the existing slide speed, halving the parameter value as needed. Clearly, there is a limit to how far the pitch slide can go; with 101 the frequency register increases by 1 every 4 ticks, and is especially noticeable for low notes like the one shown above; however, they can be placed anywhere as long as the channel frequency has not clipped, and multiple changes to the octave register are usually not required. Should this be automated, the engine may have to keep checking the frequency as soon as it reaches a certain value, say 0x100, then right-shift the frequency and increment the octave.

The Qxy command is required to occur on a different tick than the 1xx command in the official build, because portamento effects are applied after handling all effects; in turn the speed parameter does matter because the channel will use that as the slide speed for one tick. In 0CC-FamiTracker one may place these commands on the same row.

This does not work with Rxy effects. As stated in the post linked above, the octave register will not decrease when using a Rxy or 3xx to bend to a lower note. The engine may, however, automatically left-shift the frequency and decrement the octave if that is desirable, increasing the pitch resolution (which may be useful for using 3xx to bend to very low notes).

EDIT: Technically, this should work:

Code: Select all

     # : Pulse 1      fx2
ROW 00 : C-1 00 . ... 108
ROW 01 : ... .. . ... ...
ROW 02 : ... .. . ... ...
ROW 03 : ... .. . ... ...
ROW 04 : C-2 00 . 301 104
ROW 05 : ... .. . ... ...
ROW 06 : ... .. . ... ...
ROW 07 : ... .. . ... ...
ROW 08 : C-3 00 . 301 102
ROW 09 : ... .. . ... ...
ROW 0A : ... .. . ... ...
ROW 0B : ... .. . ... ...
ROW 0C : C-4 00 . 301 101
ROW 0D : ... .. . ... ...
ROW 0E : ... .. . ... ...
ROW 0F : ... .. . ... ...
Not just VRC7, but all sound channels should be able to handle this as though the 1xx command takes effect after the 3xx command, resulting in a smooth slide as were the 1xx command placed 1 or 2 ticks after. It seems all versions of FamiTracker break this as though all 3xx commands have a parameter of 00, and this is most likely a bug, or at least a nuisance since it presumably violates the evaluation order of pattern effects.

The second bug is probably due to jsr not overriding the respective methods in CChannelHandlerInverted, which I have reported somewhere on the 0.5.0 beta thread.
Last edited by HertzDevil on Thu Jan 14, 2016 8:12 pm, edited 6 times in total.
refactoring 0cc-famitracker

Roflo
Posts: 292
Joined: Thu May 07, 2015 3:51 pm
Location: Germany
Contact:

Re: VRC7 slide up bug

Postby Roflo » Thu Jan 14, 2016 7:47 pm

Thanks! I'll try that.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest