SPB Git

Repository Public

gs_melody_and_drone.sonata 1.5 KB 58 lines

1// ORIX Sonata2// File: Examples/gs_melody_and_drone.sonata3// Description: A modal tune on the pan flute over a held fifth in the cellos: ties hold a note across bar lines, a voice block lets one track play two lines.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// category: Getting started9// title: Melody over a Drone10// teaches: tie, voice blocks, key and degree(), rests11//12// expect: notes 2313// expect: tracks 214// expect: duration 22.1053s15// expect: deterministic16composition "Melody over a Drone" {17    tempo 76bpm18    key D dorian1920    instrument flute: PanFlute {21        gain -6dB22        rest 1bar23        // degree(n) is the n-th note of the key: 1 is D, 5 is A.24        for d in [5, 4, 5, 8, 7, 5, 4, 3] {25            play degree(d, 4) duration 1/426        }27        play degree(2, 4) duration 1/228        play degree(1, 4) duration 1/2 tie29        play degree(1, 4) duration 1/230        rest 1/231        for d in [1, 3, 5, 6, 5, 3, 2, 1] {32            play degree(d, 5) duration 1/833        }34        play degree(5, 4) duration 1/135        effects {36            reverb chamber(mix: 0.25)37        }38    }3940    instrument drone: Cello {41        gain -10dB42        voice {43            repeat 3 {44                play D2 duration 1/1 tie45            }46            play D2 duration 1/147            play D2 duration 2bars48        }49        voice {50            repeat 3 {51                play A2 duration 1/1 tie52            }53            play A2 duration 1/154            play A2 duration 2bars55        }56    }57}58
Files main
Menu

Theme