SPB Git

Repository Public

uses_modules.sonata 911 B 37 lines

1// ORIX Sonata2// File: Examples/uses_modules.sonata3// Description: Imports a project module (lib/motifs.sonata) and combines its pattern and function with the standard library.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7//8// expect: notes 529// expect: tracks 210// expect: duration 8.2759s11// expect: deterministic12import std.music13import lib.motifs1415composition "Uses Modules" {16    tempo 116bpm17    key C major1819    instrument right: GrandPiano {20        gain -7dB21        let notes = scale_run(C5, major, 1)22        for i in [2, 4, 3, 1] {23            arpeggio(turn(notes, i), step: 1/16, vel: 0.75)24            play notes[i] duration 1/425            rest 1/426        }27    }2829    instrument left: GrandPiano {30        gain -10dB31        pan -0.232        for c in [chord(C3, major), chord(F3, major), chord(G3, major), chord(C3, major)] {33            alberti(c)34        }35    }36}37
Files main
Menu

Theme