Skip to content

Instantly share code, notes, and snippets.

View ALOUT's full-sized avatar

Taichi Arai ALOUT

  • 日本
View GitHub Profile
@ALOUT
ALOUT / SinMFilterSequence.scd
Last active August 29, 2015 14:01
サイン波&MoogFF(SynthDefの定義からPbindを使用した簡単なシーケンス)
(
SynthDef(\SawAndMoogFilter, { |out, freq=440, amp=0.1, gate=1,cutoff=1000,resonance=2|
var snd = Splay.ar(SinOsc.ar(freq * [1,2,3,4], mul:0.25));
snd = MoogFF.ar(snd, cutoff * 10, resonance);
snd = snd * EnvGen.ar(Env.adsr(0.501, 0.1, 0.7, 0.8), gate, doneAction:2);
OffsetOut.ar(out, snd * amp)
}).add;
);
@ALOUT
ALOUT / Quarks-wslib.scd
Last active August 29, 2015 14:02
Quarks拡張(wslib)の音名表記
// Quarks.install(”wslib”);な書き方
Pbind(\midinote, Pseq(["D2", "Bb3", "G4", "Bb5"].namemidi, inf)).play;
@ALOUT
ALOUT / makeEffect.scd
Last active August 29, 2015 14:02
Effectt-SynthDef定義用ラッパー
~makeEffect = {| name, func, lags, numChannels = 2 |
SynthDef(name, {| i_bus = 0, gate = 1, wet = 1|
var in, out, env, lfo;
in = In.ar(i_bus, numChannels);
env = Linen.kr(gate, 2, 1, 2, 2); // fade in the effect
out = SynthDef.wrap(func, lags, [in, env]);
XOut.ar(i_bus, wet * env, out);
}, [0, 0, 0.1] ).add;
};
@ALOUT
ALOUT / bbcut2.scd
Last active August 29, 2015 14:02
簡易ドラムマシン テンプレート(Pbind Sequence) -> BBCut2
s.boot;
s.quit;
(
SynthDef(\drums, {|out = 0, bassLevel = 0,
snareLevel = 0, hatLevel = 0, tomLevel = 0,
pan1 = 0, pan2 = 0, pan3 = 0, pan4 = 0|
var env1, env2, env3, bass, snare, hat, tom, bassOut, snareOut,
@ALOUT
ALOUT / 808Kick.scd
Created May 30, 2014 10:21
808LikeなKick
SynthDef("808kick", { arg gate=0;
var daNoise,daOsc,env1,env2,env3;
env1=Env.perc(0.001,1,80,-20);
env2=Env.perc(0.001,1,1,-8);
env3=Env.perc(0.001,1,80,-8);
daNoise=LPF.ar(WhiteNoise.ar(1),EnvGen.kr(env1,gate)+20);
daOsc=LPF.ar(SinOsc.ar(EnvGen.kr(env3,gate)+20),200);
Out.ar(0,Pan2.ar(
Mix.ar([daNoise,daOsc]),
0,
@ALOUT
ALOUT / dewdrop_libMixer.scd
Created May 31, 2014 01:14
dewdrop_libMixerテンプレート
MixerChannelDef(\mix1x4, 1, 4,
SynthDef(\mix1x4, { |busin, busout, xpos, ypos, level|
var sig = In.ar(busin, 1);
sig = Pan4.ar(sig, xpos, ypos, level);
Out.ar(busout, sig);
ReplaceOut.ar(busin, sig);
}),
controls: (xpos: \bipolar,
ypos: \bipolar,
level: (value: 0.75, spec: \amp))
@ALOUT
ALOUT / PianoSeq
Last active August 29, 2015 14:02
ピアノパターン #01
(
SynthDef(\mdapiano1, { |out=0, freq=440, gate=1|
var son = MdaPiano.ar(freq, gate, release: 0.9, stereo: 0.3, sustain: 0);
DetectSilence.ar(son, 0.01, doneAction:2);
Out.ar(out, son * 0.1);
}).add;
)
TempoClock.default.tempo = 0.8;
@ALOUT
ALOUT / WAVRecording.scd
Created June 1, 2014 09:25
WAV録音テンプレート
s = Server.default;
s.waitForBoot{
s.recChannels_(2);
s.recHeaderFormat_('WAV');
s.recSampleFormat_('float');
s.prepareForRecord("/Users/kinksaiz/Desktop/multi.wav");
s.sync;
s.record;
};
@ALOUT
ALOUT / mono2stereo.scd
Created June 1, 2014 10:58
mono->stereo Buffer
~amen = Buffer.readChannel(s,"/Applications/SuperCollider/sounds/Break001.aiff", channels:[0,0]);
@ALOUT
ALOUT / amenGlitches.scd
Created June 1, 2014 11:40
amen Glitchテンプレート
// @phrontist
// https://soundcloud.com/phrontist/lazy-amen-break-glitches
s.reboot;
s.stop;
~amen = Buffer.readChannel(s,"/Applications/SuperCollider/sounds/fools_gold.wav", channels:[0,0]);
SynthDef(\loop, {| out = 0, bufnum = 0, gate = 1, pos = 0, speed = 1, freq = 0, endfreq = 0.001, sustain, wobble = 1, boost = 1|