Repository Public
1// ORIX Sonata2// File: Examples/guitar_fingerstyle.sonata3// Description: Two guitars: a nylon guitar plays a finger-picking pattern built from chord tones, a steel guitar strums and answers with harmonics-like high notes.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// expect: notes 1039// expect: tracks 210// expect: duration 21.6000s11// expect: deterministic12// Travis-style picking over one chord: bass on the beat, treble strings in between.13pattern pick(c: List<Pitch>) {14 let bass = c[0] - 12st15 play bass duration 1/8 velocity 0.816 play c[2] duration 1/8 velocity 0.5517 play c[1] duration 1/8 velocity 0.618 play c[2] + 5st duration 1/8 velocity 0.519 play bass + 7st duration 1/8 velocity 0.7520 play c[2] duration 1/8 velocity 0.5521 play c[1] duration 1/8 velocity 0.622 play c[0] + 12st duration 1/8 velocity 0.523}2425composition "Guitar Fingerstyle" {26 tempo 100bpm27 key G major2829 let chords = [chord(G3, major), chord(E3, minor), chord(C3, major), chord(D3, major)]3031 instrument nylon: NylonGuitar {32 gain -6dB33 pan -0.334 repeat 2 {35 for c in chords {36 pick(c)37 }38 }39 chord chord(G2, major) + [G4] duration 1bar40 effects {41 reverb room(mix: 0.18)42 }43 }4445 instrument steel: SteelGuitar {46 gain -10dB47 pan 0.348 rest 4bars49 for c in chords {50 strum(c + 12st, count: 2, step: 1/4, vel: 0.5)51 play c[2] + 24st duration 1/4 velocity 0.452 play c[1] + 24st duration 1/4 velocity 0.453 }54 chord chord(G3, major) + 12st duration 1bar velocity 0.555 effects {56 chorus shimmer(mix: 0.2)57 reverb room(mix: 0.22)58 }59 }60}61