First update in over 3 years! :tada:
I just made some internal improvements to chronoid, which are included by proxy in this release of mantra which depends on the new version of chronoid.
You can read about the improvements in chronoid here, if you're curious.
Added the ability to express the pitch of a note as a string or keyword containing the note (letter) name and octave.
Example usage:
(require '[mantra.core :as m])
(def o (m/osc :triangle))
(m/play-notes o [{:pitch "C#5" :duration :quarter}
{:pitch :Ab3 :duration :dotted-half}])
Fixed a Firefox-specific bug caused by setting the gain value of a gain node
to 0 and then trying to use
exponentialRampToValueAtTime
.
Per Mozilla's documentation:
A value of 0.01 was used for the value to ramp down to in the last function rather than 0, as an invalid or illegal string error is thrown if 0 is used -- the value needs to be positive.
It turns out that this applies not only to the value you're ramping to, but also the value you're ramping from.
We were initializing oscillators with a gain node gain value of 0, which led to this bug when trying to use the oscillator to play notes.
This should now work properly in Firefox. I also verified that it works in Safari. It was already working in Chrome.
nil
. Previously this was
happening if you called (set-tempo)
without a bpm
argument. Now this will
throw an error instead.-triplet
, -quintuplet
, and -septuplet
suffixes to available note
lengths.Allow notes with no duration in the middle as arguments to play-notes
.
Allow users to pass in their own AudioContexts and chronoid clocks rather than creating one internally.
play-notes
, also-play-note
,
also-play-notes
, play-chord
, also-play-chord
.Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close