menu
 
Version
2017.1.9.6501

2024.1.4.8780

2023.1.12.8706

2022.1.18.8567

2021.1.14.8108

2019.2.15.7667

2019.1.11.7296

2018.1.11.6987

2017.2.10.6745

2017.1.9.6501

2016.2.6.6153

2015.1.9.5624


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": []
}
info
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.
info
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
        }
    ]
}

Cette page a-t-elle été utile ?

Besoin d'aide ?

Des questions ? Des problèmes ? Besoin de plus d'informations ? Contactez-nous, nous pouvons vous aider !

Visitez notre page d'Aide

Décrivez-nous de votre projet. Nous sommes là pour vous aider.

Enregistrez votre projet et nous vous aiderons à démarrer sans aucune obligation !

Partir du bon pied avec Wwise