Class: KeySignature

.key. KeySignature

new KeySignature(sharps)

Represents a key signature

Parameters:
Name Type Argument Default Description
sharps int <optional>
0
  • the number of sharps (negative for flats)
Properties:
Name Type Argument Default Description
sharps int <optional>
0
  • number of sharps (negative for flats)
flatMapping Array.<string>
  • flat signatures 0-12 flats
sharpMapping Array.<string>
  • sharp signatures 0-12 sharps
Source:
Example
var ks = new music21.key.KeySignature(-3); //E-flat major or c minor
var s = new music21.stream.Stream();
s.keySignature = ks;
var n = new music21.note.Note('A-'); // A-flat
s.append(n);
s.appendNewDOM();

Extends

Music21j, Copyright © 2013-2021 Michael Scott Asato Cuthbert.
Documentation generated by JSDoc 3.6.3 on Wed Jul 31st 2019 using the DocStrap template.