Class: Integer

Inherits:
Object show all
Defined in:
lib/api/hit_sq.rb,
lib/api/snd.rb,
lib/api/dist.rb,
lib/api/hit_sq.rb

Overview

shortcut e.g. 0.HitSq for the most used, a single hit at 0

Instance Method Summary collapse

Instance Method Details

#DistObject

shortcut to create a Dist with length. e.g. 10.Dist returns a new Dist with length of 10 frames already set.



171
172
173
174
175
# File 'lib/api/dist.rb', line 171

def Dist
  h=Dist.new
  h.length = self.to_i
  h
end

#eqly_spaced(chance = 1, ignore_first = 0, ignore_last = 0) ⇒ Object

a shortcut. e.g. 4.eqly_spaced gives you HitSq#eqly_spaced(4)



103
104
105
106
107
# File 'lib/api/hit_sq.rb', line 103

def eqly_spaced(chance = 1, ignore_first=0, ignore_last=0)
  h=HitSq.new
  possible_hits=self
  h.eqly_spaced(possible_hits, chance, ignore_first, ignore_last)
end

#HitSqObject



72
73
74
75
76
# File 'lib/api/hit_sq.rb', line 72

def HitSq
  h=HitSq.new
  h<<self
  h
end

#SndObject

same as Float#Snd.



60
61
62
63
64
# File 'lib/api/snd.rb', line 60

def Snd
  a = Snd.new
  a.tonepart.freq = self
  a
end