Tag: favorites

High Voltage and X-Ray Experiments

By Henning Umland


“If, for example, the capacitance of C were 1000 μF, a charge of 1 mAs would result in a voltage of 1 V, independent of any current fluctuations (the capacitor voltage varies in proportion with the charge). I use two paper/oil capacitors with a total capacity of approx. 1500 μF. Thus, a capacitor voltage of 1 V is equivalent to a charge of 1.5 mAs. The time constant resulting from C and the internal resistance of the vacuum tube volt meter, VTVM (Ri = 11 MΩ), is 16500 seconds. Therefore, the capacitor voltage remains virtually constant for some time after the anode current stops flowing. Electrolytic capacitors are not suitable for such a circuit because of their relatively high and unpredictable leak current…”

From “Building a Simple X-Ray Machine”


Leap Motion Midi synth in Max

Midi notes triggered by finger movement



folder: leap-motion

patch: leapfinger2.maxpat

externals and dependencies

Download the aka.leapmotion external – and add it to your Max file path in options | file preferences: http://akamatsu.org/aka/max/objects/


  • plug in a Leap Motion sensor
  • Click the toggle to start reading Leap Motion data
  • Wave your fingers around to play notes

Granular time stretching in Max

Adaptation of Andy Farnell’s Pd granular timestretch patch

Adjustable chunk-size, pitch, and speed – as well as manual scrubbing.

The original Pd patch (timestretch.pd) is available here: http://aspress.co.uk/sd/index.php



folder: granular-timestretch


  • timestretch5.maxpat (main patch)
  • tabread4~.maxpat (Pd abstraction) 
  • hip~.maxpat (Pd abstraction)

How it works

An index pointer (file phasor) scans from the beginning to the end of the file. For example, at 44.1KHz, a 1 second file of audio would have 44,100 samples. Each sample is 022676 ms. Another phasor (grain phasor) scans small chunks (grains) of audio. If audio is playing back at the normal rate and pitch, this grain phasor runs at zero. the file phasor just moves sequentially from one grain to the next.

To stretch the time, the file phasor is slowed down, but the grain phasor speeds up, scanning grains of audio, that start at the current file phasor index. In this way, in listening to the file from beginning to end, you are actually listening to a series of overlapping grains.

As the chunk (grain) size increases the grain phasor frequency decreases.

To raise the pitch, the grain phasor frequency would be increased. To lower the pitch, the phasor frequency goes negative and increases in a negative direction to reduce pitch further.

As you can see, while running this patch, the chunk size, pitch, and speed are all related by a single equation.

phasor frequency = ((pitch / 120)**2 – speed) / chunksize

  • where pitch is in cents (0 is normal)
  • speed is a scaling factor (1 is normal)
  • chunk (grain) size  is in ms.

So the input values interact with each other.

In addition, the grain player uses a technique called PSOLA. Pitch synchronous overlap and add. There are actually two grain players playing simultaneously 180 degrees out of phase. Each is windowed using a positive cosine function. This helps to reduce clicks by crossfading from one grain to the next.

There is some comb-filtering and ringing present on the audio. There are various techniques to reduce this, including:

  • trying different window functions
  • higher sample rates
  • changing the overlap
  • varying the grain size
Interesting artifacts:
  • reducing the grain size to several ms. causes oscillation similar to the Karplus-Strong effect
  • increasing the grain size to around 1000 ms. causes a feedback delay effect due to the out of phase grain players
  • setting the overlap to anything other than .5 causes random phase cancellation
Manual or automated scrubbing.

There is also an option to manually scrub the file. This way you can listen to the texture of grains of various sizes from various points in the file.

You can also set random automatic scrubbing to branch to various points in the file.