To create a richly textured, bell- or chime-like sound using additive synthesis.
The opcode I chose for this experiment was
First, some old business: as of this writing (7-March-2009), the
adsyn opcode is still broken (note this is 'adsyn', without the 't'). I first brought this up 11 months ago. Even on a brand new 5.10.1 build and install,
adsyn still produces only noise, exactly as I described in that earlier article.
Sort of makes the
hetro utility useless, for now.
Anyway, my experiment focused on the broken opcode's next door neighbor,
adsynt. My idea was to generate a sound using (almost) inharmonic partials -- actually, based on the perfect fifth (3/2) octave ratio, according to the following formula:
partial freq = (3/2)^(n/2)
That is, for each partial n (starting at zero), the even overtones will be related to the 3:2 harmonic. The odd will be related as well, but in a more-or-less inharmonic way.
The trick is to get the sound to change as it moves through time. This is done by rolling down the level of the higher partials according to a formula. Originally, the higher partials fall off at a rate of 1/(n+1); in the final stages of the decay, they are falling off by 1/(n+1)^5.
I also added a bit of exponential decay, modeling the physics of a bell or chime. Overall, the higher frequencies fall off quickly, while the lower ones resonate longer. Just for that extra bit of texture, I put a slight vibrato on the individual partials (all of them go at different vibrato rates and phases -- the higher, the faster the vibrato).
Part of the trick here is to 'play' the instrument in the Csound score file by altering 1.) how hard the chime is hit (I used dBfs) and 2.) how many partials are included in the instrument. As a general rule, I made it so that harder hits correspond to more partials.
There is a lot of possibility in this instrument, and instruments like it. For one, instead of manually programming in the relation between number of partials and strength of the hit, it seems logical there could be a way to implement it as
n = g(s,f)
where n is the number partials, s is the strength of the hit, and f is the frequency of the note (presumably higher notes would have less of the higher partials as well). The function 'g' would also have to return an integer (n is the index for a table, so decimal values make no sense).
*EDIT* Not quite sure how, but the attached file got lost somewhere between 'submit' and now. I've replaced it.