Changes from last post
- Switched to cross synthesis from convolution
- Now using a very short sample of the trumpet playing only one pitch
- Adjusted the range of morphing to be much smaller (12dB) so there is much more moment to moment continuity in the sound. The range is also much lower for the portion of her voice which has been cross-synthesized, that portion can now only reach a maximum of -28dB.
- Using pitch shifting on the trumpet, shifted to: an octave and minor 5th above, a minor 9th above, an octave above, a minor 5th above, a minor 2nd above, unshifted, a minor 5th below, the minor 2nd an octave down, the minor 5th two octaves down, and two octaves down. I chose these intervals in an attempt at an 'open' or 'expansive' sound that was also dissonant. Also, the wider the bandwidth of the trumpet sample the more of her vocal formants will be preserved in the synthesis.
- Removed the resonance filters (for now)
(
var score=CtkScore.new, note, gamp, fftbuf, centbuf;
var doc, ray, crossbuf, warpbuf;
doc = CtkBuffer("/Users/bion/Desktop/Transitions_In-Humanity/Doc1.wav").addTo(score);
ray = CtkBuffer("/Users/bion/Desktop/Transitions_In-Humanity/raysamp1.wav").addTo(score);
fftbuf = CtkBuffer.buffer(2**12).addTo(score);
centbuf = CtkBuffer.buffer(2**12).addTo(score);
crossbuf = CtkBuffer.buffer(2**12).addTo(score);
warpbuf = CtkBuffer.buffer(2**12).addTo(score);
gamp = -20.dbamp;
note = CtkSynthDef(\docvoicing, {
var chain, env, outS, pdoc, pray, cent, width, yi, er, san, avg, adj, centchain;
var cross, crosschain, resAdj, res, res2, res3, waste, pitch;
env = EnvGen.kr(Env([0,1,1,0], [0.01, 1, 0.01].normalizeSum, [-10, 10]), timeScale: doc.duration);
pray = PlayBuf.ar(1, ray, BufRateScale.kr(ray), loop:1);
pdoc = PlayBuf.ar(1, doc, BufRateScale.kr(doc));
#pdoc, waste = GVerb.ar(pdoc, 15, 0.14);
pray = Mix.ar(WarpIn.ar(pray, warpbuf, 1, [2.8284271247462, 2, 2*1.0594630943593, 1.4142135623731, 1, 1.0594630943593, 0.70710678118655, 0.5*1.0594630943593, 0.35355339059328, 0.25], interp: 4));
// #pitch, waste = Pitch.kr(pray);
pdoc = Compander.ar(pdoc, pdoc, -3.dbamp, 1, -12.dbamp);
chain = FFT(fftbuf, pdoc);
centchain = PV_Copy(chain, centbuf);
centchain = PV_MagAbove(centchain, 50);
cent = SpecCentroid.kr(centchain);
er = DelayC.kr(cent, 0.10, 0.10);
san = DelayC.kr(cent, 0.06, 0.06);
avg = (cent+er+san)/3;
avg = avg.min(1000);
avg = avg.max(100);
adj = LinLin.kr(avg, 100, 1000, -40.dbamp, -28.dbamp);
crosschain = FFT(crossbuf, pray);
crosschain = PV_Mul(crosschain, chain);
chain = PV_Morph(chain, crosschain, adj);
chain = IFFT(chain);
// resAdj = LinLin.kr(adj, -14.dbamp, -4.dbamp, 1, 0.5);
// res = Mix.ar(Resonz.ar(chain, pitch*[1, 2, 3], resAdj*[250/pitch, 500/(pitch*2), 1000/(pitch*3)]));
outS = chain;
outS = outS*gamp*env;
outS = Limiter.ar(outS, 0.dbamp);
Out.ar(0, outS);
});
score.add(note.new(0.5, doc.duration/3));
score.play;
score.write("~/Desktop/docvoice.wav".standardizePath,
options: ServerOptions.new.numOutputBusChannels_(1))
)
No comments:
Post a Comment