ddf.minim
Interface AudioSignal

All Known Implementing Classes:
Oscillator, PinkNoise, PulseWave, SawWave, SignalChain, SineWave, SquareWave, Summer, TriangleWave, UGenSignal, WhiteNoise

public interface AudioSignal

If you want to write an audio generating class to work with Minim, you must implement the AudioSignal interface. Your only responsibility is to fill either a single float buffer or two float buffers with values in the range of [-1, 1]. The AudioOutput to which you add your signal will handle the mixing of multiple signals. There may be values in the arrays when you receive them, left over from the previous signal in a SignalChain, but you can disregard them (or use them if you're feeling crazy like that).

Author:
Damien Di Fede

Method Summary
 void generate(float[] signal)
          Fills signal with values in the range of [-1, 1].
 void generate(float[] left, float[] right)
          Fills left and right with values in the range of [-1, 1].
 

Method Detail

generate

void generate(float[] signal)
Fills signal with values in the range of [-1, 1]. signal represents a mono audio signal.

Parameters:
signal - the float array to fill

generate

void generate(float[] left,
              float[] right)
Fills left and right with values in the range of [-1, 1]. left represents the left channel of a stereo signal, right represents the right channel of that same stereo signal.

Parameters:
left - the left channel
right - the right channel