Class: Synthesizer::Amplifier
- Inherits:
-
Object
- Object
- Synthesizer::Amplifier
- Defined in:
- lib/synthesizer/amplifier.rb
Instance Attribute Summary collapse
-
#pan ⇒ Object
readonly
Returns the value of attribute pan.
-
#tune_cents ⇒ Object
readonly
Returns the value of attribute tune_cents.
-
#tune_semis ⇒ Object
readonly
Returns the value of attribute tune_semis.
-
#uni_detune ⇒ Object
readonly
Returns the value of attribute uni_detune.
-
#uni_num ⇒ Object
readonly
Returns the value of attribute uni_num.
-
#uni_stereo ⇒ Object
readonly
Returns the value of attribute uni_stereo.
-
#volume ⇒ Object
readonly
Returns the value of attribute volume.
Instance Method Summary collapse
-
#initialize(shape: Shape::Sine, volume: 1.0, pan: 0.0, tune_semis: 0, tune_cents: 0, uni_num: 1.0, uni_detune: 0.0, uni_stereo: 0.0) ⇒ Amplifier
constructor
A new instance of Amplifier.
Constructor Details
#initialize(shape: Shape::Sine, volume: 1.0, pan: 0.0, tune_semis: 0, tune_cents: 0, uni_num: 1.0, uni_detune: 0.0, uni_stereo: 0.0) ⇒ Amplifier
Returns a new instance of Amplifier.
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/synthesizer/amplifier.rb', line 19 def initialize(shape: Shape::Sine, volume: 1.0, pan: 0.0, tune_semis: 0, tune_cents: 0, uni_num: 1.0, uni_detune: 0.0, uni_stereo: 0.0) @volume = ModulationValue.create(volume) @pan = ModulationValue.create(pan) @tune_semis = ModulationValue.create(tune_semis) @tune_cents = ModulationValue.create(tune_cents) @uni_num = ModulationValue.create(uni_num) @uni_detune = ModulationValue.create(uni_detune) @uni_stereo = ModulationValue.create(uni_stereo) end |
Instance Attribute Details
#pan ⇒ Object (readonly)
Returns the value of attribute pan.
5 6 7 |
# File 'lib/synthesizer/amplifier.rb', line 5 def pan @pan end |
#tune_cents ⇒ Object (readonly)
Returns the value of attribute tune_cents.
7 8 9 |
# File 'lib/synthesizer/amplifier.rb', line 7 def tune_cents @tune_cents end |
#tune_semis ⇒ Object (readonly)
Returns the value of attribute tune_semis.
6 7 8 |
# File 'lib/synthesizer/amplifier.rb', line 6 def tune_semis @tune_semis end |
#uni_detune ⇒ Object (readonly)
Returns the value of attribute uni_detune.
9 10 11 |
# File 'lib/synthesizer/amplifier.rb', line 9 def uni_detune @uni_detune end |
#uni_num ⇒ Object (readonly)
Returns the value of attribute uni_num.
8 9 10 |
# File 'lib/synthesizer/amplifier.rb', line 8 def uni_num @uni_num end |
#uni_stereo ⇒ Object (readonly)
Returns the value of attribute uni_stereo.
10 11 12 |
# File 'lib/synthesizer/amplifier.rb', line 10 def uni_stereo @uni_stereo end |
#volume ⇒ Object (readonly)
Returns the value of attribute volume.
4 5 6 |
# File 'lib/synthesizer/amplifier.rb', line 4 def volume @volume end |