mrotate


mrotate is a disk-based instrument that does 'tape-head' style pitch-shifting (similar to the gliss() function in rt). The instrument windows a soundfile and then transposes the windows according to the curve set in makegen 3.

Syntax:


makegen(1, 24, 1000, t0, a0, t1, a1...) /* amplitude curve for the output signal */
makegen(2, 25, 1000, 1) /* sets a hamming window function for the windowing of the signal */
makegen(3, 24, 1000, t0, a0, t1, a1...) /* curve for the transposition function */

mrotate(outskip, inskip, duration, amp, pitch_shift_0, pitch_shift_1, windowsize, inchan, spread) /* the two pitch_shift fields are in 8ve.pc, positive or negative, defining the transposition of the input signal when makegen 3 is at 0 and 1, respectively */

in comment form:

/*  mrotate -- a pitch-shifting instrument based upon the idea
*	of old rotating tape-head pitch shifters
*
*  p0 = output skip
*  p1 = input skip
*  p2 = duration
*  p3 = amplitude multiplier
*  p4 = pitch shift up or down (oct.pc) when function table 3 is 0
*  p5 = pitch shift up or down (oct.pc) when function table 3 is 1
*  p6 = window size
*  p7 = input channel number
*  p8 = stereo spread (0-1) [optional]
*  assumes function table 1 is the amplitude envelope
*  assumes function table 2 is the window envelope
*	
*  assumes function table 3 is the pitch shift envelope
*
*/

An example score:

load("mrotate")
input("/sndh/bob.dole.mono.snd")
output("/sndh/bob.dole.rotate.snd")
makegen(1, 24, 1000, 0,0, 1,1, 7.0,1, 7.8,0)
makegen(2, 25, 1000, 1) /* hanning window */
makegen(3, 7, 1000, 0, 500, 1, 500, 0)
mrotate(0, 0, 7.8, 1, -0.07, 0.09, 0.14)

A second score:

load("mrotate")
input("/sndh/bob.dole.mono.snd")
output("/sndh/bob.dole.rotate.snd")
makegen(1, 24, 1000, 0,0, 1,1, 7.0,1, 7.8,0)
makegen(2, 25, 1000, 1) /* hanning window */
makegen(3, 7, 1000, 0, 500, 1, 500, 0)
mrotate(0, 0, 7.8, 1, -0.07, 0.09, 0.14, 0, 0)
mrotate(0, 0, 7.8, 1, 0.07, -0.09, 0.15, 0, 1)