Showing posts from April, 2006

lab 62 - software synth csp style

NAME lab 62 - software synth CSP style NOTES This is the next iteration of my software synth code for Inferno. Of particular note is the embrace of CSP style as implementation technique. This was true of the code in lab 60. But this time much more of it actually works and the basic framework, the interfaces, are in place for me to extend it further. I think it makes a nice show case of CSP style programming. I thought my lexis database did too (lab 34) but this code is probably easier and more fun to play with. I want to post this now before I move onto the next phase, which may add a lot more complexity but won't illustrate any better the CSP style of programming in this application. You are encouraged to edit this code to create your own synthesizer, and use that as a way into studying CSP style. This synth comes with a basic GUI. Here is a screen shot. The GUI is bare bones, designed just so that it very easy to add new knobs for the control of filters. (One of the thin

lab 61 - javascript tool

NAME lab 61 javascript tool NOTES In this lab I wanted to get a standalone javascript interpreter for general scripting use within inferno. [Deleted a section on reasons why I'd want to do this based on the mix of languages already available--it's not that interesting and is just me trying to rationalize why I like javascript] There is already a javascript interpreter in inferno as part of the charon web browser. All I'd need to do is add a small set of host objects to interface with the OS. In this lab I haven't included all the host objects I'd want; not even a fraction. This is just the setup, the beginnings of a javascript tool. The only host object I've added is System which contains three functions: getline , print , and readFile . Getline reads a line from stdin and returns it as a string. Print writes a string to stdout. ReadFile reads the in the contents of a file and returns it as a string. Suggestions on what the host objects to add are we

lab 60 - sequencer using channels

NAME lab 60 - sequencer using channels NOTES In the comments to lab 53 Rog suggested using channels to parse buffers between processes in place of the one-sample-at-a-time technique I was using in my earlier DSP attempts. This lab is an attempt at Rog's suggestion. It's one limbo file that acts as a simple sequencer and generates it's own voices. Each instrument should have an interface: f: fn(c: chan of (array of real, chan of array of real), ctl: chan of (int, real)); This function is spawned and control messages are sent on the ctl channel, and the request for samples and the response channel are sent down c . It really requires jit to be turned on to sound acceptable. Here's a sample setup, % bind -a '#A' /dev % echo 1 > /dev/jit % sequencer4 < > /dev/audio Uncomment sequencer.b4:60 to add a little echo to the music. I think I'm getting closer to Rog's ideas, but I'm not sure I'm still