Closed tomara-x closed 5 months ago
even you, ramp()?! BETRAYAL! same with piping through a filter first (lol what did you expect?)
try with multiple! like 8! see if any of them are identical
i'm going to a commune in vermont and will deal with no unit of time shorter than a season
this has something to do with ping() and the AttoHash
Pico sized hasher. It is used in computing deterministic pseudorandom phase hashes
but why would you assign a random phase to oscillators? it makes no sense
eh
fuck! i need to bisect to be sure, but i think 67c6f4d stopped this behavior? (or something since 0.4) (which is great! i'm happy that doesn't happen to oscillators anymore.. but the question is: why tf)
i love fundsp! i love how i can just do this
use fundsp::hacker32::*;
fn main() {
let mut net1 = Net32::wrap(Box::new(sine_hz(440.)));
let mut net2 = Net32::wrap(Box::new(sine_hz(440.)));
let mut net3 = net1.clone() | net2.clone();
let mut net4 = Net32::wrap(Box::new(net1.clone() | net2.clone()));
println!("1: {:?}", net1.get_mono());
println!("2: {:?}", net2.get_mono());
println!("3: {:?}", net3.get_stereo());
println!("4: {:?}", net4.get_stereo());
}
and yep, that confirms it
1: -0.46202415
2: -0.46202415
3: (-0.46202415, -0.46202415)
4: (-0.26424092, -0.99266475)
FunDSP uses a deterministic pseudorandom phase system for audio generators. Generator phases are seeded from network structure and node location.
network structure and node location..
fundsp bug https://discord.com/channels/590254806208217089/780429214809063444/1247429203993821318
now the question is: why did the pseudorandom phase never happen with ramp() (the new version) (it needs the hash method to be implemented, right?)
yup! everything makes sense now!
/// Set node pseudorandom phase hash.
/// This is called from `ping` (only). It should not be called by users.
/// The node is allowed to reset itself here.
#[allow(unused_variables)]
fn set_hash(&mut self, hash: u64) {
// Override this to use the hash.
// The default implementation does nothing.
}
in the case of noise, yeah that's great, but why's an oscillator spitting different samples? the nets are cloned, they should be independent
try with other generators, maybe the ramp? what happens if it's the same oscillator going through a filter, then that's stacked?