Allow different playback modes for samplers

Bug #774808 reported by jus
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Mixxx
Confirmed
Wishlist
Unassigned

Bug Description

1. Normal mode : Play from start to end and stop. Pressing play again stops the sample.
2. Repeat Mode: Play from start to end and repeat. Pressing play again stops the sample.
3. "One shot" mode (its like hotcue_X_goto): Play from start to end and stop. Pressing play again starts the sample again . Use left button to break the loop and stop the sample.
4. “Note off” mode (its like for stopped hotcues): Play from start while button is down and stop upon release

Related branches

jus (jus)
Changed in mixxx:
importance: Undecided → Wishlist
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

need to make the call on whether this will go in 1.10 or not. we shouldn't release samplers to the world half-baked but at the same time this shouldn't blcok the release

Changed in mixxx:
status: New → Confirmed
milestone: none → 1.10.0
RJ Skerry-Ryan (rryan)
tags: added: sampler
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I think we should nail down the sampler use case in 1.11

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

For now it's kind of the "minimum viable feature".

Changed in mixxx:
milestone: 1.10.0 → 1.11.0
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

AFAIK not happening in 1.11

Changed in mixxx:
milestone: 1.11.0 → none
Revision history for this message
Marco Aurélio Simão (marco-a-simao) wrote :

I dont think this is the correct description of the bug. AFAIK at 1.10 there is only one play mode: sample plays from start to end, pressing play again doesnt replay it. Am i missing something?

tags: added: looping
Revision history for this message
Rowan Jones (r0w4nj) wrote :

I've fixed this bug and implemented each of the modes... How do you think the mode switching should be done on the GUI?

1) right click the play button to toggle modes
2) separate button to toggle modes
3) something I have't thought of!

As for now Ive added a button using the 4 hot cue number button .pngs to toggle between modes...

I will link my brach shortly.

Rowan Jones (r0w4nj)
Changed in mixxx:
assignee: nobody → Rowan Jones (r0w4nj)
Revision history for this message
Marco Aurélio Simão (marco-a-simao) wrote :

We could have a single button that updates its png like: 1, 2, 3, 4 corresponding its modes, what do you think?

Revision history for this message
Rowan Jones (r0w4nj) wrote :

Do you mean a play button that changes its png or separate button?

Revision history for this message
Marco Aurélio Simão (marco-a-simao) wrote :

I thought separate button, but your suggestion "play button that changes" seems more pratical better solution ;)

Revision history for this message
Rowan Jones (r0w4nj) wrote :

here's my branch:

lp:~r0w4nj/mixxx/rowanstrunk

The 4 modes I have implemented are:

1. Normal Mode - Same as before (play / pause) except now jumps back to start when reaching end of sample.

2. One Shot Mode - As described in the bug description.

3. Hold Mode - Pauses on release, plays from same position on press.

4. Note off Mode - As described in bug desc. same as hot cues.

There is already a dedicated repeat button so no need for a repeat play mode as per bug desc.

I have only the first sampler changed the Deere 1280x1024 .xml to support this as of yet to see what people think about how to design the gui.

Revision history for this message
Rowan Jones (r0w4nj) wrote :

Cool, yeah I've implemented a seperate button you should check out my branch and see what you think :)

Revision history for this message
Marco Aurélio Simão (marco-a-simao) wrote :

I will try it tonight as im not with my notebook right now, but great solution im looking forward to see it ;)

Revision history for this message
Marco Aurélio Simão (marco-a-simao) wrote :

Are you open to other modifications? Could we too try to implement effects unit? I tested lv2 plugins with jackd and they very cool and stable, maybe we could adapt something, all projects using it, use c / c++ and qt as well ;)

Revision history for this message
Rowan Jones (r0w4nj) wrote :

Definitely, I'd really like to work on effects integration. I haven't worked with lv2 before but it looks great :) This depends on the result of my GSOC application though as if I'm accepted I will be spending the summer implementing a loop recorder!

Revision history for this message
jus (jus) wrote :

Nice one Rowen.
Had the chance to test your branch and would like to give some feedback.

* The fact that samplers now jumps back to start when reaching end of sample is a good touch, and i can see it being the standard on the regular decks as well.

* The multi-state button to indicate the samplers playback mode is fine. With the sampler decks there is always little space and we use multi-state buttons already in other places. Also, dont waste time on the buttons look, we'll take care of that later.

* The existing Repat control seems ok for now, but works only if we play a sample to it's end. If we'd further extend the sampler functionality, like starting from an Cue or Loop-In point and stopping at Loop-Out, then we'll need a new state for the play_mode control. Another thing it would be come handy is when we start playback in a predefined loop-size (loops and loop resize controls work in samplers too).

* Integrating the new "play_mode" control into src/skin/tooltips.cpp and /src/controllers/dlgcontrollerlearning.cpp would be beneficial. This allows to display the buttons tooltips in the skins and to assign buttons on external MIDI devices to the control.

* There is a flaw when a sample is playing and and you change the playback mode in between: Set playback mode to [ 2 ] ans start playing. While playing, set playback mode to [ 3 ] or [ 4 ] and click the play button again. The play buttons changes to it's inactive state even if the sample is still playing. Then, if the sample reaches the end, it does not jump back to start.

Good work so far, thanks

Changed in mixxx:
status: Confirmed → In Progress
Revision history for this message
Rowan Jones (r0w4nj) wrote :

Thanks for the feedback Jus :)

* Yes - The only problem I could see including this on the decks would be if scratching a sample at the end of a track and it jumping back to the start.

* Great I'll just leave the 4-state numbered button for now then. The 'Sync" button could be made much smaller to make more space...

* I'll look in to ways of implementing this. It might work well if the current 4 play modes worked with a loop-in/loop-out point and treated them as the start/end of the sample.

* I'll get cracking on this.

* Yes, I was aware of this, I just didn't want to spend time fixing the problem until I had some feedback on whether my overall approach seemed ok! I will sort it now though. I need to test this with midi too (once I've integrated it), to check from problems that may occur switching modes while pressing the play button on keyboard / play pad etc on the controller.

Revision history for this message
Rowan Jones (r0w4nj) wrote :

I've now completed the following and updated my branch:

- Added tooltips to src/skin/tooltips.cpp
- Fixed switching modes problem
- Updated /src/controllers/dlgcontrollerlearning.cpp

I had to create another push button within EngineBuffer for the MIDI control as mapping directly to the play button caused toggling issues. I've tested this with an MPK-mini (momentary mode: pad press = 1 pad release = 0) and everything seems ok :)

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

There seem to be a lot of changes in your branch that aren't related directly to this bug -- can you create a patch that would apply cleanly to trunk that just has the bugfix?

Revision history for this message
Rowan Jones (r0w4nj) wrote :

Here's a patch for the trunk.

Revision history for this message
Be (be.ing) wrote :

Considering the last activity on this was in 2013, I'm changing this from In Progress to Confirmed.

Changed in mixxx:
status: In Progress → Confirmed
Be (be.ing)
Changed in mixxx:
assignee: Rowan Jones (r0w4nj) → nobody
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/5883

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

Related blueprints

Remote bug watches

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