diff --git a/java/libraries/minim/changelog.txt b/java/libraries/minim/changelog.txt deleted file mode 100644 index b15c3a758..000000000 --- a/java/libraries/minim/changelog.txt +++ /dev/null @@ -1,41 +0,0 @@ -Changelog! - -Version 2.0.2 - -Fixed Bugs: - -+ filenames were being parsed incorrectly by createRecorder. - -+ fixed audio processing routines for AudioPlayer and AudioSnippet so that - they don't spend cycles doing nothing while not in the "play" state. - -+ fixed the zombie thread bug, which kept audio processing Threads from - exiting when close() was called. - -+ fixed out-of-memory problems that could occur when large files were - played. this does come at the cost of slower seek times. - -+ fixed the isEnabled(AudioEffect) function, which, uh, wasn't working. - -+ fixed the pan() function, which was returning the BALANCE control. - -New Features: - -+ added functions to FFT for doing forward transforms with an offset: - forward(float[] samples, offset) and forward(AudioBuffer samples, offset) - -+ added a freqToIndex(float freq) method to FFT for finding out the index - of the spectrum band that contains the passed in frequency. - -+ added a stop() method to AudioSample, so that playing samples can be - immediately silenced. - -+ added setPanNoGlide(float pan) to Controller, which will snap the panning - setting of a sound to the provided value. - -+ added setInputMixer(Mixer) and setOutputMixer(Mixer), which allow you to - specify which Java Mixer object should be used when obtaining inputs (AudioInput) - and outputs (AudioOuput, AudioPlayer, AudioSnippet, AudioSample). - - - diff --git a/java/libraries/minim/examples/AddListener/AddListener.pde b/java/libraries/minim/examples/AddListener/AddListener.pde deleted file mode 100755 index 77ad5a53e..000000000 --- a/java/libraries/minim/examples/AddListener/AddListener.pde +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Add Listener - * by Damien Di Fede. - * - * This sketch demonstrates how to use the addListener method of a Recordable class. - * The class used here is AudioPlayer, but you can also add listeners to AudioInput, - * AudioOutput, and AudioSample objects. The class defined in waveform.pde implements - * the AudioListener interface and can therefore be added as a listener to groove. - */ - -import ddf.minim.*; - -Minim minim; -AudioPlayer groove; -WaveformRenderer waveform; - -void setup() -{ - size(512, 200, P2D); - - minim = new Minim(this); - groove = minim.loadFile("groove.mp3", 512); - groove.loop(); - waveform = new WaveformRenderer(); - groove.addListener(waveform); -} - -void draw() -{ - background(0); - // see waveform.pde for an explanation of how this works - waveform.draw(); -} - -void stop() -{ - // always close Minim audio classes when you are done with them - groove.close(); - // always stop Minim before exiting. - minim.stop(); - super.stop(); -} diff --git a/java/libraries/minim/examples/AddListener/Waveform.pde b/java/libraries/minim/examples/AddListener/Waveform.pde deleted file mode 100755 index c48b7471b..000000000 --- a/java/libraries/minim/examples/AddListener/Waveform.pde +++ /dev/null @@ -1,76 +0,0 @@ -// This class is a very simple implementation of AudioListener. By implementing this interface, -// you can add instances of this class to any class in Minim that implements Recordable and receive -// buffers of samples in a callback fashion. In other words, every time that a Recordable object has -// a new buffer of samples, it will send a copy to all of its AudioListeners. You can add an instance of -// an AudioListener to a Recordable by using the addListener method of the Recordable. If you want to -// remove a listener that you previously added, you call the removeListener method of Recordable, passing -// the listener you want to remove. -// -// Although possible, it is not advised that you add the same listener to more than one Recordable. -// Your listener will be called any time any of the Recordables you've added it have new samples. This -// means that the stream of samples the listener sees will likely be interleaved buffers of samples from -// all of the Recordables it is listening to, which is probably not what you want. -// -// You'll notice that the three methods of this class are synchronized. This is because the samples methods -// will be called from a different thread than the one instances of this class will be created in. That thread -// might try to send samples to an instance of this class while the instance is in the middle of drawing the -// waveform, which would result in a waveform made up of samples from two different buffers. Synchronizing -// all the methods means that while the main thread of execution is inside draw, the thread that calls -// samples will block until draw is complete. Likewise, a call to draw will block if the sample thread is inside -// one of the samples methods. Hope that's not too confusing! - -class WaveformRenderer implements AudioListener -{ - private float[] left; - private float[] right; - - WaveformRenderer() - { - left = null; - right = null; - } - - synchronized void samples(float[] samp) - { - left = samp; - } - - synchronized void samples(float[] sampL, float[] sampR) - { - left = sampL; - right = sampR; - } - - synchronized void draw() - { - // we've got a stereo signal if right or left are not null - if ( left != null && right != null ) - { - noFill(); - stroke(255); - beginShape(); - for ( int i = 0; i < left.length; i++ ) - { - vertex(i, height/4 + left[i]*50); - } - endShape(); - beginShape(); - for ( int i = 0; i < right.length; i++ ) - { - vertex(i, 3*(height/4) + right[i]*50); - } - endShape(); - } - else if ( left != null ) - { - noFill(); - stroke(255); - beginShape(); - for ( int i = 0; i < left.length; i++ ) - { - vertex(i, height/2 + left[i]*50); - } - endShape(); - } - } -} diff --git a/java/libraries/minim/examples/AddListener/data/groove.mp3 b/java/libraries/minim/examples/AddListener/data/groove.mp3 deleted file mode 100755 index 0a91e6c71..000000000 Binary files a/java/libraries/minim/examples/AddListener/data/groove.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/BandPassFilter/BandPassFilter.pde b/java/libraries/minim/examples/BandPassFilter/BandPassFilter.pde deleted file mode 100755 index 799f54609..000000000 --- a/java/libraries/minim/examples/BandPassFilter/BandPassFilter.pde +++ /dev/null @@ -1,71 +0,0 @@ -/** - * Band Pass Filter - * by Damien Di Fede. - * - * This sketch demonstrates how to use the BandPass effect. - * Move the mouse left and right to change the frequency of the pass band. - * Move the mouse up and down to change the band width of the pass band. - */ - -import ddf.minim.*; -import ddf.minim.effects.*; - -Minim minim; -AudioPlayer groove; -BandPass bpf; - -void setup() -{ - size(512, 200, P2D); - - minim = new Minim(this); - - groove = minim.loadFile("groove.mp3"); - groove.loop(); - // make a band pass filter with a center frequency of 440 Hz and a bandwidth of 20 Hz - // the third argument is the sample rate of the audio that will be filtered - // it is required to correctly compute values used by the filter - bpf = new BandPass(440, 20, groove.sampleRate()); - groove.addEffect(bpf); -} - -void draw() -{ - background(0); - stroke(255); - // draw the waveforms - // the values returned by left.get() and right.get() will be between -1 and 1, - // so we need to scale them up to see the waveform - for(int i = 0; i < groove.right.size()-1; i++) - { - float x1 = map(i, 0, groove.bufferSize(), 0, width); - float x2 = map(i+1, 0, groove.bufferSize(), 0, width); - line(x1, height/4 - groove.left.get(i)*50, x2, height/4 - groove.left.get(i+1)*50); - line(x1, 3*height/4 - groove.right.get(i)*50, x2, 3*height/4 - groove.right.get(i+1)*50); - } - // draw a rectangle to represent the pass band - noStroke(); - fill(255, 0, 0, 60); - rect(mouseX - bpf.getBandWidth()/20, 0, bpf.getBandWidth()/10, height); -} - -void mouseMoved() -{ - // map the mouse position to the range [100, 10000], an arbitrary range of passBand frequencies - float passBand = map(mouseX, 0, width, 100, 2000); - bpf.setFreq(passBand); - float bandWidth = map(mouseY, 0, height, 50, 500); - bpf.setBandWidth(bandWidth); - // prints the new values of the coefficients in the console - bpf.printCoeff(); -} - -void stop() -{ - // always close Minim audio classes when you finish with them - groove.close(); - // always stop Minim before exiting - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/BandPassFilter/data/groove.mp3 b/java/libraries/minim/examples/BandPassFilter/data/groove.mp3 deleted file mode 100755 index 0a91e6c71..000000000 Binary files a/java/libraries/minim/examples/BandPassFilter/data/groove.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/ForwardFFT/ForwardFFT.pde b/java/libraries/minim/examples/ForwardFFT/ForwardFFT.pde deleted file mode 100755 index 80c23a5da..000000000 --- a/java/libraries/minim/examples/ForwardFFT/ForwardFFT.pde +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Forward FFT - * by Damien Di Fede. - * - * This sketch demonstrates how to use an FFT to analyze an AudioBuffer - * and draw the resulting spectrum. It also allows you to turn windowing - * on and off, but you will see there is not much difference in the spectrum. - * Press 'w' to turn on windowing, press 'e' to turn it off. - */ - -import ddf.minim.analysis.*; -import ddf.minim.*; - -Minim minim; -AudioPlayer jingle; -FFT fft; -String windowName; - -void setup() -{ - size(512, 200); - minim = new Minim(this); - - jingle = minim.loadFile("jingle.mp3", 2048); - jingle.loop(); - // create an FFT object that has a time-domain buffer the same size as jingle's sample buffer - // note that this needs to be a power of two and that it means the size of the spectrum - // will be 512. see the online tutorial for more info. - fft = new FFT(jingle.bufferSize(), jingle.sampleRate()); - textFont(createFont("SanSerif", 12)); - windowName = "None"; -} - -void draw() -{ - background(0); - stroke(255); - // perform a forward FFT on the samples in jingle's left buffer - // note that if jingle were a MONO file, this would be the same as using jingle.right or jingle.left - fft.forward(jingle.mix); - for(int i = 0; i < fft.specSize(); i++) - { - // draw the line for frequency band i, scaling it by 4 so we can see it a bit better - line(i, height, i, height - fft.getBand(i)*4); - } - fill(255); - // keep us informed about the window being used - text("The window being used is: " + windowName, 5, 20); -} - -void keyReleased() -{ - if ( key == 'w' ) - { - // a Hamming window can be used to shape the sample buffer that is passed to the FFT - // this can reduce the amount of noise in the spectrum - fft.window(FFT.HAMMING); - windowName = "Hamming"; - } - - if ( key == 'e' ) - { - fft.window(FFT.NONE); - windowName = "None"; - } -} - -void stop() -{ - // always close Minim audio classes when you finish with them - jingle.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/ForwardFFT/data/jingle.mp3 b/java/libraries/minim/examples/ForwardFFT/data/jingle.mp3 deleted file mode 100755 index 8774a7632..000000000 Binary files a/java/libraries/minim/examples/ForwardFFT/data/jingle.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/FrequencyEnergy/BeatListener.pde b/java/libraries/minim/examples/FrequencyEnergy/BeatListener.pde deleted file mode 100755 index b9e8a8b0f..000000000 --- a/java/libraries/minim/examples/FrequencyEnergy/BeatListener.pde +++ /dev/null @@ -1,22 +0,0 @@ -class BeatListener implements AudioListener -{ - private BeatDetect beat; - private AudioPlayer source; - - BeatListener(BeatDetect beat, AudioPlayer source) - { - this.source = source; - this.source.addListener(this); - this.beat = beat; - } - - void samples(float[] samps) - { - beat.detect(source.mix); - } - - void samples(float[] sampsL, float[] sampsR) - { - beat.detect(source.mix); - } -} diff --git a/java/libraries/minim/examples/FrequencyEnergy/FrequencyEnergy.pde b/java/libraries/minim/examples/FrequencyEnergy/FrequencyEnergy.pde deleted file mode 100755 index 2fa95a906..000000000 --- a/java/libraries/minim/examples/FrequencyEnergy/FrequencyEnergy.pde +++ /dev/null @@ -1,82 +0,0 @@ -/** - * Frequency Energy - * by Damien Di Fede. - * - * This sketch demonstrates how to use the BeatDetect object in FREQ_ENERGY mode. - * You can use isKick, isSnare, isHat, - * isRange, and isOnset(int) to track whatever kind - * of beats you are looking to track, they will report true or false based on - * the state of the analysis. To "tick" the analysis you must call detect - * with successive buffers of audio. You can do this inside of draw, - * but you are likely to miss some audio buffers if you do this. The sketch implements - * an AudioListener called BeatListener so that it can call - * detect on every buffer of audio processed by the system without repeating - * a buffer or missing one. - * - * This sketch plays an entire song so it may be a little slow to load. - */ - -import ddf.minim.*; -import ddf.minim.analysis.*; - -Minim minim; -AudioPlayer song; -BeatDetect beat; -BeatListener bl; - -float kickSize, snareSize, hatSize; - -void setup() -{ - size(512, 200); - smooth(); - - minim = new Minim(this); - - song = minim.loadFile("marcus_kellis_theme.mp3", 2048); - song.play(); - // a beat detection object that is FREQ_ENERGY mode that - // expects buffers the length of song's buffer size - // and samples captured at songs's sample rate - beat = new BeatDetect(song.bufferSize(), song.sampleRate()); - // set the sensitivity to 300 milliseconds - // After a beat has been detected, the algorithm will wait for 300 milliseconds - // before allowing another beat to be reported. You can use this to dampen the - // algorithm if it is giving too many false-positives. The default value is 10, - // which is essentially no damping. If you try to set the sensitivity to a negative value, - // an error will be reported and it will be set to 10 instead. - beat.setSensitivity(300); - kickSize = snareSize = hatSize = 16; - // make a new beat listener, so that we won't miss any buffers for the analysis - bl = new BeatListener(beat, song); - textFont(createFont("SanSerif", 16)); - textAlign(CENTER); -} - -void draw() -{ - background(0); - fill(255); - if ( beat.isKick() ) kickSize = 32; - if ( beat.isSnare() ) snareSize = 32; - if ( beat.isHat() ) hatSize = 32; - textSize(kickSize); - text("KICK", width/4, height/2); - textSize(snareSize); - text("SNARE", width/2, height/2); - textSize(hatSize); - text("HAT", 3*width/4, height/2); - kickSize = constrain(kickSize * 0.95, 16, 32); - snareSize = constrain(snareSize * 0.95, 16, 32); - hatSize = constrain(hatSize * 0.95, 16, 32); -} - -void stop() -{ - // always close Minim audio classes when you are finished with them - song.close(); - // always stop Minim before exiting - minim.stop(); - // this closes the sketch - super.stop(); -} diff --git a/java/libraries/minim/examples/FrequencyEnergy/data/marcus_kellis_theme.mp3 b/java/libraries/minim/examples/FrequencyEnergy/data/marcus_kellis_theme.mp3 deleted file mode 100755 index ba57c5aac..000000000 Binary files a/java/libraries/minim/examples/FrequencyEnergy/data/marcus_kellis_theme.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/GetLineIn/GetLineIn.pde b/java/libraries/minim/examples/GetLineIn/GetLineIn.pde deleted file mode 100755 index fcb66ceb7..000000000 --- a/java/libraries/minim/examples/GetLineIn/GetLineIn.pde +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Get Line In - * by Damien Di Fede. - * - * This sketch demonstrates how to use the getLineIn method of - * Minim. This method returns an AudioInput object. - * An AudioInput represents a connection to the computer's current - * record source (usually the line-in) and is used to monitor audio coming - * from an external source. There are five versions of getLineIn: - *
- * getLineIn()
- * getLineIn(int type) 
- * getLineIn(int type, int bufferSize) 
- * getLineIn(int type, int bufferSize, float sampleRate) 
- * getLineIn(int type, int bufferSize, float sampleRate, int bitDepth)  
- * 
- * The value you can use for type is either Minim.MONO - * or Minim.STEREO. bufferSize specifies how large - * you want the sample buffer to be, sampleRate specifies the - * sample rate you want to monitor at, and bitDepth specifies what - * bit depth you want to monitor at. type defaults to Minim.STEREO, - * bufferSize defaults to 1024, sampleRate defaults to - * 44100, and bitDepth defaults to 16. If an AudioInput - * cannot be created with the properties you request, Minim will report - * an error and return null. - * - * When you run your sketch as an applet you will need to sign it in order to get an input. - * - * Before you exit your sketch make sure you call the close method - * of any AudioInput's you have received from getLineIn. - */ - -import ddf.minim.*; - -Minim minim; -AudioInput in; - -void setup() -{ - size(512, 200, P2D); - - minim = new Minim(this); - minim.debugOn(); - - // get a line in from Minim, default bit depth is 16 - in = minim.getLineIn(Minim.STEREO, 512); -} - -void draw() -{ - background(0); - stroke(255); - - // draw the waveforms - for(int i = 0; i < in.bufferSize() - 1; i++) - { - line(i, 50 + in.left.get(i)*50, i+1, 50 + in.left.get(i+1)*50); - line(i, 150 + in.right.get(i)*50, i+1, 150 + in.right.get(i+1)*50); - } -} - - -void stop() -{ - // always close Minim audio classes when you are done with them - in.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/GetLineOut/GetLineOut.pde b/java/libraries/minim/examples/GetLineOut/GetLineOut.pde deleted file mode 100755 index d62b20087..000000000 --- a/java/libraries/minim/examples/GetLineOut/GetLineOut.pde +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Get Line Out - * by Damien Di Fede. - * - * This sketch demonstrates how to use the getLineOut method - * of Minim. This method returns an AudioOutput - * object. An AudioOutput represents a connection to the - * computer's speakers and is used to generate audio with AudioSignals. - * There are five versions of getLineOut: - *
- * getLineOut()
- * getLineOut(int type) 
- * getLineOut(int type, int bufferSize) 
- * getLineOut(int type, int bufferSize, float sampleRate) 
- * getLineOut(int type, int bufferSize, float sampleRate, int bitDepth)  
- * 
- * The value you can use for type is either Minim.MONO - * or Minim.STEREO. bufferSize specifies how large - * you want the sample buffer to be, sampleRate specifies what - * the sample rate of the audio you will be generating is, and bitDepth - * specifies what the bit depth of the audio you will be generating is (8 or 16). - * type defaults to Minim.STEREO, bufferSize - * defaults to 1024, sampleRate defaults to 44100, and - * bitDepth defaults to 16. - * - * Before you exit your sketch make sure you call the close - * method of any AudioOutput's you have received from getLineOut. - */ - -import ddf.minim.*; -import ddf.minim.signals.*; - -Minim minim; -AudioOutput out; -SineWave sine; - -void setup() -{ - size(512, 200, P2D); - - minim = new Minim(this); - - // get a line out from Minim, default sample rate is 44100, default bit depth is 16 - out = minim.getLineOut(Minim.STEREO, 2048); - - // create a sine wave Oscillator, set to 440 Hz, at 0.5 amplitude, sample rate 44100 to match the line out - sine = new SineWave(440, 0.5, out.sampleRate()); - // add the oscillator to the line out - out.addSignal(sine); -} - -void draw() -{ - background(0); - stroke(255); - // draw the waveforms - for(int i = 0; i < out.bufferSize() - 1; i++) - { - line(i, 50 + out.left.get(i)*50, i+1, 50 + out.left.get(i+1)*50); - line(i, 150 + out.right.get(i)*50, i+1, 150 + out.right.get(i+1)*50); - } -} - - -void stop() -{ - // always close Minim audio classes when you are done with them - out.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/GetMetaData/GetMetaData.pde b/java/libraries/minim/examples/GetMetaData/GetMetaData.pde deleted file mode 100755 index f433e4327..000000000 --- a/java/libraries/minim/examples/GetMetaData/GetMetaData.pde +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Get Meta Data - * by Damien Di Fede. - * - * This sketch demonstrates how to use the getMetaData - * method of AudioPlayer. This method is also available - * for AudioSnippet and AudioSample. - * You should use this method when you want to retrieve metadata - * about a file that you have loaded, like ID3 tags from an mp3 file. - * If you load WAV file or other non-tagged file, most of the metadata - * will be empty, but you will still have information like the filename - * and the length. - */ - -import ddf.minim.*; - -Minim minim; -AudioPlayer groove; -AudioMetaData meta; - -void setup() -{ - size(512, 256, P2D); - - minim = new Minim(this); - groove = minim.loadFile("groove.mp3"); - meta = groove.getMetaData(); - - textFont(createFont("Serif", 12)); - textMode(SCREEN); -} - -int ys = 25; -int yi = 15; - -void draw() -{ - background(0); - int y = ys; - text("File Name: " + meta.fileName(), 5, y); - text("Length (in milliseconds): " + meta.length(), 5, y+=yi); - text("Title: " + meta.title(), 5, y+=yi); - text("Author: " + meta.author(), 5, y+=yi); - text("Album: " + meta.album(), 5, y+=yi); - text("Date: " + meta.date(), 5, y+=yi); - text("Comment: " + meta.comment(), 5, y+=yi); - text("Track: " + meta.track(), 5, y+=yi); - text("Genre: " + meta.genre(), 5, y+=yi); - text("Copyright: " + meta.copyright(), 5, y+=yi); - text("Disc: " + meta.disc(), 5, y+=yi); - text("Composer: " + meta.composer(), 5, y+=yi); - text("Orchestra: " + meta.orchestra(), 5, y+=yi); - text("Publisher: " + meta.publisher(), 5, y+=yi); - text("Encoded: " + meta.encoded(), 5, y+=yi); -} - - -void stop() -{ - // always close Minim audio classes when you are done with them - groove.close(); - // always stop Minim before exiting - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/GetMetaData/data/groove.mp3 b/java/libraries/minim/examples/GetMetaData/data/groove.mp3 deleted file mode 100755 index abfd3c811..000000000 Binary files a/java/libraries/minim/examples/GetMetaData/data/groove.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/GetMetaData/data/serif.vlw b/java/libraries/minim/examples/GetMetaData/data/serif.vlw deleted file mode 100755 index dbb25086b..000000000 Binary files a/java/libraries/minim/examples/GetMetaData/data/serif.vlw and /dev/null differ diff --git a/java/libraries/minim/examples/GetSetPan/GetSetPan.pde b/java/libraries/minim/examples/GetSetPan/GetSetPan.pde deleted file mode 100755 index 5a4395b1e..000000000 --- a/java/libraries/minim/examples/GetSetPan/GetSetPan.pde +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Get Set Pan - * by Damien Di Fede. - * - * This sketch demonstrates how to use the getPan and - * setPan methods of a Controller object. - * The class used here is an AudioOutput but you can also - * get and set the pan of AudioSample, AudioSnippet, - * AudioInput, and AudioPlayer objects. - * getPan and setPan will get and set the pan - * of the DataLine that is being used for input or output, - * but only if that line has a pan control. A DataLine is - * a low-level JavaSound class that is used for sending audio to, - * or receiving audio from, the audio system. You will notice in this - * sketch that you will hear the pan changing (if it's available) but you - * will not see any difference in the waveform being drawn. The reason - * for this is that what you see in the output's sample buffers is what - * it sends to the audio system. The system makes the pan change after - * receiving the samples. - */ - -import ddf.minim.*; -import ddf.minim.signals.*; - -Minim minim; -AudioOutput out; -Oscillator osc; -WaveformRenderer waveform; - -void setup() -{ - size(512, 200); - - minim = new Minim(this); - out = minim.getLineOut(); - - // see the example AudioOutput >> SawWaveSignal for more about this class - osc = new SawWave(100, 0.2, out.sampleRate()); - // see the example Polyphonic >> addSignal for more about this - out.addSignal(osc); - - waveform = new WaveformRenderer(); - // see the example Recordable >> addListener for more about this - out.addListener(waveform); - - textFont(createFont("SanSerif", 12)); -} - -void draw() -{ - background(0); - // see waveform.pde for more about this - waveform.draw(); - - if ( out.hasControl(Controller.PAN) ) - { - // map the mouse position to the range of the pan - float val = map(mouseX, 0, width, -1, 1); - // if a pan control is not available, this will do nothing - out.setPan(val); - // if a pan control is not available this will report zero - text("The current pan is " + out.getPan() + ".", 5, 20); - } - else - { - text("The output doesn't have a pan control.", 5, 20); - } -} - -void stop() -{ - // always close Minim audio classes when you are finished with them - out.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/GetSetPan/Waveform.pde b/java/libraries/minim/examples/GetSetPan/Waveform.pde deleted file mode 100755 index 674ef47f0..000000000 --- a/java/libraries/minim/examples/GetSetPan/Waveform.pde +++ /dev/null @@ -1,76 +0,0 @@ -// This class is a very simple implementation of AudioListener. By implementing this interface, -// you can add instances of this class to any class in Minim that implements Recordable and receive -// buffers of samples in a callback fashion. In other words, every time that a Recordable object has -// a new buffer of samples, it will send a copy to all of its AudioListeners. You can add an instance of -// an AudioListener to a Recordable by using the addListener method of the Recordable. If you want to -// remove a listener that you previously added, you call the removeListener method of Recordable, passing -// the listener you want to remove. -// -// Although possible, it is not advised that you add the same listener to more than one Recordable. -// Your listener will be called any time any of the Recordables you've added it have new samples. This -// means that the stream of samples the listener sees will likely be interleaved buffers of samples from -// all of the Recordables it is listening to, which is probably not what you want. -// -// You'll notice that the three methods of this class are synchronized. This is because the samples methods -// will be called from a different thread than the one instances of this class will be created in. That thread -// might try to send samples to an instance of this class while the instance is in the middle of drawing the -// waveform, which would result in a waveform made up of samples from two different buffers. Synchronizing -// all the methods means that while the main thread of execution is inside draw, the thread that calls -// samples will block until draw is complete. Likewise, a call to draw will block if the sample thread is inside -// one of the samples methods. Hope that's not too confusing! - -class WaveformRenderer implements AudioListener -{ - private float[] left; - private float[] right; - - WaveformRenderer() - { - left = null; - right = null; - } - - synchronized void samples(float[] samp) - { - left = samp; - } - - synchronized void samples(float[] sampL, float[] sampR) - { - left = sampL; - right = sampR; - } - - synchronized void draw() - { - // we've got a stereo signal if right is not null - if ( left != null && right != null ) - { - noFill(); - stroke(255); - beginShape(); - for ( int i = 0; i < left.length; i++ ) - { - vertex(i, height/4 + left[i]*50); - } - endShape(); - beginShape(); - for ( int i = 0; i < right.length; i++ ) - { - vertex(i, 3*(height/4) + right[i]*50); - } - endShape(); - } - else if ( left != null ) - { - noFill(); - stroke(255); - beginShape(); - for ( int i = 0; i < left.length; i++ ) - { - vertex(i, height/2 + left[i]*50); - } - endShape(); - } - } -} diff --git a/java/libraries/minim/examples/LinearAverages/LinearAverages.pde b/java/libraries/minim/examples/LinearAverages/LinearAverages.pde deleted file mode 100755 index f55147a19..000000000 --- a/java/libraries/minim/examples/LinearAverages/LinearAverages.pde +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Linear Averages - * by Damien Di Fede. - * - * This sketch demonstrates how to use the averaging abilities of the FFT. - * 128 linearly spaced averages are requested and then those are drawn as rectangles. - */ - -import ddf.minim.analysis.*; -import ddf.minim.*; - -Minim minim; -AudioPlayer jingle; -FFT fft; - -void setup() -{ - size(512, 200, P2D); - minim = new Minim(this); - - jingle = minim.loadFile("jingle.mp3", 2048); - // loop the file - jingle.loop(); - // create an FFT object that has a time-domain buffer the same size as jingle's sample buffer - // and a sample rate that is the same as jingle's - // note that this needs to be a power of two - // and that it means the size of the spectrum will be 1024. - // see the online tutorial for more info. - fft = new FFT(jingle.bufferSize(), jingle.sampleRate()); - // use 128 averages. - // the maximum number of averages we could ask for is half the spectrum size. - fft.linAverages(128); - rectMode(CORNERS); -} - -void draw() -{ - background(0); - fill(255); - // perform a forward FFT on the samples in jingle's mix buffer - // note that if jingle were a MONO file, this would be the same as using jingle.left or jingle.right - fft.forward(jingle.mix); - int w = int(fft.specSize()/128); - for(int i = 0; i < fft.avgSize(); i++) - { - // draw a rectangle for each average, multiply the value by 5 so we can see it better - rect(i*w, height, i*w + w, height - fft.getAvg(i)*5); - } -} - -void stop() -{ - // always close Minim audio classes when you finish with them - jingle.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/LinearAverages/data/jingle.mp3 b/java/libraries/minim/examples/LinearAverages/data/jingle.mp3 deleted file mode 100755 index 8774a7632..000000000 Binary files a/java/libraries/minim/examples/LinearAverages/data/jingle.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/LoadFile/LoadFile.pde b/java/libraries/minim/examples/LoadFile/LoadFile.pde deleted file mode 100755 index 09d599f51..000000000 --- a/java/libraries/minim/examples/LoadFile/LoadFile.pde +++ /dev/null @@ -1,67 +0,0 @@ -/** - * Load File - * by Damien Di Fede. - * - * This sketch demonstrates how to use the loadFile method - * of Minim. The loadFile method allows you to - * specify the file you want to load with a String and optionally - * specify what you want the buffer size of the returned AudioPlayer - * to be. If you don't specify a buffer size, the returned player will have a - * buffer size of 1024. Minim is able to play wav files, au files, aif files, - * snd files, and mp3 files. When you call loadFile, if you just - * specify the filename it will try to load the file from the data folder of - * your sketch. However, you can also specify an absolute path - * (such as "C:\foo\bar\thing.wav") and the file will be loaded from that - * location (keep in mind that won't work from an applet). You can also specify - * a URL (such as "http://www.mysite.com/mp3/song.mp3") but keep in mind that - * if you run the sketch as an applet you may run in to security restrictions - * if the applet is not on the same domain as the file you want to load. You can - * get around the restriction by signing the applet. Before you exit your sketch - * make sure you call the close method of any AudioPlayer's - * you have received from loadFile, followed by the stop - * method of Minim. - */ - -import ddf.minim.*; - -AudioPlayer player; -Minim minim; - -void setup() -{ - size(512, 200, P2D); - - minim = new Minim(this); - - // load a file, give the AudioPlayer buffers that are 1024 samples long - // player = minim.loadFile("groove.mp3"); - - // load a file, give the AudioPlayer buffers that are 2048 samples long - player = minim.loadFile("groove.mp3", 2048); - // play the file - player.play(); -} - -void draw() -{ - background(0); - stroke(255); - // draw the waveforms - // the values returned by left.get() and right.get() will be between -1 and 1, - // so we need to scale them up to see the waveform - // note that if the file is MONO, left.get() and right.get() will return the same value - for(int i = 0; i < player.left.size()-1; i++) - { - line(i, 50 + player.left.get(i)*50, i+1, 50 + player.left.get(i+1)*50); - line(i, 150 + player.right.get(i)*50, i+1, 150 + player.right.get(i+1)*50); - } -} - -void stop() -{ - // always close Minim audio classes when you are done with them - player.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/LoadFile/data/groove.mp3 b/java/libraries/minim/examples/LoadFile/data/groove.mp3 deleted file mode 100755 index 0a91e6c71..000000000 Binary files a/java/libraries/minim/examples/LoadFile/data/groove.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/LoadSample/LoadSample.pde b/java/libraries/minim/examples/LoadSample/LoadSample.pde deleted file mode 100755 index ff3fbcea3..000000000 --- a/java/libraries/minim/examples/LoadSample/LoadSample.pde +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Load Sample - * by Damien Di Fede. - * - * This sketch demonstrates how to use the loadSample - * method of Minim. The loadSample - * method allows you to specify the sample you want to load with - * a String and optionally specify what you - * want the buffer size of the returned AudioSample - * to be. If you don't specify a buffer size, the returned sample - * will have a buffer size of 1024. Minim is able to load wav files, - * au files, aif files, snd files, and mp3 files. When you call - * loadSample, if you just specify the filename it will - * try to load the sample from the data folder of your sketch. However, - * you can also specify an absolute path (such as "C:\foo\bar\thing.wav") - * and the file will be loaded from that location (keep in mind that - * won't work from an applet). You can also specify a URL (such as - * "http://www.mysite.com/mp3/song.mp3") but keep in mind that if you - * run the sketch as an applet you may run in to security restrictions - * if the applet is not on the same domain as the file you want to load. - * You can get around the restriction by signing the applet. Before you - * exit your sketch make sure you call the close method - * of any AudioSamples's you have received from - * loadSample. - * - * An AudioSample is a special kind of file playback that - * allows you to repeatedly trigger an audio file. It does this - * by keeping the entire file in an internal buffer and then keeping a - * list of trigger points. AudioSample supports up to 20 - * overlapping triggers, which should be plenty for short sounds. It is - * not advised that you use this class for long sounds (like entire songs, - * for example) because the entire file is kept in memory. - * - * Press 'k' to trigger the sample. - */ - -import ddf.minim.*; - -Minim minim; -AudioSample kick; - -void setup() -{ - size(512, 200, P2D); - // always start Minim before you do anything with it - minim = new Minim(this); - // load BD.mp3 from the data folder with a 1024 sample buffer - // kick = Minim.loadSample("BD.mp3"); - // load BD.mp3 from the data folder, with a 512 sample buffer - kick = minim.loadSample("BD.mp3", 2048); -} - -void draw() -{ - background(0); - stroke(255); - // use the mix buffer to draw the waveforms. - // because these are MONO files, we could have used the left or right buffers and got the same data - for (int i = 0; i < kick.bufferSize() - 1; i++) - { - line(i, 100 - kick.left.get(i)*50, i+1, 100 - kick.left.get(i+1)*50); - } -} - -void keyPressed() -{ - if ( key == 'k' ) kick.trigger(); -} - -void stop() -{ - // always close Minim audio classes when you are done with them - kick.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/LoadSample/data/BD.mp3 b/java/libraries/minim/examples/LoadSample/data/BD.mp3 deleted file mode 100755 index 9d1aa49fe..000000000 Binary files a/java/libraries/minim/examples/LoadSample/data/BD.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/LoadSnippet/LoadSnippet.pde b/java/libraries/minim/examples/LoadSnippet/LoadSnippet.pde deleted file mode 100755 index 278232df9..000000000 --- a/java/libraries/minim/examples/LoadSnippet/LoadSnippet.pde +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Load Snippet - * by Damien Di Fede. - * - * This sketch demonstrates how to use the loadSnippet - * method of Minim. The loadSnippet method - * allows you to specify the file you want to load with a - * String. Unlike with loadFile and loadSample, - * you are not able to specify a buffer size because an AudioSnippet - * doesn't give you access to the samples as they are played. - * - * Minim is able to load wav files, au files, aif files, snd files, and mp3 - * files. When you call loadSnippet, if you just specify the - * filename it will try to load the file from the data folder of your sketch. - * However, you can also specify an absolute path (such as "C:\foo\bar\thing.wav") - * and the file will be loaded from that location (keep in mind that won't - * work from an applet). You can also specify a URL (such as - * "http://www.mysite.com/mp3/song.mp3") but keep in mind that if you run the - * sketch as an applet you may run in to security restrictions if the applet - * is not on the same domain as the file you want to load. You can get around the - * restriction by signing the applet. - * - * AudioSnippet is a simple wrapper around a JavaSound Clip - * (It isn't called AudioClip because that's an interface defined in the package - * java.applet). It provides almost the exact same functionality, the main - * difference being that length, position, and cue are expressed in milliseconds - * instead of microseconds. One of the limitations of AudioSnippet is - * that you do not have access to the audio samples as they are played. However, - * you are spared all of the overhead associated with making samples available. - * An AudioSnippet is a good choice if all you need to do is play - * a short sound at some point. If your aim is to repeatedly trigger a sound, you - * should use an AudioSample instead. - * - * Before you exit your sketch make sure you call the close - * method of any AudioSnippet's you have received from - * loadSnippet. - */ - -import ddf.minim.*; - -Minim minim; -AudioSnippet snip; - -void setup() -{ - size(512, 200); - - minim = new Minim(this); - snip = minim.loadSnippet("groove.mp3"); - // play the file - snip.play(); -} - -void draw() -{ - background(0); - // there are no waveforms to draw -} - -void stop() -{ - // always close Minim audio classes when you are done with them - snip.close(); - // always stop Minim before exiting - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/LoadSnippet/data/groove.mp3 b/java/libraries/minim/examples/LoadSnippet/data/groove.mp3 deleted file mode 100755 index 0a91e6c71..000000000 Binary files a/java/libraries/minim/examples/LoadSnippet/data/groove.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/RecordLineIn/RecordLineIn.pde b/java/libraries/minim/examples/RecordLineIn/RecordLineIn.pde deleted file mode 100755 index ee356d6e9..000000000 --- a/java/libraries/minim/examples/RecordLineIn/RecordLineIn.pde +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Record Line In - * by Damien Di Fede. - * - * This sketch demonstrates how to an AudioRecorder - * to record audio to disk. To use this sketch you need to have - * something plugged into the line-in on your computer. Press 'r' - * to toggle recording on and off and the press 's' to save to disk. - * The recorded file will be placed in the sketch folder of - * the sketch. - */ - -import ddf.minim.*; - -Minim minim; -AudioInput in; -AudioRecorder recorder; - -void setup() -{ - size(512, 200, P2D); - textMode(SCREEN); - - minim = new Minim(this); - - // get a stereo line-in: sample buffer length of 2048 - // default sample rate is 44100, default bit depth is 16 - in = minim.getLineIn(Minim.STEREO, 2048); - // create a recorder that will record from the input to the filename specified, using buffered recording - // buffered recording means that all captured audio will be written into a sample buffer - // then when save() is called, the contents of the buffer will actually be written to a file - // the file will be located in the sketch's root folder. - recorder = minim.createRecorder(in, "myrecording.wav", true); - - textFont(createFont("SanSerif", 12)); -} - -void draw() -{ - background(0); - stroke(255); - // draw the waveforms - // the values returned by left.get() and right.get() will be between -1 and 1, - // so we need to scale them up to see the waveform - for(int i = 0; i < in.bufferSize() - 1; i++) - { - line(i, 50 + in.left.get(i)*50, i+1, 50 + in.left.get(i+1)*50); - line(i, 150 + in.right.get(i)*50, i+1, 150 + in.right.get(i+1)*50); - } - - if ( recorder.isRecording() ) - { - text("Currently recording...", 5, 15); - } - else - { - text("Not recording.", 5, 15); - } -} - -void keyReleased() -{ - if ( key == 'r' ) - { - // to indicate that you want to start or stop capturing audio data, you must call - // beginRecord() and endRecord() on the AudioRecorder object. You can start and stop - // as many times as you like, the audio data will be appended to the end of the buffer - // (in the case of buffered recording) or to the end of the file (in the case of streamed recording). - if ( recorder.isRecording() ) - { - recorder.endRecord(); - } - else - { - recorder.beginRecord(); - } - } - if ( key == 's' ) - { - // we've filled the file out buffer, - // now write it to the file we specified in createRecorder - // in the case of buffered recording, if the buffer is large, - // this will appear to freeze the sketch for sometime - // in the case of streamed recording, - // it will not freeze as the data is already in the file and all that is being done - // is closing the file. - // the method returns the recorded audio as an AudioRecording, - // see the example AudioRecorder >> RecordAndPlayback for more about that - recorder.save(); - println("Done saving."); - } -} - -void stop() -{ - // always close Minim audio classes when you are done with them - in.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/SineWaveSignal/SineWaveSignal.pde b/java/libraries/minim/examples/SineWaveSignal/SineWaveSignal.pde deleted file mode 100755 index 917f2b350..000000000 --- a/java/libraries/minim/examples/SineWaveSignal/SineWaveSignal.pde +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Sine Wave Signal - * by Damien Di Fede. - * - * This sketch demonstrates how to use a SineWave with - * an AudioOutput. Move the mouse up and down to change - * the frequency, left and right to change the panning. - * - * SineWave is a subclass of Oscillator, which - * is an abstract class that implements the interface AudioSignal. - * This means that it can be added to an AudioOutput and the - * AudioOutput will call one of the two generate() - * functions, depending on whether the AudioOutput is STEREO or MONO. - * Since it is an abstract class, it can't be directly instantiated, it - * merely provides the functionality of smoothly changing frequency, amplitude - * and pan. In order to have an Oscillator that actually - * produces sound, you have to extend Oscillator and define - * the value function. This function takes a step value and returns - * a sample value between -1 and 1. In the case of the SineWave, - * the value function returns this: sin(freq * TWO_PI * step) - * freq is the current frequency (in Hertz) of the Oscillator. - * It is multiplied by TWO_PI to set the period of the sine wave - * properly and then that sine wave is sampled at step. - */ - -import ddf.minim.*; -import ddf.minim.signals.*; - -Minim minim; -AudioOutput out; -SineWave sine; - -void setup() -{ - size(512, 200, P2D); - - minim = new Minim(this); - // get a line out from Minim, default bufferSize is 1024, default sample rate is 44100, bit depth is 16 - out = minim.getLineOut(Minim.STEREO); - // create a sine wave Oscillator, set to 440 Hz, at 0.5 amplitude, sample rate from line out - sine = new SineWave(440, 0.5, out.sampleRate()); - // set the portamento speed on the oscillator to 200 milliseconds - sine.portamento(200); - // add the oscillator to the line out - out.addSignal(sine); -} - -void draw() -{ - background(0); - stroke(255); - // draw the waveforms - for(int i = 0; i < out.bufferSize() - 1; i++) - { - float x1 = map(i, 0, out.bufferSize(), 0, width); - float x2 = map(i+1, 0, out.bufferSize(), 0, width); - line(x1, 50 + out.left.get(i)*50, x2, 50 + out.left.get(i+1)*50); - line(x1, 150 + out.right.get(i)*50, x2, 150 + out.right.get(i+1)*50); - } -} - -void mouseMoved() -{ - // with portamento on the frequency will change smoothly - float freq = map(mouseY, 0, height, 1500, 60); - sine.setFreq(freq); - // pan always changes smoothly to avoid crackles getting into the signal - // note that we could call setPan on out, instead of on sine - // this would sound the same, but the waveforms in out would not reflect the panning - float pan = map(mouseX, 0, width, -1, 1); - sine.setPan(pan); -} - -void stop() -{ - out.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/UserDefinedEffect/ReverseEffect.pde b/java/libraries/minim/examples/UserDefinedEffect/ReverseEffect.pde deleted file mode 100755 index 4393e40a5..000000000 --- a/java/libraries/minim/examples/UserDefinedEffect/ReverseEffect.pde +++ /dev/null @@ -1,23 +0,0 @@ -// this is a really straightforward effect that just reverses the order of the samples it receives -// it doesn't sound like how you think ;-) -class ReverseEffect implements AudioEffect -{ - void process(float[] samp) - { - float[] reversed = new float[samp.length]; - int i = samp.length - 1; - for (int j = 0; j < reversed.length; i--, j++) - { - reversed[j] = samp[i]; - } - // we have to copy the values back into samp for this to work - arraycopy(reversed, samp); - } - - void process(float[] left, float[] right) - { - process(left); - process(right); - } -} - diff --git a/java/libraries/minim/examples/UserDefinedEffect/UserDefinedEffect.pde b/java/libraries/minim/examples/UserDefinedEffect/UserDefinedEffect.pde deleted file mode 100755 index 734c03a22..000000000 --- a/java/libraries/minim/examples/UserDefinedEffect/UserDefinedEffect.pde +++ /dev/null @@ -1,50 +0,0 @@ -/** - * User Defined Effect - * by Damien Di Fede. - * - * This sketch demonstrates how to write your own AudioEffect. - * See NoiseEffect.pde for the implementation. - */ - -import ddf.minim.*; -import ddf.minim.effects.*; - -Minim minim; -AudioPlayer groove; -ReverseEffect reffect; - -void setup() -{ - size(512, 200, P2D); - - minim = new Minim(this); - // try changing the buffer size to see how it changes the effect - groove = minim.loadFile("groove.mp3", 2048); - groove.loop(); - reffect = new ReverseEffect(); - groove.addEffect(reffect); -} - -void draw() -{ - background(0); - stroke(255); - // we multiply the values returned by get by 50 so we can see the waveform - for ( int i = 0; i < groove.bufferSize() - 1; i++ ) - { - float x1 = map(i, 0, groove.bufferSize(), 0, width); - float x2 = map(i+1, 0, groove.bufferSize(), 0, width); - line(x1, height/4 - groove.left.get(i)*50, x2, height/4 - groove.left.get(i+1)*50); - line(x1, 3*height/4 - groove.right.get(i)*50, x2, 3*height/4 - groove.right.get(i+1)*50); - } -} - -void stop() -{ - // always close Minim audio classes when you finish with them - groove.close(); - // always stop Minim before exiting - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/examples/UserDefinedEffect/data/groove.mp3 b/java/libraries/minim/examples/UserDefinedEffect/data/groove.mp3 deleted file mode 100755 index 0a91e6c71..000000000 Binary files a/java/libraries/minim/examples/UserDefinedEffect/data/groove.mp3 and /dev/null differ diff --git a/java/libraries/minim/examples/UserDefinedSignal/MouseSaw.pde b/java/libraries/minim/examples/UserDefinedSignal/MouseSaw.pde deleted file mode 100755 index e07d1b35a..000000000 --- a/java/libraries/minim/examples/UserDefinedSignal/MouseSaw.pde +++ /dev/null @@ -1,24 +0,0 @@ -// this signal uses the mouseX and mouseY position to build a signal -class MouseSaw implements AudioSignal -{ - void generate(float[] samp) - { - float range = map(mouseX, 0, width, 0, 1); - float peaks = map(mouseY, 0, height, 1, 20); - float inter = float(samp.length) / peaks; - for ( int i = 0; i < samp.length; i += inter ) - { - for ( int j = 0; j < inter && (i+j) < samp.length; j++ ) - { - samp[i + j] = map(j, 0, inter, -range, range); - } - } - } - - // this is a stricly mono signal - void generate(float[] left, float[] right) - { - generate(left); - generate(right); - } -} diff --git a/java/libraries/minim/examples/UserDefinedSignal/UserDefinedSignal.pde b/java/libraries/minim/examples/UserDefinedSignal/UserDefinedSignal.pde deleted file mode 100755 index b82714ad2..000000000 --- a/java/libraries/minim/examples/UserDefinedSignal/UserDefinedSignal.pde +++ /dev/null @@ -1,48 +0,0 @@ -/** - * User Defined Signal - * by Damien Di Fede. - * - * This sketch demonstrates how to implement your own AudioSignal - * for Minim. See MouseSaw.pde for the implementation. - */ - -import ddf.minim.*; -import ddf.minim.signals.*; - -Minim minim; -AudioOutput out; -MouseSaw msaw; - -void setup() -{ - size(512, 200, P2D); - - minim = new Minim(this); - - out = minim.getLineOut(Minim.STEREO, 2048); - msaw = new MouseSaw(); - // adds the signal to the output - out.addSignal(msaw); -} - -void draw() -{ - background(0); - stroke(255); - // draw the waveforms - for(int i = 0; i < out.bufferSize()-1; i++) - { - float x1 = map(i, 0, out.bufferSize(), 0, width); - float x2 = map(i+1, 0, out.bufferSize(), 0, width); - line(x1, 50 + out.left.get(i)*50, x2, 50 + out.left.get(i+1)*50); - line(x1, 150 + out.right.get(i)*50, x2, 150 + out.right.get(i+1)*50); - } -} - -void stop() -{ - out.close(); - minim.stop(); - - super.stop(); -} diff --git a/java/libraries/minim/library/export.txt b/java/libraries/minim/library/export.txt deleted file mode 100644 index f2681acab..000000000 --- a/java/libraries/minim/library/export.txt +++ /dev/null @@ -1 +0,0 @@ -name = Minim Audio diff --git a/java/libraries/minim/license.txt b/java/libraries/minim/license.txt deleted file mode 100755 index fc8a5de7e..000000000 --- a/java/libraries/minim/license.txt +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/java/libraries/minim/version.txt b/java/libraries/minim/version.txt deleted file mode 100755 index e9307ca57..000000000 --- a/java/libraries/minim/version.txt +++ /dev/null @@ -1 +0,0 @@ -2.0.2