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

[proposal#2] Track Similarity Column #5

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

danferns
Copy link

Discussion on Zulip


We also get a delta/detune value to find out how off tune the tracks will be in cents.

TODO: The algorithm needs to be able to take in tuning information, for non 440Hz tuning standards.
Copy link
Member

Choose a reason for hiding this comment

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

I think this is something we can consider out of scope for the first version. As always, we can take it into account so that a future version could possibly handle it, but I think trying to support this from the start will add a lot of unnecessary complexity.

Copy link
Member

Choose a reason for hiding this comment

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

All the tracks are analyzed with 440 Hz. A 432 Hz Track is "just" a slightly pitched track compared to others. Since the algorithm needs to deal with pitched tracks anyway, this part comes for free. We just must not prevent it artificially.

The missing bit is to define the library storage format and add a GUI to enter the tuning info. This is out of scope of this project.

We can already read Tracks annotated with keys like "A#m +50" but we discard the tuning info currently. Once this is "fixed" we can support tuning: https://github.com/mixxxdj/mixxx/blob/3d8e7fec8ba03fac34769bb2de6e863fd67b3efa/src/track/keyutils.cpp#L329

Copy link
Member

Choose a reason for hiding this comment

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

sounds good to me

* **Other docs or links:**
* [GSoC Proposal](https://docs.google.com/document/d/1QAe8mvZFKkFnG--02kuzSagzea6_ed5g3VfjuSyAY7w/edit?usp=sharing)

> Proposal to add a column in the Track Library that shows how harmonically close each track is with a Target
Copy link
Member

Choose a reason for hiding this comment

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

Based on the discussion and confusion about how to tell which track is being considered for similarity, I don't think it's enough to just have a new column. There needs to be a new UI element that clearly indicates what track is the reference point. The source for how that UI element is populated can be the Sync Leader, or an explicit selection, but we will need a way to communicate the reference track.

We could do something like: put the reference track at the top of the library, highlighted in a special way. Sort operations would not move this special track, it is always at the top.

Copy link
Member

Choose a reason for hiding this comment

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

I am afraid this whole feature is a rats nest which need some experiments and POC. If we heading for a perfect solution, this 90 hour GSoC project will be over without and mergeable outcome.
So let's use only the Sync Leader for picking the current BPM and Key.

Once the have this Proposed Track Similarity Column merged we can adjust the magic algorithm as we like.

Copy link
Member

Choose a reason for hiding this comment

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

sounds good for first version

Copy link
Member

@daschuer daschuer left a comment

Choose a reason for hiding this comment

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

Sounds like we have a plan. Thank you :-)

* **Other docs or links:**
* [GSoC Proposal](https://docs.google.com/document/d/1QAe8mvZFKkFnG--02kuzSagzea6_ed5g3VfjuSyAY7w/edit?usp=sharing)

> Proposal to add a column in the Track Library that shows how harmonically close each track is with a Target
Copy link
Member

Choose a reason for hiding this comment

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

I am afraid this whole feature is a rats nest which need some experiments and POC. If we heading for a perfect solution, this 90 hour GSoC project will be over without and mergeable outcome.
So let's use only the Sync Leader for picking the current BPM and Key.

Once the have this Proposed Track Similarity Column merged we can adjust the magic algorithm as we like.


### Finding the target track

This is still an **Open Question**. Here's where we are at right now:
Copy link
Member

Choose a reason for hiding this comment

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

Let's postpone the Question and use only the Sync Leader for reference for the first version. That works already perfectly when "testing" transitions at home.

Copy link
Member

Choose a reason for hiding this comment

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

+1

If the user does not explicitly select a target track, Mixxx may automatically select a deck, based on the
algorithm for choosing the Sync Leader.

We can provide context menu options to target other decks, or tracks from the library.
Copy link
Member

Choose a reason for hiding this comment

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

I wonder how this will interact with the "find similar feature". I think both target the same use case, one will filter, and the other will populate the new Track Similarity Column. If we sort by it, the "filter" nature becomes probably obsolete, because with the similarity, we also see close matches that would be normally hidden.

Copy link
Member

Choose a reason for hiding this comment

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

I use the Preview deck to listen to candidates. We can also use this for a "revese" lookup, how does the candidate Track match to the cued tracks in AutoDJ. At which position should I place it.

Copy link
Author

@danferns danferns Jul 5, 2024

Choose a reason for hiding this comment

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

I think the Preview deck would actually be an elegant solution to this. Maybe something like this:

if track in preview deck:
    target = track in preview deck
else if sync leader present:
    target = sync leader
else:
    no target, leave similarity blank

I don't listen to the Preview deck, but I am cool with putting tracks in it. It will also let us easily see which track is being used as the target.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, nice. We can change it at any time later.


def compatibility(pitch_difference):
rounded_pitch_diff = round(pitch_difference)
delta = abs(rounded_pitch_diff - pitch_difference)
Copy link
Member

Choose a reason for hiding this comment

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

Is this the cents value of difference? Maybe we should format it actually as cents.
The compatibility is than a kind of sinus curve with a tip at a full match and at compatible keys and dips where the key is out of tunes at the 50 cents region at least.

Copy link
Member

Choose a reason for hiding this comment

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


We also get a delta/detune value to find out how off tune the tracks will be in cents.

TODO: The algorithm needs to be able to take in tuning information, for non 440Hz tuning standards.
Copy link
Member

Choose a reason for hiding this comment

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

All the tracks are analyzed with 440 Hz. A 432 Hz Track is "just" a slightly pitched track compared to others. Since the algorithm needs to deal with pitched tracks anyway, this part comes for free. We just must not prevent it artificially.

The missing bit is to define the library storage format and add a GUI to enter the tuning info. This is out of scope of this project.

We can already read Tracks annotated with keys like "A#m +50" but we discard the tuning info currently. Once this is "fixed" we can support tuning: https://github.com/mixxxdj/mixxx/blob/3d8e7fec8ba03fac34769bb2de6e863fd67b3efa/src/track/keyutils.cpp#L329


**Open Question**: It may be possible to combine the information of the detune column into the similarity column.
Either by creating a formula that combines the two values,
or by encoding it in some other way (like opacity, or another icon).
Copy link
Member

Choose a reason for hiding this comment

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

Since the Detune value destroys the assumptions in the similarity column, it should be directly considered in the value of the similarity column. We may consider to add controls to see the detune in the decks to all skins not have a Shade Skin only feature. Putting this into the similarity column as an extra value is probably confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants