Remove sample pitch and root note handling in Ableton exporter
This commit is contained in:
@@ -422,9 +422,6 @@ async function buildSimplerDevice(
|
|||||||
device.VolumeAndPan.Panorama.Manual['@Value'] = padSound.pan;
|
device.VolumeAndPan.Panorama.Manual['@Value'] = padSound.pan;
|
||||||
|
|
||||||
let pitch = padSound.pitch || 0;
|
let pitch = padSound.pitch || 0;
|
||||||
if (koTrack.samplePitch) {
|
|
||||||
pitch += koTrack.samplePitch;
|
|
||||||
}
|
|
||||||
|
|
||||||
// adding PITCH fader param if defined
|
// adding PITCH fader param if defined
|
||||||
if (koTrack.faderParams[FaderParam.PTC] !== -1) {
|
if (koTrack.faderParams[FaderParam.PTC] !== -1) {
|
||||||
|
|||||||
@@ -32,8 +32,6 @@ export type AblTrack = Omit<Pad, 'file' | 'rawData' | 'midiChannel'> & {
|
|||||||
sampleName: string;
|
sampleName: string;
|
||||||
sampleChannels: number;
|
sampleChannels: number;
|
||||||
sampleRate: number;
|
sampleRate: number;
|
||||||
sampleRootNote: number;
|
|
||||||
samplePitch: number;
|
|
||||||
bpm: number;
|
bpm: number;
|
||||||
drumRack: boolean;
|
drumRack: boolean;
|
||||||
drumRackSendingNote?: number;
|
drumRackSendingNote?: number;
|
||||||
@@ -226,8 +224,6 @@ function abletonTransformer(data: ProjectRawData, exporterParams: ExporterParams
|
|||||||
sampleName: getSampleName(sound?.meta?.name, soundId),
|
sampleName: getSampleName(sound?.meta?.name, soundId),
|
||||||
sampleChannels: sound?.meta?.channels || 0,
|
sampleChannels: sound?.meta?.channels || 0,
|
||||||
sampleRate: sound?.meta?.samplerate || 0,
|
sampleRate: sound?.meta?.samplerate || 0,
|
||||||
sampleRootNote: pad.rootNote,
|
|
||||||
samplePitch: sound?.meta?.['sound.pitch'] ?? 0,
|
|
||||||
bpm: data.settings.bpm,
|
bpm: data.settings.bpm,
|
||||||
drumRack: false,
|
drumRack: false,
|
||||||
tracks: [],
|
tracks: [],
|
||||||
@@ -549,8 +545,6 @@ function abletonTransformer(data: ProjectRawData, exporterParams: ExporterParams
|
|||||||
sampleName: '',
|
sampleName: '',
|
||||||
sampleChannels: 0,
|
sampleChannels: 0,
|
||||||
sampleRate: 0,
|
sampleRate: 0,
|
||||||
sampleRootNote: 60,
|
|
||||||
samplePitch: 0,
|
|
||||||
bpm: data.settings.bpm,
|
bpm: data.settings.bpm,
|
||||||
drumRack: true,
|
drumRack: true,
|
||||||
drumRackSendingNote: undefined,
|
drumRackSendingNote: undefined,
|
||||||
|
|||||||
@@ -393,6 +393,39 @@ test('preserves rack playback pitch, unused-pad root note, AMP and choke members
|
|||||||
assert.equal(melodic.inChokeGroup, true);
|
assert.equal(melodic.inChokeGroup, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('uses the assigned pad record as the static pitch authority', () => {
|
||||||
|
const data = project();
|
||||||
|
data.pads.a[0].pitch = 3;
|
||||||
|
data.sounds = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
fileNode: {
|
||||||
|
nodeId: 1,
|
||||||
|
flags: 0,
|
||||||
|
fileSize: 0,
|
||||||
|
fileName: 'pitched slot',
|
||||||
|
fileType: 'file',
|
||||||
|
},
|
||||||
|
meta: {
|
||||||
|
name: 'pitched slot',
|
||||||
|
channels: 1,
|
||||||
|
samplerate: 46875,
|
||||||
|
format: 's16',
|
||||||
|
crc: 0,
|
||||||
|
'sound.pitch': 12,
|
||||||
|
},
|
||||||
|
} as ProjectRawData['sounds'][number],
|
||||||
|
];
|
||||||
|
|
||||||
|
const result = abletonTransformer(data, { includeArchivedSamples: true });
|
||||||
|
const rack = result.tracks.find((track) => track.drumRack);
|
||||||
|
const a0 = rack?.tracks.find((track) => track.padCode === 'a0');
|
||||||
|
|
||||||
|
assert.ok(a0);
|
||||||
|
assert.equal(a0.pitch, 3);
|
||||||
|
assert.equal('samplePitch' in a0, false);
|
||||||
|
});
|
||||||
|
|
||||||
test('uses one hybrid classification for Arrangement and Session exports', () => {
|
test('uses one hybrid classification for Arrangement and Session exports', () => {
|
||||||
const arrangement = abletonTransformer(project(), {
|
const arrangement = abletonTransformer(project(), {
|
||||||
includeArchivedSamples: true,
|
includeArchivedSamples: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user