From: Mathieu Bouchard Date: 2005-03-31T13:07:47+09:00 Subject: Re: FMOD or other sound libraries...anyone? On Tue, 22 Mar 2005, David Plans Casal wrote: > The world's so small. Met you on IRC last saturday ;-) (nick: pland) You're welcome if you want to come back. The next PureData developers meeting is on FreeNode #dataflow on April 1st, UTC 17:00. > Does this mean that Ruby-PD bindings might get deeper (audio buffer > access?), if you have time? Yes, that and making GridFlow's C++ side more accessible from Ruby, which should help getting decent performance for audio processing. However Ruby is a major pain for low-latency audio, as I said previously, and I know people who don't want to run GridFlow because it makes the sound skip because of too-long garbage collection times. > Ah! Ok I understand now. In my case, because of my music background > and the fact I wanted to learn Ruby, I thought it would be great to be > able to -hear- my study of Ruby, if you see what I mean. So, what I > was after was a way to exemplify concepts from the second edition of > the Pickaxe, in sound. I think you can do lots of interesting music programming in Ruby with the current GridFlow if you restrict yourself to event generation. E.g. the Ruby code could handle complex combinations of scales, chords, polyrhythms, while PureData would do the actual signal synthesis. I have an example with GridFlow and audio buffers, but it's rather slow because the audio buffer has to be sent to PureData one number at a time (one per message i mean!). Still I have been able to achieve nice results, such as: http://gridflow.ca/gallery/spectrogram.gif http://gridflow.ca/gallery/photo_pianoroll.pd.gif The first is a spectrogram with a temporal low-pass filter post-processing the video-stream, in such a way that changes appear in reddish and bluish colours while non-changing parts are more black-and-white. The latter is an inverse-spectrogram, that is, synthesising sounds from a picture. Both use the FFT filters built into PureData. > So, see above, but here's a summary : I think Gridflow is an amazing > idea and project (got some osx compilation trouble I'll address > ex-list), and would love to start learning it. GridFlow is not so stable on OSX, and it's very slow on PPC for semi-unknown reasons. > But browsing the pd flow ruby examples in there got me kinda lost. > Firstly because I couldn't run it (compilation), but also because I > didn't quite get how PD would pick Gridflow up and viceversa (other > than -lib) "pd -lib gridflow" picks up gridflow.pd_linux, which starts libruby.so and then gridflow.so. There is a config file ~/.gridflow_startup in which you can put your Ruby scripts because it's being parsed as a Ruby file. > What I'm looking for, I guess, is the ability to play with sampled > sound for now (similar to Cocoa's NSSound, but a bit deeper), in a way > that allows me to explore ruby by ear. So simple sample loading, > playing, buffering, maybe some DSP...perhaps some MIDI (though I see > midilib)...like I said, PDRuby would be of course ideal, but the basics > through pure Ruby and Gridflow would be even better right now, since > I'm a complete n00b to Ruby. There's unfortunately no tutorial or doc for writing PureData classes in Ruby, because I wanted to improve the API, and still haven't got around to finishing that completely. However it's not too hard, you mostly just have to subclass FObject, export the class using self.install(name,inlets,outlets), embed inlet-numbers in methodnames, like def _0_bang(), and use send_out(outletnumber,selector,*args) to send messages. > Well I aim to get to a point where I can do that too. And so, I -will- > need a low-latency, probably C-implemented (like PD) engine behind me, > and I guess I see Ruby as the higher-level, 'thinking' language for > composition, and pedal-making. > My guess is you do too? I'm not very much into audio. 95% of what I do is video. > What can I do to help? I'm studying the Pickaxe now, and I'll download > tarball of Gridflow (tried CVS unsuccessfully) and try on OSX > (10.3.8)...is there a short summary of how to get GF and PD talking > anywhere (other than website docs?) This message (see above). If you have any questions on how do to specific things, just ask. I would recommend joining the gridflow-dev mailing-list: http://ns.artengine.ca/mailman/listinfo/gridflow-dev _____________________________________________________________________ Mathieu Bouchard -=- Montr�al QC Canada -=- http://artengine.ca/matju