Repository Public
1// ORIX Sonata2// File: Examples/mallet_phasing.sonata3// Description: Two marimbas play the same twelve-note cell; the second one is rotated by one more note every two bars, with a glockenspiel marking each shift.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// expect: notes 2169// expect: tracks 410// expect: duration 17.1429s11// expect: deterministic12const cell = [E4, F#4, B4, C#5, D5, F#4, E4, C#5, B4, F#4, D5, C#5]1314pattern loop(notes: List<Pitch>, times: Number, vel: Velocity) {15 repeat times {16 for n in notes {17 play n duration 1/8 velocity vel18 }19 }20}2122composition "Mallet Phasing" {23 tempo 168bpm24 key B minor25 signature 6/42627 instrument steady: Marimba {28 gain -8dB29 pan -0.530 loop(cell, 8, 0.7)31 }3233 instrument shifting: Marimba {34 gain -8dB35 pan 0.536 for shift in 0..8 {37 loop(rotate(cell, shift), 1, 0.65)38 }39 }4041 instrument marker_bell: Glockenspiel {42 gain -14dB43 for shift in 0..8 {44 play cell[shift] + 12st duration 1bar velocity 0.545 }46 effects {47 reverb plate(mix: 0.3)48 }49 }5051 instrument pulse: Vibraphone {52 gain -14dB53 repeat 8 {54 chord [B2, F#3] duration 1bar velocity 0.555 }56 }57}58