Skip to content

Commit ee544fc

Browse files
committed
sound library examples
1 parent 7ce2db0 commit ee544fc

14 files changed

+50
-335
lines changed

Rakefile

+9-33
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ task :all do
1010
Rake::Task[:demo].execute
1111
Rake::Task[:vecmath].execute
1212
Rake::Task[:shaders].execute
13-
# Rake::Task[:slider].execute
13+
Rake::Task[:sound].execute
1414
end
1515

1616
desc 'run demo samples'
@@ -22,49 +22,25 @@ desc 'shaders'
2222
task :shaders do
2323
sh "cd #{PRWD}/shaders && rake"
2424
end
25-
#
26-
# desc 'PixelFlow'
27-
# task :pixel_flow do
28-
# sh "cd #{PRWD}/external_library/java/pixel_flow && rake"
29-
# end
30-
#
25+
3126
desc 'vecmath'
3227
task :vecmath do
3328
sh "cd #{PRWD}/library/vecmath/vec2d && rake"
3429
sh "cd #{PRWD}/library/vecmath/vec3d && rake"
3530
sh "cd #{PRWD}/library/vecmath/arcball && rake"
3631
end
37-
#
38-
# desc 'hype'
39-
# task :hype do
40-
# sh "cd #{PRWD}/external_library/java/hype && rake"
41-
# end
42-
#
43-
# desc 'slider'
44-
# task :slider do
45-
# sh "cd #{PRWD}/processing_app/library/slider && rake"
46-
# end
47-
#
32+
4833
desc 'geomerative'
4934
task :geomerative do
5035
sh "cd #{PRWD}/gems/geomerative && rake"
5136
end
52-
#
53-
# desc 'hemesh'
54-
# task :hemesh do
55-
# sh "cd #{PRWD}/external_library/java/hemesh && rake"
56-
# end
57-
#
58-
# desc 'pbox2d'
59-
# task :pbox2d do
60-
# sh "cd #{PRWD}/external_library/gem/pbox2d && rake"
61-
# sh "cd #{PRWD}/external_library/gem/pbox2d/revolute_joint && jruby revolute_joint.rb"
62-
# sh "cd #{PRWD}/external_library/gem/pbox2d/test_contact && jruby test_contact.rb"
63-
# sh "cd #{PRWD}/external_library/gem/pbox2d/mouse_joint && jruby mouse_joint.rb"
64-
# sh "cd #{PRWD}/external_library/gem/pbox2d/distance_joint && jruby distance_joint.rb"
65-
# end
66-
#
37+
6738
desc 'wordcram'
6839
task :wordcram do
6940
sh "cd #{PRWD}/gems/ruby_wordcram && rake"
7041
end
42+
43+
desc 'sound'
44+
task :sound do
45+
sh "cd #{PRWD}/library/sound && rake"
46+
end

library/sound/Rakefile

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# -*- encoding: utf-8 -*-
2+
3+
PRWD = File.expand_path(__dir__)
4+
5+
desc 'run demo'
6+
task :default => [:all]
7+
8+
desc 'autorun all samples'
9+
task :all do
10+
Rake::Task[:soundfile].execute
11+
Rake::Task[:oscillators].execute
12+
Rake::Task[:noise].execute
13+
Rake::Task[:effects].execute
14+
end
15+
16+
desc 'run soundfile samples'
17+
task :soundfile do
18+
sh "cd #{PRWD}/soundfile && rake"
19+
end
20+
21+
desc 'oscillators'
22+
task :oscillators do
23+
sh "cd #{PRWD}/oscillators && rake"
24+
end
25+
26+
desc 'noise'
27+
task :noise do
28+
sh "cd #{PRWD}/noise && rake"
29+
end
30+
31+
desc 'effects'
32+
task :effects do
33+
sh "cd #{PRWD}/effects && rake"
34+
end

library/sound/brown_noise.rb

-32
This file was deleted.

library/sound/keyboard.rb

-92
This file was deleted.

library/sound/noise/brown_noise.rb

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def settings
1515

1616
def setup
1717
background(255)
18+
sketch_title 'Brown Noise'
1819
# Create and start the noise generator
1920
@noise = BrownNoise.new(self)
2021
noise.play

library/sound/noise/noise_spectrum.rb

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def settings
2020

2121
def setup
2222
background(255)
23+
sketch_title 'Noise Spectrum'
2324
@current = 0
2425
# Create the noises
2526
@noises = PRE.map { |pre| eval("#{pre}Noise.new(self)") }

library/sound/noise/pink_noise.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ def settings
1414
end
1515

1616
def setup
17-
background(255)
17+
background(255)
18+
sketch_title 'Pink Noise'
1819
# Create and start the noise generator
1920
@noise = PinkNoise.new(self)
2021
noise.play

library/sound/noise/white_noise.rb

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def settings
1515

1616
def setup
1717
background(255)
18+
sketch_title 'White Noise'
1819
# Create and start the noise generator
1920
@noise = WhiteNoise.new(self)
2021
noise.play

library/sound/pink_noise.rb

-32
This file was deleted.

library/sound/sample.rb

-54
This file was deleted.

0 commit comments

Comments
 (0)