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EVSMVNGE5P6TBDVVWYNJQC
{
use fundsp::hacker32::*;
fundsp_output.play(
&fundsp_kira::Machine::new(
pink() * 0.2 * envelope(|t| exp(-0.1 * t)),
// pink() * 0.5 * envelope(|t| exp(-10.0 * t)),
// pink() * 0.2,
),
&mut track,
);
}
// {
// use fundsp::hacker32::*;
// fundsp_output.play(
// &fundsp_kira::Machine::new(
// pink() * 0.1 * envelope(|t| exp(-0.1 * t)),
// // pink() * 0.5 * envelope(|t| exp(-10.0 * t)),
// // pink() * 0.2,
// ),
// &mut track,
// );
// }
fn new(node: T, settings: MachinedSettings, trackable: Trackable<Track>) -> Self {
#[inline(always)]
fn make_frame((left, right): (f32, f32)) -> kira::dsp::Frame {
kira::dsp::Frame { left, right }
}
fn new(
mut node: T,
sample_rate: f64,
settings: MachinedSettings,
trackable: Trackable<Track>,
) -> Self {
let (left, right) = self.node.get_stereo();
// Process samples
let left = self.monitor_left.filter_mono(left);
let right = self.monitor_right.filter_mono(right);
// sample rate check
let frame = kira::dsp::interpolate_frame(
self.buffer[0],
self.buffer[1],
self.buffer[2],
self.buffer[3],
(self.elapsed.as_secs_f32() / self.sample_time.as_secs_f32()).clamp(0.0, 1.0),
);
self.elapsed += Duration::from_secs_f64(dt);
while self.elapsed > self.sample_time {
self.elapsed -= self.sample_time;
// push in a new frame, by shifting over everything else
for i in 0..self.buffer.len() - 1 {
self.buffer[i] = self.buffer[i + 1];
}
self.buffer[self.buffer.len() - 1] = Self::make_frame(self.node.get_stereo());
}
// Process samples (from frame)
// Monitor samples
self.monitor_left.filter_mono(frame.left);
self.monitor_right.filter_mono(frame.right);
self.trackable.left_channel.store_sample(left);
self.trackable.right_channel.store_sample(right);
kira::dsp::Frame { left, right }
self.trackable.left_channel.store_sample(frame.left);
self.trackable.right_channel.store_sample(frame.right);
frame
[build]
public_url = "./"