CSound and Houdini-Example #1
The Floating Sphere


Audio file (example_1.1.aiff) - 2.5 MB
Audio file (example_1.2.aiff) - 2.5 MB
QT Movie
(ex1.1.mov) - 5MB (Cinepack)
QT Movie (ex1.2.mov) - 5MB (Cinepack)

This first example is to simply map the animation channels to a few CSound score p-fields, a very simple demonstration of how to control oscillators, filters, and their control parameters of a CSound composition with channel data from Houdini.

The animation is simple, a single "floating" sphere who's translation channels, TX, TY and TZ are controlling pan, skip time, and volume respectively. The CSound orchestra for this example is simply a single "soundin" CSound opcode to read an audio file, the skip time of the sample is altered by TY of the sphere. The channels to translate the sphere are being generated by 3 simple Wave CHOPs and exported to the sphere's Xform SOP in it's SOP chain.

Here's the CHOP editor for this first example; the channel data of the sphere's translation are "fetched"" with a Fetch CHOP, then normalized to a range of 0-1 with a Math CHOP, merging the channels with a Merge CHOP, then finally piped into the CSound score generator's first input. The third input (event trigger) of the CSound score generator is connected to a Wave CHOP to generate periodic score/note events. There is also an include file being inserted into the score for reverb (he second input, instrument select, to the score generator is not used in this example).

This is the "pseudo code" for the CSound instrument, using VOP/CHOP operators (these operators are still in R&D and are included here as examples)

This next example demonstrates a slightly more complicated example of a CSound instrument and using other attributes, namely the opacity and color of the floating sphere to control parameters for an FM synthesis opcode. The sphere's TX and TZ data are again applied to pan and volume respectively. In addition the RZ data is used to modulate the LFO, RY modules the reverb send and RX modulates the mount of signal sent to the "comb" delay.

And here is the "pseudo code" for the instrument, using VOP/CHOP operators (these operators are still in R&D and are included here as examples)

 

[ CSound-Houdini Home ]