SPB Git

Repository Public

al_euclid_grid.sonata 1.6 KB 71 lines

1// ORIX Sonata2// File: Examples/al_euclid_grid.sonata3// Description: Seven Euclidean rhythms, from E(2,16) to E(11,16), layered one instrument at a time, each rotated so the patterns interlock instead of piling up on the first beat.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// category: Algorithmic9// title: Euclidean Grid10// teaches: euclid(), rotate(), the rhythm pattern, entering layer by layer11//12// expect: notes 19113// expect: tracks 714// expect: duration 16.5517s15// expect: deterministic16pattern layer(pitch: Pitch, hits: Number, turn: Number, bars: Number, vel: Velocity) {17    repeat bars {18        rhythm(pitch, rotate(euclid(hits, 16), turn), step: 1/16, vel: vel)19    }20}2122composition "Euclidean Grid" {23    tempo 116bpm24    key D minor2526    instrument kick: Kick {27        gain -4dB28        layer(C2, 4, 0, 8, 0.9)29    }3031    instrument bass: SubBass {32        gain -8dB33        rest 1bar34        layer(D2, 3, 0, 7, 0.8)35    }3637    instrument block: Woodblock {38        gain -12dB39        pan -0.440        rest 2bars41        layer(D5, 5, 2, 6, 0.7)42    }4344    instrument marimba: Marimba {45        gain -8dB46        pan 0.347        rest 3bars48        layer(A3, 7, 1, 5, 0.65)49    }5051    instrument glass: GlassHarp {52        gain -10dB53        pan -0.254        rest 4bars55        layer(F4, 9, 3, 4, 0.5)56    }5758    instrument hat: ClosedHat {59        gain -15dB60        pan 0.561        rest 5bars62        layer(F#2, 11, 0, 3, 0.5)63    }6465    instrument bell: Bell {66        gain -12dB67        rest 6bars68        layer(D5, 2, 4, 2, 0.6)69    }70}71
Files main
Menu

Theme