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

Preview Library Tracks in Headphones #5151

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

Preview Library Tracks in Headphones #5151

mixxxbot opened this issue Aug 22, 2022 · 18 comments

Comments

@mixxxbot
Copy link
Collaborator

Reported by: luciano-relojurbano
Date: 2009-04-24T13:50:07Z
Status: Fix Released
Importance: Wishlist
Launchpad Issue: lp366091
Tags: feature, library, monitor, request


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

@mixxxbot
Copy link
Collaborator Author

Commented by: kousu
Date: 2009-04-24T15:05:06Z


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).

@mixxxbot
Copy link
Collaborator Author

Commented by: kousu
Date: 2009-04-24T18:12:58Z


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 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).

@mixxxbot
Copy link
Collaborator Author

Commented by: laferrer
Date: 2009-06-04T02:04:47Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2011-07-01T22:04:22Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: neufena
Date: 2011-12-06T13:01:12Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-12-06T16:19:56Z


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)
  1. Create a PreviewDeck derivative of BaseTrackPlayer in src/ (see Deck
    and Sampler classes as examples)

  2. 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.

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

  4. 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 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

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-12-06T16:21:39Z


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 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)
  1. Create a PreviewDeck derivative of BaseTrackPlayer in src/ (see Deck
    and Sampler classes as examples)

  2. 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.

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

  4. 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 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

@mixxxbot
Copy link
Collaborator Author

Commented by: rryan
Date: 2011-12-06T16:28:10Z


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 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 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)
  1. Create a PreviewDeck derivative of BaseTrackPlayer in src/ (see Deck
    and Sampler classes as examples)

  2. 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.

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

  4. 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 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

@mixxxbot
Copy link
Collaborator Author

Commented by: ferranpujolcamins
Date: 2012-02-22T09:02:55Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-04-10T21:26:50Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: neufena
Date: 2012-04-11T11:27:59Z


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'.

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-04-11T14:04:23Z


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.

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-04-14T17:25:38Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-05-24T16:53:14Z


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/

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-05-26T19:12:36Z


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()

@mixxxbot
Copy link
Collaborator Author

Commented by: daschuer
Date: 2012-05-28T21:36:17Z


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

@mixxxbot
Copy link
Collaborator Author

Commented by: kain88-de
Date: 2012-05-29T21:46:42Z


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.

@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
Projects
None yet
Development

No branches or pull requests

1 participant