Repository Public
1// ORIX Sonata2// File: Examples/lib/motifs.sonata3// Description: A project module: reusable motifs imported by uses_modules.sonata.4//5// Author: Simon-Pierre Boucher6// Contact: contact@spboucher.ai7// A broken chord figure (Alberti bass) on a triad.8pattern alberti(notes: List<Pitch>, step: Duration = 1/8) {9 repeat 2 {10 play notes[0] duration step11 play notes[2] duration step12 play notes[1] duration step13 play notes[2] duration step14 }15}1617// A turn around a pitch inside a scale.18fn turn(notes: List<Pitch>, index: Number) -> List<Pitch> {19 return [notes[index + 1], notes[index], notes[index - 1], notes[index]]20}21