-
-
Notifications
You must be signed in to change notification settings - Fork 918
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2628 from level-xx/main
Synths winwood_lead, bass_foundation, and bass_highend
- Loading branch information
Showing
7 changed files
with
373 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Adapted for Sonic Pi from | ||
// https://raw.githubusercontent.com/supercollider/supercollider/develop/examples/demonstrations/stealthissound.scd | ||
// Published there under GPL v3, so re-published under the same terms, see: | ||
// https://www.gnu.org/licenses/gpl-3.0.en.html | ||
// Date of modification: 10.01.2021 | ||
|
||
( | ||
SynthDef('sonic-pi-bass_foundation', {| | ||
note = 40, note_slide = 0, note_slide_shape = 1, note_slide_curve = 0, | ||
amp = 1, amp_slide = 0, amp_slide_shape = 1, amp_slide_curve = 0, | ||
pan = 0, pan_slide = 0, pan_slide_shape = 1, pan_slide_curve = 0, | ||
attack = 0.01, decay = 0, sustain = 0.9, release = 0.05, | ||
attack_level = 1, decay_level = 0.5, sustain_level = 0, | ||
cutoff = 83, cutoff_slide = 0, cutoff_slide_shape = 1, cutoff_slide_curve = 0, | ||
res = 0.5, res_slide = 0, res_slide_shape = 1, res_slide_curve = 0, | ||
out_bus = 0| | ||
|
||
var snd, osc, env, filterenv; | ||
|
||
note = note.midicps; | ||
note = note.varlag(note_slide, note_slide_curve, note_slide_shape); | ||
decay_level = Select.kr(decay_level < 0, [decay_level, sustain_level]); | ||
amp = amp.varlag(amp_slide, amp_slide_curve, amp_slide_shape); | ||
pan = pan.varlag(pan_slide, pan_slide_curve, pan_slide_shape); | ||
|
||
cutoff = cutoff.midicps; | ||
cutoff = cutoff.varlag(cutoff_slide, cutoff_slide_curve, cutoff_slide_shape); | ||
|
||
res = res.varlag(res_slide, res_slide_curve, res_slide_shape); | ||
|
||
osc = Saw.ar(note); | ||
|
||
filterenv = EnvGen.ar(Env.adsr(0.0, 0.5, 0.2, 0.2), 1, doneAction:2); | ||
snd = RLPF.ar(osc,cutoff*filterenv+100, res); | ||
|
||
env = Env.new( | ||
[0, attack_level, decay_level, sustain_level, 0], | ||
[attack,decay,sustain,release], | ||
\lin | ||
); | ||
|
||
snd = Pan2.ar(Mix(snd) * EnvGen.kr(env, doneAction: 2), pan); | ||
|
||
Out.ar(out_bus, snd * amp); | ||
}).writeDefFile("/Users/sam/Development/RPi/sonic-pi/etc/synthdefs/compiled/"); | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Adapted for Sonic Pi from | ||
// https://raw.githubusercontent.com/supercollider/supercollider/develop/examples/demonstrations/stealthissound.scd | ||
// Published there under GPL v3, so re-published under the same terms, see: | ||
// https://www.gnu.org/licenses/gpl-3.0.en.html | ||
// Date of modification: 11.01.2021 | ||
|
||
( | ||
SynthDef('sonic-pi-bass_highend',{| | ||
note = 40, note_slide = 0, note_slide_shape = 1, note_slide_curve = 0, | ||
amp = 1, amp_slide = 0, amp_slide_shape = 1, amp_slide_curve = 0, | ||
pan = 0, pan_slide = 0, pan_slide_shape = 1, pan_slide_curve = 0, | ||
attack = 0.01, decay = 0, sustain = 0.9, release = 0.05, | ||
attack_level = 1, decay_level = 0.5, sustain_level = 0, | ||
cutoff = 102, cutoff_slide = 0, cutoff_slide_shape = 1, cutoff_slide_curve = 0, | ||
res = 0.1, res_slide = 0, res_slide_shape = 1, res_slide_curve = 0, | ||
drive = 2.0, drive_slide = 0, drive_slide_shape = 1, drive_slide_curve = 0, | ||
out_bus = 0| | ||
|
||
var osc, snd, env, filterenv, ab; | ||
|
||
note = note.midicps; | ||
note = note.varlag(note_slide, note_slide_curve, note_slide_shape); | ||
decay_level = Select.kr(decay_level < 0, [decay_level, sustain_level]); | ||
amp = amp.varlag(amp_slide, amp_slide_curve, amp_slide_shape); | ||
pan = pan.varlag(pan_slide, pan_slide_curve, pan_slide_shape); | ||
|
||
cutoff = cutoff.midicps; | ||
cutoff = cutoff.varlag(cutoff_slide, cutoff_slide_curve, cutoff_slide_shape); | ||
|
||
res = res.varlag(res_slide, res_slide_curve, res_slide_shape); | ||
|
||
drive = drive.varlag(drive_slide, drive_slide_curve, drive_slide_shape); | ||
|
||
osc = Mix(Saw.ar(note*[0.25,1,1.5],[0.5,0.4,0.1])); | ||
filterenv = EnvGen.ar(Env.adsr(0.0,0.5,0.2,0.2), doneAction:2); | ||
snd = RLPF.ar(osc,cutoff*filterenv+100,res); | ||
|
||
ab = abs(snd); | ||
snd = (snd*(ab + drive)/(snd ** 2 + (drive - 1) * ab + 1)); | ||
|
||
// Remove low end | ||
snd = BLowShelf.ar(snd, 300, 1.0, -12); | ||
|
||
// Dip at 1600Hz | ||
snd = BPeakEQ.ar(snd, 1600, 1.0, -6); | ||
|
||
env = Env.new( | ||
[0, attack_level, decay_level, sustain_level, 0], | ||
[attack,decay,sustain,release], | ||
\lin | ||
); | ||
|
||
snd = Pan2.ar(Mix(snd) * EnvGen.kr(env, doneAction: 2) * 2, pan); | ||
|
||
Out.ar(out_bus, snd * amp); | ||
|
||
}).writeDefFile("/Users/sam/Development/RPi/sonic-pi/etc/synthdefs/compiled/"); | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
// Adapted for Sonic Pi from | ||
// https://raw.githubusercontent.com/supercollider/supercollider/develop/examples/demonstrations/stealthissound.scd | ||
// Published there under GPL v3, so re-published under the same terms, see: | ||
// https://www.gnu.org/licenses/gpl-3.0.en.html | ||
// Date of modification: 10.01.2021 | ||
|
||
( | ||
SynthDef('sonic-pi-winwood_lead', {| | ||
note = 69, note_slide = 0, note_slide_shape = 1, note_slide_curve = 0, | ||
amp = 1, amp_slide = 0, amp_slide_shape = 1, amp_slide_curve = 0, | ||
pan = 0, pan_slide = 0, pan_slide_shape = 1, pan_slide_curve = 0, | ||
attack = 0.01, decay = 0, sustain = 0.9, release = 0.05, | ||
attack_level = 1, decay_level = 0.5, sustain_level = 0.5, | ||
cutoff = 119, cutoff_slide = 0, cutoff_slide_shape = 1, cutoff_slide_curve = 0, | ||
lfo_width = 0.01, lfo_width_slide = 0, lfo_width_slide_shape = 1, lfo_width_slide_curve = 0, | ||
lfo_rate = 8, lfo_rate_slide = 0, lfo_rate_slide_shape = 1, lfo_rate_slide_curve = 0, | ||
res = 0.8, res_slide = 0, res_slide_shape = 1, res_slide_curve = 0, | ||
seed = 0, rand_buf = 0, | ||
out_bus = 0| | ||
|
||
var snd, pulse, env, lfo; | ||
var rand_val; | ||
|
||
note = note.midicps; | ||
note = note.varlag(note_slide, note_slide_curve, note_slide_shape); | ||
decay_level = Select.kr(decay_level < 0, [decay_level, sustain_level]); | ||
amp = amp.varlag(amp_slide, amp_slide_curve, amp_slide_shape); | ||
pan = pan.varlag(pan_slide, pan_slide_curve, pan_slide_shape); | ||
|
||
cutoff = cutoff.midicps; | ||
cutoff = cutoff.varlag(cutoff_slide, cutoff_slide_curve, cutoff_slide_shape); | ||
|
||
lfo_width = lfo_width.varlag(lfo_width_slide, lfo_width_slide_curve, lfo_width_slide_shape); | ||
lfo_rate = lfo_rate.varlag(lfo_rate_slide, lfo_rate_slide_curve, lfo_rate_slide_shape); | ||
|
||
res = res.varlag(res_slide, res_slide_curve, res_slide_shape); | ||
|
||
rand_val = BufRd.kr(1, rand_buf, seed, 1); | ||
|
||
lfo = LFTri.kr(lfo_rate,(rand_val*2.0)!2); | ||
|
||
pulse = Mix(Pulse.ar(note*[1,1.001]*(1.0+(lfo_width*lfo)),[0.2,0.19]))*0.5; | ||
|
||
snd = RLPF.ar(pulse,cutoff,res); | ||
|
||
snd = BLowShelf.ar(snd,351,1.0,-9); | ||
|
||
env = Env.new( | ||
[0, attack_level, decay_level, sustain_level, 0], | ||
[attack,decay,sustain,release], | ||
\lin | ||
); | ||
|
||
snd = Pan2.ar(Mix(snd) * EnvGen.kr(env, doneAction: 2), pan); | ||
|
||
Out.ar(out_bus, snd * amp); | ||
}).writeDefFile("/Users/sam/Development/RPi/sonic-pi/etc/synthdefs/compiled/"); | ||
) |