Skip to content

Commit efc49ab

Browse files
committed
fixes
1 parent ce21b30 commit efc49ab

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

external_library/java/minim/drum_machine.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class DrumMachine < Processing::App
1616
attr_reader :minim, :out, :kick, :snare, :hat, :bpm, :beat, :buttons
1717
attr_reader :kikRow, :snrRow, :hatRow
1818
def setup
19+
sketch_title 'Drum Machine'
1920
minim = Minim.new(self)
2021
@out = minim.getLineOut
2122
@hatRow = Array.new(16, false)
@@ -27,10 +28,9 @@ def setup
2728
# load all of our samples, using 4 voices for each.
2829
# this will help ensure we have enough voices to handle even
2930
# very fast tempos.
30-
kick = Sampler.new(data_path('BD.wav'), 4, minim)
31-
snare = Sampler.new(data_path('SD.wav'), 4, minim)
32-
hat = Sampler.new(data_path('CHH.wav'), 4, minim)
33-
31+
@kick = Sampler.new(data_path('BD.wav'), 4, minim)
32+
@snare = Sampler.new(data_path('SD.wav'), 4, minim)
33+
@hat = Sampler.new(data_path('CHH.wav'), 4, minim)
3434
# patch samplers to the output
3535
kick.patch(out)
3636
snare.patch(out)

external_library/java/minim/library/tick/lib/rect.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def draw
2020
end
2121

2222
def mouse_pressed
23-
if mouseX >= x && mouseX <= x + w && mouseY >= y && mouseY <= y + h
23+
if mouse_x >= x && mouse_x <= x + w && mouse_y >= y && mouse_y <= y + h
2424
steps[stepId] = !steps[stepId]
2525
end
2626
end

0 commit comments

Comments
 (0)