Class: SynthBlocks::Mixer::SendChannel
- Inherits:
-
MixerChannel
- Object
- Core::Sound
- MixerChannel
- SynthBlocks::Mixer::SendChannel
- Defined in:
- lib/synth_blocks/mixer/send_channel.rb
Overview
t Channel subclass specifically for SendChannels
Constant Summary
Constants inherited from MixerChannel
Instance Attribute Summary
Attributes inherited from MixerChannel
Attributes inherited from Core::Sound
Instance Method Summary collapse
-
#initialize(srate, insert_effects: [], sends: [], preset: {}) ⇒ SendChannel
constructor
creates new send channel.
-
#run(offset, input) ⇒ Object
run the send channel.
Methods inherited from MixerChannel
Methods inherited from Core::Sound
#active_events, #duration, #get, #live_params, #release, #set, #start, #stop
Constructor Details
#initialize(srate, insert_effects: [], sends: [], preset: {}) ⇒ SendChannel
creates new send channel. See MixerChannel#new for parameters
10 11 12 |
# File 'lib/synth_blocks/mixer/send_channel.rb', line 10 def initialize(srate, insert_effects: [], sends: [], preset: {}) super(srate, nil, insert_effects: insert_effects, sends: sends, preset: preset) end |
Instance Method Details
#run(offset, input) ⇒ Object
run the send channel
16 17 18 19 20 21 22 |
# File 'lib/synth_blocks/mixer/send_channel.rb', line 16 def run(offset, input) out = @eq.run(input) @insert_effects.each do |effect| out = effect.run(out) end @output = out * @preset[:volume] end |