[racket] Small Racket-embedded dataflow DSP language
On 07/14/2013 09:20 AM, Tom Schouten wrote:
> On 06/27/2013 02:15 PM, John Clements wrote:
>> On Jun 12, 2013, at 9:24 AM, Tom Schouten wrote:
>>
>>> On 05/30/2013 08:21 PM, Tom Schouten wrote:
>>>> On 05/30/2013 05:30 PM, John Clements wrote:
>>>>> On May 30, 2013, at 1:21 PM, Tom Schouten wrote:
>>>>>
>>>>>> Hi List,
>>>>>>
>>>>>> Here's a tiny experimental tool I've been working on the last
>>>>>> couple of months:
>>>>>> http://zwizwa.be/rai/rai.html
>>>>>>
>>>>>> It's mostly aimed at the music DSP world (sound synthesizers and
>>>>>> effects) where feedback structures are very important, but it
>>>>>> could be fairly generic in its use. I tried to stay as close to
>>>>>> Scheme as possible.
>>>>>>
>>>>>> The basic idea is to use Racket as replacement for Matlab, i.e.
>>>>>> to analyze algorithms specified in a high level format, and use
>>>>>> it to generate dependency-free C or ASM code for deeply embedded
>>>>>> targets.
>>>>>>
>>>>>> Currently it can generate binary plugins for Windows VSTi, Pure
>>>>>> Data and Jack Audio.
>>>>> This looks totally awesome. Would you consider making a Racket
>>>>> Package out of this? My fall class could definitely be interested.
>>>>
>>>> Cool :)
>>>>
>>>> Here's the package:
>>>> raco pkg install github://github.com/zwizwa/rai/master
>>>> That will run all the Racket code.
>>>>
>>>> For the C code gen, the Makefile is the best point of entry.
>>>> Currently Linux only, and might need some tweaking.
>>>>
>>> added synth-lib.rkt basic synth kit and synth.rkt example synthesizer.
>>>
>>> - envelopes
>>> - parameter control dezippers
>>> - parameter control scales (exponential, "squashed" exponential, ...)
>>> - SVF filter
>>> - supersaw osc
>>> - anti-aliased saw osc
>>> - saturation functions
>>> - FDN reverb tail
>>>
>>> How I use it at this time, Linux + Pd:
>>>
>>> make sp_host.pd_linux # build binary Pd wrapper
>>> pd sp_test.pd& # run Pd patch built around sp_host
>>> make livecode # continuously compile synth.rkt -> synth.sp binary
>>> module
>>>
>>> then edit synth.rkt or any of its dependencies and the binary code
>>> running in Pd will be updated, leaving state intact if the type
>>> didn't change.
>> Very cool.
>>
>> If only my students weren't all running windows….
>>
>> John
>>
>>
> It already uses mingw on linux for cross compilation so it should work
> pretty much out of the box with mingw on windows.
>
Bare-bones build-mingw.bat to build the VST plugin DLLs using standard
install MinGW / MSYS on Windows:
https://github.com/zwizwa/rai/blob/master/rai/build-mingw.bat
The MSYS deps are only there to support Makefile + shell script + small
unix commands.
I suppose that part could be replaced by a racket script, which might be
also be more useful for building & loading the native code VST plugin
into racket for testing after C code generation.