I am writing a real-time data processing tool (data in —> pattern
recognition —> midi out) called rubyk (site: http://rubyk.org trac:
http://dev.rubyk.org). The first idea was to embed ruby (thus the name
I did some testing with a first “pure ruby” implementation of the
signal sending mechanism and it works fine but is erratic (very hard
to have stable tempo), probably due to ruby’s GC messing in the way.
So I wrote a C++ core and thought I would embed ruby. But then the
garbage collector’s “inconvenient pause” would happen again (with less
Will ruby work fine for real-time midi ? Or am I better off using Lua
? I really like ruby and would prefer going this route, but I do not
want to be limited to a “rubato” style of music.
So the questions are:
- I need to loop at a minimum of 300Hz. Will ruby GC be fast enough ?
- Is there a way to disable GC without leaking memory ?
- Would Lua be a better fit ?
- Python uses reference counting so no “mark & sweep” pause. But I do
not want to use Python, so please do not tell me Python would be
Many thanks for your answers.