Is anyone familiar with cljs-bach or klangmeister? I am just looking for a hello world example to get rolling. The cljs-bach
readme gets as far as suggesting:
; Play the ping synthesiser now, at 440 hertz.
(-> (ping 440)
(connect-> destination)
(run-with context (current-time context) 1.0)))
…but leaves it to us to provide destination
, apparently a DOM node. I was hoping to find a complete example. I do not see anything in the klangmeister
repo like an example. The google comes up empty, too.@hiskennyness destination would be expecting the audiocontext destination:
var audioCtx = new AudioContext;
gainNode.connect(audioCtx.destination);
(-> (js/AudioContext.) .-destination)
seems like context
above is already the audiocontext so: (let [destination (.-destination context)] ... )
should work
Fantastic, @chris358. That worked great. I can evaluate all the forms without error, and the destination looks like a destination. But when I evaluate the whole shebang I get:
TypeError: synth.call is not a function
Hmm. That is in an Intellij/Cursive repl connected via figwheel to my browser. Possibly not meant to work that way?
But, hey, thanks for the huge leg up! 🙏