new KeySignature(sharps)
Represents a key signature
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
sharps |
int |
<optional> |
0 |
|
- number of sharps (negative for flats)
- flat signatures 0-12 flats
- sharp signatures 0-12 sharps
- Source:
Properties:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
sharps |
int |
<optional> |
0 | |
flatMapping |
Array.<string> | |||
sharpMapping |
Array.<string> |
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();