Skip to content

Commit a28371e

Browse files
committed
Synths - add decay_curve opt to sc808 closed hihat
1 parent a7f3a78 commit a28371e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

app/server/ruby/lib/sonicpi/synths/synthinfo.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4601,7 +4601,8 @@ def arg_defaults
46014601
:lpf_slide => 0,
46024602
:lpf_slide_shape => 1,
46034603
:lpf_slide_curve => 0,
4604-
:decay => 0.42
4604+
:decay => 0.42,
4605+
:decay_curve => -30
46054606
}
46064607
end
46074608

@@ -4613,6 +4614,12 @@ def specific_arg_info
46134614
:validations => [v_positive(:decay)],
46144615
:modulatable => false
46154616
},
4617+
:decay_curve =>
4618+
{
4619+
:doc => "Curve value for the decay of the hi-hat",
4620+
:validations => [],
4621+
:modulatable => false
4622+
}
46164623
:lpf =>
46174624
{
46184625
:doc => "Low pass filter cutoff value for the hi-hat. A MIDI note representing the highest frequencies allowed to be present in the sound. A low value like 30 makes the sound round and dull, a high value like 100 makes the sound buzzy and crispy.",
Binary file not shown.

etc/synthdefs/designs/supercollider/sc808.scd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ SynthDef('sonic-pi-sc808_closed_hihat', {|
474474
lpf = 121.05875888638981, lpf_slide = 0, lpf_slide_shape = 1, lpf_slide_curve = 1,
475475

476476
decay=0.42,
477+
decay_curve = -30,
477478
out_bus = 0|
478479

479480
var sig, sighi,siglow, sum, env, osc1, osc2, osc3, osc4, osc5, osc6;
@@ -483,7 +484,7 @@ SynthDef('sonic-pi-sc808_closed_hihat', {|
483484
hpf = hpf.varlag(hpf_slide, hpf_slide_curve, hpf_slide_shape);
484485
lpf = lpf.varlag(lpf_slide, lpf_slide_curve, lpf_slide_shape);
485486

486-
env = EnvGen.kr(Env.perc(0.005, decay, 1, -30),doneAction:2);
487+
env = EnvGen.kr(Env.perc(0.005, decay, 1, decay_curve),doneAction:2);
487488
osc1 = LFPulse.ar(203.52);
488489
osc2 = LFPulse.ar(366.31);
489490
osc3 = LFPulse.ar(301.77);

0 commit comments

Comments
 (0)