WTF is Envelope?

Music Programming 101

Krisnamughni
6 min readMay 27, 2023

In short, Envelope in sound/audio/signal/or what ever you call. Is referring to the amplitude characteristics of a wave over time. but in this context I will use the term “sound” in music hehe.

Music is a universal language that transcends barriers, connecting people across cultures and generations. But have you ever wondered what lies beneath the enchanting melodies and captivating beats? In this article, we will embark on a journey into the realms of science and programming to unravel the magic of music, even if you’re not versed in music theory, math, or science.

Envelope basic

The shape of a wave’s envelope plays a crucial role in defining the distinct characteristics of a sound and greatly impacts our perception and interpretation of it. In general, this is divided into 3 lines.

Signal Envelope

https://en.wikipedia.org/wiki/File:ADSR_parameter.svg

The envelope of a signal can be commonly measured in four ways which it outlines the distinct phases that a sound goes through. ADSR: including the initial Attack (when the sound begins), the Decay (the decrease in amplitude after the attack), the Sustain (the level at which the sound is maintained), and the Release (the sound’s fade-out). The signal envelope provides vital information about the overall shape, texture, and emotional impact of a sound, allowing us to perceive and interpret it in unique ways.

  1. Attack: The attack phase represents the initial onset of a sound. It refers to the time it takes for the sound to reach its maximum amplitude after it is triggered. For example, when you strike a piano key, the attack phase is the brief moment it takes for the sound to rise to its full volume. The attack can range from instantaneous (such as a percussion sound) to gradual (such as a bowed string instrument).
  2. Decay: After the attack, the sound enters the decay phase, where the amplitude gradually decreases from its peak level. The decay rate determines how quickly or slowly the sound fades. For instance, when you release a piano key, the sound starts to decrease in volume as it enters the decay phase. The decay phase can be short, resulting in a percussive sound, or longer, creating a sustained sound with a gradual fade.
  3. Sustain: Once the decay phase reaches a certain level, the sound enters the sustain phase. In this phase, the amplitude remains constant at a sustained level for as long as the sound is held. For example, when you hold a guitar string, the sound that lingers is in the sustain phase. The sustain phase allows for the duration of the sound, and its level can be adjusted to create different musical effects.
  4. Release: When the sound is released or the input signal ends, it enters the release phase. This phase represents the gradual decrease in amplitude from the sustain level to silence. It determines how long it takes for the sound to fade out completely. In the case of a piano, the release phase is when you let go of the key, and the sound fades away gradually. The release phase can be short or extended, depending on the desired effect.

Together, the ADSR stages shape the overall contour of a sound, influencing its perceived loudness, timbre, and emotional character. By manipulating the parameters of each stage, sound designers, synthesizer programmers, and music producers can create a wide range of expressive sounds, from sharp staccatos to sustained pads and everything in between. The ADSR model provides a powerful tool for controlling and sculpting the envelope of a sound, allowing for endless creative possibilities in music production and synthesis.

Differing Sounds

Differing sounds possess unique qualities because every sound is different. Just as each individual has their own characteristics and traits, every sound is shaped by various elements such as the source, the medium through which it travels, and the environment in which it is heard.

https://www.kidscanpress.com/product/sounds-all-around/

These factors contribute to the diverse range of sounds we encounter in our daily lives. Whether it’s the gentle rustle of leaves, the explosive crack of thunder, or the soothing melody of a piano, the inherent differences in sound arise from the intricate interplay of physical properties and environmental variables. Each sound carries its own signature, making our auditory experiences rich and diverse.

In instrument music, the different sounds produced by various instruments are a result of their unique characteristics and construction. Each instrument has its own distinct shape, size, materials, and playing technique, which directly influence the sound it produces.

https://www.classicfm.com/events/oscars/nominated-film-scores-2023/

For example, let’s consider the violin and the trumpet. The violin is a string instrument played with a bow. The sound is created by the vibrations of the strings as they are bowed, which resonate through the instrument’s hollow wooden body. The shape and thickness of the strings, the tension applied to them, and the resonance of the wooden body all contribute to the violin’s warm and expressive sound.

On the other hand, the trumpet is a brass instrument played by buzzing the lips into a mouthpiece. The sound is produced when the air from the player’s lips creates vibrations that travel through the trumpet’s tubing. The length and shape of the tubing, along with the player’s embouchure and breath control, influence the trumpet’s bright and powerful sound.

https://designbyiconica.com/what-causes-different-timbres-quora-uu-79018366

These differences in construction and playing technique result in distinct timbres or tonal qualities for each instrument. Timbre refers to the unique characteristics of a sound that allow us to differentiate between different instruments, even when playing the same pitch or note. This is why we can easily distinguish between a violin and a trumpet, or any other combination of instruments in an ensemble.

Hearing Envelopes

Hearing envelopes refer to the perception of sound over time and the way our ears and brain process the dynamic changes in a sound’s amplitude, When we listen to a sound, our auditory system captures and analyzes the fluctuations in air pressure that reach our ears. These pressure changes are transformed into electrical signals that are then sent to the brain for interpretation. The hearing envelopes play a crucial role in shaping our perception and understanding of the sound. read more : [WTF is Soundscapes?]

Programming the envolve

ADSR programming allows musicians and producers to shape the characteristics of a sound by controlling its envelope. By manipulating the attack, decay, sustain, and release parameters, they can create a wide range of sonic textures and shapes, adding depth and emotion to their compositions.

https://www.edmprod.com/adsr-envelopes/

For example, Let’s consider a hypothetical scenario where you’re programming a synthesizer to create a piano sound. By adjusting the ADSR parameters, you can mimic the unique characteristics of a piano keypress. A fast attack would simulate the immediate striking of the key, a short decay would mimic the natural decay of a piano string, a long sustain would allow the note to continue as long as the key is pressed, and a gentle release would emulate the gradual fading of the note when the key is released.

--

--

Krisnamughni
Krisnamughni

Written by Krisnamughni

Most of the time, we see only what we want to see, or what others tell us to see, instead of really investigate to see what is really there.

No responses yet