Module: MIDICommunicationsWindows::TypeConversion
- Extended by:
- TypeConversion
- Included in:
- TypeConversion
- Defined in:
- lib/midi-communications-windows/type_conversion.rb
Overview
Utility methods for converting between MIDI data formats.
Class Method Summary collapse
-
.numeric_bytes_to_hex_string(bytes) ⇒ String
Converts an array of numeric bytes to a hex string.
Instance Method Summary collapse
-
#numeric_bytes_to_hex_string(bytes) ⇒ String
Converts an array of numeric bytes to a hex string.
Class Method Details
.numeric_bytes_to_hex_string(bytes) ⇒ String
Converts an array of numeric bytes to a hex string.
16 17 18 |
# File 'lib/midi-communications-windows/type_conversion.rb', line 16 def numeric_bytes_to_hex_string(bytes) bytes.map { |byte| format('%02X', byte) }.join end |
Instance Method Details
#numeric_bytes_to_hex_string(bytes) ⇒ String
Converts an array of numeric bytes to a hex string.
16 17 18 |
# File 'lib/midi-communications-windows/type_conversion.rb', line 16 def numeric_bytes_to_hex_string(bytes) bytes.map { |byte| format('%02X', byte) }.join end |