Skip to content
Browse files

Improved with last features

  • Loading branch information...
1 parent 4f47fc7 commit 0b67f3e8d2546250e3bd21a000e4e0b2597086d7 @rafadc committed Jan 29, 2012
Showing with 62 additions and 7 deletions.
  1. +62 −7 README.md
View
69 README.md
@@ -18,8 +18,13 @@ Also, some versions of readline are blocking so if you experience sounds not bei
Unluckly then your history keys will stop working in irb
+Now you can try to fire an example to check the installation
-## Using rhythmic
+ ruby examples/song_example.rb
+
+You'll hear a rhythmic demo.
+
+## Using rhythmic drumkits
Rhythmic is used through irb so one you've checked out rythmic code go to installation directory and type "irb"
@@ -38,19 +43,26 @@ For example if you type the following
=> true
irb(main):002:0> drums = Drumkit.new "gmkit"
[...]
- irb(main):003:0> drums.pattern("kick", 0, 1)
+ irb(main):003:0> drums.pattern("kick", 0 [0, 1])
+ [...]
+ irb(main):004:0> drums.pattern("tom_hi", [2])
+ [...]
+ irb(main):005:0> drums.copy_pattern(0, 1)
[...]
- irb(main):004:0> drums.pattern("tom_hi", 2)
+ irb(main):006:0> drums.copy_pattern(0, 2)
+ [...]
+ irb(main):007:0> drums.copy_pattern(0, 3)
+ [...]
+ irb(main):008:0> drums.play
[...]
- irb(main):005:0> drums.play 4
You'll here four times the pattern we just defined. The kick in the first and second beat and the tom in the third. The fourh beat will be on silence.
Then you can play with the tempo. If you do
drums.tempo = 200
[...]
- drums.play 4
+ drums.play
[...]
You'll hear your drums faster.
@@ -59,14 +71,57 @@ You can also change the lenght of a loop. If you do
drums.lenght = 2
[...]
- drums.play 4
+ drums.play
[...]
You'll only hear kicks all the way since the loop ends in the second beat.
+## Playing samples
+
+You can just load some samples alone and fire them at will. Try doing:
+
+ irb(main):001:0> require "./rhythmic"
+ [...]
+ irb(main):002:0> your_in = Rhythmic::Sample.new("YourInOrYourOut.wav")
+ [...]
+ irb(main):003:0> your_in.play_after(0,3,3,3)
+ [...]
+ irb(main):004:0> your_in.play
+ [...]
+
+You have to load the sample and after that indicate the delays between plays.
+The sample will be played at specified time.
+
+## Putting it all together
+
+To run several things at the same time you can put them all in a song. Just do
+
+ irb(main):004:0> demo_song = Rhythmic::Song.new
+ [...]
+ irb(main):004:0> drums = Rhythmic::Drumkit.new("gmkit", 230, 10)
+ [...]
+ irb(main):004:0> drums.pattern("clap", 0, [0, 2, 4, 6, 8, 10])
+ [...]
+ irb(main):004:0> demo_song.add drums
+ [...]
+ irb(main):004:0> your_in = Rhythmic::Sample.new("YourInOrYourOut.wav")
+ [...]
+ irb(main):004:0> your_in.volume = 0.7
+ [...]
+ irb(main):004:0> your_in.play_after(0, 4)
+ [...]
+ irb(main):004:0> demo_song.add your_in
+ [...]
+ irb(main):004:0> demo_song.play
+ [...]
+
+You should hear both things at the same time
+
## Defining new drumkits
-Rhythmic just fires samples located in drumkit folder. To create a new drumkit just create a new folder with the name of the drumkit. Inside it you must place a yaml file like the following
+Rhythmic just fires samples located in drumkit folder. To create a new drumkit
+just create a new folder with the name of the drumkit. Inside it you must place
+a yaml file like the following
[{name : kick, file : clap_Dry_c.wav},
{name : tom_hi, file : tom_Rock_mid.wav}]

0 comments on commit 0b67f3e

Please sign in to comment.
Something went wrong with that request. Please try again.