|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ddf.minim.ugens.UGen ddf.minim.ugens.Oscil
public class Oscil
Provides a UGen which generates a Waveform at a specified frequency.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ddf.minim.ugens.UGen |
---|
UGen.InputType, UGen.UGenInput |
Field Summary | |
---|---|
UGen.UGenInput |
amplitude
Patch to this to control the amplitude of the oscillator with another UGen. |
UGen.UGenInput |
frequency
Patch to this to control the frequency of the oscillator with another UGen. |
UGen.UGenInput |
phase
Patch to this to control the phase of the oscillator with another UGen. |
Constructor Summary | |
---|---|
Oscil(float frequencyInHertz,
float amplitude)
Constructs an Oscil UGen given frequency in Hz and amplitude. |
|
Oscil(float frequencyInHertz,
float amplitude,
Waveform waveform)
Constructs an Oscil UGen given frequency in Hz, amplitude, and a waveform |
|
Oscil(Frequency frequency,
float amplitude)
Constructs an Oscil UGen given a Frequency and amplitude. |
|
Oscil(Frequency freq,
float amp,
Waveform wave)
Constructs an Oscil UGen given a Frequency, amplitude, and a waveform |
Method Summary | |
---|---|
void |
reset()
Resets the time-step used by the oscillator to be equal to the current phase value. |
protected void |
sampleRateChanged()
This routine will be called any time the sample rate changes. |
void |
setFrequency(float hz)
Sets the frequency of this Oscil. |
void |
setFrequency(Frequency newFreq)
Sets the frequency of this Oscil. |
void |
setPhase(float newPhase)
Set the amount that the phase will be offset by. |
protected void |
uGenerate(float[] channels)
Implement this method when you extend UGen. |
Methods inherited from class ddf.minim.ugens.UGen |
---|
addInput, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, setSampleRate, tick, unpatch, unpatch |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public UGen.UGenInput amplitude
public UGen.UGenInput frequency
public UGen.UGenInput phase
Constructor Detail |
---|
public Oscil(float frequencyInHertz, float amplitude, Waveform waveform)
frequencyInHertz
- the frequency this should oscillate atamplitude
- the base amplitudewaveform
- the waveform we will oscillate overpublic Oscil(float frequencyInHertz, float amplitude)
frequencyInHertz
- the frequency this should oscillate atamplitude
- the amplitudepublic Oscil(Frequency frequency, float amplitude)
frequency
- the frequency this should oscillate atamplitude
- the amplitudepublic Oscil(Frequency freq, float amp, Waveform wave)
frequency
- amplitude
- waveform
- Method Detail |
---|
protected void sampleRateChanged()
sampleRateChanged
in class UGen
public void setFrequency(float hz)
hz
- the frequency, in Hertz, to set this Oscil topublic void setFrequency(Frequency newFreq)
freq
- the Frequency to set this Oscil topublic void setPhase(float newPhase)
newPhase
- public void reset()
protected void uGenerate(float[] channels)
UGen
getLastValues
method of your audio UGenInput to retrieve the audio you want to modify,
which you will then modify however
you need to, assigning the result to the values in channels
.
uGenerate
in class UGen
channels
- an array representing one sample frame.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |