File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change 1919__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"
2020
2121
22- def sine_wave (sample_frequency , pitch ):
22+ def sine_wave (sample_frequency : float , pitch : float ):
2323 """Generate a single sine wav cycle at the given sampling frequency and pitch."""
2424 length = int (sample_frequency / pitch )
2525 b = array .array ("H" , [0 ] * length )
Original file line number Diff line number Diff line change 1818__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"
1919
2020
21- def square_wave (sample_length = 2 ):
21+ def square_wave (sample_length : int = 2 ):
2222 """Generate a single square wave of sample_length size"""
2323 square = array .array ("H" , [0 ] * sample_length )
2424 for i in range (sample_length // 2 ):
You can’t perform that action at this time.
0 commit comments