Recently I learned that the current beta release of LuaJIT, a
just-in-time compiler for the dynamic language Lua for Intel
architecture, now has a native foreign function interface the includes
the ability to declare and access C style arrays and structures rather
than Lua tables. Some benchmarks were rewritten in this style, and the
performance ranges from about half has fast as compiled C to several
times faster than compiled C.

All reports are not yet in, but there is a distinct possibility that
with LuaJIT, dynamic languages have come into their own and can be
considered for many high-performance applications.

Consequently, I invite you to consider writing a sound synthesis
system in pure Lua for LuaJIT + FFI, using the FFI facility to declare
signal buffers as C arrays, and possibly to declare unit generators as
C structs. Although there currently is no native threading
implementation in LuaJIT, one could still use OS threads or pthreads
via FFI.

I think a LuaJIT+FFI sound synthesis system would be competitive in
speed with C/C++ systems, and far superior in terms of portability,
ease of writing code, and so on.

Regards,
Mike

On Thu, Feb 17, 2011 at 8:02 AM, Batuhan Bozkurt
<batu...@batuhanbozkurt.com> wrote:
> Hi,
>
> I'm currently working on a library (about 85% done at the moment) that does 
> some of the things you want. I too am a SuperCollider user and once I wanted 
> to make a clean library implementation (fork) of scsynth to use with mobile 
> development. When I brought up the case in sc-dev mailing list, I've learned 
> that I can't distribute my art through Apple appstore because the GPL binary 
> distribution clauses aren't compatible with Apple agreement. So even if I 
> provide the full source with my art, I am not allowed to distribute it in 
> binary form if the source is GPL'ed. This was the consensus so I backed off.
>
> Now I've made a kind of lame audio server implementation which is heavily 
> influenced by scsynth. I have nodes but they are restricted to synths at this 
> moment so there are no groups. I've ported many of the SuperCollider UGens 
> (recoded all of them by hand, followed through the original sources and all). 
> I also do not have FFT (yet) and multichannel expansion like things but it is 
> not very hard to achieve. It is easy to connect UGens to parameters of other 
> UGens and such. I'm quite happy with it overall for the time being.
>
> The good part is that I've made the implementation in haXe 
> (http://www.haxe.org ) language so I can target the same DSP code for Flash 
> (Flash 10+ supports realtime audio), JavaScript (for the upcoming audio api 
> for js in firefox 4) and I can also emit C++ code for mobile development. The 
> performance is quite good (only tested in flash yet though, a very 
> pessimistic ballpark would be that it is half as efficient as scsynth running 
> in a browser with Flash). I'll open source it at some moment but not under 
> GPL.
>
> I can use some help so if anyone is interested in helping to make it release 
> ready, drop me a line.
>
> Best,
> Batuhan Bozkurt
> /* http://www.earslap.com */
>
>
>
>
> On Feb 8, 2011, at 3:09 AM, Morgan Packard wrote:
>
>> (First post to this list. Sent this a few days ago and it doesn't seem
>> to have gone through, so trying again.)
>>
>>
>> Hi There,
>> I've been writing low-level code for my iOS app, Thicket, pretty much
>> myself, with the exception of a sine oscillator and an envelope
>> borrowed from STK. I'd like to be able to work on this platform in a
>> much faster way than I have been, simply plugging unit generators in
>> to one another, not having to stop and think about how to, for
>> example, go from a mono oscillator signal to a stereo reverb signal.
>> I'd like to be able to work more like I work in SuperCollider, writing
>> higher-level code to create a "signal path", trusting that the
>> connections will be efficiently managed for me.  In other words, I'd
>> like to spend a little less time being a fairly incompetent engineer,
>> and more time being a halfway-decent artist.  I'm finding that my list
>> of options is surprisingly small
>> SuperCollider -- GPL licence, would require that I open-source my app
>> ChucK -- GPL license, would require that I open-source my app
>> CSound -- the FAQ indicates that I need to make arrangements with MIT
>> to put it to commercial use. Worth looking in to, perhaps.
>> JSyn -- java, not gonna work on iOS
>> MusicKit -- looks very interesting, but doesn't seem to be a very
>> active project, and I don't think anyone has gotten it running on iOS
>> yet
>> Pure Data -- seems like my best option. more permissive license, but
>> I'm wary of the visual programming paradigm, and have at least one
>> technical detail which is making me a bit uncomfortable
>>
>> Am I missing something? Is there anything -- free, or not, which I
>> should look at for iOS development besides Pure Data? Are there not
>> hundreds of other people with the same needs that I have? Are my
>> options really limited to: Pure Data or rolling my own, or
>> open-sourcing my app?
>> I sincerely appreciate any info or thoughts any of you are able to
>> share with me.
>> thanks,
>> -Morgan
>> --
>> ================================
>> Web:
>> http://www.morganpackard.com
>> Music/Art:
>> Latest album: Moment Again Elsewhere
>> iOS app Thicket available on iTunes store.
>> ================================
>>
>>
>>
>> --
>> ================================
>> Web:
>> http://www.morganpackard.com
>> Music/Art:
>> Latest album: Moment Again Elsewhere
>> iOS app Thicket available on iTunes store.
>> ================================
>> --
>> dupswapdrop -- the music-dsp mailing list and website:
>> subscription info, FAQ, source code archive, list archive, book reviews, dsp 
>> links
>> http://music.columbia.edu/cmc/music-dsp
>> http://music.columbia.edu/mailman/listinfo/music-dsp
>
> --
> dupswapdrop -- the music-dsp mailing list and website:
> subscription info, FAQ, source code archive, list archive, book reviews, dsp 
> links
> http://music.columbia.edu/cmc/music-dsp
> http://music.columbia.edu/mailman/listinfo/music-dsp
>



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com
--
dupswapdrop -- the music-dsp mailing list and website:
subscription info, FAQ, source code archive, list archive, book reviews, dsp 
links
http://music.columbia.edu/cmc/music-dsp
http://music.columbia.edu/mailman/listinfo/music-dsp

Reply via email to