start curating the soundfont list
This commit is contained in:
parent
ff412f6396
commit
aa324ae25d
2 changed files with 468 additions and 272 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -251,7 +251,10 @@ function SoundsTab() {
|
|||
const trigRef = useRef();
|
||||
// stop current sound on mouseup
|
||||
useEvent('mouseup', () => {
|
||||
trigRef.current?.then((ref) => ref?.stop(getAudioContext().currentTime + 0.01));
|
||||
trigRef.current?.then((ref) => {
|
||||
ref?.stop(getAudioContext().currentTime + 0.01);
|
||||
trigRef.current = undefined;
|
||||
});
|
||||
});
|
||||
return (
|
||||
<div id="sounds-tab" className="break-normal w-full px-4 dark:text-white text-stone-900">
|
||||
|
|
@ -264,7 +267,7 @@ function SoundsTab() {
|
|||
{soundEntries.map(([name, { data, onTrigger }]) => (
|
||||
<span
|
||||
key={name}
|
||||
className="cursor-pointer hover:opacity-50"
|
||||
className="cursor-pointer hover:opacity-50 block"
|
||||
onMouseDown={async () => {
|
||||
const ctx = getAudioContext();
|
||||
const params = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue