SPB Git

Repository Public

gs_three_chords.sonata 1.3 KB 40 lines

1// ORIX Sonata2// File: Examples/gs_three_chords.sonata3// Description: The I-IV-V-I progression three ways: block chords written by hand, chords built with chord(), then broken into arpeggios.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// category: Getting started9// title: Three Chords10// teaches: chord literals, chord(), invert(), arpeggio pattern11//12// expect: notes 4613// expect: tracks 114// expect: duration 23.4783s15// expect: deterministic16composition "Three Chords" {17    tempo 92bpm18    key G major1920    instrument piano: UprightPiano {21        gain -4dB22        // Written note by note.23        chord [G3, B3, D4] duration 1/224        chord [C4, E4, G4] duration 1/225        chord [D4, F#4, A4] duration 1/226        chord [G3, B3, D4] duration 1/227        // Built from a root and a quality; invert() keeps the hands close together.28        chord chord(G3, major) duration 1/229        chord invert(chord(C3, major), 2) duration 1/230        chord invert(chord(D3, major), 1) duration 1/231        chord chord(G3, major) duration 1/232        // Broken chords.33        for c in [chord(G3, major), chord(C4, major), chord(D4, dom7), chord(G3, major)] {34            arpeggio(c + [c[0] + 12st], step: 1/8, vel: 0.7)35            rest 2/4 - 1/8 * (len(c) + 1) + 1/236        }37        chord [G2, G3, B3, D4, G4] duration 1/138    }39}40
Files main
Menu

Theme