Package wellen
Class InstrumentDSP
java.lang.Object
wellen.Instrument
wellen.InstrumentDSP
- All Implemented Interfaces:
DSPNodeOutputSignal
- Direct Known Subclasses:
InstrumentDSPLibrary.BELL
,InstrumentDSPLibrary.FAT_LEAD
,InstrumentDSPLibrary.HI_HAT
,InstrumentDSPLibrary.KICK_DRUM
,InstrumentDSPLibrary.SAMPLER
implementation of
Instrument
for the internal tone engine.-
Field Summary
Modifier and TypeFieldDescriptionboolean
static final float
static final int
-
Constructor Summary
ConstructorDescriptionInstrumentDSP
(int ID) InstrumentDSP
(int ID, int sampling_rate) InstrumentDSP
(int ID, int sampling_rate, int wavetable_size) -
Method Summary
Modifier and TypeMethodDescriptionfloat
float
float
int
float
float
int
float
float
float
float
float
float
float
float
float
int
get_VCO()
void
note_off()
void
note_on
(int note, int velocity) void
pitch_bend
(float frequency_offset) void
set_amplitude
(float amplitude) void
set_amplitude
(float amplitude, int interpolation_duration_in_samples) void
set_amplitude_LFO_amplitude
(float amplitude) void
set_amplitude_LFO_frequency
(float frequency) void
set_attack
(float attack) void
set_channels
(int num_channels) void
set_decay
(float decay) void
set_detune
(float detune) detune of second oscillator in relation to main oscillatorvoid
set_detune_amplitude
(float amplitude) void
set_detune_oscillator_type
(int oscillator) void
set_filter_frequency
(float frequency) void
set_filter_resonance
(float resonance) void
set_frequency
(float frequency) void
set_frequency
(float frequency, int interpolation_duration_in_samples) void
set_frequency_LFO_amplitude
(float amplitude) void
set_frequency_LFO_frequency
(float frequency) void
set_LPF_envelope_cutoff_max
(float value) void
set_LPF_envelope_cutoff_min
(float value) void
set_LPF_envelope_resonance_max
(float value) void
set_LPF_envelope_resonance_min
(float value) void
set_oscillator_type
(int oscillator) void
set_release
(float release) void
set_sustain
(float sustain) Methods inherited from class wellen.Instrument
enable_additional_oscillator, enable_ADSR, enable_amplitude_LFO, enable_detune, enable_frequency_LFO, enable_LPF, enable_LPF_envelope_cutoff, enable_LPF_envelope_resonance, get_attack, get_decay, get_pan, get_release, get_sustain, ID, is_playing, set_adsr, set_pan
-
Field Details
-
DEFAULT_FREQUENCY
public static final float DEFAULT_FREQUENCY- See Also:
-
DEFAULT_WAVETABLE_SIZE
public static final int DEFAULT_WAVETABLE_SIZE- See Also:
-
always_interpolate_frequency_amplitude_changes
public boolean always_interpolate_frequency_amplitude_changes
-
-
Constructor Details
-
InstrumentDSP
public InstrumentDSP(int ID, int sampling_rate, int wavetable_size) -
InstrumentDSP
public InstrumentDSP(int ID, int sampling_rate) -
InstrumentDSP
public InstrumentDSP(int ID)
-
-
Method Details
-
output_signal
- Specified by:
output_signal
in interfaceDSPNodeOutputSignal
- Returns:
- output signal
-
set_attack
public void set_attack(float attack) - Overrides:
set_attack
in classInstrument
- Parameters:
attack
- time parameter defining the time it takes for the set_amp to reach maximum level.
-
set_decay
public void set_decay(float decay) - Overrides:
set_decay
in classInstrument
- Parameters:
decay
- time parameter defining the time it takes to go from maximum to get_sustain level.
-
set_sustain
public void set_sustain(float sustain) - Overrides:
set_sustain
in classInstrument
- Parameters:
sustain
- level parameter defining the level hold while note is still played.
-
set_release
public void set_release(float release) - Overrides:
set_release
in classInstrument
- Parameters:
release
- time parameter defining the time it takes for the set_amp to reach zero after note is off.
-
get_oscillator_type
public int get_oscillator_type()- Specified by:
get_oscillator_type
in classInstrument
-
set_oscillator_type
public void set_oscillator_type(int oscillator) - Specified by:
set_oscillator_type
in classInstrument
-
get_frequency_LFO_amplitude
public float get_frequency_LFO_amplitude()- Specified by:
get_frequency_LFO_amplitude
in classInstrument
-
set_frequency_LFO_amplitude
public void set_frequency_LFO_amplitude(float amplitude) - Specified by:
set_frequency_LFO_amplitude
in classInstrument
-
get_frequency_LFO_frequency
public float get_frequency_LFO_frequency()- Specified by:
get_frequency_LFO_frequency
in classInstrument
-
set_frequency_LFO_frequency
public void set_frequency_LFO_frequency(float frequency) - Specified by:
set_frequency_LFO_frequency
in classInstrument
-
get_amplitude_LFO_amplitude
public float get_amplitude_LFO_amplitude()- Specified by:
get_amplitude_LFO_amplitude
in classInstrument
-
set_amplitude_LFO_amplitude
public void set_amplitude_LFO_amplitude(float amplitude) - Specified by:
set_amplitude_LFO_amplitude
in classInstrument
-
get_amplitude_LFO_frequency
public float get_amplitude_LFO_frequency()- Specified by:
get_amplitude_LFO_frequency
in classInstrument
-
set_amplitude_LFO_frequency
public void set_amplitude_LFO_frequency(float frequency) - Specified by:
set_amplitude_LFO_frequency
in classInstrument
-
get_filter_resonance
public float get_filter_resonance()- Specified by:
get_filter_resonance
in classInstrument
-
set_filter_resonance
public void set_filter_resonance(float resonance) - Specified by:
set_filter_resonance
in classInstrument
-
get_filter_frequency
public float get_filter_frequency()- Specified by:
get_filter_frequency
in classInstrument
-
set_filter_frequency
public void set_filter_frequency(float frequency) - Specified by:
set_filter_frequency
in classInstrument
-
get_amplitude
public float get_amplitude()- Specified by:
get_amplitude
in classInstrument
-
set_amplitude
public void set_amplitude(float amplitude) - Specified by:
set_amplitude
in classInstrument
-
set_amplitude
public void set_amplitude(float amplitude, int interpolation_duration_in_samples) - Overrides:
set_amplitude
in classInstrument
-
get_frequency
public float get_frequency()- Specified by:
get_frequency
in classInstrument
-
set_frequency
public void set_frequency(float frequency) - Specified by:
set_frequency
in classInstrument
-
set_frequency
public void set_frequency(float frequency, int interpolation_duration_in_samples) - Overrides:
set_frequency
in classInstrument
-
get_LPF_envelope_cutoff_min
public float get_LPF_envelope_cutoff_min()- Specified by:
get_LPF_envelope_cutoff_min
in classInstrument
-
set_LPF_envelope_cutoff_min
public void set_LPF_envelope_cutoff_min(float value) - Specified by:
set_LPF_envelope_cutoff_min
in classInstrument
-
get_LPF_envelope_cutoff_max
public float get_LPF_envelope_cutoff_max()- Specified by:
get_LPF_envelope_cutoff_max
in classInstrument
-
set_LPF_envelope_cutoff_max
public void set_LPF_envelope_cutoff_max(float value) - Specified by:
set_LPF_envelope_cutoff_max
in classInstrument
-
get_LPF_envelope_resonance_min
public float get_LPF_envelope_resonance_min()- Specified by:
get_LPF_envelope_resonance_min
in classInstrument
-
set_LPF_envelope_resonance_min
public void set_LPF_envelope_resonance_min(float value) - Specified by:
set_LPF_envelope_resonance_min
in classInstrument
-
get_LPF_envelope_resonance_max
public float get_LPF_envelope_resonance_max()- Specified by:
get_LPF_envelope_resonance_max
in classInstrument
-
set_LPF_envelope_resonance_max
public void set_LPF_envelope_resonance_max(float value) - Specified by:
set_LPF_envelope_resonance_max
in classInstrument
-
get_LPF_envelope_cutoff
- Specified by:
get_LPF_envelope_cutoff
in classInstrument
-
get_LPF_envelope_resonance
- Specified by:
get_LPF_envelope_resonance
in classInstrument
-
pitch_bend
public void pitch_bend(float frequency_offset) - Specified by:
pitch_bend
in classInstrument
-
set_detune
public void set_detune(float detune) detune of second oscillator in relation to main oscillator- Specified by:
set_detune
in classInstrument
- Parameters:
detune
- in percent. a value of 1.0 will tune the second oscillator to the exact frequency as the main oscillator. a value of 0.5 will tune the second oscillator to half the frequency of the main oscillator, etcetera.
-
get_detune
public float get_detune()- Specified by:
get_detune
in classInstrument
-
set_detune_amplitude
public void set_detune_amplitude(float amplitude) - Specified by:
set_detune_amplitude
in classInstrument
-
get_detune_amplitude
public float get_detune_amplitude()- Specified by:
get_detune_amplitude
in classInstrument
-
set_detune_oscillator_type
public void set_detune_oscillator_type(int oscillator) - Specified by:
set_detune_oscillator_type
in classInstrument
-
get_detune_oscillator_type
public int get_detune_oscillator_type() -
note_off
public void note_off()- Specified by:
note_off
in classInstrument
-
note_on
public void note_on(int note, int velocity) - Specified by:
note_on
in classInstrument
-
get_VCO
-
get_detune_VCO
-
get_channels
public int get_channels() -
set_channels
public void set_channels(int num_channels)
-