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']),
|
...omit(pad, ['file', 'rawData']),
|
||||||
soundId,
|
soundId,
|
||||||
padCode: pattern.pad,
|
padCode: pattern.pad,
|
||||||
oneShotOverride: hasOneShotOverride(
|
oneShotOverride: hasOneShotOverride(pattern.pad, exporterParams.abletonOneShotPads),
|
||||||
pattern.pad,
|
|
||||||
exporterParams.abletonOneShotPads,
|
|
||||||
),
|
|
||||||
name: sound?.meta?.name || pattern.pad,
|
name: sound?.meta?.name || pattern.pad,
|
||||||
volume: pad.volume / 200, // converting from 0-200 to 0.0-1.0
|
volume: pad.volume / 200, // converting from 0-200 to 0.0-1.0
|
||||||
sampleName: getSampleName(sound?.meta?.name, soundId),
|
sampleName: getSampleName(sound?.meta?.name, soundId),
|
||||||
|
|||||||
@@ -4,10 +4,10 @@ import { useFormContext, useWatch } from 'react-hook-form';
|
|||||||
import { projectIdAtom } from '~/atoms/project';
|
import { projectIdAtom } from '~/atoms/project';
|
||||||
import CheckboxField from '~/components/form/CheckboxField';
|
import CheckboxField from '~/components/form/CheckboxField';
|
||||||
import SelectField from '~/components/form/SelectField';
|
import SelectField from '~/components/form/SelectField';
|
||||||
|
import CheckBox from '~/components/ui/CheckBox';
|
||||||
import useProject from '~/hooks/useProject';
|
import useProject from '~/hooks/useProject';
|
||||||
import { getPadDisplayName, hasMultipleNoteVariations } from '~/lib/utils';
|
import { getPadDisplayName, hasMultipleNoteVariations } from '~/lib/utils';
|
||||||
import { PadCode } from '~/types/types';
|
import { PadCode } from '~/types/types';
|
||||||
import CheckBox from '~/components/ui/CheckBox';
|
|
||||||
import { ExportFormValues } from './exportFormSchema';
|
import { ExportFormValues } from './exportFormSchema';
|
||||||
|
|
||||||
function ExportOptions({ disabled = false }: { disabled?: boolean }) {
|
function ExportOptions({ disabled = false }: { disabled?: boolean }) {
|
||||||
|
|||||||
@@ -12,9 +12,7 @@ export const exportFormSchema = z.object({
|
|||||||
format: z.enum(FORMAT_IDS),
|
format: z.enum(FORMAT_IDS),
|
||||||
abletonVersion: z.enum(['10', '11']),
|
abletonVersion: z.enum(['10', '11']),
|
||||||
abletonOneShotPads: z.array(
|
abletonOneShotPads: z.array(
|
||||||
z.custom<PadCode>(
|
z.custom<PadCode>((value) => typeof value === 'string' && /^[abcd]\d+$/.test(value)),
|
||||||
(value) => typeof value === 'string' && /^[abcd]\d+$/.test(value),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
projectName: z.string(),
|
projectName: z.string(),
|
||||||
includeArchivedSamples: z.boolean(),
|
includeArchivedSamples: z.boolean(),
|
||||||
|
|||||||
Reference in New Issue
Block a user