class GotimeObject

Attributes

curraryval[RW]
gotimary[RW]
internalgranularity[RW]
offset[RW]
val[RW]

Public Class Methods

new(v) click to toggle source
# File lib/melody_object/Mo_h_hc.rb, line 56
def initialize(v)
  if v.class==Fixnum
    @val=v
    @internalgranularity=v
     @curraryval=0
  else
    @gotimary=v
    @curraryval=0
  end
end

Public Instance Methods

granularity() click to toggle source
# File lib/melody_object/Mo_h_hc.rb, line 67
def granularity
  @internalgranularity#+rand(2)
end
status() click to toggle source
# File lib/melody_object/Mo_h_hc.rb, line 71
def status
 if @gotimary.nil?
  if Midistack.ticker==0
    #~ puts 'zero'
    return true 
    else
      #~ puts 'slipped'
   x=Midistack.ticker%@internalgranularity==0
   #~ if x then puts 'yeh' end
    return x
  end
 else
  #~ puts "mt:#{Midistack.ticker} os:#{@offset} cv#{@curraryval}  cvv#{@gotimary[@curraryval]}  t/f: #{Midistack.ticker-@offset==@gotimary[@curraryval]-1}"
  #~ $fyl.puts " #{@offset}, #{@curraryval}, len:#{@gotimary.length} #{@gotimary[@curraryval]}"
  #~ return Midistack.ticker-@offset==@gotimary[@curraryval]-1
 end
end