- make dictionary a control
- standalone voicing function - simplify voicing control names
This commit is contained in:
parent
d5c0309885
commit
0b3a8a5f65
3 changed files with 24 additions and 14 deletions
|
|
@ -54,6 +54,15 @@ export const x2chroma = (x) => {
|
|||
}
|
||||
};
|
||||
|
||||
export const x2midi = (x) => {
|
||||
if (typeof x === 'number') {
|
||||
return x;
|
||||
}
|
||||
if (typeof x === 'string') {
|
||||
return note2midi(x);
|
||||
}
|
||||
};
|
||||
|
||||
// duplicate: util.mjs (does not support sharp flag)
|
||||
export const midi2note = (midi, sharp = false) => {
|
||||
const oct = Math.floor(midi / 12) - 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue