diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a3c091..41b5625 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ This change log follows the conventions of often](https://github.com/Deep-Symmetry/beat-link-trigger/issues/185). Thanks to [Deniz Gencer, @Firedude1](https://github.com/Firedude1) who noticed it was thrashing his GPU and reported this. +- An error in the helper code for user expressions caused an exception when attempting to use the `track-length` convenience variable with real (but not simulated) events. ## [7.4.1] - 2024-06-01 diff --git a/src/beat_link_trigger/expressions.clj b/src/beat_link_trigger/expressions.clj index d3ee233..cea56d5 100644 --- a/src/beat_link_trigger/expressions.clj +++ b/src/beat_link_trigger/expressions.clj @@ -358,7 +358,7 @@ :doc "The label of the loaded track, if metadata is available."} 'track-length {:code '(if-let [data util/*simulating*] (get-in data [:metadata :duration]) - (when (some? track-metadata) (.getLength track-metadata))) + (when (some? track-metadata) (.getDuration track-metadata))) :doc "The length in seconds of the loaded track, if metadata is available."} 'track-metadata {:code '(when-not util/*simulating* (.getLatestMetadataFor