Sampler bank presets, save/load groups of tracks to sample decks

Bug #1181215 reported by rob
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
jus

Bug Description

The new sampler heavy skin has got me thinking about samplers a bit differently... They're not really usable the way I'm thinking about them yet, because there's no way to save sampler state (specifically, what tracks are loaded into the samplers), but I'm now thinking that you could set up a skin with 16 or more tiny samplers, load short loops and one-shot samples into them, and use them for on the fly remixing. This would sort of address one of the big holes in mixxx. But it's not practical to manually load 16 samples every time you want to play a song. We need a way to save the set of tracks as a "bank", and then reload them all later.

This could be hacked together with controller scripts if we, at minimum, had the ability to query a deck or sampler for the filename and location of the currently loaded song, and to force a deck to load a file by filename via script.

To fully implement this, we would also need a way for scripts to persistently save data that they could retrieve later. Perhaps space in the database could be created for "user data", allowing scripts to save arbitrary data for later retrieval, even after mixxx was restarted.

Tags: sampler skin
RJ Skerry-Ryan (rryan)
tags: added: sampler
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Not sure scripts are the answer until scripts can talk to the library but I totally agree we need to be able to save/load sampler state or add sampler presets of some sort. This was part of Ryan Baker's original sampler project but never got done.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Wishlist
summary: - Wishlist: Sampler Banks. Need a way to script loading and saving tracks
- into banks of samplers
+ Sampler bank presets, save/load groups of tracks to sample decks
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

(for save/load of samplers to XML)

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

Actually, I think those even work. Jus -- how do you feel about adding this in 1.12.0?

Changed in mixxx:
milestone: none → 1.12.0
assignee: nobody → jus (jus)
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

The controls are:

[Sampler],LoadSamplerBank
[Sampler],SaveSamplerBank

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

It looks like you wrote it at 2 in the morning :P

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

commit bc3fed81245f7e7302d67d6613855a42df85fdeb
Author: RJ Ryan <email address hidden>
Date: Sun Oct 24 22:56:22 2010 -0700

    Make SamplerBank for loading and saving sampler configuration (adapted from Ryan's code...

Well, it was 10pm but who knows how much sleep I had. 2010 was not a good year :P.

The XML could probably use some tweaking but it has group and track location which is mostly all that matters.

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

Maybe we could add things like sampler settings themselves to the XML (especially if we have sampler modes).

Revision history for this message
jus (jus) wrote :

Well, i tried to add the following to a skin:

<PushButton>
  <Size>40f,20f</Size>
  <NumberStates>1</NumberStates>
  <State>
    <Number>0</Number>
    <Text>Save Set</Text>
  </State>
  <Connection>
    <ConfigKey>[Sampler],SaveSamplerBank</ConfigKey>
  </Connection>
</PushButton>

<PushButton>
  <Size>40f,20f</Size>
  <NumberStates>1</NumberStates>
  <State>
    <Number>0</Number>
    <Text>Load Set</Text>
  </State>
  <Connection>
    <ConfigKey>[Sampler],LoadSamplerBank</ConfigKey>
  </Connection>
</PushButton>

I can put a file name for the sampler bank in the file dialog, but it segfaults on saving, no file is written to the disk.

Warning [Main]: Warning PlayerManager::getSampler() called with invalid index: 0
Process 94568 stopped
* thread #1: tid = 0x11fabe6, 0x000000010003ba7f mixxx`BasePlayer::getGroup() [inlined] QString(this=0x00007fff5fbfe3b0, other=0x0000000000000010) at qstring.h:726, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x10)
    frame #0: 0x000000010003ba7f mixxx`BasePlayer::getGroup() [inlined] QString(this=0x00007fff5fbfe3b0, other=0x0000000000000010) at qstring.h:726
   723 inline void QString::clear()
   724 { if (!isNull()) *this = QString(); }
   725 inline QString::QString(const QString &other) : d(other.d)
-> 726 { Q_ASSERT(&other != this); d->ref.ref(); }
   727 inline int QString::capacity() const
   728 { return d->alloc; }
   729 inline QString &QString::setNum(short n, int base)

Changed in mixxx:
status: Confirmed → In Progress
tags: added: skin
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Ah, you can really tell that code has never been used then :).

Fixed in https://github.com/mixxxdj/mixxx/commit/06b30d17536c2f63aaa5b3d15172a53f261be6af

Revision history for this message
jus (jus) wrote :

Thanks for taking a look at it.
Just pulled latest master and the segfault is fixed.

Now you can save a bank, but when loading the bank, it throws the error ``Could not read the sampler bank file``. The saved file is overwritten on load and corrupts (empty).

In the log, there is the following line:
Warning [Main]: QIODevice::read: WriteOnly device
2014-12-01 20:04:56.377 mixxx[4762:507] modalSession has been exited prematurely - check for a reentrant call to endModalSession:

This is with OSX 10.9.3

Notes:
By default, the banks are saved without file extension. Might be a nice touch to add *.xml or similar to allow sorting by file type in the file browser. Banks probably belong in the library just like playlist/recordings. But this is for Samplers 2.0 :-)

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

Pushed another couple of fixes -- this time I even verified that it works before pushing!

Revision history for this message
jus (jus) wrote :

Load/save Samplerbanks now available in the Deere skin, see https://github.com/mixxxdj/mixxx/commit/87d85f03cc0208dbe394a982615ae18fb6030fda

Revision history for this message
jus (jus) wrote :

Fixed in deere

Changed in mixxx:
status: In Progress → Fix Committed
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/7043

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.

Other bug subscribers

Remote bug watches

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