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

Increase tempo, position mark and cue attr max from 7200 to 86400 seconds #49

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/converter/rekordbox/position_mark.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
{:tag (s/spec #{:POSITION_MARK})
:attrs {:Name string?
:Type ::position-mark-type
:Start (s/double-in :min 0 :max 7200 :NaN? false :infinite? false)
(std/opt :End) (s/double-in :min 0 :max 7200 :NaN? false :infinite? false)
:Start (s/double-in :min 0 :max 86400 :NaN? false :infinite? false)
(std/opt :End) (s/double-in :min 0 :max 86400 :NaN? false :infinite? false)
:Num (s/spec #{"-1" "0" "1" "2" "3" "4" "5" "6" "7"})
(std/opt :Red) (s/int-in 0 256)
(std/opt :Green) (s/int-in 0 256)
Expand Down
2 changes: 1 addition & 1 deletion src/converter/rekordbox/tempo.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
(std/spec
{:name ::tempo
:spec {:tag (s/spec #{:TEMPO})
:attrs {:Inizio (s/double-in :min 0 :max 7200 :NaN? false :infinite? false)
:attrs {:Inizio (s/double-in :min 0 :max 86400 :NaN? false :infinite? false)
:Bpm (s/double-in :min 0 :NaN? false :infinite? false)
:Metro string?
:Battito string?}}}))
Expand Down
6 changes: 3 additions & 3 deletions src/converter/traktor/cue.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

(defn start-plus-len-not-greater-than-max
[{{:keys [:START :LEN]} :attrs :as cue}]
(if (< 7200000 (+ START LEN))
(if (< 86400000 (+ START LEN))
(assoc-in cue [:attrs :LEN] 0)
cue))

Expand All @@ -41,8 +41,8 @@
:spec {:tag (s/spec #{:CUE_V2})
:attrs {:NAME string?
:TYPE ::type-num
:START (s/double-in :min 0 :max 7200000 :NaN? false :infinite? false) ; millis
:LEN (s/double-in :min 0 :max 7200000 :NaN? false :infinite? false) ; millis
:START (s/double-in :min 0 :max 86400000 :NaN? false :infinite? false) ; millis
:LEN (s/double-in :min 0 :max 86400000 :NaN? false :infinite? false) ; millis
:HOTCUE ::hotcue}}}))

(def cue-spec
Expand Down
6 changes: 3 additions & 3 deletions src/converter/universal/marker.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
(defn end-for-loop-markers
[marker]
(if (= ::type-loop (::type marker))
(update marker ::end (fn [end start] (if (< 7200 (+ start end)) 7200 (+ start end))) (::start marker))
(update marker ::end (fn [end start] (if (< 86400 (+ start end)) 86400 (+ start end))) (::start marker))
marker))

(defn end-for-other-markers
Expand All @@ -27,8 +27,8 @@

(def marker {::name string?
::type ::type-kw
::start (s/double-in :min 0 :max 7200 :NaN? false :infinite? false) ; seconds
::end (s/double-in :min 0 :max 7200 :NaN? false :infinite? false) ; seconds
::start (s/double-in :min 0 :max 86400 :NaN? false :infinite? false) ; seconds
::end (s/double-in :min 0 :max 86400 :NaN? false :infinite? false) ; seconds
::num (s/spec #{"-1" "0" "1" "2" "3" "4" "5" "6" "7"})})

(def marker-spec
Expand Down
2 changes: 1 addition & 1 deletion src/converter/universal/tempo.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
(def tempo-spec
(std/spec
{:name ::tempo
:spec {::inizio (s/double-in :min 0 :max 7200 :NaN? false :infinite? false) ; seconds
:spec {::inizio (s/double-in :min 0 :max 86400 :NaN? false :infinite? false) ; seconds
::bpm (s/double-in :min 0 :NaN? false :infinite? false)
::metro string?
::battito string?}}))