Skip to content

Commit

Permalink
Fix exception for track-length in user expressions.
Browse files Browse the repository at this point in the history
  • Loading branch information
brunchboy committed Sep 8, 2024
1 parent 6312a2d commit 1bba921
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/beat_link_trigger/expressions.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1bba921

Please sign in to comment.