4 const int ZEROOCTAVE
=7;
8 accidentals
.set_size(7);
9 for (int i
= 0; i
< 7 ; i
++)
13 Local_key::Local_key()
15 octaves
.set_size(OCTAVES
);
21 return octaves
[i
+ZEROOCTAVE
];
25 Key::set(int i
, int a
)
27 assert(a
> -3 && a
< 3);
33 Local_key::reset(Key k
)
35 for (int i
= 0; i
< OCTAVES
; i
++)
40 Key::read(Array
<Scalar
> s
)
43 for (int j
= 0; j
< 7; j
++)
46 for (int i
=0; i
< s
.size(); ) {
49 accidentals
[large
]=small
;
58 Key::oldkey_undo(Array
<Scalar
>s
)
63 for (int i
=0; i
< newkey
.size(); i
++)
66 for (int i
=0; i
< s
.size(); ) {
69 newkey
[large
] = small
;
71 for (int i
=0; i
< newkey
.size(); i
++)
72 if (accidentals
[i
] && accidentals
[i
] != newkey
[i
]) {