Skip to content

Commit e541d16

Browse files
committed
Metadata for unanalyzed tracks w/o real player number!
1 parent b86a745 commit e541d16

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This change log follows the conventions of
88

99
### Changed
1010

11-
- We can now obtain track metadata including the waveform and beat grid even for tracks that have not been analyzed by rekordbox when talking to a CDJ-3000 and using a real player number.
11+
- We can now obtain track metadata including the waveform and beat grid even for tracks that have not been analyzed by rekordbox when talking to CDJ-3000s, whether or not we are using a real player number.
1212
This means that such tracks can interact usefully with almost all BLT features.
1313
- Works with the 8.x version of Beat Link, to offer support for the Opus Quad, as long as you build and attach metadata archives for the USBs you are using, or are loading them from rekordbox or rekordbox mobile on a different computer than where BLT is running.
1414
- The aging (and no-longer-maintained) user interface look-and-feel has been replaced with a newer one, which also supports user choice of light and dark mode (including adopting the system-wide setting for that, if desired), and allows custom look-and-feels to be installed and used.

src/beat_link_trigger/players.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,7 @@
481481
(seesaw/config! title-label :text title)
482482
(seesaw/config! artist-label :text "n/a")
483483
(when (and status
484+
(not= "CDJ-3000" (.getDeviceName status))
484485
(not (#{CdjStatus$TrackType/NO_TRACK CdjStatus$TrackType/REKORDBOX} (.getTrackType status)))
485486
(not (sending-status?)))
486487
(report-limited-metadata @player-window player))))))

src/beat_link_trigger/triggers.clj

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
[java.io File]
3737
[javax.swing JFrame JMenu JMenuItem JCheckBoxMenuItem JPanel JRadioButtonMenuItem UIManager]
3838
[org.deepsymmetry.beatlink BeatFinder BeatListener CdjStatus CdjStatus$TrackSourceSlot
39-
DeviceAnnouncementListener DeviceFinder DeviceUpdateListener LifecycleListener Util VirtualCdj]
39+
DeviceAnnouncement DeviceAnnouncementListener DeviceFinder DeviceUpdateListener LifecycleListener
40+
Util VirtualCdj]
4041
[org.deepsymmetry.beatlink.data AnalysisTagFinder ArtFinder BeatGridFinder CrateDigger MetadataFinder
4142
SearchableItem SignatureFinder TimeFinder TrackMetadata WaveformFinder]
4243
[beat_link_trigger.util MidiChoice]
@@ -1638,6 +1639,17 @@
16381639
(do (.setSendingStatus virtual-cdj true) ; We can do it.
16391640
(.setPassive metadata-finder false))))))
16401641

1642+
(defn- actively-request-metadata-from-cdj-3000s
1643+
"Even if we are not using a real player number, if the only other
1644+
players on the network are CDJ-3000s, we can still actively request
1645+
metadata using the dbserver protocol."
1646+
[]
1647+
(when (every? (fn [^DeviceAnnouncement device]
1648+
(or (> (.getDeviceNumber device) 6)
1649+
(= (.getDeviceName device) "CDJ-3000")))
1650+
(.getCurrentDevices device-finder))
1651+
(.setPassive metadata-finder false)))
1652+
16411653
(declare go-online)
16421654

16431655
(defn expression-report-link
@@ -1906,7 +1918,9 @@
19061918
(when (util/online?)
19071919
(start-other-finders)
19081920
(.addLifecycleListener virtual-cdj vcdj-lifecycle-listener)) ; React when VirtualCdj shuts down unexpectedly.
1909-
(when (real-player?) (actively-send-status))
1921+
(if (real-player?)
1922+
(actively-send-status)
1923+
(actively-request-metadata-from-cdj-3000s))
19101924
(when (util/online?)
19111925
(run-global-function :online)
19121926
(settings/run-online-actions @trigger-frame expression-globals)

0 commit comments

Comments
 (0)