at a certain point i lost the interest in making music - somewhere in my early 30's.
-
@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.