-
First update in over 3 years! 🎉
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 bug in chronoid that was affecting mantra to some extent. mantra now uses chronoid 0.1.1, which contains the fix.
-
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.
- Added in a safeguard against setting the tempo to
nil
. Previously this was happening if you called(set-tempo)
without abpm
argument. Now this will throw an error instead.
- Allow note lengths to be provided in string form.
- Added
-triplet
,-quintuplet
, and-septuplet
suffixes to available note lengths.
- Note-length abstractions (quarter, dotted eighth, triple-dotted semihemidemiquaver, etc.)
-
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.
- Expanded note/chord functions -- added
play-notes
,also-play-note
,also-play-notes
,play-chord
,also-play-chord
.
- Use chronoid for more accurate timing.
- API changes, internal improvements
- Initial release -- can create oscillators, use them to make bleeps & bloops.