I just discovered Tom Murphy's Vivid-Synth[1], a Haskell library that lets you control SuperCollider. (A few very slight changes allowed me to get it to work in Stack instead of Cabal, as described here[2,3].)

TidalCycles[4] also controls SuperCollider from Haskell. It does tortuous backflips to hand the timing job over to SuperCollider. If I recall correctly, that was because SC's timing was more solid than Haskell's.

I modified the Vivid demo to go faster and have a few more voices[5], and tried running it at the same time as Spotify and Youtube and apt upgrade and loading LibreOffice and playing some music in VLC, and I detected (by ear) no timing errors.

Can I expect GHC's maybe-new rhythmic stability to hold up?

[1] http://www.vivid-synth.com/
[2] https://github.com/vivid-synth/vivid/issues/5
[3] https://github.com/JeffreyBenjaminBrown/vivid/commit/3d25266d4495d9dd8e573f30e819e8ebeffc3f88
[4] https://tidalcycles.org/
[5] https://github.com/JeffreyBenjaminBrown/vivid/blob/jbb/jbb/sine.hs


--
Jeff Brown | Jeffrey Benjamin Brown
Website   |   Facebook   |   LinkedIn(spammy, so I often miss messages here)   |   Github