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

AutoDJProcessor: Calculate and expose the number of tracks and accurate total duration in the Auto DJ queue #13183

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

cr7pt0gr4ph7
Copy link
Contributor

@cr7pt0gr4ph7 cr7pt0gr4ph7 commented Apr 28, 2024

The calculated total duration take into account the transition modes, transition time etc. (in fact, it reuses the code that performs the actual transition during queue playing).

The time_remaining and tracks_remaining are exposed as ControlObjects so they can be consumed by skins.

The time_remaining and tracks_remaining controls in the [AutoDJ]
can be used to display the information about the Auto DJ queue
in custom skins.

The current calculation method for the time_remaining control
only considers the total duration of the tracks by themselves,
and does not take the transition times between tracks into account.
This is a first step in generalizing the transition logic in
AutoDJProcessor to enable it to also be applied to tracks in
the queue instead of just the current decks.
This is another step in generalizing the transition logic
in AutoDJProcessor to enable calculating transition times
for the whole queue.
This is the final step in generalizing the core transition timing
logic in AutoDJProcessor, so that it can be applied to a whole
playlist instead of just the current decks.
…n relevant

The following data points are used as inputs for the "remaining time"
calculation, and should therefore trigger a recalculation:

* The list of tracks in the Auto DJ playlist (both
  the set of tracks and their order are important).

  We subscribe to PlaylistTableModel::tracksChanged
  to receive the relevant notifications.

* The AutoDJ transition mode and transition time settings.
  We will be notified via ::setTransitionMode
  and ::setTransitionTime, respectively.

* The Intro, Outro & N60dBSound cues of all tracks
  that are contained in the Auto DJ queue.

  We subscribe to TrackCollection::tracksChanged
  and TrackCollection::multipleTracksChanged to
  receive notifications about possible changes.

  As of now, we do not filter the notifications,
  and simply trigger a recalculation when ANY
  track has changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant