generateMelodicSeed = slow 4
$ linger 0.5
$ repeatCycles 3
-- $ palindrome \n
$ (+ (slow (irand (4)+1) (sometimes (inversion) (run (irand (4)+1)))))
$ slow ((irand 3) + 1)
$ e ("x"<~>(irand 8)) 8
$ "x*16"<~>(irand 5)
hush
let melody = slow 6 $ "0 2 [4 8 .] [3 4 3] 8 4 9"
d1
$ note
((scaleP scalePattern
$ off 4 ((+ 2 ).slow 2)
$ off 1 (inversion.slow 2)
$ off 3 (inversion.slow 3)
$ off 1.5 ((+ 2).rev.slow 2)
$ generateMelodicSeed
))#s "[pe-gtr:10,midi]" #gain 1 #orbit 0 #midichan 1
Window Function
A window function is a tool in Digital Signal Processing that allows a long signal to be broken into small pieces. Many window functions aim to do this without introducing discontinuities at the boundaries of these pieces. The window function does this by gradually reducing the gain of the signal to zero at the edges.
Some window functions have a useful property called overlap add.
Signals that have been broken up using window functions with this
property can be put back together again just by summing the pieces
together where they overlap in time. Here is the property as a
mathematical statement:
spectral leakage
Multiplying by a window function convolves its spectra with the
spectra of the signal you are windowing. Windowing a pure tone (
common functions
rectangular window
triangular window
\[ w[n] = 1 - \abs(\frac{n - \frac{n}{2}{\frac{L}{2}}), 0 \leq n \leq N \]
sine
a whole family of windows can be generated by taking powers of this
window... for some power
The even powers may be implemented as sums of cosines...
Hann
Blackman-Harris
Blackman
Gaussian
The character of the window depends on selection of
Welch window
notes: this window reaches 0 just outside its bounds creating a soft discontinuity