GLXCurses.Buzzer module¶
-
GLXCurses.Buzzer.
play_sound
(frequency, duration)[source]¶ Play a sound via the Buzzer of the computer
Parameters: - frequency (int) – frequency in Hertz (HZ) of the note to play
- duration (int) – how many time we play the note in Millisecond (ms)
-
class
GLXCurses.Buzzer.
Buzzer
[source]¶ Bases:
object
Description: The famous buzzer class, why not implement a wireless protocol with the buzzer ?
-
tempo
¶ Beats per minute (bpm) is a unit typically used as a measure of tempo
Type: :py:__area_data:float Flags: Read / Write Default value: 110.0
-
get_tempo
()[source]¶ Get the tempo attribute
Returns: tempo attribute value is in BPM Return type: float
-
set_tempo
(tempo=110.0)[source]¶ Set the tempo attribute
Parameters: tempo (float) – tempo value in BPM
-
get_tempo_to_ms
()[source]¶ Get actual tempo value in Millisecond (ms)
Returns: tempo value in ms Return type: int
-
get_croche
()[source]¶ Get the Croche it consist to devise the tempo by 2
Returns: tempo value div by 2 in Millisecond (ms) Return type: int
-
get_double_croche
()[source]¶ Get the Double Croche it consist to devise the tempo by 4
Returns: tempo value div by 4 in Millisecond (ms) Return type: int
-
get_triple_croche
()[source]¶ Get the Triple Croche it consist to devise the tempo by 8
Returns: tempo value div by 8 in Millisecond (ms) Return type: int
-
get_blanche
()[source]¶ Get the Blanche it consist to multiply the tempo by 2
Returns: tempo value div by 2 in Millisecond (ms) Return type: int
-
get_triolet
()[source]¶ Get the Triolet it consist to multiply the tempo by 3
Returns: tempo value div by 3 in Millisecond (ms) Return type: int
-
get_notes
()[source]¶ Get MIDI notes list , each item contain a list as container
Notes Structure: list(Octave, Midi_Note_Number, Note_Name, Frequency_Hz, Absolute_Cents)
Returns: the entry midi note list Return type: list(list(),list(),list())
-
static
get_ms_to_tempo
(ms)[source]¶ Get the conversion of a ms value to a tempo value
Parameters: ms (int) – tempo value in Millisecond (ms) Returns: 60000 divided by Millisecond (ms) value Return type: float
-