Fretboards#

Horizontal Fretboard#

class fretboardgtr.fretboards.horizontal.HorizontalFretBoard[source]#

Bases: object

Class 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_background_dimensions()[source]#
Return type:

Tuple[float, float]

get_background_start_position()[source]#
Return type:

Tuple[float, float]

get_cross_position(string_no)[source]#
Parameters:

string_no (int) –

Return type:

Tuple[float, float]

get_fret_number_position(dot)[source]#
Parameters:

dot (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_list_in_good_order(_list)[source]#
Parameters:

_list (List[Any]) –

Return type:

List[Any]

get_neck_dot_position(dot)[source]#
Parameters:

dot (int) –

Return type:

List[Tuple[float, float]]

get_nut_position()[source]#
Return type:

Tuple[Tuple[float, float], Tuple[float, float]] | None

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]

get_strings_position(string_no)[source]#
Parameters:

string_no (int) –

Return type:

Tuple[Tuple[float, float], Tuple[float, float]]

get_tuning_position(string_no)[source]#
Parameters:

string_no (int) –

Return type:

Tuple[float, float]

Vertical Fretboard#

class fretboardgtr.fretboards.vertical.VerticalFretBoard[source]#

Bases: object

Class 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_background_dimensions()[source]#
Return type:

Tuple[float, float]

get_background_start_position()[source]#
Return type:

Tuple[float, float]

get_cross_position(string_no)[source]#
Parameters:

string_no (int) –

Return type:

Tuple[float, float]

get_fret_number_position(dot)[source]#
Parameters:

dot (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_list_in_good_order(_list)[source]#
Parameters:

_list (List[Any]) –

Return type:

List[Any]

get_neck_dot_position(dot)[source]#
Parameters:

dot (int) –

Return type:

List[Tuple[float, float]]

get_nut_position()[source]#
Return type:

Tuple[Tuple[float, float], Tuple[float, float]] | None

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]

get_strings_position(string_no)[source]#
Parameters:

string_no (int) –

Return type:

Tuple[Tuple[float, float], Tuple[float, float]]

get_tuning_position(string_no)[source]#
Parameters:

string_no (int) –

Return type:

Tuple[float, float]