Fix ableton transformer function call and update export form schema validation
This commit is contained in:
@@ -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),
|
||||
|
||||
@@ -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 }) {
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user