Version

menu_open

Importing Audio Files and Creating Structures

There are several ways of creating Wwise objects with the Wwise Authoring API.

Creating Wwise Objects

Using ak.wwise.core.object.create to create a single Actor-Mixer:

Refer to ak.wwise.core.object.create for more information.

{
    "parent": "{a9129d80-07e0-11e7-93ae-92361f002671}",
    "type": "ActorMixer",
    "name": "My Actor-Mixer",
    "children": []
}
Note.gif
Note: The parent field indicates where to create the object in the project. To retrieve an object ID, refer to ak.wwise.core.object.get. You could, for example, retrieve the object ID by its project path.
Note.gif
Note: To retrieve an object ID from a Wwise project, you can hold the key SHIFT while right-clicking an object, then select Copy GUID(s) to clipboard.

Using ak.wwise.core.object.create to create a hierarchy of objects with properties:

Refer to ak.wwise.core.object.create for more information.

{
    "parent": "{a9129d80-07e0-11e7-93ae-92361f002671}",
    "type": "ActorMixer",
    "name": "Weapons",
    "@Volume": "-2",
    "children": [
        {
            "type": "RandomSequenceContainer",
            "name": "BigGun",
            "@RandomOrSequence": "1",
            "children": [
                {
                    "type": "Sound",
                    "name": "Gun1",
                },              
                {
                    "type": "Sound",
                    "name": "Gun2",
                }
            ]
        }
    ]
}

Understanding the name conflict modes

When calling ak.wwise.core.object.create, it is possible to specify one of the 4 name conflict modes:

If an object already exists at destination with the same name:

  • fail: The create function returns an error.
  • replace: The object at destination is deleted (including its children), and a new object is created.
  • rename: A new unique name is automatically assigned for the new object, appending numbers to it.
  • merge: The object at destination is re-used, and the specified properties, references and children are merged to the destination leaving untouched the rest of the object.

Importing Audio Files

Audio files can be imported using the Wwise Authoring API by means of the same importation processor available through the Tab Delimited import in the Audio File Importer. For more information about it, refer to https://www.audiokinetic.com/library/edge/?source=Help&id=importing_media_files_from_tab_delimited_text_file.

Using the Wwise Authoring API allows complete automation of the importation process and provides direct control in the programming language of your choice.

The import format allows great flexibility. You can import:

Examples:

Importing a WAV file, and creating the associated Sound object.

Calling ak.wwise.core.audio.import to import audio files:

Refer to ak.wwise.core.audio.import for more information.

{
    importOperation: "createNew",
    default: {
        importLanguage: "SFX"
    },
    imports: [
        {
            objectPath: '\\Actor-Mixer Hierarchy\\Default Work Unit\\<Sound>MyNewSound1',
            audioFile: "C:\\Wave\\cues\\1.wav",
            "@Volume": 0.42
        },
        {
            objectPath: '\\Actor-Mixer Hierarchy\\Default Work Unit\\<Sound>MyNewSound2',
            audioFile: "C:\\Wave\\cues\\2.wav",
            "@Volume": 0.1
        }
    ]
}

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise