module ZXUtils::MusicBox::TrackConfigCommands
MusicBox
TrackConfigCommands
¶ ↑
Common Track
and Multitrack
commands for changing track configuration options.
Constants
- DEFAULT_FIRST_OCTAVE_NOTE
- DEFAULT_TEMPO
Public Instance Methods
first_octave_note [note]
click to toggle source
Gets or establishes which music note
:a
to :g!
begins an octave. By default the first music note in an octave is: :a
.
# File lib/zxutils/music_box/track.rb, line 15 def first_octave_note(note=nil) @first_octave_note = note if note @first_octave_note end
tempo [ticks]
click to toggle source
Gets or alters the tempo ticks
.
The ticks
value is being used as a base for the notes/pause duration.
See CommonInstrumentCommands.pause
.
# File lib/zxutils/music_box/track.rb, line 27 def tempo(ticks=nil) if ticks raise ArgumentError, "ticks should be a positive integer" unless Integer === ticks and ticks >= 1 @tempo = ticks end @tempo end