Class ChordPatterns
- Namespace
- Sigil.Sound
- Assembly
- Sigil.Sound.Notes.dll
Patterns of chords: playing them as block chords, or as arpeggios.
public static class ChordPatternsInheritance
Inherited Members
Methods
Arp(Pattern<Chord>, ArpMode, int)
Plays each chord one note after another, dividing the chord's event equally among the steps, so a chord that lasts a bar
becomes an arpeggio across the bar. Speed it up with Fast or add the octaves.
public static Pattern<Note> Arp(this Pattern<Chord> chords, ArpMode mode = ArpMode.Up, int octaves = 1)Parameters
chordsPattern<Chord>-
The chords, such as
Mini.Chords("c3:min7 f3:7"). modeArpMode-
The order the notes are walked in.
octavesint-
How many octaves to climb (1 to 4); more octaves make a longer run.
Returns
Highest(Pattern<Chord>)
The highest tone of each chord, as a pattern of pitches.
public static Pattern<int> Highest(this Pattern<Chord> chords)Parameters
Returns
Examples
// The top voice of a progression, an octave up, as a melody.
Mini.Chords("<c3:min7 f3:7 bb2:maj7 g3:7>").Highest().Select(p => new Note(p + 12))
.Play(v => Triangle(v.Frequency).Adsr(0.005, 0.2, 0.3, 0.2), bpm: 100) * 0.3
Lowest(Pattern<Chord>)
The lowest tone of each chord, as a pattern of pitches: the bass line of a progression, or of the chord being played.
public static Pattern<int> Lowest(this Pattern<Chord> chords)Parameters
Returns
Examples
// The bass line of a progression: the lowest tone of each chord, an octave down.
Mini.Chords("<c3:min7 f3:7 bb2:maj7 g3:7>").Lowest().Select(p => new Note(p - 12))
.Play(v => Sine(v.Frequency).Adsr(0.01, 0.3, 0.6, 0.3), bpm: 100) * 0.5
Notes(Pattern<Chord>)
Every chord as its notes, all sounding together for the chord's whole event.
public static Pattern<Note> Notes(this Pattern<Chord> chords)Parameters
Returns
Steps(Pattern<Chord>, Pattern<int>)
Plays steps of whatever chord is in force at each step: step 0 is the chord's lowest tone, 1 the next one up, past the top it climbs
into the next octave, below 0 it goes down. The rhythm is the steps' own; the chords only say which notes they are, so the same
text follows the harmony, whether it is written (Mini.Chords("<c3:min7 f3:7>")) or played
(Sigil.Sound.NoteStream.Chord(System.Double,Sigil.Sound.ChordLatch,Sigil.Sound.ChordSwitch)). A step with no chord, or a note outside the MIDI range, is left out.
public static Pattern<Note> Steps(this Pattern<Chord> chords, Pattern<int> steps)Parameters
chordsPattern<Chord>-
The chords.
stepsPattern<int>-
The steps, such as
Mini.Integers("7 6 5 4 3 2 1 0").
Returns
Examples
Mini.Chords("<c3:min7 f3:7>").Steps(Mini.Integers("[7 6 5 4 3 2 1 0] ~ [4 2 0] ~")).Play(v => Saw(v.Frequency).Adsr(0.003, 0.2, 0, 0.2))
Steps(Pattern<Chord>, string)
Plays steps of the chords written in Sigil.Sound.Mini notation; see Sigil.Sound.ChordPatterns.Steps(Sigil.Sound.Pattern{Sigil.Sound.Chord},Sigil.Sound.Pattern{System.Int32}).
public static Pattern<Note> Steps(this Pattern<Chord> chords, string steps)Parameters
Returns
Exceptions
- MiniNotationException
-
The text is not valid.