Creator Tools hanging on push
agoldgeier
Member Posts: 1 Newcomer
I've used a script to load a bunch of samples into a new Group, but when I push, it gets stuck on "Assigning instrument". What are some potential reasons for this?
One thing I notice that is different about the zones I've created from my script vs the the zones I create manually is that the filenames begin with "…///Users" instead of "/Users"
I'm using an adapted version of Tutorial 2/7, here is my script:
-- Much of this is stolen from the Kontakt Creator Tools "Tutorial 2" and "Tutorial 7" script -- Check for valid instrument if not instrument then print("The following error message informs you that the Creator Tools are not ".. "focused on a Kontakt instrument. To solve this, load an instrument in ".. "Kontakt and select it from the instrument dropdown menu on top.") end -- From https://stackoverflow.com/questions/1426954/split-string-in-lua function parseFn (filename) local t={} for str in string.gmatch(filename, "([^%._]+)") do table.insert(t, str) end return t end local dynamicsMapping = { ["F"] = {["low"] = 50, ["high"] = 127}, ["MP"] = {["low"] = 0, ["high"] = 80} } local groupNames = {"SUS"} local basePath = scriptPath .. filesystem.preferred("/Raw Samples/") -- instrument.groups:reset() local samples = {} for _, groupName in ipairs(groupNames) do -- Make new group local group = Group() instrument.groups:insert(0, group) group.name = groupName groupPath = basePath .. groupName .. "/" -- Load files into zones for _, filename in filesystem.directoryRecursive(groupPath) do if filesystem.isRegularFile(filename) then local parts = parseFn(filename) -- for a filename like "SUS_F_72.wav", parts should look like {SUS, F, 72, wav} local zone = Zone() group.zones:add(zone) zone.file = groupPath .. "/" .. filename local dynamic = parts[2] local root = parts[3] zone.velocityRange.low = dynamicsMapping[dynamic]["low"] zone.velocityRange.high = dynamicsMapping[dynamic]["high"] zone.rootKey = root zone.keyRange.low = root zone.keyRange.high = root end end end
0
This discussion has been closed.
Back To Top
Categories
- All Categories
- 19 Welcome
- 1.5K Hangout
- 60 NI News
- 771 Tech Talks
- 4K Native Access
- 16.3K Komplete
- 2K Komplete General
- 4.3K Komplete Kontrol
- 5.6K Kontakt
- 1.6K Reaktor
- 375 Battery 4
- 833 Guitar Rig & FX
- 425 Massive X & Synths
- 1.2K 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