Fix ableton transformer function call and update export form schema validation

This commit is contained in:
2026-07-13 10:18:41 +02:00
parent 7571a04e58
commit c2b6a3e487
3 changed files with 3 additions and 8 deletions

View File

@@ -176,10 +176,7 @@ function abletonTransformer(data: ProjectRawData, exporterParams: ExporterParams
...omit(pad, ['file', 'rawData']),
soundId,
padCode: pattern.pad,
oneShotOverride: hasOneShotOverride(
pattern.pad,
exporterParams.abletonOneShotPads,
),
oneShotOverride: hasOneShotOverride(pattern.pad, exporterParams.abletonOneShotPads),
name: sound?.meta?.name || pattern.pad,
volume: pad.volume / 200, // converting from 0-200 to 0.0-1.0
sampleName: getSampleName(sound?.meta?.name, soundId),

View File

@@ -4,10 +4,10 @@ import { useFormContext, useWatch } from 'react-hook-form';
import { projectIdAtom } from '~/atoms/project';
import CheckboxField from '~/components/form/CheckboxField';
import SelectField from '~/components/form/SelectField';
import CheckBox from '~/components/ui/CheckBox';
import useProject from '~/hooks/useProject';
import { getPadDisplayName, hasMultipleNoteVariations } from '~/lib/utils';
import { PadCode } from '~/types/types';
import CheckBox from '~/components/ui/CheckBox';
import { ExportFormValues } from './exportFormSchema';
function ExportOptions({ disabled = false }: { disabled?: boolean }) {

View File

@@ -12,9 +12,7 @@ export const exportFormSchema = z.object({
format: z.enum(FORMAT_IDS),
abletonVersion: z.enum(['10', '11']),
abletonOneShotPads: z.array(
z.custom<PadCode>(
(value) => typeof value === 'string' && /^[abcd]\d+$/.test(value),
),
z.custom<PadCode>((value) => typeof value === 'string' && /^[abcd]\d+$/.test(value)),
),
projectName: z.string(),
includeArchivedSamples: z.boolean(),