lib/mass.rb in mass-0.0.1 vs lib/mass.rb in mass-0.0.2
- old
+ new
@@ -2,50 +2,13 @@
require 'mass/version'
require 'mass/pitch'
require 'mass/note'
require 'mass/pattern'
+require 'mass/sequence'
# A massive synth library.
module Mass
- class << self
- # The current BPM of this track. Defaults to +100+.
- #
- # @return [Integer]
- def current_bpm
- @current_bpm ||= 100
- end
-
- # Change BPM of the track.
- #
- # @example
- # require 'mass'
- # include Mass
- #
- # bpm 128
- #
- def bpm(new_bpm)
- @current_bpm = new_bpm
- end
-
- # Create a pattern in Mass.
- #
- # @example
- # require 'mass'
- # include Mass
- #
- # pattern name: 'verse', bars: 1 do
- # note 8, pitch: 'C4'
- # note 8, pitch: 'C3'
- # note 8, pitch: 'A3'
- # note 8, pitch: 'B4'
- # note 8, pitch: 'C4'
- # note 8, pitch: 'Gb2'
- # note 8, pitch: 'C4'
- # rest 8
- # end
- #
- def pattern(**params, &block)
- Pattern.create(**params, &block)
- end
+ def self.sequence(*args)
+ Sequence.define(*args)
end
end