Class: Sidtool::MidiFileWriter::KeySignature

Inherits:
Struct
  • Object
show all
Defined in:
lib/sidtool/midi_file_writer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#is_majorObject

Returns the value of attribute is_major

Returns:

  • (Object)

    the current value of is_major



40
41
42
# File 'lib/sidtool/midi_file_writer.rb', line 40

def is_major
  @is_major
end

#sharps_or_flatsObject

Returns the value of attribute sharps_or_flats

Returns:

  • (Object)

    the current value of sharps_or_flats



40
41
42
# File 'lib/sidtool/midi_file_writer.rb', line 40

def sharps_or_flats
  @sharps_or_flats
end

Instance Method Details

#bytesObject



41
42
43
44
45
46
47
# File 'lib/sidtool/midi_file_writer.rb', line 41

def bytes
  [
    0xFF, 0x59, 0x02,
    sharps_or_flats,
    is_major ? 0 : 1
  ]
end