2
$\begingroup$

Impetus: I'm currently working on my first synthesizer, after many years of playing with them. I've just added an ADSR envelope to modify the gain, but for some reason it sounds wrong to me. I've asked around forums whether or not I'm supposed to apply the envelope to the amplitude linearly, and it would appear that's the normal way to do it. So my guess here is that experience with acoustic instruments has conditioned me to hear drop off differently. In order to prove/disprove this theory, I would like an answer to the following...

Question: What is the (approximate) function for amplitude of a plucked string over time? Is it linear, or curved? And, if it's curved, is that curvature a product of the material, tension, or other variables?

Detailed Explanation: In this context, what I mean by "function for amplitude" is the value by which a simple wave would be multiplied over time to create a reasonably approximate rate of fade out. I do realize the actual function of amplitude is probably a very complex physics problem, and while I think it would be interesting to cite some sources in that vein, it is not my intention to create a true to physics simulation of a string.

$\endgroup$
7
$\begingroup$

An exponentially decaying envelope $a\exp(-b x)$ is a good choice, and is used for example in vintage Yamaha FM synthesizers. It has the favorable property that over any constant length time interval, by the end of the interval the envelope has decayed to a constant fraction of what it was at the beginning of the interval. Damped oscillation (with some frequency-dependent energy loss) of a string is largely sinusoidal after enough time has passed, and if the oscillation is small enough that the system can be considered linear, then the amplitude loss per time unit will be proportional to the amplitude, giving an exponentially decaying envelope. Closer to the attack these assumptions do not hold.

In the simple exponential decay model, the choice of material could only manifest itself in the decay rate constant $b.$ If it would affect also $a,$ the player could adjust the plucking strength to compensate, nullifying this effect.

This will be very hand-wavy, but for small amplitudes (no non-linearities), the energy loss to the air depends on the acoustic impendance matching between the string, the instrument body, and the air. The acoustic impedance of air is $1.2 \text{ kg}/\text{m}^3 \times 344\text{ m}/\text{s},$ which is the product of the density and speed of sound. In solid materials both of these numbers are typically higher, and transmission of the vibration to the air, from a material of higher density and/or with a higher speed of sound, will require more reflections and will take more time compared to a material for which the figures are smaller. Here both the string and the instrument body are going to affect the outcome. The instrument body may also provide acoustic impedance conversion mechanically, so it's not all about materials.

Exponential decay of the amplitude is linear decay in dB scale.

$\endgroup$
  • $\begingroup$ Do you have any generalizations about the effects of materials on the decay rate b? Just curious, great answer btw. $\endgroup$ – Seph Reed Dec 16 '18 at 21:56
  • $\begingroup$ It is not strictly true that the decay will be exponential if the oscillation is small enough to be linear, because the envelope will contain all the different vibrational modes, and each mode has its own decay constant. You can see this if you plot the envelope on a log scale, and the effect is not limited just to near the attack. $\endgroup$ – Dietrich Epp Dec 17 '18 at 2:47
  • $\begingroup$ @DietrichEpp Thanks for explaining that. My logic is that only one of the modes will survive after all the others have died out, and from that point on the vibration will be sinusoidal and the decay exponential. It is true that it will take a long time for this to happen, possibly long enough that the phenomenon will be obscured by environmental/microphone noise. $\endgroup$ – Olli Niemitalo Dec 17 '18 at 7:01
3
$\begingroup$

To a first approximation, a plucked string has an exponential decay, so your envelope will look like $$x(t) = a \exp -bt.$$

The physical explanation for this is simple: when you pluck the string, you put a certain amount of energy into the system. Over time, energy is lost. At any given time, the amount of energy lost is proportional to the amount of energy in the system. When you turn this into differential equations and solve them, you get an exponential decay. Choosing different materials will change the decay constant.

However, if you actually plot the envelope of a string's decay, you will see a more complicated picture. Here is the decay envelope of a piano sample that I plotted (Y axis is dB, X axis spans 16 seconds):

Decay envelope of piano

You can hold up a ruler to the screen, or the edge of your cell phone. You'll notice that there are some sections of the graph that kind of look linear:

Decay envelope of piano with linear segments

(Yes, you can try to approximate nearly any function with a piecewise linear one. But it actually makes sense here!)

The different linear segments are caused by different vibrational modes in the string. Think of a mode as a particular way that a string can vibrate. When you pluck or hit a string, the total vibration of the string is made up of all the different vibrational modes, added together. Some modes are harmonics of the fundamental frequency, but other modes are just different types of waves. A string will vibrate with transverse waves (in two different directions), longitudinal waves, and torsional waves. Each of these different vibrational modes have different decay constants.

The initial energy you put into a string is distributed between these different vibrational modes. However, due to the particular physics of the string, each of these modes will decay differently, and the energy will transfer from one mode to another.

If a particlar mode has a short decay time, then it will make the overall envelope steep at the beginning. If a mode has a long decay time, it will make the overall envelope shallow and long at the end. So, to make a more physically accurate envelope, you mix a steeper decay at the beginning with a longer decay at the end. The more accurate envelope will look something like, $$x(t) = \sum_{i=1}^N a_i \exp -b_i t$$

If you are not attempting to create a “true to physics” simulation of a string, this is where I might stop, but the decision of where to stop is somewhat arbitrary. There are a wide array of physical modeling synthesis techniques if you are interested in the subject. Karplus-Strong string synthesis is a fairly simple technique that gives good-sounding plucked string sounds, and many other techniques build on it by considering additional vibrational modes or adding nonlinearities to the system.

For more in-depth readings on the subject, I like the readings by Julius Orion Smith III at CCRMA.

$\endgroup$
  • $\begingroup$ Wow! This is a really amazing answer. You mentioned that the line segments are modes. How might a string with more or less modes sound? Is it twangy-er with more modes? Or are the modes more a factor of how it's played? (like piano hammer -> 3 strings transferring energy -> 3 in tune strings fading -> body and other strings sync) or (bow scraping violin string -> string removing chaos from scrape -> body and string syncing) $\endgroup$ – Seph Reed Dec 17 '18 at 16:46
  • $\begingroup$ @SephReed: I'm not sure how more modes would sound in general, but one of the ways you do get more modes is by having more strings. Because the strings will not be perfectly in tune with each other, you will get "beating" as they go in and out of phase with each other. I would describe this as sounding thicker or richer. For a piano, the low notes usually have one string, the middle notes two strings, and the high notes have three. You can hear the (sudden) differences as you go up or down the piano, although the piano will also switch between wound and unwound strings at some point. $\endgroup$ – Dietrich Epp Dec 17 '18 at 17:46
  • $\begingroup$ Hmmmm... so, on the modes scale, there might be a Sitar on one end and perhaps a harp on the other. Perhaps smearing is an applicable term. I'll see if I can't look out for this effect as I hear instruments. Thanks again. $\endgroup$ – Seph Reed Dec 17 '18 at 21:10
1
$\begingroup$

I found a way to answer my own question. By looking at various .wav's of samples of string plucks (https://freesound.org/search/?q=guitar+string), it would appear that amplitude drop off is not linear, which would explain why my adsr release sounds so wrong!

I still can't tell if a harder string would make this curve sharper or more linear, but my guess is sharper. In terms of what I can hear/see, it's very hard to tell the difference between a sharper curve and a shorter release time.

Still, to answer two parts of my own question:

  1. The approximate curve appears to be in the range of reciprocal functions (ie 1/(x+1) or 1/(2^x))
  2. It is not linear
  3. I have yet to answer this question, but my theory is that the curvature is fairly similar amongst materials, else there would be a material with something close to a linear drop off and it wouldn't sound so unnatural.
$\endgroup$
  • 1
    $\begingroup$ Note that $1/2^x = 2^{-x} = \exp(-bx),$ with $b = \ln(2)$, is exponential decay. $\endgroup$ – Olli Niemitalo Dec 16 '18 at 21:00

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.