From 3446ad60e3cb006d52cf9d0a04b41258ace2be63 Mon Sep 17 00:00:00 2001 From: Eugene Petkevich Date: Mon, 27 Mar 2023 02:28:51 +0200 Subject: [PATCH] play on midi-keyboard; params depend on note --- ...1\213\322\217\320\270\323\210\321\221.scd" | 37 ++++++++++++++++++- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git "a/\320\227\321\217\321\201\320\260\321\205-\320\234\321\213\322\217\320\270\323\210\321\221.scd" "b/\320\227\321\217\321\201\320\260\321\205-\320\234\321\213\322\217\320\270\323\210\321\221.scd" index 1ad4d43..326138b 100644 --- "a/\320\227\321\217\321\201\320\260\321\205-\320\234\321\213\322\217\320\270\323\210\321\221.scd" +++ "b/\320\227\321\217\321\201\320\260\321\205-\320\234\321\213\322\217\320\270\323\210\321\221.scd" @@ -464,8 +464,8 @@ Pdef.all.do{|i| i.stop}; ) ( -TempoClock.tempo = 1/4; -thisThread.randSeed = 1011; +TempoClock.tempo = 1/8; +thisThread.randSeed = 2001; Pdef(2, ~makeBeatPat.(0.1, 2, -3-100)).quant_(4).play; Pdef(3, ~makeBeatPat.(0.2, 3, -5-100)).quant_(4).play; Pdef(4, ~makeBeatPat.(0.35, 4, -12-100)).quant_(4).play; @@ -474,6 +474,39 @@ Pdef(6, ~makeBeatPat.(0.75, 6, -30-100)).quant_(4).play; Pdef(7, ~makeBeatPat.(0.9, 7, -39-100)).quant_(4).play; ) +//// testing synth and scale on keyboard + +~kedifu = MidiRemote25SL(); + +( +~synthChooser = { + ~synthNames.choose +}; + +~kedifu.mod_{|v| + ~distort = v*10; +}; + +~keyParams = {|freq, v| + [ + attack: 0.05 * (freq.cpsoct**(-0.5)), + release: 1.0 * (freq.cpsoct**(-0.9)), + distort: ~distort, + detuneMax: 0.05, + lowHarm: 2, + highHarm: (91 * (freq.cpsoct**(-0.6))).round, + harmMul: 1.3, + harmLen: 1.0, + out: ~reverbBusses.choose, + ]; +}; +) + +( +~keys = KeySynth(~kedifu, ~synthChooser, 12/13, true, {|f,v|~keyParams.(f,v)}, 0.3, + onlyWhite: true, scale: ~scale); +) +~keys.synthName = \dyti; //// s.record(bus: a.h); \ No newline at end of file -- 2.17.1