@@ -0,0 +1,63 @@
(
b = Bus.control(s);
x = {
var p, c;
# p, c = Pitch.kr(SoundIn.ar(0), clar:1);
Out.kr(b.index, p);
Out.kr(b.index+1, c);
}.play(s);

t = 0.1;
r = Routine { inf.do {
b.getn(2, { arg vals;
if (vals[1] > 0.6, {
postln([vals, vals[0].cpsmidi]);
});
});
t.wait;
}}.play;


SynthDef.new(\sine,{ arg hz=60, amp=0.2; Out.ar(0,SinOsc.ar(hz).dup*amp)}).send(s);

)

/*
r.stop;
r.start;
*/

/* dd
h = 136 * 2
y = Synth.new(\sine, [\hz, h * 2]);
z.free;
z = Synth.new(\sine, [\hz, h*3/2]);
w = Synth.new(\sine, [\hz, h*4/5]);
q = Synth.new(\sine, [\hz, h*2*15/16 * 4]);
v = Synth.new(\sine, [\hz, h*6/5]);
y.set(\hz, 36.midicps * 2);
z.set(\hz,
*/

/* bc
h = 492;
m = h.cpsmidi;
y = Synth.new(\sine, [\hz, h]);
z = Synth.new(\sine, [\hz, h*3/4]);
w = Synth.new(\sine, [\hz, h*4/5]);
w.free;
*/



/* eb
h = 281;
m = h.cpsmidi;
SynthDef.new(\sine,{ arg hz=60, amp=0.2; Out.ar(0,SinOsc.ar(hz).dup*amp)}).send(s);
y = Synth.new(\sine, [\hz, h]);
z = Synth.new(\sine, [\hz, h*]);
w = Synth.new(\sine, [\hz, h*4/5]);
w.free;
*/
Empty file.
@@ -0,0 +1,29 @@
-- @param tab: a table
-- @param fn: function taking keys and values of tab
-- @return: new table with tab's keys mapped to function results
function tab_map (tab, fn)
local t = {}
for k,v in pairs(tab) do
t[k] = fn(k,v)
end
return t
end

-- @param m: an integer
-- @param n: an integer
-- @return: greatest common divisor
function gcd ( m, n )
while n ~= 0 do
local q = m
m = n
n = q % n
end
return m
end

-- @param m: an integer
-- @param n: an integer
-- @return: least common multiple
function lcm ( m, n )
return ( m ~= 0 and n ~= 0 ) and m * n / gcd( m, n ) or 0
end
@@ -0,0 +1,43 @@
worlds = {

bc = {
start=30,
dur=110,
headroom_db = 0,
key_hz = 492,
ratios = {
{3,2},
{1,2},
{3,4},
{4,5},
}
},

dd = {
start=38,
dur=68,
headroom_db = 12,
key_hz = 272,
ratios = {
{3,2},
{4,5},
{6,5},
{30,16},
}
},

eb = {
start=78,
dur=72,
headroom_db = 0,
key_hz = 281,
ratios = {
{1,2},
{3,4},
{1,2},
{8,9},
}
}

}
world_keys = {'bc','dd','eb'}
@@ -70,10 +70,10 @@ function init()
sc.rate(i,1.0)
sc.play(i,0)

sc.post_filter_dry(i,0)
sc.post_filter_dry(i,0.5)

This comment has been minimized.

@tehn

tehn Mar 2, 2020
Member

were these changes to @infovore 's script intentional?

This comment has been minimized.

@catfact

catfact Mar 2, 2020
Author Contributor

oh sorry, no they wern't

sc.post_filter_lp(i,1)
sc.post_filter_hp(i,0)
sc.post_filter_bp(i,0)
sc.post_filter_bp(i,0.25)
sc.post_filter_br(i,0)
sc.post_filter_rq(i,0.6)

@@ -0,0 +1,85 @@
-- vorpal (nc01-drone
-- @zebra
--
-- E1 feed
-- E2 bright
-- E3 dense
-- K2 evo
-- K3 world

which_world = 1

-- order of includes matters in this case

include ('lib/vorpal/util') -- extra utilities
include ('lib/vorpal/worlds') -- world data
include ('lib/vorpal/cuts') -- softcut meta

function set_world(ix)
which_world = ix
cut_set_world(ix)
end

include ('lib/vorpal/moves') -- sequence
include ('lib/vorpal/hands') -- logic

function init()
begin_cuts()
begin_moves()
begin_hands()

params:add({type="number", id="bps", name="BPS",
min=1, max=256, default=88,
action = function(bps)
set_tick_base(1/bps)
end})

screen_tick = metro.init(function() redraw() end, 1/30, -1)
screen_tick:start()
end

function enc(n,z)
if n == 1 then delta_volume(z) end
if n == 2 then delta_bright(z) end
if n == 3 then delta_dense(z) end
end

function key(n,z)
if n == 2 then press_evolve(z) end
if n == 3 then press_world(z) end
end



function redraw()
screen.clear()
-- feedback in background
screen.level(math.floor(params:get("feed") /feed_max *16))
screen.rect(0, 0, 128, 64)
screen.fill()

-- draw things for positions
--- brightness == brightness
screen.level(math.floor(params:get("bright") /bright_max *12 +4))
for i,v in ipairs(voice_pos) do
w = v*126
x = (64-w)/2
h = 64/5
y = h*i
screen.rect(x, y, w, h)
screen.fill()
end
for i,v in ipairs(voice_loop_len_ratio) do
h = math.floor(v)
if h > 62 then h = 62 end
y = (64-h)/2
w = 128/7
x = w*(i+1)
screen.rect(x, y, w, h)
screen.level(1)
screen.fill()
end

screen.update()
end