Notes Creators#
- class fretboardgtr.notes_creators.ChordFromName[source]#
Bases:
objectObject generating NotesContainer object from root and chord quality.
Given a root name and a quality name, get the resulting scale.
Also : Mode name can be given thanks to the constants.ChordName enum as well as string Note name can be given thanks to the constants.NoteName enum as well as string
Example
>>> ChordFromName(root='C',quality='M').build() NotesContainer(root= 'C', scale = ['C', 'E', 'G']) >>> ChordFromName(root=NoteName.C,quality=ChordName.MAJOR).build() NotesContainer(root= 'C', scale = ['C', 'E', 'G'])
- class fretboardgtr.notes_creators.NotesContainer[source]#
Bases:
objectNotesContainer(root: str, notes: List[str])
- get_chord_fingerings(tuning, max_spacing=5, min_notes_in_chord=2, number_of_fingers=4)[source]#
Get all probably possible fingering for a specific tuning.
- Parameters:
tuning (List[str]) – List of note of the tuning
max_spacing (int) – Maximum spacing between notes
min_notes_in_chord (int) – Minimum number of notes in chord
number_of_fingers (int) – Number of fingers allowed
- Returns:
List of propably possible fingerings
- Return type:
List[List[Optional[int]]]
- get_scale(tuning, max_spacing=5)[source]#
Get the scale of each string in the given tuning.
Goes from 0 up to (12 + max_spacing - 1) on the fretboard
- Parameters:
(List[str]) (tuning) – The tuning of each string.
tuning (List[str]) –
max_spacing (int) –
- Returns:
The scale of each string in the tuning.
- Return type:
List[List[int]]
- get_scale_positions(tuning, max_spacing=5)[source]#
Get all possible scale positions for a specific tuning.
- Parameters:
tuning (List[str]) – List of note of the tuning
max_spacing (int) – Maximum spacing between notes
- Returns:
List of all possible scale positions
- Return type:
List[List[List[Optional[int]]]]
- class fretboardgtr.notes_creators.ScaleFromName[source]#
Bases:
objectObject that generating NotesContainer object from root and mode.
Given a root name and a mode name, get the resulting scale.
Also : Mode name can be given thanks to the constants.ModeName enum as well as string Note name can be given thanks to the constants.NoteName enum as well as string
Example
>>> ScaleFromName(root='C',mode='Dorian').build() NotesContainer(root= 'C', scale = ['C', 'D', 'D#', 'F', 'G', 'A', 'A#']) >>> ScaleFromName(root=Name.C,mode=ModeName.DORIAN).build() NotesContainer(root= 'C', scale = ['C', 'D', 'D#', 'F', 'G', 'A', 'A#'])