SPB Git

Repository Public

rh_seven_and_eleven.sonata 2.0 KB 80 lines

1// ORIX Sonata2// File: Examples/rh_seven_and_eleven.sonata3// Description: Asymmetric metres: four bars of 7/8 grouped 2+2+3, then four bars of 11/8 grouped 3+3+3+2, on plucked strings and a hand drum; the signature changes at composition level.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// category: Rhythm9// title: Seven and Eleven10// teaches: signature changes with at, asymmetric grouping, patterns with a list of groups11//12// expect: notes 11613// expect: tracks 314// expect: duration 15.6522s15// expect: deterministic16// Plays one bar from a list of group sizes in eighth notes: an accent starts each group.17pattern grouped_bar(pitch: Pitch, groups: List<Number>) {18    for g in groups {19        play pitch duration 1/8 accent20        repeat g - 1 {21            play pitch duration 1/8 velocity 0.422        }23    }24}2526pattern tune_bar(notes: List<Pitch>, groups: List<Number>) {27    for i in 0..len(groups) {28        play notes[i] duration 1/8 * groups[i]29    }30}3132composition "Seven and Eleven" {33    tempo 138bpm34    signature 7/835    key E phrygian3637    // Bar 5 starts after four bars of 7/8.38    at 4bars {39        signature 11/840    }4142    instrument drum: Woodblock {43        gain -9dB44        pan 0.345        repeat 4 {46            grouped_bar(C4, [2, 2, 3])47        }48        repeat 4 {49            grouped_bar(C4, [3, 3, 3, 2])50        }51    }5253    instrument oud: SteelGuitar {54        gain -5dB55        repeat 2 {56            tune_bar([E3, G3, B3], [2, 2, 3])57            tune_bar([F3, A3, E4], [2, 2, 3])58        }59        repeat 2 {60            tune_bar([E3, G3, B3, E4], [3, 3, 3, 2])61            tune_bar([F3, A3, C4, B3], [3, 3, 3, 2])62        }63        effects {64            reverb room(mix: 0.2)65        }66    }6768    instrument bass: FingerBass {69        gain -5dB70        repeat 4 {71            play E2 duration 4/872            play E2 duration 3/873        }74        repeat 4 {75            play E2 duration 6/876            play F2 duration 5/877        }78    }79}80
Files main
Menu

Theme