Preview Library Tracks in Headphones

Bug #366091 reported by Luciano A. Ferrer
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Wishlist
Max Linke

Bug Description

It will be useful to have an option/way to listen files in the library, when you are playing...
instead adding each file to the deck... an easy way to clic and listen in headphones, so you can queue faster without problems
and the 2nd deck will be really used as "next song to play"

it will be nice if you can "pan" the file too, to not listen only the beginning

Related branches

Changed in mixxx:
importance: Undecided → Wishlist
Revision history for this message
Nick (kousu) wrote : Re: [Bug 366091] Re: a way to monitor/listen files in library when playing

Do we really want this? I could see it being reasonable to make a
track in the library track start playing on the headphone channel if
it's clicked and held for a second but being able to scroll through it
too?

On vinyl or CDJs or traktor the standard way to figure out which track
is which is to put it on and play it like normal. I mean, I'm saying
that we should do something -just because- it's the convention, but
sometimes conventions exist for good reasons.

The better answer is N-deck support. Just use whichever deck you're
not using to play out tracks or cue the next one as your 'scan through
the library' deck (dependant on us figuring out a different UI style
that stays as efficient as Mixxx is right now).

Revision history for this message
Nick (kousu) wrote : Re: [Bug 366091] [NEW] a way to monitor/listen files in library when playing

Well I guess I should put my foot in my mouth. Traktor 3 does have a
little pre-monitor-player. Seems irritating to me but I thought I'd
set the record straight.

On 24/04/2009, Nick Guenther <email address hidden> wrote:
> Do we really want this? I could see it being reasonable to make a
> track in the library track start playing on the headphone channel if
> it's clicked and held for a second but being able to scroll through it
> too?
>
> On vinyl or CDJs or traktor the standard way to figure out which track
> is which is to put it on and play it like normal. I mean, I'm saying
> that we should do something -just because- it's the convention, but
> sometimes conventions exist for good reasons.
>
> The better answer is N-deck support. Just use whichever deck you're
> not using to play out tracks or cue the next one as your 'scan through
> the library' deck (dependant on us figuring out a different UI style
> that stays as efficient as Mixxx is right now).
>

Revision history for this message
Luciano A. Ferrer (laferrer) wrote : Re: a way to monitor/listen files in library when playing

well, at least something to just listen files, without scroll/pane functions, will be an interesting improvement

RJ Skerry-Ryan (rryan)
tags: added: library
Changed in mixxx:
status: New → Confirmed
summary: - a way to monitor/listen files in library when playing
+ Preview Library Tracks in Headphones
Revision history for this message
Daniel Schürmann (daschuer) wrote :

This feature becomes important if you use the Auto DJ.

Auto DJ occupies both decks. So you have to be very careful not to disturb auto DJ while you listen to a track on headphones.

It might be that with some changes, be we will use the sampler for it, but it would be the best to have an own Monitor Player.

The click solution without a GUI will fit for me also.

Revision history for this message
John Mitchell (neufena) wrote :

I'd like this feature too. I work on the fly a lot at clubnights and gigs so the ability to really quickly find the right sound for after a band etc would be great.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 366091] Re: Preview Library Tracks in Headphones

This feature is pretty easy to add:

1) Create an EngineChannel subclass in src/engine, something like
EnginePreviewDeck
  - return true for isPFL(), return false for isMaster()
  - Give it an EngineBuffer, EngineVuMeter and EngineClipping only (use
EngineDeck as a template)
  - Return something sensible for isActive() (ideally copy from EngineDeck
where appropriate)

2) Create a PreviewDeck derivative of BaseTrackPlayer in src/ (see Deck
and Sampler classes as examples)

3) Update PlayerManager (src/playermanager.cpp/h) to support creation of
PreviewDecks (we will probably only have 1 but it's best to think in terms
of multiple of them from the beginning in case we want to expand). Just
copy the code for samplers in PlayerManager to support an addPreviewDeck()
method just as there is an addSampler() method.

4) Add a PlayerManager::groupForPreviewDeck(int) method that returns
something like [PreviewDeckX]

5) In WTrackTableView (src/widget) add context menu support for loading a
track to to a preview deck. You could hard-code this one to support just
the first preview deck because we don't want a sub-menu if there is only
going to be one element.

That's pretty much it. It could be done in an hour or two of hacking for
someone who is already very familiar with Mixxx and probably a weekend for
someone new to the code if they just copy/paste from existing classes.

On Tue, Dec 6, 2011 at 8:01 AM, John Mitchell <email address hidden>wrote:

> I'd like this feature too. I work on the fly a lot at clubnights and
> gigs so the ability to really quickly find the right sound for after a
> band etc would be great.
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/366091
>
> Title:
> Preview Library Tracks in Headphones
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/366091/+subscriptions
>

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

The rest of the work is adding the preview deck to the skins. As an example
to test that it's working, you could take an existing skin and replace
every instance of [Sampler1] with [PreviewDeck1] and the 1st sampler in the
skin should them become the preview deck.

On Tue, Dec 6, 2011 at 11:19 AM, RJ Ryan <email address hidden> wrote:

> This feature is pretty easy to add:
>
> 1) Create an EngineChannel subclass in src/engine, something like
> EnginePreviewDeck
> - return true for isPFL(), return false for isMaster()
> - Give it an EngineBuffer, EngineVuMeter and EngineClipping only (use
> EngineDeck as a template)
> - Return something sensible for isActive() (ideally copy from
> EngineDeck where appropriate)
>
> 2) Create a PreviewDeck derivative of BaseTrackPlayer in src/ (see Deck
> and Sampler classes as examples)
>
> 3) Update PlayerManager (src/playermanager.cpp/h) to support creation of
> PreviewDecks (we will probably only have 1 but it's best to think in terms
> of multiple of them from the beginning in case we want to expand). Just
> copy the code for samplers in PlayerManager to support an addPreviewDeck()
> method just as there is an addSampler() method.
>
> 4) Add a PlayerManager::groupForPreviewDeck(int) method that returns
> something like [PreviewDeckX]
>
> 5) In WTrackTableView (src/widget) add context menu support for loading a
> track to to a preview deck. You could hard-code this one to support just
> the first preview deck because we don't want a sub-menu if there is only
> going to be one element.
>
> That's pretty much it. It could be done in an hour or two of hacking for
> someone who is already very familiar with Mixxx and probably a weekend for
> someone new to the code if they just copy/paste from existing classes.
>
>
>
>
> On Tue, Dec 6, 2011 at 8:01 AM, John Mitchell <email address hidden>wrote:
>
>> I'd like this feature too. I work on the fly a lot at clubnights and
>> gigs so the ability to really quickly find the right sound for after a
>> band etc would be great.
>>
>> --
>> You received this bug notification because you are a member of Mixxx
>> Development Team, which is subscribed to Mixxx.
>> https://bugs.launchpad.net/bugs/366091
>>
>> Title:
>> Preview Library Tracks in Headphones
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/mixxx/+bug/366091/+subscriptions
>>
>
>

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

This is assuming there would be a tiny preview player (e.g. above the
searchbox) with just a play/pause button and a mini-waveform just as wide
as the sidebar that you can seek through the track with. If you wanted to
embed play/pause buttons into the library table then that is a little more
complicated. These steps I described will get you drag-and-drop to a
preview player and also right-click context option for previewing.

On Tue, Dec 6, 2011 at 11:21 AM, RJ Ryan <email address hidden> wrote:

> The rest of the work is adding the preview deck to the skins. As an
> example to test that it's working, you could take an existing skin and
> replace every instance of [Sampler1] with [PreviewDeck1] and the 1st
> sampler in the skin should them become the preview deck.
>
>
> On Tue, Dec 6, 2011 at 11:19 AM, RJ Ryan <email address hidden> wrote:
>
>> This feature is pretty easy to add:
>>
>> 1) Create an EngineChannel subclass in src/engine, something like
>> EnginePreviewDeck
>> - return true for isPFL(), return false for isMaster()
>> - Give it an EngineBuffer, EngineVuMeter and EngineClipping only (use
>> EngineDeck as a template)
>> - Return something sensible for isActive() (ideally copy from
>> EngineDeck where appropriate)
>>
>> 2) Create a PreviewDeck derivative of BaseTrackPlayer in src/ (see Deck
>> and Sampler classes as examples)
>>
>> 3) Update PlayerManager (src/playermanager.cpp/h) to support creation of
>> PreviewDecks (we will probably only have 1 but it's best to think in terms
>> of multiple of them from the beginning in case we want to expand). Just
>> copy the code for samplers in PlayerManager to support an addPreviewDeck()
>> method just as there is an addSampler() method.
>>
>> 4) Add a PlayerManager::groupForPreviewDeck(int) method that returns
>> something like [PreviewDeckX]
>>
>> 5) In WTrackTableView (src/widget) add context menu support for loading a
>> track to to a preview deck. You could hard-code this one to support just
>> the first preview deck because we don't want a sub-menu if there is only
>> going to be one element.
>>
>> That's pretty much it. It could be done in an hour or two of hacking for
>> someone who is already very familiar with Mixxx and probably a weekend for
>> someone new to the code if they just copy/paste from existing classes.
>>
>>
>>
>>
>> On Tue, Dec 6, 2011 at 8:01 AM, John Mitchell <email address hidden>wrote:
>>
>>> I'd like this feature too. I work on the fly a lot at clubnights and
>>> gigs so the ability to really quickly find the right sound for after a
>>> band etc would be great.
>>>
>>> --
>>> You received this bug notification because you are a member of Mixxx
>>> Development Team, which is subscribed to Mixxx.
>>> https://bugs.launchpad.net/bugs/366091
>>>
>>> Title:
>>> Preview Library Tracks in Headphones
>>>
>>> To manage notifications about this bug go to:
>>> https://bugs.launchpad.net/mixxx/+bug/366091/+subscriptions
>>>
>>
>>
>

Revision history for this message
Ferran Pujol (ferranpujol) wrote :

It can also be done as follows: not to add any visual preview player, just play the file through headphones from a default point. For example the stored cue point or a special "preview" marker. This would allow you to listen and identify the song much faster with little need of scrolling through the track. It could be activated with a tiny button for each song int he list. Although the tiny waveform player could be implemented as well, maybe activated from preferences.

Revision history for this message
Max Linke (max-linke) wrote :

I've created a branch with a previewDeck. The PreviewDeck is enabled in LateNight 1280x800 and replaces Sampler 1.

Whats missing is a skin that uses it

~max-linke/mixxx/previewdeck

Changed in mixxx:
status: Confirmed → In Progress
assignee: nobody → Max Linke (max-linke)
Revision history for this message
John Mitchell (neufena) wrote :

I've tried to compile code from this branch and get this error on MAc OS 10.7

scons: *** [osx64_build/PreviewDeck.o] Source `src/PreviewDeck.cpp' not found, needed by target `osx64_build/PreviewDeck.o'.

Revision history for this message
Max Linke (max-linke) wrote :

src/PreviewDeck.cpp should be there.

try "ls src/ | grep PreviewDeck.cpp" this should give you an output if the PreviewDeck.cpp is src/
In case this fails update the branch and try again.

Revision history for this message
Max Linke (max-linke) wrote :

I've updated the code. Now there is a real Preview Deck over the search box (LateNight 1280x800).
The code to make this work is not really pretty though. The rest of the design can be made in the skin.xml files

Revision history for this message
Max Linke (max-linke) wrote :

Hi

today I've noticed that I get a segfault if I use my PreviewButton on a song in the RhytmboxTM. To reproduce this
just select any song from the RhytmboxTM and after some Mixxx will suddenly have a segfault.

here is an output of gdb
http://paste.debian.net/170988/

Revision history for this message
Max Linke (max-linke) wrote :

Ok I've found the place where the segfault is generated but I have absolutly no idea why

The segfault is thrown when setArtist of TrackInfoObject is called,
QMutexLocker lock(&m_qMutex);

for me this looks we give lock sum chunk adress. I have no Idea why this happens.
The setArtist method is orignially called in ryhtemboxtablemodel.cpp getTrack()

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

Hi Max,

sorry I have not time early.

The segfault occours because setArtist is called on a NULL Trackpointer.
#3 TrackInfoObject::setArtist (this=0x0, s=...) at src/trackinfoobject.cpp:473

This happens only for our external library tracks, because at fist they have not a valid track ID.
They are getting a track ID when RhythmboxPlaylistModel::getTrack is called. But in your case this is not done before PreviewButtonDelegate::setModelData

You have already fixed the problem on an other way, but
I have added a check against a null Track to avoid those segfaults in future.

     TrackPointer pTrack = m_trackDAO.getTrack(trackId);
+ if (!pTrack) {
+ return false;
+ }
     setTrackValueForColumn(pTrack, column, value);

Kind regards,

Daniel

Revision history for this message
Max Linke (max-linke) wrote :

Ah thanks.

I think trackDAO.getTrack should also print to cerr if a NULL-Pointer is returned. That would make debugging of such segfault much much easier, as we have still a quite some places in the code where we don't make that check.

Max Linke (max-linke)
Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: none → 1.11.0
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/5151

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.