Starting with Loris Library (createEnvelopePaths)
-
Hi folks, I'm starting with the Loris library. The starting idea is to morph the timbre from sound 1 with the timbre of sound 2. But the problem comes with the EnvelopePaths:
LorisManager.createEnvelopePaths(var file, String parameter, int harmonicIndex)
As I can't get it to work. Do know what I'm doping wrong?
The code si the following
var file_1 = FileSystem.getFolder(FileSystem.AudioFiles).getChildFile("deep_piano_noise.wav"); var file_2 = FileSystem.getFolder(FileSystem.AudioFiles).getChildFile("SonidoVoz.wav"); const var lorisManager = Engine.getLorisManager(); const sampleRate = Engine.getSampleRate(); var bitDepth = 24; lorisManager.set("timedomain", "0to1"); lorisManager.set("enablecache", "False"); var analysis_file_1 = lorisManager.analyse(file_1, 40); var frequencyEnvelope = lorisManager.createEnvelopePaths(file_1, "frequency", -1); // Use -1 for all harmonics // Step 2: Use the frequency envelope from file_1 to shift the pitch of file_2 lorisManager.analyse(file_2, 40); // Analyze file_2 first lorisManager.process(file_2, "shiftPitch", frequencyEnvelope); var modifiedBuffer = lorisManager.synthesise(file_2); // Export audio FileSystem.getFolder(FileSystem.Desktop).getChildFile("ChangedAudio.wav").writeAudioFile(modifiedBuffer, 44100, 24); // Save as a file
Here's the full snipped if anyone want to check:
HiseSnippet 1807.3ocsW8taaaCDWNsdXwcCXEXO.DBX.NcZNVINIMInXMMwd0aMIFQsAaHHHfQhJlsxjphTo0onOL6i6C6onuP6MX6NRIa47m0hr07AGQx6O+ti2c7tAYxPlRIybp034iSYN09p5AiE5gaOjxEN82wo1cqenuySFmRUJVjSsZ24mvSpM+ccL+8W+3SnITQHa5VNNGJ4grmwGw0S2cvi+EdRROZD647QUntyi6GJEaKSj4.JtS81NozvWQOisGEIat5NOkpF5T6A0auxpL1ZKGGEQWd4nUWc00e35cV2mF2tC8T+UWuyRcVaoGtVrSsunaDWKyBzTMSAlvSjQiCFJeivpfC4J9oILbguS.nY618jIQnIh65r8PdRzfR2ixAjxfoNq6XcVea8c4Q7I6O0o8MlCHS4npCr1byBu6LC77qBu1Uf20.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