Skip to content

Instantly share code, notes, and snippets.

View yotamorimoto's full-sized avatar
🖖

yota morimoto yotamorimoto

🖖
View GitHub Profile
Server.supernova;
s.reboot;
// use your own sound instead:
b = Buffer.read(s,"/Users/yota/Desktop/tail.wav");
b = Buffer.read(s,"/Users/yota/Music/am_cpb/maison/mk_nuit1-.wav");
~pos = Bus.control;
(
SynthDef(\play, { |rate=1, pos=0, dur=1, pan=0|
var sig, env;
sig = PlayBuf.ar(2, b, rate, 1, ~pos.kr*SampleRate.ir);
(
// how many
n = 9;
// grid of nxn
~grid = 0!n!n;
// our process
~process = {1.0.rand2};
// install
Quarks.install("https://github.com/yotamorimoto/sc_ca.git");
Quarks.install("https://github.com/yotamorimoto/sc_sample.git");
// recompile class library
// before proceeding
// look
Pca1({2.rand}!512, 50).plot;
/*******************************************************************************
2012年制作
2021年動作確認
demo live-coding using synth emulations from ymo 'rydeen'
yota morimoto
*******************************************************************************/
(
// double clicking selection.
s = Server.default;
TempoClock.default.tempo = 128/60;
@yotamorimoto
yotamorimoto / gist:2339477
Last active September 26, 2024 13:33
らいでぃーん
/*******************************************************************************
"rydeen" -- ymo
old school exercise -- yota morimoto
2024 動作確認済み
*******************************************************************************/
(
// ダブルクリックで選択後、実行
// ページ下の再生コードを実行
TempoClock.default.tempo = 142/60;
s = Server.default;
リードシンセとリバーブ
(
// メロディ用のリードシンセ
SynthDef(\lead, { |out=0, gate=1, amp=0.1, freq=440|
var sig, env;
env = EnvGen.kr(Env.adsr(0.01), gate, amp, 0, 1, 2);
sig = Mix.ar(LFTri.ar([freq, freq*2])); // オクターブを重ねる
sig = HPF.ar(sig, 500);
sig = sig * env;
Out.ar(out, sig);
和音と配列
(
SynthDef(\hrm, { |amp, freq=440|
var sig, env;
env = EnvGen.kr(Env.perc, 1, amp, doneAction: 2);
sig = Saw.ar([freq, freq*0.99]);
sig = RLPF.ar(sig, 3200);
Out.ar(0, sig * env);
}).add;
@yotamorimoto
yotamorimoto / gist:2332157
Last active July 28, 2021 11:17
mtranspose
(
// ノコギリ波をつかう
SynthDef(\arp, { |gate=1, amp=0.1, sustain=1, freq=440, pan=0|
var sig, env;
env = EnvGen.kr(Env.adsr, gate, amp, 0, sustain, 2);
sig = Mix(LFSaw.ar([freq,freq+0.1])).softclip;
sig = RLPF.ar(sig, 4500, 0.5);
sig = Pan2.ar(sig, pan, env);
Out.ar(0, sig);
}).add;
(
// これまで作ったリズム隊のパターンを再定義します
// シンセ定義は以前のものを使う
~hatA = Pbind(\instrument, \hat,
\dur, Pn(0.25, 4 * 4 * 8), // 注1
\amp, Pseq([0.4, 0.2, 0.3, 0.2], inf),
\pan, -0.5
);
~snrA = Pbind(\instrument, \snr,
\dur, Pseq([
ベース作りと音階、音度、オクターブについて
倍音成分が豊かな「ノコギリ波」をフィルタリングしてつくる
(
// 引数 freq, gate を準備
SynthDef(\bss, { |gate=1, amp=0.1, sustain=1, freq=440|
var sig, env;
env = EnvGen.kr(Env.adsr, gate, amp, 0, sustain, 2);
// 2つのノコギリ波をmixし少し歪みを加える
sig = Mix(Saw.ar([freq,freq+0.1])).tanh;