Skip to main content

key_data

Function key_data 

Source
pub fn key_data(sharps: IntegerType, mode: Mode) -> [u8; 2]
Expand description

The two bytes of a key: sharps, flats below nought, then the mode.

use music21::midi::translate::{Mode, key_data};

assert_eq!(key_data(-5, Mode::Minor), [0xFB, 1]);