41570: Timeslicing and start/end samples run away

I also had this issue in the current stable build but I’m trying to experimental so tagging it for that build. A lot of operators that rely on timeslicing have start/end samples that constantly increments then eventually loop around back to 0. It leads to a lot of annoying issues in complex networks to the point where I have to put a Trim or Shift CHOP after operators like filters, logics, timers, etc, just to be sure they aren’t acting up. See example project file below, even without dropping frames, a Timer CHOP won’t hold a start/end sample. Picture also attached.
example.toe (4.01 KB)

+1 I have to work around this all the time since at least early 099 versions, maybe late 088. Just haven’t gotten around to reporting it as an issue.
Have to use Trim or Resample CHOPs to work around it, generally a pain to even find it. Usually it will cycle the interval along with the timeline frames which 95% of the time i’m not using / care about.

+1, same problem when using Timeslice and using the Trim trick. I thought it was expected behavior due to Timeslicing :unamused:

This is the core of how Time Slicing works, so it is by design. A time sliced CHOP needs data from the previous frame and the current frame to calculate its result, the frame is relative to the timeline. When not dropping frames this isn’t as apparent, but once you drop frames it is how the data remains smooth and you’ll see that the time sliced CHOP cooks a number of samples that range to the previous frame to the current frame on the timeline.

When working with and merging moving time index CHOPs into those that aren’t, you either need to Trim CHOP it, or pay attention to Align parameter settings in the Merge and Math CHOPs for example. This is the correct approach.

I recently did a 30 minute presentation in Tokyo on time slicing that went very deep (maybe too deep for my audience in some respects). I think I need to redo this as a tutorial video soon because there is still a lot of unknowns and confusion about how to work with time slicing. Its quite important for troubleshooting CHOPs, but its an advanced topic that usually only speaks to those who really know their CHOPs already.

In the meantime, this page is still very useful to study:
docs.derivative.ca/Time_Slicing

And the video halfway down was done WAY WAY back in 077 by Greg put still is completely accurate today. Start at 6:00 mark to learn about the moving time index stuff.
docs.derivative.ca/Time_Slicing_Vid

That is not to say we couldn’t add a toggle or feature to the common page of all CHOPs to make it easier to work with. Just saying, its not a bug.

Thanks for the response and additional info!
And yes I think we could rally around putting something on the common page of CHOPs to make this easier to deal with when needed. What say you Elburz?

Hmm, I’ve rarely had this scrolling start/end sample thing till recently. So I’m not sure if something has changed or if I’m using more of those operators now than I was before. I was doing a demo a week and a half ago and I swear after every filter chop and logic chop I had to put a trim/shift otherwise I’d get strange results in the proceeding operators down stream, which I never had to do before.

To be honest, the more I think about time slicing, the less useful it seems to be in professional context vs beginner contexts, and might even be detrimental on high-end professional projects. The key part of my rationale being that it’s not really acceptable to drop frames on a pro project, at least any of the projects I’ve been involved with it’s not ok. So then if time slicing is a protection against value spikes/jumps from dropping frames, all the additional aligning/trimming/shifting that a professional user needs to do is just additional overhead to get around the side effects of a feature that they would be avoiding using to begin with. So essentially a double-lose for pros, and a single win for regular users, but I would wager the win for regular users is probably overshadowed by confusion as they progress to intermediate/advanced levels and start trying to make more complicated CHOP networks and find strange behaviour they can’t really explain when their networks drop frames.

I wonder if it’s possible to have a global toggle in the settings on whether or not to turn on/off time slicing globally, and by time slicing I mean the moving samples/interpolation part of it, I think operators like Filter and etc would still need previous/current frame (or possibly on frame drop they dump previous frame and just use current frame twice until 2 frame renders have passed and they can “function normally” again).

It also ties into the bigger question about the timeline I guess, as I have the same feelings about that as I do about time slicing. It’s more headache than benefit on anything I’ve ever worked on, and to most users I talk to. I rarely see anyone lock something to global timeline, and I’ve seen hundreds of users (myself included) wonder why something isn’t working only to find the global timeline accidentally paused.

I think something else is going on in your case Elburz, it shouldn’t be in your way that much, and nothing should have changed recently such that you are suddenly changing your workflow. For the most part you can work in CHOPs without worrying about it, there are a few cases where its important to understand what its doing though.

Can you create an example file with the behaviour you are talking about - and build number?

I totally agree. Fist we should asses what a channel and its samples are, and in my perception its a named array. I rarely use timeline and cannot see any use for offsetting a sample index to a timeline. A simple join operation should just append samples as is so in an array. The first sample should always be index zero.

Plus the overhead. A static channel gets cooked every fame because of this feature. Id be interested to know what the use case is for the offsetting. So at least i can understand it. Either way. Would love a feature to turn it off.

Re: overhead - Could you provide an example of a static channel cooking every frame?

If you think of them like arrays, then the current frame is just the array index that TD is currently calculating when the CHOP is timesliced (ie. a timeslice).

I also asked Elburz for some example networks and if you could as well asterix, it will help us talk about your specific cases more directly and explain or get to the bottom of it.

Sorry should have some examples next week. Been stuck on another thing for the moment. If i remember correctly, the really frustrating part I found was when you’re working with multi-sample channels and depending on what you were doing the multisample channels would be changing size to keep up with the timeslice.

+1 for toggle :slight_smile: