mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-25 04:28:30 +00:00
start curating the soundfont list
This commit is contained in:
parent
ff412f6396
commit
aa324ae25d
File diff suppressed because it is too large
Load Diff
@ -251,7 +251,10 @@ function SoundsTab() {
|
|||||||
const trigRef = useRef();
|
const trigRef = useRef();
|
||||||
// stop current sound on mouseup
|
// stop current sound on mouseup
|
||||||
useEvent('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 (
|
return (
|
||||||
<div id="sounds-tab" className="break-normal w-full px-4 dark:text-white text-stone-900">
|
<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 }]) => (
|
{soundEntries.map(([name, { data, onTrigger }]) => (
|
||||||
<span
|
<span
|
||||||
key={name}
|
key={name}
|
||||||
className="cursor-pointer hover:opacity-50"
|
className="cursor-pointer hover:opacity-50 block"
|
||||||
onMouseDown={async () => {
|
onMouseDown={async () => {
|
||||||
const ctx = getAudioContext();
|
const ctx = getAudioContext();
|
||||||
const params = {
|
const params = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user