Skip to content

Commit

Permalink
DEVICES: blepsynth/plotblep.py: fix minor plotting bug
Browse files Browse the repository at this point in the history
sub_phase reset wasn't implemented properly

Signed-off-by: Stefan Westerfeld <[email protected]>
  • Loading branch information
swesterfeld committed Nov 3, 2020
1 parent 7e74315 commit 06a5a7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devices/blepsynth/plotblep.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ def osc_py (params):
sub_phase = 0 # not really correct (see bleposc.hh for a better implementation)

sub_phase += 0.0005 * sync_factor
saw_state = -4 * sub_phase * (shape + 1)
if sub_phase > 1:
sub_phase -= 1

saw_state = -4 * sub_phase * (shape + 1)

if sub_phase > c:
pout = shape * 4 + 3
sout = 1
Expand Down

0 comments on commit 06a5a7d

Please sign in to comment.