MOCKBEND -- cubic spline dynamic pitch-shifter
in RTcmix/insts/std


quick syntax:
MOCKBEND(outsk, insk, dur, amp, pitchenvgenno[, inputchan, pan])


   p0 = output start time (seconds)
   p1 = input start time (seconds)
   p2 = output duration (or endtime if negative) (seconds)
   p3 = amplitude multiplier (relative multiplier of input signal)
   p4 = function table number for pitch envelope
   p5 = input channel [optional, default is 0]
   p6 = percent to left [optional, default is .5]
	Assumes gen table 1 is amplitude curve for the note.

   Because this instrument has not been updated for pfield control,
   the older makegen control envelope sysystem should be used:

   assumes function table 1 is the amplitude envelope

   Author:  Ivica Ico Bukvic (based on Doug Scott's TRANSBEND instrument)



MOCKBEND performs a time-varying pitch transposition on a mono input signal (channel-selectable) using cubic spline interpolation



Usage Notes

MOCKBEND is a version of TRANSBEND designed to work with real-time input sources, such as a microphone or aux bus. It processes only one channel at a time.

MOCKBEND uses the older makegen control envelope system to specify the pitch-transposition envelope. It uses the function table specified by p4 for this data. The interval values in this table are expressed in linear octaves (makegen(2, ...) is probably best for this).

MOCKBEND can produce either mono or stereo output.



Sample Scores

basic use:

   rtsetparams(44100, 2)
   load("MOCKBEND")

   rtinput("mysoundfile.aif")
   
   dur = DUR(0)
   amp = 1.5
   pan = 0.5
   
   /* amplitude curve */
   setline(0,0, 1,1, 90,1, 100,0)
   
   /* transpose from 4 semitones up to 8 down - stored in gen slot 2 */
   makegen(-2, 18, 512, 1,.4, 512,-.8)
   
   MOCKBEND(0, 0, dur, amp, 2, 0, pan)



See Also

PVOC, SCRUB, TRANS, TRANS3, TRANSBEND