Skip to content

Commit d517441

Browse files
committed
Ensure detect-silence triggers even when amplitude is zero
1 parent a61d171 commit d517441

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
Binary file not shown.
Binary file not shown.

etc/synthdefs/designs/overtone/sonic-pi/src/sonic_pi/bell.clj

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@
105105
amp (varlag amp amp_slide amp_slide_curve amp_slide_shape)
106106
pan (varlag pan pan_slide pan_slide_curve pan_slide_shape)
107107
freq (midicps note)
108-
snd (* amp (bell-partials freq attack decay sustain release attack_level decay_level sustain_level dull-partials))]
109-
(detect-silence snd :action FREE)
108+
snd (* amp (bell-partials freq attack decay sustain release attack_level decay_level sustain_level dull-partials))
109+
det (+ snd (impulse:ar 0))]
110+
(detect-silence det :action FREE)
110111
(out out_bus (pan2 snd pan))))
111112

112113
(defsynth sonic-pi-pretty_bell [note 52
@@ -135,8 +136,9 @@
135136
amp (varlag amp amp_slide amp_slide_curve amp_slide_shape)
136137
pan (varlag pan pan_slide pan_slide_curve pan_slide_shape)
137138
freq (midicps note)
138-
snd (* amp (bell-partials freq attack decay sustain release attack_level decay_level sustain_level partials))]
139-
(detect-silence snd :action FREE)
139+
snd (* amp (bell-partials freq attack decay sustain release attack_level decay_level sustain_level partials))
140+
det (+ snd (impulse:ar 0))]
141+
(detect-silence det :action FREE)
140142
(out out_bus (pan2 snd pan)))))
141143

142144
(comment

0 commit comments

Comments
 (0)