Fencepost Rhythms

The idea here is to calculate some function at regular intervals (the fenceposts) and based on some condition being true generate a MIDI event, otherwise to extend silence. An improvement may involve a graph of the equation and the fenceposts so that you can better see what the equation is doing, but that is more work.

=> trig.pl | trig.lisp

=> f(x) = sin(5x) + cos(2x) | f(x) = sin(7x) + cos(11 * sin(x/5))

The step is 0.05, so the equation is being run at 0, 0.05, 0.1, or so, these being floating point values. There are many things to fiddle with here. For example, the MIDI dtime values could vary, e.g. the rests might use a shorter value and the note event a longer sustain? More advanced would be to construct (or start to construct) a software synth with square waves, saw waves, etc.

Actual uses for these rhythms might be to select snippets that work, or to use the beats for machine or space noises that need to be regular but not really conform to expected musical rhythms.

Proxy Information
Original URL
gemini://thrig.me/blog/2024/10/04/fencepost-rhythms.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
1009.458085 milliseconds
Gemini-to-HTML Time
0.232289 milliseconds

This content has been proxied by September (3851b).