mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-24 05:57:17 -04:00
can now pass meta data to setSound
+ added types for synth and sample + list sample count for samples in sounds tab (as before)
This commit is contained in:
@@ -196,15 +196,15 @@ function ConsoleTab({ log }) {
|
||||
|
||||
function SoundsTab() {
|
||||
const sounds = useStore(soundMap);
|
||||
const getSamples = (samples) =>
|
||||
Array.isArray(samples) ? samples.length : typeof samples === 'object' ? Object.values(samples).length : 1;
|
||||
return (
|
||||
<div id="sounds-tab" className="break-normal w-full px-4 dark:text-white text-stone-900">
|
||||
{/* <span>{loadedSamples.length} banks loaded:</span> */}
|
||||
{Object.entries(sounds).map(([name, samples]) => (
|
||||
{Object.entries(sounds).map(([name, { data }]) => (
|
||||
<span key={name} className="cursor-pointer hover:opacity-50" onClick={() => {}}>
|
||||
{' '}
|
||||
{name}
|
||||
{/* (
|
||||
{Array.isArray(samples) ? samples.length : typeof samples === 'object' ? Object.values(samples).length : 1}) */}
|
||||
{name} {data?.type === 'sample' ? `(${getSamples(data.samples)})` : ''}
|
||||
</span>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user