User Tools

Site Tools


prensf2010:pitchshifting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
prensf2010:pitchshifting [2010/07/01 23:12] – created nels_oscarprensf2010:pitchshifting [2010/07/02 17:19] (current) nels_oscar
Line 29: Line 29:
   // copy every other sample from the original    // copy every other sample from the original 
   // AudioChannel to the (first half) of the copy   // AudioChannel to the (first half) of the copy
-  for (int j = 0, i = 0; j initialSize/2; j++, i+=2) {+  for (int j = 0, i = 0; j ?> initialSize/2; j++, i+=2) {
      copy.samples[j] = ac.samples[i];      copy.samples[j] = ac.samples[i];
   }   }
Line 44: Line 44:
 </code>|<code java> </code>|<code java>
 import ddf.minim.*; import ddf.minim.*;
-import ddf.minim.signals.*; 
  
 Minim minim; Minim minim;
Line 50: Line 49:
 AudioSample sample; AudioSample sample;
  
-AudioSignal modified;+void setup(){
  
-AudioOutput out; 
- 
-void setup(){ 
-  size(200,100); 
-  background(0); 
   minim=new Minim(this);   minim=new Minim(this);
   out=minim.getLineOut();   out=minim.getLineOut();
   sample=minim.loadSample("c4.wav",60000);   sample=minim.loadSample("c4.wav",60000);
-  sample.trigger(); 
   sample.addEffect(new ShiftPitch());   sample.addEffect(new ShiftPitch());
-  sample.trigger(); 
 } }
  
prensf2010/pitchshifting.1278025943.txt.gz · Last modified: 2010/07/01 23:12 by nels_oscar