Repository Public
1// ORIX Sonata2// File: Examples/ha_modal_interchange.sonata3// Description: Modal interchange: a progression in C major that borrows the flat sixth, flat seventh and minor fourth from C minor, played by strings and electric piano with a voice-led top line.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// category: Harmony9// title: Borrowed Chords10// teaches: chord qualities, invert(), voice leading by hand, legato strings11//12// expect: notes 8713// expect: tracks 314// expect: duration 33.3333s15// expect: deterministic16composition "Borrowed Chords" {17 tempo 72bpm18 key C major1920 // I bVI bVII I | I iv I6 V | I21 let chords = [chord(C3, maj7), chord(Ab2, maj7), chord(Bb2, major), chord(C3, major), chord(C3, add9), invert(chord(F2, minor), 2), invert(chord(C3, major), 1), chord(G2, dom7)]2223 instrument keys: ElectricPiano {24 gain -7dB25 for c in chords {26 chord c + 12st duration 1/2 velocity 0.627 chord c + 12st duration 1/2 velocity 0.428 }29 chord chord(C3, maj9) + 12st duration 2bars velocity 0.530 effects {31 tremolo vintage(mix: 0.5)32 reverb room(mix: 0.2)33 }34 }3536 instrument strings: ConcertStrings {37 gain -9dB38 articulation legato39 // A top line that moves by step through the borrowed notes: G Ab Bb G | G Ab G F | E.40 for n in [G5, Ab5, Bb5, G5, G5, Ab5, G5, F5] {41 play n duration 1/142 }43 play E5 duration 2bars44 }4546 instrument bass: FingerBass {47 gain -5dB48 for c in chords {49 play c[0] - 12st duration 3/450 play c[0] - 12st duration 1/4 velocity 0.651 }52 play C1 duration 2bars53 }54}55