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.



285
286
287
288
289
# File 'lib/api/dist.rb', line 285

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)



179
180
181
182
183
# File 'lib/api/hit_sq.rb', line 179

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



147
148
149
150
151
# File 'lib/api/hit_sq.rb', line 147

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

#SndObject

same as Float#Snd.



79
80
81
82
83
# File 'lib/api/snd.rb', line 79

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