-
-
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
Serato Markers Integration for Track Color/BPM lock #2499
Conversation
I need some help here. For importing cue positons I need the track's sample rate. However, I cannot use |
Mixxx's format for storing the position of cue points in samples is unfortunate. I guess there will be no easy solution other than some dirty hack. In the long term we need to migrate from samples (integer) to time units (floating-point). The sample rate from the tags is not reliable and may be missing or differ from the sample rate of the actual audio stream. This property is only available after actually opening the stream with a decoder. |
The correct sample rate must then be passed to the tag reader as an additional parameter for performing these conversions. The tag reader must not make any assumptions how this sample rate is determined. |
I'm still struggling to find the proper spot for doing this. Seems wrong to read metadata here: https://github.com/mixxxdj/mixxx/blob/master/src/sources/soundsourceproxy.cpp#L526 |
I agree that this is an ugly side effect. But it is the only opportunity where we could update the metadata with the actual properties. Any ideas how to improve this? Return the audio properties to the caller? We need to ensure somehow that the The |
f2468f1
to
752d276
Compare
Extracting the audio stream properties from |
752d276
to
0e87d94
Compare
Apart from the problem that the sample rate is incorrect, I also need a way to get the Track dependency out of the Serato classes. I was planning to have a
I'm not sure how to solve this. Should I create a new |
@uklotzde What do you think? |
Difficult question. I'm biased after I already failed and finally gave up on fixing the cue control code 😬 |
7482342
to
e448b84
Compare
c1ee228
to
a247f99
Compare
d6acaa5
to
4589e20
Compare
Merge? This is ifdef'ed behind |
src/track/serato/tags.cpp
Outdated
return RgbColor(0x999998); | ||
} | ||
|
||
if (value == 0x99999a) { |
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.
Many of those magic codes/numbers appear repeatedly and in pairs. Would it make sense to define some constants for 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 thought about that, too, but decided against it - mainly because I couldn't find fitting names ;-)
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.
TODO: Test that dumping empty markers produces empty byte arrays. This is required when exporting the markers into file tags.
Like this? 27871cb |
I fixed the |
Anything else to do here? |
LGTM. No CI failures expected. Thank you Jan!! |
@uklotzde Thanks for all the thorough reviews! |
This adds support for reading the
Serato Markers_
andSerato Markers2
tag that are written by Serato and contains Cues, Loops, Track Color, etc.This PR supersedes #2473 and depends on #2495. As @daschuer suggested I removed export support for now.
IMPORTANT: You need to apply this patch to enable the actual integration: