Enum Medium
pub enum Medium {
None,
TapeOxide,
BbdLeakage,
DigitalQuantize,
}Expand description
Physical storage medium model for the delay buffer.
In real tape and BBD circuits, the storage medium itself transforms the signal while it sits in the buffer. This is physically distinct from write-side processing (saturation at the record head) and read-side processing (gap loss at playback heads), which are handled by WDF elements in the signal chain.
The medium processing uses a zone-based approach: the virtual tape path is divided into zones, and each sample gets processed once as it crosses a zone boundary. This is O(zones) per tick, not O(buffer_length), keeping CPU cost negligible.
Variants§
None
Clean digital delay — no buffer processing.
TapeOxide
Magnetic tape self-demagnetization. Adjacent domains with opposing polarity partially cancel, causing frequency-dependent HF loss that increases with distance from the record head. Short wavelengths (high frequencies) are affected more because opposing domains are physically closer.
BbdLeakage
BBD charge leakage. Amplitude decays uniformly toward zero over time (not frequency- dependent like tape). Each bucket loses a fraction of its charge on every clock cycle.
DigitalQuantize
Digital bit reduction (PT2399-style).
Quantization happens at write time only — no ongoing buffer
processing. The process_medium() method is a no-op for this mode.
Trait Implementations§
impl Copy for Medium
impl Eq for Medium
impl StructuralPartialEq for Medium
Auto Trait Implementations§
impl Freeze for Medium
impl RefUnwindSafe for Medium
impl Send for Medium
impl Sync for Medium
impl Unpin for Medium
impl UnsafeUnpin for Medium
impl UnwindSafe for Medium
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.