ReimData
A convenience class for holding data used for Auditory Augmentation.
Internally the data is send to a control-rate bus, which then can be accessed via the kr method.
See also (ReimFilter).
(
// load some Data
q = q ? ();
q.data = CSVFileReader.readInterpret("/localvol/data/share/testData/glass.csv");
// use first 9 Dimensions
q.data = q.data.flop[0..8].flop;
)
// prepare server to be (a) responsive and (b) able to process upto 1200 bus inputs at once in one synthdef
Server.default = s = Server.internal
s.options.blockSize = 32; // (a)
s.options.hardwareBufferSize = 32; // (a)
s.options.numWireBufs = 64; // (b)
// boot server
s.boot
// instantiate an sData object and fill it with one row of data
q.sData = ReimData(s, q.data.shape.last);
q.sData.data = q.data.choose;
// create a Reim with the sData
Ndef(\sReim, {|gThresh = 0.1, amp = 1, ringtime = 0.1, highFreq = 1000|
var in = SoundIn.ar(0);
var freqs, amps, rings;
in = Gate.ar(in * amp, Amplitude.kr(in, releaseTime: 0.1)-gThresh);
freqs = Select.kr(q.sData.kr.abs > 0, [100, q.sData.kr.abs]) * 4000 + 2000;
amps = q.sData.kr > 0;
rings = q.sData.kr > 0;
in = (in + HPF.ar(in, highFreq)) * 0.5;
DynKlank.ar(
`[freqs.lag(0.1), DelayN.kr(amps, 0.1, 0.1), rings * ringtime],
in * 0.25
).tanh;
})
Ndef(\sReim).play