Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: "slip mode" #5753

Closed
mixxxbot opened this issue Aug 22, 2022 · 11 comments
Closed

feature request: "slip mode" #5753

mixxxbot opened this issue Aug 22, 2022 · 11 comments
Labels
Milestone

Comments

@mixxxbot
Copy link
Collaborator

Reported by: ywwg
Date: 2011-01-16T15:20:16Z
Status: Fix Released
Importance: Wishlist
Launchpad Issue: lp703585
Attachments: [Patch to add slip mode and rolling loops to Mixxx](https://bugs.launchpad.net/bugs/703585/+attachment/3173164/+files/Patch to add slip mode and rolling loops to Mixxx), [Patch Draft 2](https://bugs.launchpad.net/bugs/703585/+attachment/3175812/+files/Patch Draft 2), [Cool Graph](https://bugs.launchpad.net/bugs/703585/+attachment/3177630/+files/Cool Graph)


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: esbrandt
Date: 2011-10-03T09:27:20Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2011-11-02T15:47:31Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2012-06-02T20:03:33Z
Attachments: [Patch to add slip mode and rolling loops to Mixxx](https://bugs.launchpad.net/mixxx/+bug/703585/+attachment/3173164/+files/Patch to add slip mode and rolling loops to Mixxx)


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2012-06-05T04:58:51Z
Attachments: [Patch Draft 2](https://bugs.launchpad.net/mixxx/+bug/703585/+attachment/3175812/+files/Patch Draft 2)


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: esbrandt
Date: 2012-06-06T15:15:00Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: ywwg
Date: 2012-06-06T16:14:42Z
Attachments: [Cool Graph](https://bugs.launchpad.net/mixxx/+bug/703585/+attachment/3177630/+files/Cool Graph)


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)

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2012-09-06T19:11:18Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2012-10-14T20:23:22Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: esbrandt
Date: 2012-10-16T13:11:05Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2012-10-16T19:31:47Z


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

@mixxxbot
Copy link
Collaborator Author

Issue closed with status Fix Released.

@mixxxbot mixxxbot transferred this issue from another repository Aug 24, 2022
@mixxxbot mixxxbot added this to the 1.11.0 milestone Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant