- feat: add freq support to gm soundfonts

- refactor: toMidi -> noteToMidi
- refactor: fromMidi -> midiToFreq
This commit is contained in:
Felix Roos 2023-03-23 10:18:24 +01:00
parent 13133583ca
commit ba35a81e9b
10 changed files with 59 additions and 50 deletions

View file

@ -1,4 +1,4 @@
import { Pattern, toMidi, valueToMidi } from '@strudel.cycles/core';
import { Pattern, noteToMidi, valueToMidi } from '@strudel.cycles/core';
//import { registerSoundfonts } from '@strudel.cycles/soundfonts';
import { registerSynthSounds, samples } from '@strudel.cycles/webaudio';
@ -22,7 +22,7 @@ export async function prebake() {
]);
}
const maxPan = toMidi('C8');
const maxPan = noteToMidi('C8');
const panwidth = (pan, width) => pan * width + (1 - width) / 2;
Pattern.prototype.piano = function () {