Various doc examples: Fix the "/ 18" copypasta bug
This commit is contained in:
parent
0db8b888d3
commit
90571e7b7f
|
@ -61,7 +61,7 @@
|
|||
//| length = 8000 // 440
|
||||
//| sine_wave = array.array("H", [0] * length)
|
||||
//| for i in range(length):
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15) + 2 ** 15)
|
||||
//|
|
||||
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
|
||||
//| i2s = audiobusio.I2SOut(board.D1, board.D0, board.D9)
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
//| length = 8000 // 440
|
||||
//| sine_wave = array.array("h", [0] * length)
|
||||
//| for i in range(length):
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15))
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15))
|
||||
//|
|
||||
//| dac = audioio.AudioOut(board.SPEAKER)
|
||||
//| sine_wave = audiocore.RawSample(sine_wave)
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
//| length = 8000 // 440
|
||||
//| sine_wave = array.array("H", [0] * length)
|
||||
//| for i in range(length):
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15) + 2 ** 15)
|
||||
//|
|
||||
//| dac = audioio.AudioOut(board.SPEAKER)
|
||||
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
//| length = 8000 // 440
|
||||
//| sine_wave = array.array("H", [0] * length)
|
||||
//| for i in range(length):
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / 18) * (2 ** 15) + 2 ** 15)
|
||||
//| sine_wave[i] = int(math.sin(math.pi * 2 * i / length) * (2 ** 15) + 2 ** 15)
|
||||
//|
|
||||
//| dac = audiopwmio.PWMAudioOut(board.SPEAKER)
|
||||
//| sine_wave = audiocore.RawSample(sine_wave, sample_rate=8000)
|
||||
|
|
Loading…
Reference in New Issue