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 > Dxx problem/question Owner: Stratelier New post
Page 1 of 2 Sort: Goto Page: [1] [2] Next >>
Dxx problem/question Posted: 2014-07-06 21:13  (Last Edited: 2014-07-06 21:58) Reply | Quote
Stratelier



Member for: 2954 days
Status: Offline

#59103
[tested against 0.4.2]

So the description on effect Dxx is "skip to the next frame and start at row [i]xx[/i]". In most cases the effect is specified as D00 to make one frame shorter than usual, but I'm currently experimenting with [i]xx[/i] values other than zero and I've discovered a case where FamiTracker isn't doing what I expect it to.

First, if you issue a Dxx command with a value other than zero, FamiTracker's pattern editor should display the next frame [i]starting with the specified row[/i] instead of always row 00.

E.g. instead of seeing this (formatting mine)...
[quote=].
.
.
2C | .....
2D | .....
2E | .....
2F | ..... [b]D30[/b]
---------
[i]00 | .....
01 | .....
02 | .....
.
.
.
2E | .....
2F | .....[/i]
[u]30[/u] | .....
31 | .....
[/quote]

FamiTracker should display it like this:
[quote=].
.
.
2C | .....
2D | .....
2E | .....
2F | ..... D30
---------
30 | .....
31 | .....
32 | .....[/quote]

Next problem: Take the attached file for example (I uploaded it as a text export and not an .ftm for a specific reason). Examine it in a text editor (not FamiTracker itself) and look specifically at the "three pattern" version of the song - notice that in frame 01, row 2F I skip directly to row 30 of frame 02, and everything sounds correct. (Why did I bother with the D30 command at all? Because this is the control group; the experiment group follows below.)

Now, examine the "two pattern" version of the song (again, in your text editor). First, notice how pattern 00 is repeated three times (frames 00 - 02). And notice the D30 command at row 2F of the pattern. Logically this should mean that frame 00 plays rows (00-2F) of pattern 00, frame 01 plays pattern 00 starting at row 30 (i.e. 30-3F), frame 02 plays pattern 00 from (00-2F), and frame 03 plays pattern 01 from (30-3F).

Now import the file into FamiTracker and play both. The "three pattern" version plays just fine, but the "two pattern" version cuts out literally half the song. Watch closely and notice how, in the latter case, when FamiTracker hits the first D30 command it tries to skip ahead to row 30 but it notices the next D30 command "en route" (we told it row 30, not row 2F) and skips ahead [i]again[/i], spots the third D30 command and skips ahead [i]yet again[/i].

Is this the correct and intended behavior for the Dxx command?

I realize it's mostly an esoteric issue, but it 'feels' wrong. I also don't have the ability to play it on actual hardware to verify whether it's a hardware limitation or a bug in FamiTracker.

_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Attachments:
jinglebells.txt (27 Kb)
Posted: 2014-07-06 21:45  (Last Edited: 2014-07-06 21:47) Reply | Quote
jrlepage
Moderator

Avatar

Member for: 4983 days
Location: Canada
Status: Offline

#59110
Both versions work just fine here.

As for your first suggestion, that would probably require a lot of work because Famitracker would have to work out how to draw the next frame based on the effects you used in the current one. Probably not impossible, but there are way more important things to take care of before we get to this, in my opinion. (Disclaimer: I am not jsr.)

_______________________
Follow me on [url=https://twitter.com/jrlepage2a03]Twitter.
I record (some) NSFs on hardware. Feel free to [url=http://www.famitracker.com/forum/posts.php?id=3633]request a hardware render.
Posted: 2014-07-06 22:00  (Last Edited: 2014-07-06 22:08) Reply | Quote
Stratelier



Member for: 2954 days
Status: Offline

#59112
Okay, my bad - forgot to test against 0.4.3 before posting (apparently it's already been fixed, but is not noted in the readme file).

_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Posted: 2014-07-07 13:32 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#59144
The first suggestion is actually not that hard to fix, as pattern drawing already depends on the effects. All that's needed to do is to read the effect value as well and select a new starting row number for next patttern.

The second one is a bit more complicated though. It does play as intended in 0.4.3 but doesn't display properly when the pattern preview setting is enabled. The problem is that patterns are expected to end after a Dxx command, so I don't recommend adding more data after that point (even though it is possible).

Oh and 0.4.3 was worked on for over a year and had lots of stuff fixed, I forgot to add everything to the changelog.

_______________________
Programmer and developer
Posted: 2014-07-07 20:15  (Last Edited: 2014-07-07 20:31) Reply | Quote
Stratelier



Member for: 2954 days
Status: Offline

#59173
Hmm ... if the first one is not hard to fix, then shouldn't the second one be a moot point? If FT displays a frame starting from row XX then it should not actually encounter any prior B/C/D commands to stop rendering at?


_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Posted: 2014-07-07 22:09 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#59178
Well the first issue is related only to displaying previews of patterns, which is a separate thing from actually trying to play a pattern beyond the end.

_______________________
Programmer and developer
Posted: 2014-07-08 08:59  (Last Edited: 2014-07-08 09:00) Reply | Quote
Stratelier



Member for: 2954 days
Status: Offline

#59200
But FamiTracker (as of 0.4.3) has no problem [i]playing[/i] a row "beyond the end" (maybe the Dxx command was issued on a channel other than the pattern of interest). If one frame contains a D20 command (and the next pattern contains a Dxx command at row 1F), the only problem is FamiTracker displaying that pattern starting from row 00 (and cutting it off at 1F when it finds the Dxx command) instead of starting at row 20 and continuing through the rest of the pattern (which is how it actually plays).

_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Posted: 2014-07-08 14:05 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#59205
The playing past end fix in the latest version is a result of code refactoring, not really something that was intended. However I still don't think it's a good idea to place data beyond a Dxx-point, move that to a new pattern instead.

Anyway I've tried now to add preview from the Dxx-row, but didn't work that well when working in edit mode since moving to that frame will still move to row 0. It felt unintuitive, so I don't think I'll keep that.

_______________________
Programmer and developer
Posted: 2014-07-08 20:54 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#59223
I'd actually much prefer an option for D00 not to hide the rows following.

When I was working on the soundtrack to my game, it was essential for me to be able to play partial versions of patterns I was reusing elsewhere using D00 on another channel, so that I could keep the data sizes small, but many times I had to delete the D00 effect temporarily to take a look and make sure the hidden data was correct.

Posted: 2014-07-08 21:17  (Last Edited: 2014-07-08 21:17) Reply | Quote
Xyz_39808

Avatar

Member for: 4180 days
Location: South Texas
Status: Offline

#59228
Config option maybe? Off by default

Posted: 2014-07-08 21:26  (Last Edited: 2014-07-09 09:37) Reply | Quote
Stratelier



Member for: 2954 days
Status: Offline

#59231
A config option could work ... sometimes you DO want a pattern that can be played for different lengths as controlled by a secondary channel.

FF5's iconic song "Clash on the Big Bridge" is a good example ([url=http://famitracker.com/forum/attachments/58955/gilgamesh.ftm]e.g. 0:16 (9 beats) vs. 0:23 (12 beats) and 0:27 (16 beats) vs. 1:20 (8 beats) ).

_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Posted: 2014-07-09 14:53 Reply | Quote
jsr
Administrator

Avatar

Member for: 5925 days
Location: Sweden
Status: Offline

#59253
Ok, would it be acceptable to make it not hide the rest of the pattern unless there is only empty rows reamining? That way there would be no hidden data and it should play correctly when playing beyond a Dxx command.

To me that would probably be the easiest solution.

_______________________
Programmer and developer
Posted: 2014-07-09 21:00 Reply | Quote
Stratelier



Member for: 2954 days
Status: Offline

#59261
Not sure that is necessary - when there is e.g. a D00 command issued on a channel (and whether other channels have useful note data past that point is moot; that pattern could be repeated elsewhere without an adjacent D00 command, in which case if you need to edit the pattern beyond the D00 you'd most likely do so from the other frame) it makes sense not to display the rest of the rows by default, as when played FamiTracker will obviously skip over it to the next frame. Likewise with a Bxx command.

Now with the C00 command there's no harm in displaying the remaining rows anyway -- sometimes the C00 command is useful as a temporary 'stop here' while test-playing segments of a song you're working on, in which case seeing the rest of the frame suddenly disappear from the view is a little jarring.

_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Posted: 2014-07-10 04:53  (Last Edited: 2014-07-10 16:52) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#59273
Clearly there are differing opinions on what is "necessary" to show.

I think a simple option satisfies the most people, moreso than doing a "smart" automation.

Forcing it one way or another, even the automatic version makes somebody unhappy at some point. Like, your option to hide extra rows only if there is no data there would satisfy me, but clearly it wouldn't satisfy Stratelier. Everybody prefers something different.

I suspect most people like it the way it is. I've just had a need many times in the past to know what's in the "hidden" area. Having to go to another order frame or delete the D00 to inspect it is a workaround, so I'd prefer to be able to just disable D00 hiding.

(BTW if I'm the only one who wants this, no need to accomodate just me, especially since I can easily change it myself.)

Posted: 2014-07-10 21:03  (Last Edited: 2014-07-10 21:06) Reply | Quote
Stratelier



Member for: 2954 days
Status: Offline

#59291
I agree, "the way it is" now works well, minus the (presumably uncommon) case where you issue a Dxx command other than D00 and the next pattern is not displayed from where it logically starts.

Oh, and speaking of the "hidden" area, here's a bug:

Say I have a pattern that issues a D00 command at row 1F (half the pattern length). Now I copy a full pattern (rows 00-3F) from somewhere else and paste it into this channel (in a way that pastes over/replaces the D00 command in the process)...

...but it turns out only rows 00-1F of my selection were actually pasted; rows 20-3F were ignored. I have to either take out the D00 command [i]before[/i] I attempt to paste, or paste it [i]again[/i] to get the full data. [tested against 0.4.2 but not 0.4.3]

_______________________
Where to find me:
YouTube: [url=http://youtube.com/user/stratelier]http://youtube.com/user/stratelier
DeviantArt: [url=http://stratadrake.deviantart.com/]http://stratadrake.deviantart.com/
Page 1 of 2 Sort: Goto Page: [1] [2] Next >>