tomara-x / quartz

visual programming and dsp playground
https://codeberg.org/tomara-x/quartz
Apache License 2.0
90 stars 3 forks source link

math functions as ops #68

Closed tomara-x closed 9 months ago

tomara-x commented 9 months ago

don't bother with env/lfo we have our own control rate. just pass them through a var and filter when needed in networks

time inputs use the time resource lollll you don't actually give it time, silly

tomara-x commented 9 months ago

:green_circle:

tomara-x commented 9 months ago

you're so gorgeous!

lfo_in(|t, i: &Frame<f32, U1>| (t*i[0]).rem_euclid(1.))

but why don't you wrap?!!

tomara-x commented 9 months ago

it does wrap, probe is a mess. always listen to things instead of looking at them

tomara-x commented 9 months ago

wait a sec! update

Update enclosed node x with approximately dt seconds between updates. The update function is f(t, dt, x) where t is current time, dt is time from previous update, and x is the enclosed node.

:red_circle:

tomara-x commented 9 months ago

this turned into a fixing probe issue! try hold() and make it refresh on gained done

tomara-x commented 9 months ago

nope, you need a snoop. store it in a component (cause you'll have multiple) and that's your probe

:green_circle:

tomara-x commented 9 months ago

or maybe just get 735 samples...

edit: i love you!

tomara-x commented 9 months ago

holy game devs!

map(|i: &Frame<f32, U2>| max(i[0], i[1]));
tomara-x commented 9 months ago
map(|i: &Frame<f32, U2>| if i[0] > i[1] {1.} else {0.})

clock (with the ramp as input)

https://github.com/tomara-x/quartz/assets/86204514/cccc5187-d8e3-483a-8e35-fa9e9b56d851

tomara-x commented 9 months ago

what does tick() do? does it progress time without processing? if so gimme gimme! no, it just processes one sample with given array of inputs and array of outputs

:green_circle:

tomara-x commented 9 months ago

gimme custom nodes?

or..

// take ramp delayed version and pipe into <
(ramp | ramp >> tick()) >> <()

easy way to make nodes update like env nodes?

:green_circle:

tomara-x commented 9 months ago

instead of doing this, maybe we can define env/audio-rate units and have a wrapping entity that takes an input net (like pipe) and processes a single sample (the tick() method takes a frame of inputs and a frame of outputs) this way you avoid defining audio and visual versions of each function

so it can take an entity holding a unit like >() and take 2 inputs, stick those in a frame, and make a frame for the output and tick >() with those frames. magic

thank goodness! tick takes slices, not frames

tomara-x commented 9 months ago

call it apply, like lisp :3

tomara-x commented 9 months ago

just 2 entities. read input array (and audio node? i think not, it's doable but would be extra confusing) from bh.parent. and write output array to self. also only process if input array was changed

tomara-x commented 9 months ago

good work, bitch :hibiscus: