[{"data":1,"prerenderedAt":726},["ShallowReactive",2],{"page:\u002Flearn\u002Frhythm":3},{"id":4,"title":5,"article":6,"body":7,"description":718,"extension":719,"meta":720,"navigation":6,"path":721,"seo":722,"seoTitle":723,"stem":724,"__hash__":725},"pages\u002Flearn\u002Frhythm.md","Rhythm: clocks, gates & sequencers",true,{"type":8,"value":9,"toc":702},"minimark",[10,14,18,23,58,65,71,75,94,177,181,189,200,205,228,337,341,352,388,392,395,418,437,530,543,547,561,591,595,609,643,647,653,657],[11,12,5],"h1",{"id":13},"rhythm-clocks-gates-sequencers",[15,16,17],"p",{},"Until now, every note needed a finger on a key. But a modular synth can play itself, and keep perfect time doing it. All of it comes down to one humble signal: a steady stream of pulses.",[19,20,22],"h2",{"id":21},"the-clock-a-heartbeat-on-a-cable","The clock: a heartbeat on a cable",[15,24,25,26,31,32,36,37,41,42,45,46,49,50,53,54,57],{},"A ",[27,28,30],"a",{"href":29},"\u002Fmodules\u002Fclock","Clock"," sends out pulses at a steady tempo, set by ",[33,34,35],"strong",{},"BPM"," (beats per minute). Its outputs are ordinary ",[27,38,40],{"href":39},"\u002Flearn\u002Fglossary#gate","gates",", jumping from 0 to 1 and back: one fires every sixteenth note (",[33,43,44],{},"1\u002F16","), one every eighth (",[33,47,48],{},"1\u002F8","), one every beat (",[33,51,52],{},"1\u002F4",") and one every ",[33,55,56],{},"BAR",".",[15,59,60,61,64],{},"That's it. There's nothing special about a clock signal, which is the whole point: anything that listens for a gate can be played by a clock. What modules listen for is the ",[33,62,63],{},"rising edge",", the moment the signal jumps from low to high. That moment means \"now\".",[15,66,67,70],{},[33,68,69],{},"Swing"," delays every other sixteenth a little, turning stiff, robotic timing into a shuffle.",[19,72,74],{"id":73},"the-sequencer-a-melody-that-plays-itself","The sequencer: a melody that plays itself",[15,76,25,77,81,82,85,86,89,90,93],{},[27,78,80],{"href":79},"\u002Fmodules\u002Fseq","Step Sequencer"," holds a row of notes. Every pulse into its ",[33,83,84],{},"CLK"," moves it one step along, and it sends out two signals for the current step: ",[33,87,88],{},"V\u002FOCT"," (which note) and ",[33,91,92],{},"GATE"," (play it or not). If those sound familiar, it's because they're exactly what a keyboard sends. A sequencer is just a pair of hands that never get tired.",[95,96,99,107],"try-it",{"lesson":97,"title":98},"07-clock-and-sequencer","Let the machine play",[15,100,101,102,106],{},"This is the same voice as in the ",[27,103,105],{"href":104},"\u002Flearn\u002Ffilters","filters guide",", with a sequencer standing in for your hands.",[108,109,110,122,137,151],"ul",{},[111,112,113,114,119,120],"li",{},"Drag the bars to change notes, and click the lights to mute steps. ",[115,116],"turn",{"module":117,"param":118},"seq","steps"," ",[115,121],{"module":117,"param":40},[111,123,124,125,128,129,119,134],{},"Set ",[33,126,127],{},"Length"," to 5 or 7. The melody now loops in an odd length, so it lands differently against the beat each time. ",[130,131],"knob",{"module":117,"param":132,"above":133},"length","4.5",[130,135],{"module":117,"param":132,"below":136},"7.5",[111,138,139,140,143,144,119,148],{},"Turn ",[33,141,142],{},"Chance"," to 60%: steps randomly drop out, so the line keeps changing. ",[130,145],{"module":117,"param":146,"above":147},"chance","0.5",[130,149],{"module":117,"param":146,"below":150},"0.7",[111,152,153,154,156,157,159,160,162,163,119,168,119,172],{},"Move the cable from the Clock's ",[33,155,48],{}," to ",[33,158,44],{},", then add some ",[33,161,69],{},". ",[164,165],"wire",{"from":166,"to":167},"clock.s16","seq.clock",[169,170],"unplug",{"from":171,"to":167},"clock.s8",[130,173],{"module":174,"param":175,"above":176},"clock","swing","0.05",[19,178,180],{"id":179},"drums-gates-you-can-hear","Drums: gates you can hear",[15,182,183,184,188],{},"The ",[27,185,187],{"href":186},"\u002Fmodules\u002Fdrums","Drum Trio"," has three voices (kick, snare and hat), and each one plays on every rising edge at its input. Any gate works: a clock, a sequencer, even an LFO set to a square wave.",[15,190,191,192,194,195,199],{},"The simplest beat is the Clock's ",[33,193,52],{}," straight into the kick: four on the floor. For the rest, meet the ",[27,196,198],{"href":197},"\u002Fmodules\u002Feuclid","Euclid"," sequencer.",[201,202,204],"h3",{"id":203},"euclidean-rhythms-two-numbers-endless-grooves","Euclidean rhythms: two numbers, endless grooves",[15,206,207,208,211,212,215,216,220,221,162,224,227],{},"Euclid takes two numbers, ",[33,209,210],{},"Steps"," and ",[33,213,214],{},"Hits",", and spreads the hits as evenly as possible over the steps. That one rule turns out a surprising amount of the world's music: 3 hits in 8 steps is the ",[217,218,219],"em",{},"tresillo"," heard all over Latin and pop music; 5 in 8 is the Cuban ",[217,222,223],{},"cinquillo",[33,225,226],{},"Rot"," rotates the pattern so it starts in a different place.",[95,229,233,236,308,311],{"lesson":230,"title":231,":unpatched":232},"08-drums-and-rhythm","A beat from two numbers","true",[15,234,235],{},"A Clock, two Euclids and a Drum Trio, with no cables. Build the beat one drum at a time:",[237,238,239,254,268,282,296],"ol",{},[111,240,241,242,245,246,249,250],{},"Patch the Drum Trio's ",[33,243,244],{},"MIX"," into the Output's ",[33,247,248],{},"MONO",". Silence: nothing is hitting the drums yet. ",[164,251],{"from":252,"to":253},"drums.mix","out.in",[111,255,256,257,259,260,263,264],{},"Patch the Clock's ",[33,258,52],{}," into the Drum Trio's ",[33,261,262],{},"KICK",": four on the floor. ",[164,265],{"from":266,"to":267},"clock.s4","drums.kick",[111,269,256,270,272,273,275,276,119,279],{},[33,271,44],{}," into the ",[33,274,84],{}," of both Euclids, so they step along in sixteenths. ",[164,277],{"from":166,"to":278},"euclid#snEuc.clock",[164,280],{"from":166,"to":281},"euclid#hhEuc.clock",[111,283,284,285,259,288,291,292],{},"The first Euclid is 2 hits in 16 steps, rotated 4. Patch its ",[33,286,287],{},"HIT",[33,289,290],{},"SNR",": that puts the snare on beats 2 and 4. ",[164,293],{"from":294,"to":295},"euclid#snEuc.gate","drums.snare",[111,297,298,299,272,301,162,304],{},"The second is 7 hits in 16: lopsided and groovy. Patch its ",[33,300,287],{},[33,302,303],{},"HAT",[164,305],{"from":306,"to":307},"euclid#hhEuc.gate","drums.hat",[15,309,310],{},"Then play with it:",[108,312,313,328],{},[111,314,315,316,211,318,320,321,119,325],{},"Change the hats' ",[33,317,214],{},[33,319,226],{}," while it plays. ",[115,322],{"module":323,"param":324},"euclid#hhEuc","pulses",[115,326],{"module":323,"param":327},"rotate",[111,329,330,331,333,334],{},"Turn the Clock's ",[33,332,35],{}," up and down. The pattern stays exactly the same, just faster or slower, because every drum is counting the same clock. ",[115,335],{"module":174,"param":336},"bpm",[201,338,340],{"id":339},"the-drum-grid","The drum grid",[15,342,343,344,348,349,351],{},"If you'd rather place every hit yourself, the ",[27,345,347],{"href":346},"\u002Fmodules\u002Fdrumseq","Drum Seq"," is a classic drum machine grid: four lanes, sixteen steps, click to add a hit. With the Clock's ",[33,350,44],{}," stepping it, sixteen steps is one bar.",[95,353,356],{"lesson":354,"title":355},"09-drum-seq-program-a-beat","Program a beat",[108,357,358,365,376],{},[111,359,360,361],{},"Click cells on the Drum Seq to add and remove hits. Put a snare on step 16 for a fill. ",[115,362],{"module":363,"param":364},"drumseq","grid",[111,366,124,367,369,370,119,373],{},[33,368,127],{}," to 12 or 14: the beat now loops early and trips over itself. ",[130,371],{"module":363,"param":132,"above":372},"11.5",[130,374],{"module":363,"param":132,"below":375},"14.5",[111,377,183,378,381,382,384,385],{},[33,379,380],{},"OPEN"," lane is free. Patch it into the Drum Trio's ",[33,383,290],{}," for ghost notes. ",[164,386],{"from":387,"to":295},"drumseq.t4",[19,389,391],{"id":390},"one-clock-many-rhythms","One clock, many rhythms",[15,393,394],{},"Because a clock is just a signal, you can do maths with it.",[15,396,25,397,401,402,405,406,409,410,413,414,417],{},[27,398,400],{"href":399},"\u002Fmodules\u002Fclkdiv","Clock Divider"," fires on every 2nd, 3rd, 4th or 8th pulse. Send ",[33,403,404],{},"÷4"," to the kick and ",[33,407,408],{},"÷3"," to the snare and you get ",[33,411,412],{},"3 against 4",": two patterns that only line up every 12 ticks. That's a ",[33,415,416],{},"polyrhythm",", and it sounds far more complicated than it is to patch.",[15,419,420,424,425,428,429,432,433,436],{},[27,421,423],{"href":422},"\u002Fmodules\u002Flogic","Logic"," combines two gates into a new one. ",[33,426,427],{},"AND"," fires only when both are high, ",[33,430,431],{},"OR"," when either is, ",[33,434,435],{},"XOR"," when one is but not both.",[95,438,442,445],{"lesson":439,"title":440,":unpatched":232,"drop":441},"28-logic-and-clock-division","Polyrhythms from one pulse","euc",[15,443,444],{},"A Clock, a Clock Divider, a Logic module and a Drum Trio, with no cables. Build the beat one drum at a time:",[237,446,447,464,475,487,517],{},[111,448,241,449,245,451,453,454,456,457,249,459,119,461],{},[33,450,244],{},[33,452,248],{},", and the Clock's ",[33,455,44],{}," into the Divider's ",[33,458,84],{},[164,460],{"from":252,"to":253},[164,462],{"from":166,"to":463},"clkdiv.in",[111,465,466,467,259,469,471,472],{},"Patch the Divider's ",[33,468,404],{},[33,470,262],{},". Four sixteenths make a beat, so that's a kick on every beat. ",[164,473],{"from":474,"to":267},"clkdiv.d4",[111,476,466,477,272,479,481,482,162,484],{},[33,478,408],{},[33,480,290],{},": a snare on every third sixteenth. Listen to it drift against the kick. The two only land together every 12 ticks: that's ",[33,483,412],{},[164,485],{"from":486,"to":295},"clkdiv.d3",[111,488,489,490,492,493,211,496,498,499,502,503,272,505,507,508,119,511,119,514],{},"Now mark where they meet. Patch ",[33,491,404],{}," into the Logic's ",[33,494,495],{},"A",[33,497,408],{}," into its ",[33,500,501],{},"B"," (outputs can feed as many inputs as you like), then the Logic's ",[33,504,427],{},[33,506,303],{},". A hat plays only when kick and snare land together, so you can hear each 12-tick cycle start. ",[164,509],{"from":474,"to":510},"logic.a",[164,512],{"from":486,"to":513},"logic.b",[164,515],{"from":516,"to":307},"logic.and",[111,518,519,520,156,522,524,525,119,528],{},"Move the hat cable from ",[33,521,427],{},[33,523,435],{},". Now the hat plays whenever exactly one of them fires, filling the gaps between kick and snare. ",[164,526],{"from":527,"to":307},"logic.xor",[169,529],{"from":516,"to":307},[15,531,532,533,211,535,537,538,272,540,542],{},"One more to try: the Divider's ",[33,534,495],{},[33,536,501],{}," outputs are a coin toss, each tick going randomly to one of them. Patch ",[33,539,501],{},[33,541,290],{}," as well for surprise ghost notes.",[19,544,546],{"id":545},"changing-things-on-the-bar","Changing things on the bar",[15,548,25,549,553,554,557,558,560],{},[27,550,552],{"href":551},"\u002Fmodules\u002Fswitch","Switch"," passes one of its inputs through and moves to the next on every pulse into ",[33,555,556],{},"STEP",". Feed it two sequencers' melodies and step it with the Clock's ",[33,559,56],{},", and the tune changes every bar, all from one clock.",[95,562,565,568,588],{"lesson":563,"title":564},"29-switch-a-new-melody-every-bar","A new melody every bar",[15,566,567],{},"Watch the lights swap between the two inputs.",[108,569,570],{},[111,571,572,573,575,576,578,579,581,582,119,585],{},"Move the Switch's ",[33,574,556],{}," cable from the Clock's ",[33,577,56],{}," to its ",[33,580,52],{},": the melodies now swap every beat. ",[164,583],{"from":266,"to":584},"switch.clock",[169,586],{"from":587,"to":584},"clock.bar",[15,589,590],{},"A switch works on audio too: two oscillators in, one out.",[19,592,594],{"id":593},"ratchets-and-rolls","Ratchets and rolls",[15,596,597,598,602,603,605,606,57],{},"Sometimes one hit isn't enough. ",[27,599,601],{"href":600},"\u002Fmodules\u002Fburst","Burst"," turns a single trigger into a quick roll. With the clock patched into its ",[33,604,84],{},", the whole roll fits exactly inside one step, so it always lands in time. Drummers call that a ",[33,607,608],{},"ratchet",[95,610,613],{"lesson":611,"title":612},"30-burst-ratchets-and-rolls","Machine-gun hats",[108,614,615,626,635],{},[111,616,617,618,621,622],{},"The Burst's ",[33,619,620],{},"Count"," sets hits per roll; turn it to 8 for a buzz. ",[130,623],{"module":624,"param":625,"above":136},"burst","count",[111,627,628,631,632],{},[33,629,630],{},"Shape"," to the left makes the roll speed up; to the right, slow down. ",[115,633],{"module":624,"param":634},"shape",[111,636,637,638,640,641],{},"Light up more cells in the Drum Seq's ",[33,639,380],{}," lane for more rolls. ",[115,642],{"module":363,"param":364},[19,644,646],{"id":645},"why-everything-shares-one-clock","Why everything shares one clock",[15,648,649,650,652],{},"Every pattern in these patches comes from a single Clock. That's why they never drift apart: sequencers, drums, dividers and switches all move on the same pulse. Change the ",[33,651,35],{}," and everything follows. It's the same in hardware modular, where a single clock module often drives a whole case.",[19,654,656],{"id":655},"what-to-remember","What to remember",[108,658,659,667,678,684,693],{},[111,660,25,661,663,664,666],{},[33,662,174],{}," is just a steady stream of gates. Modules act on the ",[33,665,63],{},", the moment it goes high.",[111,668,25,669,672,673,211,675,677],{},[33,670,671],{},"sequencer"," sends ",[33,674,88],{},[33,676,92],{},", just like a keyboard, one step per clock pulse.",[111,679,680,683],{},[33,681,682],{},"Euclidean"," rhythms spread N hits over M steps, and many classic grooves fall out of that rule.",[111,685,686,211,689,692],{},[33,687,688],{},"Dividing",[33,690,691],{},"combining"," one clock makes polyrhythms that always stay in time.",[111,694,695,696,211,699,701],{},"Odd ",[33,697,698],{},"lengths",[33,700,146],{}," keep repeating patterns from sounding repetitive.",{"title":703,"searchDepth":704,"depth":704,"links":705},"",2,[706,707,708,713,714,715,716,717],{"id":21,"depth":704,"text":22},{"id":73,"depth":704,"text":74},{"id":179,"depth":704,"text":180,"children":709},[710,712],{"id":203,"depth":711,"text":204},3,{"id":339,"depth":711,"text":340},{"id":390,"depth":704,"text":391},{"id":545,"depth":704,"text":546},{"id":593,"depth":704,"text":594},{"id":645,"depth":704,"text":646},{"id":655,"depth":704,"text":656},"How a modular synth keeps time. Clocks, gates and triggers, step sequencers, drum grids, Euclidean rhythms, clock division, polyrhythms, switches and ratchets, with patches to play.","md",{},"\u002Flearn\u002Frhythm",{"title":5,"description":718},"Modular synth sequencing explained — clocks, gates, step sequencers and Euclidean rhythms","learn\u002Frhythm","uH--JPvpSbhhRTvjZy3xpzEv_hHURJJ-BIxHt8Z1hcA",1792599837968]