Skip to content

UsageπŸ”—

Chord patterns are built using the __chord__ class.

Import the FoxDotChord module:

import FoxDotChord

This will inject into the executor namespace the c instance used to manipulate the chords.

You can also do: from FoxDotChord import c

Chord progressionsπŸ”—

Chords can be passed in the same object and can be used in the following ways:

  • [] with string separated by space
    c['B# Cb E# Fb']
    
  • () with string separated by space
    c('B# Cb E# Fb')
    
  • [] with list of strings
    c['B#', 'Cb', 'E#', 'Fb']
    
  • () with list of strings
    c('B#', 'Cb', 'E#', 'Fb')
    

Major chords (C)πŸ”—

Major chords are created by passing on the chord cipher.

  • Do major chord
    c['C']
    

All valid ciphers are:

Natural Flats Sharps
A Ab A#
B Bb B#
C Cb C#
D Db D#
E Eb E#
F Fb F#
G Gb G#

Minor chords (Cm)πŸ”—

Minor chords are created by passing the letter m after the chord cipher.

  • Do minor chord
    c['Cm']
    

Diminished chords (C⁰)πŸ”—

Diminished chords are created by adding the symbol ⁰ after the chord cipher. Traditionally, you can also use the dim abbreviation after the cipher. The library also allows other ways of defining diminished chords.

  • ⁰
    c['C⁰']
    
  • dim
    c['Cdim']
    
  • o - lowercase o
    c['Co']
    
  • O - uppercase O
    c['CO']
    
  • 0 - zero
    c['C0']
    

Suspended chords (Csus4)πŸ”—

Chords with a suspended third can be created with the following figures:

  • sus - major second suspended
    c['Csus']
    c['Csus2']
    
  • sus4 - perfect fourth suspended
    c['Csus4']
    c['Csus3+']
    c['Csus3#']
    

Chords with extension (Cm7/9b/11#)πŸ”—

Chords, both major and minor, can contain the extension of a certain interval. To extend the chord by more than one interval, separate them with /, for example, Cm7M/9.

The accepted intervals are as follows.

2 - major secondπŸ”—

  • major
    c['C2']
    
  • minor
    c['Cm2']
    

4 - perfect fourthπŸ”—

  • major
    c['C4']
    
  • minor
    c['Cm4']
    

5 - power chordπŸ”—

  • 5 - power chord
    c['C5']
    

5- | 5+ - fifthπŸ”—

  • diminished fifth

    c['C5-']
    c['C5b']
    
    c['Cm5-']
    c['Cm5b']
    
  • augmented fifth

    c['C5+']
    c['C5#']
    
    c['Cm5+']
    c['Cm5b#]
    

6 - major sixthπŸ”—

  • major
    c['C6']
    
  • minor
    c['Cm6']
    

7 - seventhπŸ”—

  • 7 - minor seventh

    c['C7']
    
    c['Cm7']
    
  • 7M - major seventh

    c['C7M']
    c['C7Maj']
    c['C7maj']
    
    c['Cm7M']
    c['Cm7Maj']
    c['Cm7maj']
    

9 - ninthπŸ”—

  • 9 - minor ninth

    c['C9-']
    c['C9b']
    
    c['Cm9-']
    c['Cm9b']
    
  • 9 - augmented ninth

    c['C9+']
    c['C9#']
    
    c['Cm9+']
    c['Cm9#']
    
  • 9 - ninth

    c['C9']
    
    c['Cm9']
    

11 - eleventhπŸ”—

  • 11 - diminished eleventh

    c['C11-']
    c['C11b']
    
    c['Cm11-']
    c['Cm11b']
    
  • 11 - augmented eleventh

    c['C11+']
    c['C11#']
    
    c['Cm11+']
    c['Cm11#']
    
  • 11 - eleventh

    c['C11']
    
    c['Cm11']
    

13 - eleventhπŸ”—

  • 13 - diminished thirteenth

    c['C13-']
    c['C13b']
    
    c['Cm13-']
    c['Cm13b']
    
  • 13 - augmented thirteenth

    c['C13+']
    c['C13#']
    
    c['Cm13+']
    c['Cm13#']
    
  • 13 - thirteenth

    c['C13']
    
    c['Cm13']
    

ArpeggiosπŸ”—

Arpeggios can be created directly in the chord definition by putting an @ at the end of it, for example:

  • Arpeggio with @

    c['C@']
    

  • Arpeggio on just one chord of a sequence

    c['C@ G']
    

You can also use the .arp() method to arpeggiate all the chords in the sequence.

  • .arp() method
    c['C G'].arp()
    

The .arp() method can receive a list of integers. This will have the same behavior as the .arp(seq) method of the renardo Patterns or the FoxDot Patterns if you are using it.

  • .arp(seq) method
    c['C G'].arp([0, 3])
    

RepetitionπŸ”—

You can use the !N syntax to represent that a particular chord should be repeated N times, where N is the number of times that chord should sound.

  • Repeating the chords using !

    c['C!4 Dm!2 G7!2']
    
    var(c['C Dm G7'], [4, 2, 2])
    

    Play the first one 4 times and the others 2 times

  • Repeating the arpeggios (@) using !

    c['C!4 Dm!2 G7!2@']
    
    var(c['C Dm G7@'], [4, 2, 2, 2, 2, 2])
    

    You will play each note of the arpeggio twice

  • Repeat (!) the chord and arpeggiate (@) what was doubled

    c['C!4 Dm!2 G7!2@']
    
    var(c['C Dm G7@ G7@'], [4, 2, 2, 2, 2, 2, 2, 2, 2, 2])
    

    It will double the chord and arpeggiate the duplicates

Attention

When at least one ! with a value greater than 1 is used, the object returned will be a var.

Therefore, some methods such as .arp() will cease to exist.

String PatternsπŸ”—

It is also possible to use nested patterns within the string, just like in the play() synth.

  • Simple sequence ()

    >>> c['(D7 Cm)']
    P[Chord('D7'), Chord('Cm')]
    
  • On the same beat []

    >>> c['[D7 Cm]']
    P[P*(Chord('D7'), Chord('Cm'))]
    
  • Rnadom {}

    >>> c['{D7 Cm}']
    P[PRand(P[Chord('D7'), Chord('Cm')])]
    
  • Layering sequences <><>

    >>> c['<D7><Cm>']
    P[P(Chord('D7'), Chord('Cm'))]