3 ms·
I've been using Ruby for sound lately. It's a good exercise in optimization because Ruby's not that fast for numeric computation (without calling out to a C li
by nitrogen 5y ago
I've been using Ruby for sound lately. It's a good exercise in optimization because Ruby's not that fast for numeric computation (without calling out to a C lib like Numo), so your algorithms have to be reasonable. I'm hoping that the various JIT efforts will eventually let me run multiple realtime voices in my synthesizer, without having to drop down to C.
- pjmlp 5y agoI guess you might find this interesting, https://twitter.com/headius/status/1261024699837890561 https://twitter.com/headius/status/1261024699837890561
- chrisseaton 5y agoCan you share any code? I'm interested in optimising interesting Ruby demos.
- nitrogen 5y agoYeah, here's my main sound repo: https://github.com/mike-bourgeous/mb-sound https://github.com/mike-bourgeous/mb-sound There's also an FFI wrapper for jackd: https://github.com/mike-bourgeous/mb-sound-jackffi https://github.com/mike-bourgeous/mb-sound-jackffi I'm certain there are still improvements that could be made to the APIs and to performance, so I'm not currently releasing these on rubygems. Edit: I should really try these with TruffleRuby myself. I'll try to reply here if I do.