Skip to content

Commit 50990b1

Browse files
update examples and docs
1 parent c072ed8 commit 50990b1

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

cedargrove_wavebuilder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ class WaveBuilder:
5555
a member of the ``WaveShape`` class (type: string). The floating point
5656
oscillator frequency is defined as either a frequency in Hertz or
5757
overtone ratio based on the fundamental (lowest) frequency. The
58-
amplitude is a floating point value between 0. and 1.0 although any
59-
value is allowed. No default.
58+
amplitude is a floating point value between 0.0 and 1.0 (inclusive).
59+
Amplitude values outside the range will produce overflow effects
60+
that may be unwanted. No default.
6061
:param integer table_length: The number of samples contained in the
6162
resultant waveform table. No default.
6263
:param integer sample_max: The maximum positive value of a sample,

examples/wavebuilder_chime_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
wave = WaveBuilder(
3333
oscillators=chimes,
3434
table_length=WAVE_TABLE_LENGTH,
35-
sample_max=35000,
35+
sample_max=32700,
3636
lambda_factor=1,
3737
loop_smoothing=True,
3838
)

examples/wavebuilder_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Define synth parameters
1212
SAMPLE_RATE = 22050 # The sample rate in SPS
1313
WAVE_TABLE_LENGTH = 512 # The wave table length in samples
14-
SAMPLE_MAXIMUM = 35000 # The maximum value of a sample
14+
SAMPLE_MAXIMUM = 32700 # The maximum value of a sample
1515

1616
# Define the oscillator wave shape, overtone ratio, and amplitude
1717
tone = [(WaveShape.Sine, 1.0, 0.6)]

0 commit comments

Comments
 (0)