|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectddf.minim.Controller
ddf.minim.AudioSource
ddf.minim.AudioOutput
public class AudioOutput
An AudioOutput is used to generate audio with
AudioSignals. Well, strictly speaking, the
AudioSynthesizer it is constructed with generates the signals
and AudioOutput merely delegates to the synth when signals are
added. You can get an AudioOutput from Minim by
calling one of the getLineOut methods.
| Field Summary | |
|---|---|
Summer |
bus
|
NoteManager |
noteManager
|
| Fields inherited from class ddf.minim.AudioSource |
|---|
left, mix, right |
| Fields inherited from class ddf.minim.Controller |
|---|
BALANCE, GAIN, MUTE, PAN, SAMPLE_RATE, VOLUME |
| Constructor Summary | |
|---|---|
AudioOutput(AudioOut synthesizer)
Constructs an AudioOutput that will subscribe its buffers to
synthesizer and be able to control the DataLine
the synthesizer uses for output. |
|
| Method Summary | |
|---|---|
void |
addSignal(AudioSignal signal)
Adds an signal to the signals chain. |
void |
clearSignals()
Removes all signals from the signal chain. |
void |
disableSignal(AudioSignal signal)
Disables signal if it is in the chain. |
void |
disableSignal(int i)
disables the ith signal in the signal chain. |
void |
enableSignal(AudioSignal signal)
Enables signal if it is in the chain. |
void |
enableSignal(int i)
Enables the ith signal in the signal chain. |
AudioSignal |
getSignal(int i)
Returns the ith signal in the signal chain. |
boolean |
hasSignal(AudioSignal signal)
|
boolean |
isEnabled(AudioSignal signal)
Returns true if signal is in the chain and is also enabled. |
boolean |
isSounding()
Returns true if at least one signal in the chain is enabled. |
void |
noSound()
Disables all signals currently attached to this. |
void |
pauseNotes()
|
void |
playNote()
|
void |
playNote(float hz)
|
void |
playNote(float startTime,
float hz)
|
void |
playNote(float startTime,
float duration,
float hz)
|
void |
playNote(float startTime,
float duration,
Instrument instrument)
Play a note startTime seconds from now, for the given duration, using the given instrument. |
void |
playNote(float startTime,
float duration,
java.lang.String pitchName)
|
void |
playNote(float startTime,
java.lang.String pitchName)
|
void |
playNote(java.lang.String pitchName)
|
void |
removeSignal(AudioSignal signal)
Removes signal from the signals chain. |
AudioSignal |
removeSignal(int i)
Removes and returns the ith signal in the
signal chain. |
void |
resumeNotes()
|
void |
setDurationFactor(float durationFactor)
|
void |
setNoteOffset(float noteOffset)
|
void |
setTempo(float tempo)
|
int |
signalCount()
Returns the number of signals in the chain. |
void |
sound()
Enables all signals currently attached to this. |
| Methods inherited from class ddf.minim.AudioSource |
|---|
addEffect, addListener, bufferSize, clearEffects, close, disableEffect, disableEffect, effectCount, effects, enableEffect, enableEffect, getEffect, getFormat, hasEffect, isEffected, isEnabled, noEffects, removeEffect, removeEffect, removeListener, sampleRate, type |
| Methods inherited from class ddf.minim.Controller |
|---|
balance, gain, getBalance, getControl, getControls, getGain, getPan, getVolume, hasControl, isMuted, mute, pan, printControls, setBalance, setGain, setPan, setVolume, shiftBalance, shiftGain, shiftPan, shiftVolume, unmute, volume |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final NoteManager noteManager
public final Summer bus
| Constructor Detail |
|---|
public AudioOutput(AudioOut synthesizer)
AudioOutput that will subscribe its buffers to
synthesizer and be able to control the DataLine
the synthesizer uses for output. If the synth does not have an associated
DataLine, then calls to Controller's
methods will result in a NullPointerException.
synthesizer - the AudioSynthesizer to subscribe to| Method Detail |
|---|
public void addSignal(AudioSignal signal)
Polyphonic
addSignal in interface Polyphonicsignal - the AudioSignal to addpublic AudioSignal getSignal(int i)
Polyphonicith signal in the signal chain.
This method is not required to do bounds checking and may throw an
ArrayOutOfBoundsException if i is larger than
Polyphonic.signalCount().
getSignal in interface Polyphonici - which signal to return
public void removeSignal(AudioSignal signal)
Polyphonicsignal from the signals chain.
removeSignal in interface Polyphonicsignal - the AudioSignal to removepublic AudioSignal removeSignal(int i)
Polyphonicith signal in the
signal chain.
removeSignal in interface Polyphonici - which signal to remove
AudioSignalpublic void clearSignals()
Polyphonic
clearSignals in interface Polyphonicpublic void disableSignal(int i)
Polyphonicith signal in the signal chain.
disableSignal in interface Polyphonici - the index of the signal to disablepublic void disableSignal(AudioSignal signal)
Polyphonicsignal if it is in the chain.
disableSignal in interface Polyphonicsignal - the AudioSignal to disablepublic void enableSignal(int i)
Polyphonicith signal in the signal chain.
enableSignal in interface Polyphonici - the index of the signal to enablepublic void enableSignal(AudioSignal signal)
Polyphonicsignal if it is in the chain.
enableSignal in interface Polyphonicsignal - the AudioSignal to enablepublic boolean isEnabled(AudioSignal signal)
Polyphonicsignal is in the chain and is also enabled.
isEnabled in interface Polyphonicsignal - the AudioSignal to check the status of
signal is in the chain and is enabledpublic boolean isSounding()
Polyphonic
isSounding in interface Polyphonicpublic void noSound()
PolyphonicPolyphonic.disableSignal(int).
noSound in interface Polyphonicpublic int signalCount()
Polyphonic
signalCount in interface Polyphonicpublic void sound()
PolyphonicPolyphonic.enableSignal(int).
sound in interface Polyphonicpublic boolean hasSignal(AudioSignal signal)
hasSignal in interface Polyphonic
public void playNote(float startTime,
float duration,
Instrument instrument)
startTime - duration - instrument -
public void playNote(float startTime,
float duration,
float hz)
public void playNote(float startTime,
float duration,
java.lang.String pitchName)
public void playNote(float startTime,
float hz)
public void playNote(float startTime,
java.lang.String pitchName)
public void playNote(float hz)
public void playNote(java.lang.String pitchName)
public void playNote()
public void setTempo(float tempo)
public void setNoteOffset(float noteOffset)
public void setDurationFactor(float durationFactor)
public void pauseNotes()
public void resumeNotes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||