Skip to content

Commit

Permalink
Reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rafadc committed Jan 16, 2012
1 parent a982a93 commit abc70b2
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions README.md
Expand Up @@ -23,42 +23,42 @@ Rythmic is used through irb so one you've checked out rythmic code go to install

Now, in irb prompt try the following to check that your installation was correct

irb(main):001:0> load "examples/simple_example.rb"
=> true
irb(main):001:0> load "examples/simple_example.rb"
=> true

That should put some sound in your speakers or raise an error.

You will be presented with a ruby console where you can start using the drum machine

For example if you type the following

irb(main):001:0> require "rythmic"
=> true
irb(main):002:0> drums = Drumkit.new "gmkit"
[...]
irb(main):003:0> drums.pattern("kick", 0, 1)
[...]
irb(main):004:0> drums.pattern("tom_hi", 2)
[...]
irb(main):005:0> drums.play 4
irb(main):001:0> require "rythmic"
=> true
irb(main):002:0> drums = Drumkit.new "gmkit"
[...]
irb(main):003:0> drums.pattern("kick", 0, 1)
[...]
irb(main):004:0> drums.pattern("tom_hi", 2)
[...]
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.tempo = 200
[...]
drums.play 4
[...]

You'll hear your drums faster.

You can also change the lenght of a loop. If you do

drums.lenght = 2
[...]
drums.play 4
[...]
drums.lenght = 2
[...]
drums.play 4
[...]

You'll only hear kicks all the way since the loop ends in the second beat.

Expand Down

0 comments on commit abc70b2

Please sign in to comment.