Creating Bank with folders?

Hello,

I have about 600 folders with multiple .wav files per each folder.
I am trying to make 600 banks/audiotables for each folder.
This is for dialogues and each folder represents a conversation.

I was trying to create a 1 bank for all as streaming but this will be a too much of memory overhead.
Is there easy way to do this?

Thank you
J

Hi,

To handle such a large amount of banks, you’ll want to look into the Studio Scripting API and writing a custom script for creating your banks and audio tables based on the corresponding folders and assets.

Bank and Audio Table creation and assignment is fairly simple:

var bank = studio.project.create("Bank");
bank.name = "NewBank";
var table = studio.project.create("AudioTable")
table.name = "NewTable";
table.sourceDirectory = "Assets/AudioTableDirectory";
bank.audioTable = table;

The difficult part will be enumerating your folders. You can access an array of all assets in your project with studio.project.workspace.masterAssetFolder.assets - unfortunately, these aren’t stored in the same hierarchy as they are shown in the Assets tab, so you’ll need to iterate through each asset and parse their assetPath property. Alternatively, you may find it easier to use an external means (i.e. a scripting language with better filesystem access) to parse your directory and write your folders to a text file, open that text file with studio.system.getFile("./Your/TextFile/Path/Here.txt"), and then parse each folder name/path to create your banks and audio tables.

I’d recommend taking a look at the Studio Scripting API Reference for more info. The .dump() function is also extremely useful, as it will list all the functions, properties, and property values of any given ManagedObject (i.e. any of the entities in your project).

1 Like