Fretboards#
Horizontal Fretboard#
- class fretboardgtr.fretboards.horizontal.HorizontalFretBoard[source]#
Bases:
objectClass containing the different elements of a fretboard.
Also contains associated method to add some.
- __init__(tuning=None, config=None)[source]#
- Parameters:
tuning (List[str] | None) –
config (FretBoardConfig | None) –
- get_cross_position(string_no)[source]#
- Parameters:
string_no (int) –
- Return type:
Tuple[float, float]
- get_fret_position(fret_no)[source]#
- Parameters:
fret_no (int) –
- Return type:
Tuple[Tuple[float, float], Tuple[float, float]]
- get_inside_bounds()[source]#
Get the size of the inner drawing.
This function could be use to add custom elements
- Returns:
Upper left corner x coordinate, upper left corner y coordinate Lower right corner x coordinate, lower right corner y coordinate
- Return type:
Tuple[Tuple[float, float], Tuple[float, float]]
- get_single_note_position(string_no, index)[source]#
- Parameters:
string_no (int) –
index (int) –
- Return type:
Tuple[float, float]
- get_size()[source]#
Get total size of the drawing.
- Returns:
Width and heigth
- Return type:
Tuple[float, float]
Vertical Fretboard#
- class fretboardgtr.fretboards.vertical.VerticalFretBoard[source]#
Bases:
objectClass containing the different elements of a fretboard.
Also contains associated method to add some.
- __init__(tuning=None, config=None)[source]#
- Parameters:
tuning (List[str] | None) –
config (FretBoardConfig | None) –
- get_cross_position(string_no)[source]#
- Parameters:
string_no (int) –
- Return type:
Tuple[float, float]
- get_fret_position(fret_no)[source]#
- Parameters:
fret_no (int) –
- Return type:
Tuple[Tuple[float, float], Tuple[float, float]]
- get_inside_bounds()[source]#
Get the size of the inner drawing.
This function could be use to add custom elements
- Returns:
Upper left corner x coordinate, upper left corner y coordinate Lower right corner x coordinate, lower right corner y coordinate
- Return type:
Tuple[Tuple[float, float], Tuple[float, float]]
- get_single_note_position(string_no, index)[source]#
- Parameters:
string_no (int) –
index (int) –
- Return type:
Tuple[float, float]
- get_size()[source]#
Get total size of the drawing.
- Returns:
Width and heigth
- Return type:
Tuple[float, float]