Is there a way to batch change all the sample starts in an instrument to half?
Hi all. A few months ago I released an instrument called the woodland piano (https://www.pianobook.co.uk/packs/woodland-piano/), which was recorded at 96k. Unlike a second piano recorded in the exact same way, when played at 48k there is some nasty aliasing artifacts fixed only by playing the instrument in HQI as high.
A while back I batch downsampled it all to 48k but it sounded all warbled. Only now did the epiphany came that the sample start was now at double what it needed to be.
So, instead of manually changing the sample start of 1071 samples, is there a way to do this in some sort of automated process? The samples don't have shared sample starts.
Thanks very much!
Comments
-
Mayhaps polyphone can do this for you?
0 -
Heya Paule, thanks for your comment. Not seeing how I'd use Polyphone for a mass change inside a Kontakt instrument. It looks like this would simply be recreating the instrument inside a different engine. Is there something I am missing?
Thanks again!
0 -
Sample starts don't have a direct correlation with sample rate conversions, at least not in this case.
Are you sure you didn't mess up in the conversion phase? The samples should not sound warbled.
However, if you only wanted to batch change the sample starts (not considering this context), you can use Creator Tools and Lua scripting to do that.
0 -
Totally baffled about what you're trying to do. Are you playing back samples recorded in 96k at 48k, i.e.an octave lower? if so the sound will certainly be weird and totally unaffected by the HQI setting (which deals with sounds transposed in the mapping editor.)
Can't quite see how sample start is relevant for a piano instrument, but you can adjust it for any number of samples by highlighting them in the mapping editor (lasso them) and, in the wave editor, gear wheel/to all selected zones/copy current sample-start settings.
(Yet another post inappropriately relocated to the Scripting Workshop. Let's hope the OP can find it.)
0 -
Hi again. Thanks for your time. I'll re-frame the question in a more direct way.
The original samples were recorded at 96k and I'd like to have a 48k version. As downsampling reduces the amount of samples in each sample, the previously correct sample start time is now way ahead of what it should be.
This image shows the exact same sample, only the sample start had to be shifted to accommodate for the difference in sample rate, one start being 1/2 of the other.
The question is, is there a way to automatically set every individual sample start of each sample to half of what it currently is, instead of manually shifting it sample by sample inside this instrument?
Hopefully that cleared some questions up. Thanks again for taking the time.
0 -
You could use CT to halve the start time offset of all zones.
0 -
Sorry, I now see that your original post was quite clear
Don't know anything about Creator Tools, but Goldwave will allow you to batch Trim Leading Silence. You can leave a timed bit of silence at the beginning if you want to. You could then set one zone's sample-start and use gearwheel/to all selected zones/copy current sample-start setting.
Goldwave is a very fine audio editor, and I think they have an "evaluation version"
0 -
Thanks for both your suggestions. Halving the sample starts would be ideal as they are all slightly different from sample to sample instead of bang on identical.
I'll be looking at the documentation for Creator Tools to see if I can manage my way around it, but if you've got any tips or useful reading material I'd be very grateful.
Thanks again, folks.
0 -
If it's ALL the sample zones in your instrument, it should be a very simple script. Something like this
for n,g in pairs(instrument.groups) do for n,z in pairs(g.zones) do z.sampleStart = z.sampleStart / 2 end end
1 -
Hey, thanks so much. It is for all the sample zones in the instrument yes. I tried your code but it gave me this error:
And no effect is taken by pushing it to Kontakt. Any idea on what is causing that?
Thanks again!
0 -
I think that's because of the .5s from dividing odd numbers by 2.
Try replacing the main line with this, to round them all down to integers.
z.sampleStart = math.floor(z.sampleStart / 2)
1 -
I believe that that worked flawlessly, thank you so much! I'll do some digging into the different groups to make sure it's all working properly but that seems to have done it!
0 -
Hello,
Could someone help me executing the provided script?
I tried using
for n,g in pairs(instrument.groups) do for n,z in pairs(g.zones) do z.sampleStart = z.sampleStart / 2 end end
In the "Script Editor" "Empty" tab of my instrument.
I get "Line 1 syntax error" after clicking "Apply.
I also tried using "on init"
on init for n,g in pairs(instrument.groups) do for n,z in pairs(g.zones) do z.sampleStart = z.sampleStart / 2 end end end on
But I then get "line 2 expected end on" after clicking "Apply.
Am I using the right location to input this script?
I am exactly needing to perform this script.
Thanks in advance for any help
0 -
This Lua script sets the starting point of an instrument's (.nki) samples. Lua scripts are meant to be used within Creator Tools. Yaron from NI has made some excellent tutorials on configuring Kontakt to integrate with Creator Tools. After setting everything up, you can save your completed Lua script and then simply drag and drop it into Creator Tools to execute it.
0 -
Thanks a lot for the help.
Is there absolutely no way to bulk update sample start and other properties for all groups and all zones using only Kontakt? Via a script or any other mean?
Do I absolutely need to use an external tool like Creator Tools?
Thanks a bunch
0
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 61 NI News
- 774 Tech Talks
- 4K Native Access
- 16.4K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.7K Kontakt
- 1.6K Reaktor
- 376 Battery 4
- 835 Guitar Rig & FX
- 425 Massive X & Synths
- 1.3K Other Software & Hardware
- 5.7K Maschine
- 7.2K Traktor
- 7.2K Traktor Software & Hardware
- Check out everything you can do
- Create an account
- See member benefits
- Answer questions
- Ask the community
- See product news
- Connect with creators