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 19
19
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"
20
20
21
21
22
- def sine_wave (sample_frequency , pitch ):
22
+ def sine_wave (sample_frequency : float , pitch : float ):
23
23
"""Generate a single sine wav cycle at the given sampling frequency and pitch."""
24
24
length = int (sample_frequency / pitch )
25
25
b = array .array ("H" , [0 ] * length )
Original file line number Diff line number Diff line change 18
18
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_Waveform.git"
19
19
20
20
21
- def square_wave (sample_length = 2 ):
21
+ def square_wave (sample_length : int = 2 ):
22
22
"""Generate a single square wave of sample_length size"""
23
23
square = array .array ("H" , [0 ] * sample_length )
24
24
for i in range (sample_length // 2 ):
You can’t perform that action at this time.
0 commit comments