class ZXUtils::MusicBox::Mask

MusicBox Mask

Instances of this class represent the bit masks applicable to the channel's mixer tone or noise control bits or the volume envelope control bit.

Public Class Methods

new [counter, bitmask], ... click to toggle source
new [counter, bitmask], ..., :loop, ..., [counter, bitmask]

Creates an instance of the Mask with the given tuples defining bits for the mask.

counter

For how many ticks apply the bits of the following bitmask: 1 to 255.

bitmask

An 8-bit integer representing the 8 mask values: 0b00000000 to 0b11111111. The bits are being applied for each tick in turn starting from the most (leftmost) significant (7th) bit of the bitmask value down to the least significant one. If the counter is higher than 8 the bits are being applied repeatedly.

:loop

An indicator where to go back when the end of the mask is being reached. If not present the whole mask is being repeated.

Calls superclass method ZXUtils::MusicBox::Envelope::new
# File lib/zxutils/music_box/song.rb, line 512
def initialize(*args)
        super
end