[bug] Unwanted pitch shifting when using Apply sample map properties to sample files
-
I've made some tuning adjustments to my sample map using the pitch envelope. I now want to apply those to the samples using the
Apply sample map properties to sample files
tool. However there are two issues I'm finding.-
All the files it outputs that have a pitch envelope applied are a semi-tone lower than they should be. (samples without a pitch envelope are unaffected).
-
Only the first mic position is affected.
-
-
- It only outputs 44.1khz/16bit, even though my samples are 48Khz/24bit :(
-
@d-healey said in [bug] Unwanted pitch shifting when using Apply sample map properties to sample files:
- It only outputs 44.1khz/16bit, even though my samples are 48Khz/24bit :(
So solving this problem also solves problem 1. The pitch shifting is due to the sample rate change.
The
CompressionHelpers::dump
function is hardcoded to use 44100/16. I'm trying to think of the best way to get around this.@Christoph-Hart My ideas so far are I could overload the function to pass an optional sample rate and bit depth, or I could get the sample rate and bit depth from the existing file - however I think by this point the file won't exist. Any suggestions?Looks like I don't need to overload it, I can just add some optional arguments with default values :D
I thinkI have a solution. -
Here's a pull request with a fix to the auto generated pitch envelope, to remove some useless nodes, and the additions/fixes to get the Apply sample map properties tool to use the sample rate and bit depth of the original audio files - https://github.com/christophhart/HISE/pull/488
@Christoph-Hart The only thing that is missing now is that the sample map properties are not applied to all mic positions when using a merged sample map. I've had a poke around but I haven't found a solution yet. It's something to do with the fileList that's created in the backup function but I'm not quite there. Do you have any idea?
-
@d-healey said in [bug] Unwanted pitch shifting when using Apply sample map properties to sample files:
@Christoph-Hart The only thing that is missing now is that the sample map properties are not applied to all mic positions
Ok I've figured out what's causing this. The samples are all there in the list. But (for a reason that I don't know) you are removing the properties from the property list after each file has been processed. However before processing you are checking if the property is in the list. Of course this means once the first mic position has been processed, and the property has been removed, the subsequent mic positions won't be processed.
Short version, comment out this line and it works - https://github.com/christophhart/HISE/blob/develop/hi_backend/backend/BackendApplicationCommandWindows.cpp#L2390
@Christoph-Hart Any downsides?
-