Fork me on GitHub
Alex Miller (Clojure team)04:12:36

A new version of the clojure tools is now available ( • New, more informative tree format for clj -Stree / clj -X:deps tree • Added for use with clj -X:deps tree • Use 0.9.857

❤️ 45
👍 12
genmeblog15:12:00 Wavetable sound synthesizer. It's a study project which helps me to understand DSP needed to implement similar thing on STM32 chips. It contains minimal path for subtractive synthesis. It works, plays a nice piece, allows live patch changes, consists of: wavetable oscillator, state variable filter, adsr envelopes, wave shaper, phase modulation, sequnecers with bpm timer. Listen to the song generated by it and defined in sound.patch namespace:

❤️ 30
👏 24
👍 9
🎶 12

Ace! I'm giving it a spin. So you foresee giving it support for accepting midi inputs? (I have no idea of how hard that would be).


Yes, we are (I'm helping my 16yo son with this project) after tests on STM32 and MIDI is quite simple there. You just receive note on/off events with note value and velocity. I don't know yet if add MIDI in Clojure but looks like it's a straightforward java interop.

🙂 3

Overtone has MIDI support - maybe you can take some inspiration from it:


Oh lovely! Thanks.


It's not as easy as I thought.

Ben Sless17:12:35

DSP, that takes me back...


Hopefully you’ve seen Rich’s conj talk about additive synthesis

👀 6
🤯 3
bananadance 3

The javax.midi stuff isn't hard to use, just a little tedious because of the amount of classes and interop involved. Here's an example of getting key presses from a midi controller this uses a defwrapper macro to sweeten doing interop, I posted that also on ClojureVerse a while ago and someone ran with it and turned it into a library:


Sorry I don't have a cleaner example handy right now, but find some java examples, they should be straightforward to port.


Are you using a midi keyboard to control OBS? 😈


@U07FP7QJ0 Thank you, I think this is enough material to digest. As I said previously I'm not sure if I want to add midi controller support, since I achieved what I wanted, ie. dsp path works and can be used to implement target synthsesizer on STM 🙂 (btw. I remember and forget about defwrapper - great idea and I happy to see this as a library)


@U054UD60U doesn't everyone? 😁 I use the pads on the keyboard to switch betweens scenes like camera, share screen, etc


Hehe, as one of the nerds that build their own keyboards I would rather create custom keyboard or use a “macro pad” to trigger some key combinations… Or use a wifi enabled chip to directly manipulate OBS, now that I think about it 🙂


@U1EP3BZ3Q looking forward to checking this out! Wavetable synthesis has made so many interesting advances in the past few years...

👍 3

@U077BEWNQ I relied on Mutable Instruments source code. Their products sound pretty awesome.


Have you seen that there are free ports of the Mutable Instruments devices to the (also free, and awesome) VCV Rack virtual modular environment? Although I haven't used the physical modules, reviews suggest that the ports are a pretty close match. Tons of fun to play with 😀


Yes!!! I know VCVRack and played with Audible Instruments. Actually, this a wrapper to the MI source, which helped me to find entry point to the Plaits instrument and their wavetable oscillator I've stolen the idea from. I want to say that code is highly readable and it was really fun to port some parts to the Clojure.

metal 3

@U050ECB92 I haven't seen this before! Lovely stuff. Mostly based on overtone/supercollider rendering though. Here I render sound purely in clj.