[{"data":1,"prerenderedAt":663},["ShallowReactive",2],{"page:\u002Flearn\u002Fenvelopes-and-vcas":3},{"id":4,"title":5,"article":6,"body":7,"description":655,"extension":656,"meta":657,"navigation":6,"path":658,"seo":659,"seoTitle":660,"stem":661,"__hash__":662},"pages\u002Flearn\u002Fenvelopes-and-vcas.md","Envelopes & VCAs: how notes start and stop",true,{"type":8,"value":9,"toc":641},"minimark",[10,14,29,52,57,64,83,93,100,104,115,204,211,215,226,253,262,306,311,314,381,384,388,400,404,411,422,477,481,501,511,580,591,595],[11,12,5],"h1",{"id":13},"envelopes-vcas-how-notes-start-and-stop",[15,16,17,18,23,24,28],"p",{},"In the ",[19,20,22],"a",{"href":21},"\u002Flearn\u002Foscillators","oscillators guide"," we found out that an oscillator never stops. It just hums, forever. So how does a synth play ",[25,26,27],"em",{},"notes",", with a beginning and an end? And why do some notes snap in like a pluck while others swell in slowly like strings?",[15,30,31,32,36,37,40,41,36,44,47,48,51],{},"The answer is a little team of three: a ",[33,34,35],"strong",{},"gate"," that says ",[25,38,39],{},"when",", an ",[33,42,43],{},"envelope",[25,45,46],{},"how",", and a ",[33,49,50],{},"VCA"," that does the actual turning up and down.",[53,54,56],"h2",{"id":55},"the-vca-a-volume-knob-that-listens","The VCA: a volume knob that listens",[15,58,59,60,63],{},"A ",[19,61,50],{"href":62},"\u002Fmodules\u002Fvca"," (voltage-controlled amplifier) is a volume control, but instead of you turning it, a signal does.",[15,65,66,67,70,71,74,75,79,80,82],{},"On a hardware modular, every cable carries a voltage that changes over time. Some of those voltages wiggle hundreds of times a second, and you hear them: that's audio. Others move slowly, or just jump between off and on, and you don't hear them directly. You hear what they ",[25,68,69],{},"do",", because they're turning a knob for you. Those are called ",[33,72,73],{},"control voltage",", or ",[19,76,78],{"href":77},"\u002Flearn\u002Fglossary#cv","CV"," for short, and a jack labelled ",[33,81,78],{}," is a place to plug one in. Kables works the same way, with numbers instead of volts.",[15,84,85,86,89,90,92],{},"So a VCA has two inputs. Sound goes into its ",[33,87,88],{},"IN",", and its ",[33,91,78],{}," input decides how much of that sound gets through: 0 is silence and 1 is full volume. Nothing on the CV? Then the door stays shut and you hear nothing.",[15,94,95,96,99],{},"That's why \"I patched everything and there's no sound\" is so often a VCA with nothing opening it. The VCA's ",[33,97,98],{},"Bias"," knob opens it a little on its own, which is handy for a drone, but most of the time you want something to open and close it for each note.",[53,101,103],{"id":102},"the-gate-the-simplest-when","The gate: the simplest \"when\"",[15,105,106,107,111,112,114],{},"When you hold a key, the ",[19,108,110],{"href":109},"\u002Fmodules\u002Fkeys","Keyboard"," sends a ",[33,113,35],{},": 1 while the key is down, 0 when you let go. Patch that straight into the VCA's CV and the door swings fully open while you hold a key, and slams shut when you release it.",[116,117,121,124],"try-it",{"lesson":118,"title":119,":unpatched":120},"01-your-first-note","Open the door with a gate","true",[15,122,123],{},"The Keyboard, a VCO, a VCA and the Output are on the rack, with no cables yet. Wire them up yourself:",[125,126,127,159,172,185,192],"ol",{},[128,129,130,131,134,135,137,138,140,141,144,145,148,149,154,155],"li",{},"Patch the VCO's ",[33,132,133],{},"OUT"," into the VCA's ",[33,136,88],{},", then the VCA's ",[33,139,133],{}," into the Output's ",[33,142,143],{},"MONO",". Play ",[33,146,147],{},"A S D F",": silence. The sound reaches the VCA, but nothing is opening the door. ",[150,151],"wire",{"from":152,"to":153},"vco.out","vca.in"," ",[150,156],{"from":157,"to":158},"vca.out","out.in",[128,160,161,162,134,165,167,168],{},"Patch the Keyboard's ",[33,163,164],{},"GATE",[33,166,78],{},". Now each key opens the door while you hold it. Every key plays the same note, though. ",[150,169],{"from":170,"to":171},"keys.gate","vca.cv",[128,173,161,174,177,178,180,181],{},[33,175,176],{},"V\u002FOCT"," into the VCO's ",[33,179,176],{},". Now each key plays its own note. ",[150,182],{"from":183,"to":184},"keys.pitch","vco.pitch",[128,186,187,188],{},"Play a few notes and listen closely to the start and end of each one. Hear a little click? ",[189,190],"play",{"times":191},"3",[128,193,194,195,197,198],{},"Turn the VCA's ",[33,196,98],{}," all the way up. The door is now held open whatever the gate says, and the oscillator drones on forever. Turn it back down before you move on. ",[199,200],"knob",{"module":201,"param":202,"above":203},"vca","bias","0.9",[15,205,206,207,210],{},"That click is the clue. The gate jumps from 0 to 1 ",[25,208,209],{},"instantly",", so the volume does too, and an instant jump in volume sounds like a click. Real instruments never do that: even the fastest drum hit takes a moment to arrive and a while to die away. We need a smoother shape.",[53,212,214],{"id":213},"the-envelope-a-shape-for-every-note","The envelope: a shape for every note",[15,216,217,218,221,222,225],{},"An ",[19,219,43],{"href":220},"\u002Fmodules\u002Fadsr"," listens to the gate and draws a smooth curve each time a note is played. The classic one has four stages, which give it its name, ",[33,223,224],{},"ADSR",":",[227,228,229,235,241,247],"ul",{},[128,230,231,234],{},[33,232,233],{},"A","ttack: how long it takes to rise when the key goes down.",[128,236,237,240],{},[33,238,239],{},"D","ecay: how long it takes to fall from the peak…",[128,242,243,246],{},[33,244,245],{},"S","ustain: …to the level it holds while you keep the key down.",[128,248,249,252],{},[33,250,251],{},"R","elease: how long it takes to fade to nothing after you let go.",[15,254,255,256,258,259,261],{},"Patch the envelope between the gate and the VCA (Keyboard ",[33,257,164],{}," → ADSR → VCA ",[33,260,78],{},") and the VCA now follows the curve instead of the on\u002Foff gate. The click is gone, and you can shape every note.",[116,263,266,269],{"lesson":264,"title":265},"02-envelopes","Shape a note",[15,267,268],{},"Watch the graph on the ADSR change as you turn its knobs, and play a key after each change:",[227,270,271,281,297],{},[128,272,273,275,276],{},[33,274,233],{}," around 1 second: the note swells in slowly, like a pad or bowed strings. ",[199,277],{"module":278,"param":279,"above":280},"adsr","attack","0.7",[128,282,283,285,286,288,289,154,293],{},[33,284,245],{}," all the way down and ",[33,287,239],{}," around 200 ms: a short pluck, gone even while you hold the key. ",[199,290],{"module":278,"param":291,"below":292},"sustain","0.05",[199,294],{"module":278,"param":295,"below":296},"decay","0.35",[128,298,299,301,302],{},[33,300,251],{}," up to 3 seconds: notes ring on after you let go. ",[199,303],{"module":278,"param":304,"above":305},"release","2.5",[307,308,310],"h3",{"id":309},"why-four-stages-are-enough","Why four stages are enough",[15,312,313],{},"Think of real instruments and their shapes:",[315,316,317,333],"table",{},[318,319,320],"thead",{},[321,322,323,327,330],"tr",{},[324,325,326],"th",{},"Sounds like",[324,328,329],{},"Shape",[324,331,332],{},"Try",[334,335,336,348,359,370],"tbody",{},[321,337,338,342,345],{},[339,340,341],"td",{},"Plucked string, piano, drum",[339,343,344],{},"Instant start, dies away even if you hold on",[339,346,347],{},"Fast A, medium D, S at 0",[321,349,350,353,356],{},[339,351,352],{},"Organ",[339,354,355],{},"On while held, off when released",[339,357,358],{},"Fast A, S full, fast R",[321,360,361,364,367],{},[339,362,363],{},"Strings, pads",[339,365,366],{},"Swells in, swells out",[339,368,369],{},"Slow A, S high, slow R",[321,371,372,375,378],{},[339,373,374],{},"Brass",[339,376,377],{},"Quick swell with a little bump at the start",[339,379,380],{},"Short A, short D, S a bit below the top",[15,382,383],{},"Almost every instrument fits one of those, which is why ADSR has been the standard synth envelope for decades.",[307,385,387],{"id":386},"an-envelope-is-just-a-signal","An envelope is just a signal",[15,389,390,391,395,396,399],{},"The envelope's output is an ordinary signal, so it doesn't have to go to a VCA. Patch it into a filter and each note gets brighter then darker (",[19,392,394],{"href":393},"\u002Flearn\u002Ffilters","filters guide","). Patch it into an oscillator's pitch and each note swoops. And the envelope also has an ",[33,397,398],{},"INV"," output: the same shape, upside down.",[53,401,403],{"id":402},"low-pass-gates-a-vca-and-a-filter-in-one","Low-pass gates: a VCA and a filter in one",[15,405,406,407,410],{},"Hit a piece of wood or a marimba bar and the sound doesn't just get quieter as it fades, it also gets ",[25,408,409],{},"darker",". The bright, clicky part dies first and the warm low part lasts longer. An ordinary VCA can't do that, because it only changes the volume.",[15,412,59,413,417,418,421],{},[19,414,416],{"href":415},"\u002Fmodules\u002Flpg","Low-Pass Gate"," is a filter and a VCA that open and close ",[25,419,420],{},"together",". Strike it with a trigger and it opens bright and loud, then closes into dark and quiet. It even closes fast at first and slowly at the end, just like a real object, which is why it sounds so natural with no envelope at all.",[116,423,426,433],{"lesson":424,"title":425},"19-low-pass-gate-plucky-notes","Strike some wood",[15,427,428,429,432],{},"A sequencer's ",[33,430,431],{},"TRIG"," strikes the gate on every note.",[227,434,435,446,456],{},[128,436,437,438,441,442],{},"Turn the Low-Pass Gate's ",[33,439,440],{},"Decay",": around 2 s sounds like a marimba; around 0.1 s, a bongo. ",[443,444],"turn",{"module":445,"param":295},"lpg",[128,447,448,449,451,452],{},"Switch its mode to ",[33,450,50],{},": now it only changes volume. Hear what the filter was adding? ",[199,453],{"module":445,"param":454,"is":455},"mode","2",[128,457,458,459,462,463,466,467,469,470,154,473],{},"Switch back to ",[33,460,461],{},"BOTH",", then turn up its ",[33,464,465],{},"Res",": a woody \"bonk\" at the start. (Res belongs to the filter half, so in ",[33,468,50],{}," mode it does nothing.) ",[199,471],{"module":445,"param":454,"is":472},"0",[199,474],{"module":445,"param":475,"above":476},"res","0.6",[53,478,480],{"id":479},"slew-shaping-the-moves-between-notes","Slew: shaping the moves between notes",[15,482,483,484,488,489,492,493,496,497,500],{},"Envelopes shape a note's volume over time. A ",[19,485,487],{"href":486},"\u002Fmodules\u002Fslew","Slew"," shapes something else: how fast ",[25,490,491],{},"any"," signal is allowed to change. Put it between a keyboard's pitch and an oscillator, and instead of jumping from note to note, the pitch slides. That slide is called ",[33,494,495],{},"portamento"," or ",[33,498,499],{},"glide",".",[15,502,503,506,507,510],{},[33,504,505],{},"Rise"," sets how slowly it climbs, ",[33,508,509],{},"Fall"," how slowly it drops, so you can make notes scoop up gently but fall instantly.",[116,512,515,518],{"lesson":264,"title":513,"add":514},"Glide between notes","slew",[15,516,517],{},"This is the envelope patch from earlier, with a Slew waiting next to the Keyboard.",[125,519,520,532,555,564],{},[128,521,522,523,525,526,529,530],{},"Play ",[33,524,233],{}," then ",[33,527,528],{},"K",". The pitch jumps straight from one note to the other. ",[189,531],{"times":455},[128,533,534,535,537,538,540,541,177,543,545,546,154,549,154,552],{},"Put the Slew in the pitch's path: patch the Keyboard's ",[33,536,176],{}," into the Slew's ",[33,539,88],{},", and the Slew's ",[33,542,133],{},[33,544,176],{},", in place of the Keyboard's cable. ",[150,547],{"from":183,"to":548},"slew.in",[150,550],{"from":551,"to":184},"slew.out",[553,554],"unplug",{"from":183,"to":184},[128,556,522,557,525,559,561,562],{},[33,558,233],{},[33,560,528],{}," again: now the pitch slides between them. ",[189,563],{"times":455},[128,565,566,567,569,570,572,573,154,577],{},"Set a slow ",[33,568,505],{}," and a fast ",[33,571,509],{},": notes scoop up but drop straight away. ",[199,574],{"module":514,"param":575,"above":576},"rise","0.5",[199,578],{"module":514,"param":579,"below":292},"fall",[15,581,582,583,585,586,590],{},"A slew works on ",[25,584,491],{}," signal, not just pitch. ",[19,587,589],{"href":588},"\u002Fplay?lesson=23-slew-glide-anything","Lesson 23"," uses a second one to smooth random steps into a gentle wander on a filter; it makes more sense once you've met the clock and the Sample & Hold in later guides.",[53,592,594],{"id":593},"what-to-remember","What to remember",[227,596,597,602,610,627,630,636],{},[128,598,59,599,601],{},[33,600,50],{}," is a volume control that a signal turns. With nothing on its CV, it stays shut.",[128,603,59,604,606,607,609],{},[33,605,35],{}," says ",[25,608,39],{}," a note is held: 1 while the key is down, 0 after.",[128,611,217,612,614,615,617,618,620,621,623,624,626],{},[33,613,43],{}," turns the gate into a smooth shape: ",[33,616,233],{},"ttack, ",[33,619,239],{},"ecay, ",[33,622,245],{},"ustain, ",[33,625,251],{},"elease.",[128,628,629],{},"Gate → envelope → VCA is the standard way to play notes. Change the envelope and you change the instrument.",[128,631,59,632,635],{},[33,633,634],{},"low-pass gate"," closes volume and brightness together, like a real struck object.",[128,637,59,638,640],{},[33,639,514],{}," turns jumps into slides.",{"title":642,"searchDepth":643,"depth":643,"links":644},"",2,[645,646,647,652,653,654],{"id":55,"depth":643,"text":56},{"id":102,"depth":643,"text":103},{"id":213,"depth":643,"text":214,"children":648},[649,651],{"id":309,"depth":650,"text":310},3,{"id":386,"depth":650,"text":387},{"id":402,"depth":643,"text":403},{"id":479,"depth":643,"text":480},{"id":593,"depth":643,"text":594},"Why an oscillator drones forever, and how a gate, an ADSR envelope and a VCA turn it into notes, plucks and slow swells. Plus low-pass gates and slew, with hands-on patches.","md",{},"\u002Flearn\u002Fenvelopes-and-vcas",{"title":5,"description":655},"How envelopes and VCAs work — ADSR, gates and VCAs explained for beginners","learn\u002Fenvelopes-and-vcas","7xtbxBHLjmjHklvoO6OXehSsyfqZ5hq6xkdlwzFe9r4",1792599837967]