ZQD7OQ6OQB2E6CPKKT5MILYDWSR2QDNYDPCUTG3DXGY25H6ANHZQC
pink() * 0.5 * envelope(|t| exp(-t)),
fundsp_kira::AudioNodeSettings {
duration: Some(std::time::Duration::from_secs(50)),
..default()
&fundsp_kira::Machine {
machine: pink() * 0.2 * envelope(|t| exp(-0.1 * t)),
// machine: pink() * 0.5 * envelope(|t| exp(-10.0 * t)),
// machine: pink() * 0.2,
pub struct AudioNodeAdapter<T> {
impl<T: AudioUnit32> TypePath for Machine<T> {
fn type_path() -> &'static str {
static TYPE_PATH: OnceLock<String> = OnceLock::new();
TYPE_PATH
.get_or_init(|| {
let machine_type_name = std::any::type_name::<T>();
format!("{}::Machine<{machine_type_name}>", module_path!())
})
.as_str()
}
fn short_type_path() -> &'static str {
static SHORT_TYPE_PATH: OnceLock<String> = OnceLock::new();
SHORT_TYPE_PATH
.get_or_init(|| {
let machine_type_name = std::any::type_name::<T>();
format!("Machine<{machine_type_name}>")
})
.as_str()
}
}
// TODO node should be from a Machine, which is an Asset
pub struct Machined<T> {
self.settings
.duration
.is_some_and(|lim| self.elapsed >= lim)
// If we are quieter (on both channels!!) than the noise floor, assume we
// are finished an want to stop
|| (left_rms < NOISE_FLOOR_RMS && right_rms < NOISE_FLOOR_RMS)
if below_noise_floor {
info!("Stopping {self:p} due to being quieter than the noise floor!");
}
below_noise_floor