at a certain point i lost the interest in making music - somewhere in my early 30's.
-
@lritter I'm not any less tired but I took another stab at trying to see it. As I understand it, datalog patches describe the explicit and implicit connections between things, and high level audio synthesis is often described as a set of connections, between modules, so I could see that angle working since the math is pulled out of focus, but the implicit connections part is still fuzzy to me. Is this more or less along the lines of what you have in mind?
@aeva it's also relational (in the einstein sense), which allows you (and the compiler) to radically shift perspective with few changes. you can invert a function just by reading it from the outside in. it's particularly well suited to graph processing. in soufflรฉ, a datalog dialect, a toposort is 3 lines. a SCC analysis is less than 10 lines. a raytracer should be similarly dense. and you're thinking data oriented rather than functional - good for entity component systems. for audio:
-
@aeva it's also relational (in the einstein sense), which allows you (and the compiler) to radically shift perspective with few changes. you can invert a function just by reading it from the outside in. it's particularly well suited to graph processing. in soufflรฉ, a datalog dialect, a toposort is 3 lines. a SCC analysis is less than 10 lines. a raytracer should be similarly dense. and you're thinking data oriented rather than functional - good for entity component systems. for audio:
@aeva say we generate a sample of a sine with:
samplerate(44100).
duration(0.5).
pitch(440).
sample(i, sin(t * TAU * p)) :- samplerate(hz), duration(s), range(i, 0, hz * s, 1), t = i / hz, pitch(p).sample() then becomes a wavetable.
challenge: also generate wavetables for pitch 220 and 880. how would you do it?
-
@aeva say we generate a sample of a sine with:
samplerate(44100).
duration(0.5).
pitch(440).
sample(i, sin(t * TAU * p)) :- samplerate(hz), duration(s), range(i, 0, hz * s, 1), t = i / hz, pitch(p).sample() then becomes a wavetable.
challenge: also generate wavetables for pitch 220 and 880. how would you do it?
@lritter am i doing it right
-
@aeva now do it for 120 pitches.
-
@aeva now do it for 120 pitches.
@lritter I already did it for 1000 the other month https://github.com/Aeva/mollytime/blob/457a7df7fee8e2e5a6b6cdf8d070fc0228b7c109/mollytime/screens/common.py#L79
-
@lritter I already did it for 1000 the other month https://github.com/Aeva/mollytime/blob/457a7df7fee8e2e5a6b6cdf8d070fc0228b7c109/mollytime/screens/common.py#L79
@aeva want to know how i do it in my little example?
-
@aeva want to know how i do it in my little example?
@lritter yes
-
@aeva
samplerate(44100).
duration(0.5).
pitch(hz) :- range(p, 0, 10, 1/12), hz = pow(2, p).
sample(p, i, sin(t * TAU * p)) :- samplerate(hz), duration(s), range(i, 0, hz * s, 1), t = i / hz, pitch(p). -
@aeva
samplerate(44100).
duration(0.5).
pitch(hz) :- range(p, 0, 10, 1/12), hz = pow(2, p).
sample(p, i, sin(t * TAU * p)) :- samplerate(hz), duration(s), range(i, 0, hz * s, 1), t = i / hz, pitch(p).@lritter :- s
-
@lritter ...... i don't get it ;_;
-
@aeva hehe. now if i wanted to extend dimensions and also have multiple samplerates, i could do the same again, without making any changes to the implementation of sample(). "i need more than 1 of this" is the simplest task here.
-
@aeva each term on the right hand side is a for-loop, iterating 0, 1 or n times. they all nest.
-
@aeva hehe. now if i wanted to extend dimensions and also have multiple samplerates, i could do the same again, without making any changes to the implementation of sample(). "i need more than 1 of this" is the simplest task here.
@lritter I was thinking of adding functions to mollytime and some sugar for making parallel copies to do this sort of thing
-
@lritter I was thinking of adding functions to mollytime and some sugar for making parallel copies to do this sort of thing
@lritter i might be more of a pictures person ๐ถ
-
@aeva me too. which is why the editor. these are just powerful logic foundations. it's very little to learn, but extremely effective.