feature request: "slip mode"

Bug #703585 reported by Owen Williams
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
Owen Williams

Bug Description

I was looking at videos of the new version of Serato and saw one feature that should be fairly easy to add, called "slip mode." Here's the use case:

* DJ Bob wants to go nuts on the effects, using loops and delays and cuepoints
* he also, however, doesn't want to lose his place in the song to preserve the phrasing and overall timing
* so, he enters slip mode (a midi toggle switch). There is no audible change in the playback at first
* he goes nuts with effects, loops, cue points, etc.
* when he's done messing around, he exits slip mode
* playback resumes from where the song would have been if he hadn't entered slip mode

This is how I'd implement it: when entering slip mode, assign the current (precise) playposition to a m_dSlipModePos variable, and the current rate to m_dSlipModeRate. Update that position on every loop no matter what else the dj is doing. When exiting the mode, just seek to that position.

Related branches

Albert Santoni (gamegod)
Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
Revision history for this message
jus (jus) wrote :

That feature is also on some of newer CDJ`s (e.g. CDJ-900) , sounds useful
+1

Example:
http://www.youtube.com/watch?v=8Ilucq43dm4

Revision history for this message
Owen Williams (ywwg) wrote :

This would also be useful for momentary loops: hold down a key and it loops the current beat / half beat / whatever, let go and the music resumes where it would have been.

I'll try to get this into 1.11.

A newer implementation of this might involve a sampler somehow... not sure how we want to do it.

Changed in mixxx:
assignee: nobody → Owen Williams (ywwg)
Revision history for this message
Owen Williams (ywwg) wrote :

Here's a patch that implements slip mode and rolling beatloops.

* Activate "[ChannelX],slip_enabled" to turn on slip. Do whatever you want (scratch, etc). Disabling slip_enabled will resume playback where the track would have been.
* Activate "[ChannelX],beatlooproll_X_activate" to enable a rolling loop. In this patch I have an example modification to my skin which makes right-click of the loop buttons activate a roll (release the mouse button to exit the roll).

The method for predicting the future position of the track is very simple. Enginebuffer remembers the rate and position at the time of activation and simply increments the position as if that rate had held constant. When slip mode is deactivated I just seekabs to that predicted position. In my brief testing it sounds good.

Revision history for this message
Owen Williams (ywwg) wrote :

This patch has kind of grown!

Now along with slip mode and rolling loops, I've added a crossfade for loops and seeks. What this means is that over the period of one buffer, I crossfade from the out point of the loop to the in point of the loop, and from the out point of a seek to the in point of the next seek. This is done without adding additional samples to the playback so there's no overlap.

The two crossfades are implemented differently because loops are handled in RAMAN and seeks are in Engine Buffer.

In RAMAN, I do this:
* If I detect a loop-out point, read the whole buffersize, not just the segment up until the loop-out point
* record the number of samples from current position to loop-out point ("preloop samples")
* At the same time, read another segment of samples, this one starting at the loop-in point minus the number of preloop samples.
* Crossfade between these segments

In Enginebuffer I do this:
* When we get a seek, read one extra buffer before the seek is performed
* After a seek, crossfade from that buffer to the current buffer (which is at the new position)

I've checked my work with graphs and charts and it also sounds good to my ears. This is only one buffersize of crossfade (in my case, 2048 samples @96Khz), but even a very low number of samples at very low latencies should be enough to soften the worst pops.

Also I now correctly hint the reader so that as slip mode is enabled, we're caching the samples at the virtual slip playposition. That way when slip is disabled, there's no cache miss when the seek occurs.

Revision history for this message
jus (jus) wrote :

Thanks, really like these features.
The latest patch from #4 makes even short loops sound good ( no clicking anymore ) and does not fall out of sync even with long lasting 1/16 loop-rolls . To me also a fix for lp:653896

Changed in mixxx:
status: Confirmed → In Progress
milestone: none → 1.11.0
Revision history for this message
Owen Williams (ywwg) wrote :

Here's a cool graph showing the crossfade. Blue shows the outgoing waveform, Cyan shows the incoming waveform, and green shows the result. (Blue and cyan are zero when crossfading doesn't occur)

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Well, this is too much fun not to include in 1.11 :). I made some minor tweaks to the patch and committed it. The main thing I'm confused about is why you add a read-log entry in the RAMAN. I don't think it's necessary since you're just getting extra audio data to mix into the current buffer.

Changed in mixxx:
status: In Progress → Fix Committed
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Is this feature still working in lp:mixxx?
I have not managed to get this working. Any advise?

I can see the tool tip of the loop buttons, but when I click them right, nothing happens.

Revision history for this message
jus (jus) wrote :

Works fine here with latest trunk. Tested on OSX + on Ubuntu Linux (VM). Maybe you load from a ressource folder which has still some old skins in it? E.g. for Deere1280x800-WXGA the skin version should be v1.11.0.07, see CHANGELOG.txt in the skins directory.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Thank you Jus, now it works! I just have not noticed the resource path is stored in mixxx.cfg.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5753

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.