Tree-Axis ``` Processing  


Back  
Name  

TempoShift

   
Examples  
// Example by Krister Olsson

import krister.Ess.*;

AudioChannel myChannel;
TempoShift myTempoShift;

void setup() {
  size(256,200);

  // start up Ess
  Ess.start(this);

  // load "cell.aif" into a new AudioChannel
  myChannel=new AudioChannel("cell.aif");

  // make the first 2 seconds twice as fast
  myTempoShift=new TempoShift(.5);
  
  myTempoShift.filter(myChannel,0,myChannel.frames(2000));

  // play
  myChannel.play();
}

void draw() {
}

// we are done, clean up Ess

public void stop() {
  Ess.stop();
  super.stop();
}


Description   The TempoShift class is used to create filters that shift tempo. Tempo shifting up will shorten duration, tempo shifting down will lengthen it. The size of the output buffer will not be modified; cropping of filtered sample data may occur
   
   
Constructors  
TempoShift(percent)
TempoShift(percent, zeroOutputBuffer)
   
Parameters  
percent   float: the percent to tempo shift as a decimal (between 0 and 2)

zeroOutputBuffer   boolean: zero output buffer before tempo shift? The default is true

   
Usage   Web & Application
   
 
 






   
 
Updated: Tue May 31 04:52:38 PDT 2006


 
  Questions, comments, corrections: e-mail Krister Olsson.