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

AutoDj: Option to start the Crossfader centered so the track starts at full volume (default off). #13619

Closed
wants to merge 5 commits into from

Conversation

davidlmorris
Copy link
Contributor

Option to set the Crossfader to the center as AutoDj starts a crossfade so the track starts at full volume.

This overcomes the issue of a track fading in, so that it loses the start, especially on cold start vocals or drum fills. This sounds much more professional, especially for community radio or internet stations.

The setting is in preferences Auto DJ under Crossfader Behaviour (noting that the hint also applies to this setting).
image

When set all of the AutoDj settings are affected, however, despite starting from the middle the crossfade still takes the same time.

Option to set the Crossfader to the center as AutoDj starts a crossfade so the track starts at full volume.
// movements in this track's play position.
setCrossfader(currentCrossfader + adjustment);
if ((m_crossfaderStartCenter) &&
(transitionProgress <= ((thisDeck->fadeEndPos - thisDeck->fadeBeginPos)/2))) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
(transitionProgress <= ((thisDeck->fadeEndPos - thisDeck->fadeBeginPos)/2))) {
transitionProgress <= std::midpoint(thisDeck->fadeBeginPos, thisDeck->fadeEndPos) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you mean to use the standard lib calls instead of the arithmetic, then sure, that makes the intent clearer. (My C++ usage has been mostly on micro-controllers where one avoids both the speed and space overhead of libraries if possible.)

Comment on lines 1360 to 1362
switch (m_transitionMode) {
// case TransitionMode::RadioFullIntroOutro:
case TransitionMode::FullIntroOutro: {
Copy link
Member

Choose a reason for hiding this comment

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

remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. This was an artifact of an earlier experiment. I thought I had removed all of those.

Comment on lines 291 to 293


ControlProxy* m_pCOCrossfader;
Copy link
Member

Choose a reason for hiding this comment

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

remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think m_pCOCrossfader has anything to do with my code, other than I used it as a template for some of my changes. I think m_pCOCrossfader refers to #13303.

@daschuer
Copy link
Member

daschuer commented Sep 3, 2024

Thank you for this PR. I wonder what exactly is your use case and if this plays nicely with all transition modes and configured intros. I can confirm that throwing a track in at full volume is a good solution when they start with vocals right away. What your use case?

@daschuer
Copy link
Member

daschuer commented Sep 3, 2024

There are style changes in unrelated regions if the code.
Please make sure that your editor does not auto-format the whole file. This keeps the PR small and easy to review.

src/library/autodj/autodjprocessor.cpp Outdated Show resolved Hide resolved
src/library/autodj/autodjprocessor.cpp Outdated Show resolved Hide resolved
@ronso0
Copy link
Member

ronso0 commented Sep 3, 2024

There are style changes in unrelated regions if the code. Please make sure that your editor does not auto-format the whole file. This keeps the PR small and easy to review.

Some of those changes look liek pre-commit proposals. Do you have that installed?

davidlmorris and others added 2 commits September 4, 2024 08:45
Co-authored-by: ronso0 <ronso0@mixxx.org>
Co-authored-by: ronso0 <ronso0@mixxx.org>
@davidlmorris
Copy link
Contributor Author

There are style changes in unrelated regions if the code. Please make sure that your editor does not auto-format the whole file. This keeps the PR small and easy to review.

@ronso0

Some of those changes look liek pre-commit proposals. Do you have that installed?

I did for the second attempt. I had thought that the clang-format would be tied into the VS settings, and because I hadn't run it this was the cause of the original reject. [Lots of gratuitous commentary of code formatting redacted here.]

Most of this tool set (including git really) is pretty alien to me, so I am probably making quite a mess of this.

However, the code changes are simple and do work across all four AutoDj options.

@ronso0
Copy link
Member

ronso0 commented Sep 4, 2024

Thanks, I'll take another look soon.

FYI: resoving review conversations should be done by the reviewer. Otherwise (contributor) responses are hidden and it's tedious for the reviewer to expand and double-check previous reviews. Thanks!

@daschuer
Copy link
Member

Can this one be closed in favour of: #13628?

@davidlmorris
Copy link
Contributor Author

Yes. Change addressed in 13628(#13628).

@davidlmorris
Copy link
Contributor Author

Change addressed in 13628(#13628).

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.

4 participants