Tree-Axis ``` Processing  


Back  
Class   TempoShift
   
Name  

getOutputSize()

   
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");

  // tempo shift the first 1.8 seconds
  myTempoShift=new TempoShift(.33);
  
  myTempoShift.filter(myChannel,0,myChannel.frames(1800));
  
  // figure out where to start a second tempo shift
  int nextShift=myTempoShift.getOutputSize(myChannel.frames(1800));
  
  // second tempo shift
  myTempoShift.percent=1.25;
  
  myTempoShift.filter(myChannel,nextShift,myChannel.frames(1800));

  // play
  myChannel.play();
}

void draw() {
}

// we are done, clean up Ess

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


Description   Used to determine the recommended (exact) output buffer size in sample frames based on the passed input buffer size and the filter's shift percent
   
Syntax  
temposhift.getOutputSize(inputSize)
   
Parameters  
temposhift   any instance of TempoShift

inputSize   the input buffer size in sample frames

   
Returns   nothing
   
Usage   Web & Application
   
 
 






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


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