Skip to content

Commit

Permalink
k must be less than n
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Voorhis committed Nov 16, 2008
1 parent 3b7d85e commit e0afa69
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions examples/euclid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
module Euclid
module_function
def euclid(k, n)
raise ArgumentError, "`k' must be less than `n'" unless k < n
bjorklund Array.new(k, [true]) + Array.new(n - k, [false])
end

Expand Down Expand Up @@ -42,13 +43,6 @@ def interleave(list1, list2)
end
end

def cresc(factor, score)
group(score,
:velocity => env { |v0, ph|
v1 = (v0 + ph * ((v0 * factor) - v0)).round # Linear interpolation
v1.clip(0..127) })
end

def kick(*args)
n(35, *args)
end
Expand Down

0 comments on commit e0afa69

Please sign in to comment.