Skip to content

Commit

Permalink
Documentation: Example Feedback
Browse files Browse the repository at this point in the history
Implementing feedback on examples for Line and ClockDivider
  • Loading branch information
gregwht committed Jan 29, 2024
1 parent 64c18a7 commit 5c0d208
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/library/envelope/line/example-0.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Using a line to control the gain of an oscillator, emulating a sidechain ducking effect.
#-------------------------------------------------------------------------------
clock = Impulse(frequency=1.0)
line = Line(0.0, 0.5, 1.0, 0, clock)
line = Line(0.0, 0.5, 0.5, False, clock)
osc = SawOscillator(200)
output = osc * line
output.play()
Expand Down
12 changes: 7 additions & 5 deletions docs/library/sequencing/clockdivider/example-0.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@
envelope_a = ASREnvelope(0.01, 0.0, 0.25, 1.0, clock)
envelope_b = ASREnvelope(0.01, 0.0, 0.5, 1.0, divided_clock)

voice_a = oscillator_a * envelope_a
voice_b = oscillator_b * envelope_b
voice_a = oscillator_a * envelope_a * 0.5
voice_b = oscillator_b * envelope_b * 0.5

left = StereoPanner(voice_a, -1.0)
right = StereoPanner(voice_b, 1.0)
left = StereoPanner(voice_a, -0.75)
right = StereoPanner(voice_b, 0.75)

left.play()
right.play()
right.play()

graph.wait()

0 comments on commit 5c0d208

Please sign in to comment.