Closed tomara-x closed 1 month ago
little out() issues:
self modulation
wait for the fundsp refactor and the bevy release
yeet the slot. replacing it with a net with a backend
we keep a resource and add/remove entity id's to it. in there we also keep a HashMap<Entity, NodeId>.. when an entity is added to out, we get its net, push that to the output net (mix to out), store its NodeId. (maybe just the hash map will do?)
when a circle is removed, get its Entity, disconnect the node and remove it
when a node is changed but is still connected, we replace (we check arity outside anyways)
is it possible to send networks back and forth (like with crossbeam)? like, i'm thinking mem::take and replace. the network is taken, sent to audio thread, it's ticked there. when it's disconnected we send something that says "hey i want that network back", we receive it, and use mem::replace. so now it's sitting in the component with its current state. so the audio thread keeps a vec of networks and mixes them. figure out if this is possible
wait, do we even need to take and replace? like if it's possible to send nets, then i don't care about if they reset. connect seq -> seq is sent to thread connect sine -> seq and sine are sent (but since seq is already in the audio thread's vec, it's ignored and we only add sine
i'm so missing something that's gonna render this plan into a joke tomorrow
oh lol lmao, make sure you use assert no alloc when testing this xD
why am i not sending &mut Net?
suppose this works, it's only useful when connecting new nets to an out.. aka never...
i don't think this will be possible :(
the way nets are cloned is necessary to the way the graphs are constructed, changing that means rewriting everything :<
hey baby! 3d96d6b
i'd like nodes to be independent when processed. if a seq is playing, then we connect an oscillator, there's no need to reset the seq