Difference between revisions of "Quick sound synthesis without physical modeling in PD"

From CCRMA Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 
This is a quick tutorial on how to make some pleasant but complex sounding tones for use with either impulses or audio rate signals. Impulses are obviously the most simple of the options, and are still great to use for testing the patch, however if you simply want to use a tone as a signal to signify something in a patch or program, the impulse works well. This method works particularly well for unconventional setups, like using a sensor for audio rate input. This works well with that have a high signal voltage with a quick drop off, like a piezo, or even with sensors that have a relatively constant voltage ouput, such as an IR or hall-effect sensor.  
 
This is a quick tutorial on how to make some pleasant but complex sounding tones for use with either impulses or audio rate signals. Impulses are obviously the most simple of the options, and are still great to use for testing the patch, however if you simply want to use a tone as a signal to signify something in a patch or program, the impulse works well. This method works particularly well for unconventional setups, like using a sensor for audio rate input. This works well with that have a high signal voltage with a quick drop off, like a piezo, or even with sensors that have a relatively constant voltage ouput, such as an IR or hall-effect sensor.  
  
 +
== But why? ==
  
== Headline text ==
+
For most applications using sensor, the standard sonification method is to design some sort of physical modeling (be it string modeling, wind instrument modeling, etc) to create the sound, using the sensor output only to deal with the envelope of the signal or the attack velocity. In that method, the decay, feedback, depth of tonality, etc all to be neatly designed, programmed and routed, which in Pd is no small feat. Along with that, however, our sense of expectation of sound may lead to disappointment if the sound isn't doing what you'd hoped...even if it sounds good! It can be an extremely difficult and time intensive process, which sometimes is worth it, but sometimes, just isn't necessary if it isn't part of the design concept.
 +
 
 +
The goal for this patch is to create a complex, pleasing tone that has natural sounding attack and decay without having to deal with feedback, delay lines, or any other complex process.
 +
 
 +
Thus, for time when you are more concerned about the physical interaction of whatever you have designed, but still want it to sound delightful, this method is quick and dirty, and can sound as pleasant or as raunchy as you'd like.
 +
 
 +
== Basic Concept ==
 +
 
 +
A simple and computationally-light way to produce a delightful tone with natural attack AND decay is to take your input signal (be it from an impulse, such as PD's click~ object, or from the sensor input) and filter it. Any wide-band filter works to come extent- PD's bpf~, vpf~ and moog~ all work out quite well. A combination of high and low pass filters would also work, but it is much more tricky to set the parameters to make it sound pleasing.
 +
 
 +
Although I in general am a fan of the PD's in-house attempt at modeling Moog's ladder filter, it has a few problems for this use. First, it's computationally much more expensive, so utilized the way we plan to here it can bog the system down. Secondly, we are trying to avoid physical models, and while the ladder filter model isn't a physical model, it's got some more background complexity that feels a bit unfair to use. So for this implementation we'll stick with the a good old band-pass filter, the bpf~.
 +
 
 +
The trick here is slightly non-intuitive- normally, when given a frequency-rich signal, you try to keep as much of it as possible to make the sound rich and fulfilling. As it turns out, though, using that method in PD make the sound too muddy, and you don't get a natural decay sound. So instead, we will make the most of the bpf~'s Q parameter, and set the resonance at the band-pass's center frequency extremely, extremely high. When you first hear the numbers, it sounds crazy, but the end result is a very strongly pitched bell-like tone. The higher the value of Q, the sharper the attack and the longer the decay, which gives the sound a delightful sense of realism.
 +
 
 +
For most applications, values for Q might range between 1 and 5, and in more extreme cases could be up to 20. However, on paper, a Q of 20 should produce an extraordinary resonance that is highly directional and uncomfortable. But in this application, the higher Q just helps to sharpen the pitched quality of the impulse or input, sort of like a cymbal. While there are other frequencies going on underneath it, you primarily hear the band-pass' center frequency.
 +
 
 +
Thus, when used in this application, the value of Q will be between 75 and 1600 (!). If a single band-pass filter were being used, a Q of 1200-1600 seems to work best.
 +
 
 +
A simplified version of the signal flow is shown below:

Revision as of 16:52, 24 March 2009

This is a quick tutorial on how to make some pleasant but complex sounding tones for use with either impulses or audio rate signals. Impulses are obviously the most simple of the options, and are still great to use for testing the patch, however if you simply want to use a tone as a signal to signify something in a patch or program, the impulse works well. This method works particularly well for unconventional setups, like using a sensor for audio rate input. This works well with that have a high signal voltage with a quick drop off, like a piezo, or even with sensors that have a relatively constant voltage ouput, such as an IR or hall-effect sensor.

But why?

For most applications using sensor, the standard sonification method is to design some sort of physical modeling (be it string modeling, wind instrument modeling, etc) to create the sound, using the sensor output only to deal with the envelope of the signal or the attack velocity. In that method, the decay, feedback, depth of tonality, etc all to be neatly designed, programmed and routed, which in Pd is no small feat. Along with that, however, our sense of expectation of sound may lead to disappointment if the sound isn't doing what you'd hoped...even if it sounds good! It can be an extremely difficult and time intensive process, which sometimes is worth it, but sometimes, just isn't necessary if it isn't part of the design concept.

The goal for this patch is to create a complex, pleasing tone that has natural sounding attack and decay without having to deal with feedback, delay lines, or any other complex process.

Thus, for time when you are more concerned about the physical interaction of whatever you have designed, but still want it to sound delightful, this method is quick and dirty, and can sound as pleasant or as raunchy as you'd like.

Basic Concept

A simple and computationally-light way to produce a delightful tone with natural attack AND decay is to take your input signal (be it from an impulse, such as PD's click~ object, or from the sensor input) and filter it. Any wide-band filter works to come extent- PD's bpf~, vpf~ and moog~ all work out quite well. A combination of high and low pass filters would also work, but it is much more tricky to set the parameters to make it sound pleasing.

Although I in general am a fan of the PD's in-house attempt at modeling Moog's ladder filter, it has a few problems for this use. First, it's computationally much more expensive, so utilized the way we plan to here it can bog the system down. Secondly, we are trying to avoid physical models, and while the ladder filter model isn't a physical model, it's got some more background complexity that feels a bit unfair to use. So for this implementation we'll stick with the a good old band-pass filter, the bpf~.

The trick here is slightly non-intuitive- normally, when given a frequency-rich signal, you try to keep as much of it as possible to make the sound rich and fulfilling. As it turns out, though, using that method in PD make the sound too muddy, and you don't get a natural decay sound. So instead, we will make the most of the bpf~'s Q parameter, and set the resonance at the band-pass's center frequency extremely, extremely high. When you first hear the numbers, it sounds crazy, but the end result is a very strongly pitched bell-like tone. The higher the value of Q, the sharper the attack and the longer the decay, which gives the sound a delightful sense of realism.

For most applications, values for Q might range between 1 and 5, and in more extreme cases could be up to 20. However, on paper, a Q of 20 should produce an extraordinary resonance that is highly directional and uncomfortable. But in this application, the higher Q just helps to sharpen the pitched quality of the impulse or input, sort of like a cymbal. While there are other frequencies going on underneath it, you primarily hear the band-pass' center frequency.

Thus, when used in this application, the value of Q will be between 75 and 1600 (!). If a single band-pass filter were being used, a Q of 1200-1600 seems to work best.

A simplified version of the signal flow is shown below: