Method: Synthesizer::ShapePos#initialize
- Defined in:
- lib/synthesizer/shape_pos.rb
#initialize(samplerate, init_phase) ⇒ ShapePos
5 6 7 8 9 10 11 |
# File 'lib/synthesizer/shape_pos.rb', line 5 def initialize(samplerate, init_phase) @samplerate = samplerate.to_f init_phase = init_phase ? init_phase.to_f : Random.rand(1.0) @sync_phase = init_phase @shape_phase = init_phase end |