@@ -27,12 +27,12 @@ def setup
2727 minim = Minim . new ( self )
2828 @out = minim . getLineOut
2929 # when providing an Instrument, we always specify start time and duration
30- out . playNote ( 0.0 , 0.9 , SineInstrument . new ( 97.99 ) )
31- out . playNote ( 1.0 , 0.9 , SineInstrument . new ( 123.47 ) )
30+ out . playNote ( 0.0 , 0.9 , SineInstrument . new ( out , 97.99 ) )
31+ out . playNote ( 1.0 , 0.9 , SineInstrument . new ( out , 123.47 ) )
3232 # we can use the Frequency class to create frequencies from pitch names
33- out . playNote ( 2.0 , 2.9 , SineInstrument . new ( Frequency . ofPitch ( 'C3' ) . asHz ) )
34- out . playNote ( 3.0 , 1.9 , SineInstrument . new ( Frequency . ofPitch ( 'E3' ) . asHz ) )
35- out . playNote ( 4.0 , 0.9 , SineInstrument . new ( Frequency . ofPitch ( 'G3' ) . asHz ) )
33+ out . playNote ( 2.0 , 2.9 , SineInstrument . new ( out , Frequency . ofPitch ( 'C3' ) . asHz ) )
34+ out . playNote ( 3.0 , 1.9 , SineInstrument . new ( out , Frequency . ofPitch ( 'E3' ) . asHz ) )
35+ out . playNote ( 4.0 , 0.9 , SineInstrument . new ( out , Frequency . ofPitch ( 'G3' ) . asHz ) )
3636 end
3737
3838 def draw
0 commit comments