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

Fix sharp cut transition after cueing a track without a defined intro #11629

Merged
merged 3 commits into from
Jun 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/library/autodj/autodjprocessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1281,13 +1281,13 @@ void AutoDJProcessor::calculateTransition(DeckAttributes* pFromDeck,

// introEnd is equal introStart in case it has not yet been set
if (toDeckStartSeconds < introEnd && introStart < introEnd) {
// Limit the intro length adjustments to the original length x 2
// or original length + transition time, whichever is longer.
double seekBack = introStart - toDeckStartSeconds;
if (seekBack <= 0 ||
seekBack <= m_transitionTime ||
seekBack <= introEnd - introStart) {
introLength = introEnd - toDeckStartSeconds;
// Limit the intro length that results from a revers seek
// to a reasonable values. If the seek was too big, ignore it.
introLength = introEnd - toDeckStartSeconds;
if (introLength > (introEnd - introStart) * 2 &&
introLength > (introEnd - introStart) + m_transitionTime &&
introLength > outroLength) {
introLength = 0;
Comment on lines +1284 to +1290
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this limitation? IIUC if the user seeks far before the intro, then this will just skip the fade, does this make sense? Why would this be desirable?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imagine a live recording with some introduction words.
The user probably has marked an intro when the music starts. Without this change and with a previous track without an outro the loooong intro time is used for fading if it is cued at 0:00. This is likely not desired. Now the transition time from the spin box is used in this case.

The other use case is the part of the bug fix. If the track is cued at intro start and the user touches the jog for a small seek. The intro is still used.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense I guess. I just worry about the complexity this introduces. AutoDJ is already quite unpredictable IMO and this doesn't make it any better.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also a drop in the bucket, so who cares...

}
}

Expand Down