Class: SynthBlocks::Mixer::SendChannel

Inherits:
MixerChannel show all
Defined in:
lib/synth_blocks/mixer/send_channel.rb

Overview

t Channel subclass specifically for SendChannels

Constant Summary

Constants inherited from MixerChannel

MixerChannel::LIVE_PARAMS

Instance Attribute Summary

Attributes inherited from MixerChannel

#preset

Attributes inherited from Core::Sound

#mode

Instance Method Summary collapse

Methods inherited from MixerChannel

#duck, #live_params, #send

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