-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Adding RadioLanewayCrossfade transition #13750
base: main
Are you sure you want to change the base?
Adding RadioLanewayCrossfade transition #13750
Conversation
Adding RadioLanewayCrossfade transition. See mixxxdj#13716
(Wow this is fussy!).
More style issues.
Yet more code style issues (Space at end of line.)
More Code tidy Missing case in cueinfo.cpp
Code style
Spelling
avoiding a DEBUG_ASSERT(!"Unknown Loop Type");
fix up tooltip
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
didn't bother looking at the autodj for now.
// Don't change these to const as they are used only to feed the | ||
// fade thresholds which are consts below themselves while we work | ||
// out which one is best, and you'll just be adding to exe size. | ||
#define N_10DB_FADEOUT_THRESHOLD 0.3162f | ||
#define N_12DB_FADEOUT_THRESHOLD 0.2511f | ||
#define N_15DB_FADEOUT_THRESHOLD 0.1778f | ||
#define N_18DB_FADEOUT_THRESHOLD 0.1259f | ||
#define N_20DB_FADEOUT_THRESHOLD 0.1f | ||
#define N_24DB_FADEOUT_THRESHOLD 0.0631f | ||
#define N_25DB_FADEOUT_THRESHOLD 0.0562f | ||
#define N_27DB_FADEOUT_THRESHOLD 0.0447f | ||
#define N_30DB_FADEOUT_THRESHOLD 0.0316f | ||
#define N_40DB_FADEOUT_THRESHOLD 0.01f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make them constexpr
. they have internal linkage and the compiler will strip them out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I want the compiler to strip them out. Only a couple of these are used, and then only as part of a const. They are there just while we(?) work out the best values. This makes it easier to change. They can be deleted later when we have a fixed value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. I want the compiler to strip them out. Only a couple of these are used, and then only as part of a const.
Right, as long as you mark them const
. the compiler will remove them..
Anyways, not particularly important if these are only meant to be temporary (that was not clear from the source).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while we work out which one is best
template<typename ForwardIterator> | ||
ForwardIterator last_fade_in_sound(ForwardIterator begin, ForwardIterator end) { | ||
return std::find_if(begin, end, [](const auto elem) { | ||
return fabs(elem) >= kFadeInThreshold; | ||
}); | ||
} | ||
|
||
template<typename Iterator> | ||
Iterator first_fade_out_sound(Iterator begin, Iterator end) { | ||
return std::find_if(begin, end, [](const auto elem) { | ||
return fabs(elem) >= kFadeOutThreshold; | ||
}); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a copy of the above for very little reason. Consider deduplicating by simply taking the Threshold as a parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second one goes backward, while the first is strictly forward. I spent a long time playing around with these, trying to determine why I was getting weird results (and so I was keen to keep them separate). It turns out AutoDj processing can take place before a track is fully analysed, so I am less invested in that now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functions are identical. In this context ForwardIterator
and Iterator
are just names that resolve to the underlying iterator implementation when called. So there is no difference in terms of what function can be called when. A std::reverse_iterator
is a "bidirectional iterator" and thus also a "forward iterator".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::find_if
only requires a forward iterator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you like I'll refactor all of those into one, including the db60.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that would be nice. Thank you.
"volume last falls below -12Db or at the spin box setting which ever\n" | ||
"is lower, and potentially starts the next earlier if it starts below\n" | ||
"-27Db."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its very easy to change the threshold in the analyzer but forget to update it here. Do you think its valuable to have the thresholds documented here or can we just omit them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I nearly made it a more general statement (e.g., 'a certain level'), but I figured someone would want to know the exact values. It may well be worth making it more general for the reason you suggested.
VERIFY_OR_DEBUG_ASSERT(box) { //Assumes the form layout is a QVBox/QHBoxLayout! | ||
} else { | ||
VERIFY_OR_DEBUG_ASSERT(box) { // Assumes the form layout is a QVBox/QHBoxLayout! | ||
} | ||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this clang-format or you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was not intentionally me... But I gave up trying to remove spaces at the ends of lines and I did run a format document at some point, so perhaps then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you revert that then?
I suggest you do. This transition is groundbreaking. |
RadioLanewayCrossfade transition.
See issue: #13716.