Version
menu

Working with MIDI

In addition to AMB and WAV files, MIDI files can be used with music objects. These file types, once imported, are used to create clips, contained in one or many Music Segment tracks. In the case of WAV clips, each clip is a self-contained source of sound. However, MIDI clips only contain the musical notes to be played; a MIDI instrument must be used to interpret the notes. The instrument interprets all MIDI Events generated by one or many MIDI clips targeting it.

By default Wwise displays middle C as C4, but this is configurable. See Setting the MIDI middle-C mapping.

Importing MIDI files

MIDI files can be imported into Music Clips. MIDI files can't be imported into other objects in the Containers hierarchy.

A MIDI clip can be created in all the same ways as a WAV clip. For more information on how to create a clip from a file, refer to Populating tracks.

To import a MIDI file using drag and drop:

  1. Drag a MIDI file from Windows Explorer or Mac Finder to any location in the Containers hierarchy.

    The Audio File Importer opens.

  2. Click Import to complete the import operation.

[Note]Note

Hold the CTRL key during drag and drop to skip the Audio File Importer dialog.

To import a MIDI file using the Audio File Importer:

  1. Select the location to import the .mid in the Project Explorer.

  2. Use the keyboard shortcut (Shift + I) to open the Audio File Importer.

  3. Click the Add Files button

  4. Browse for a MIDI file, and click OK.

  5. Click OK again to complete the import operation.

Understanding MIDI content and MIDI target

The MIDI file reference is stored inside the Music Clips contained in tracks and segments. The MIDI clips only contain the source MIDI information; notes, pitch bend, CC. They don't define the instrument to play. The instrument to use for playback is defined by the MIDI target reference found on the Music Segment and other music ancestors.

  • MIDI playable instruments must be created and stored in sound or motion objects.

  • MIDI playable instruments use the standard object structures used for sounds in general.

Example:

  • Instrument Work Unit

    • Piano (Blend Container)

    • Drum Kit (Sound SFX)

  • Music Work Unit

    • Song (Music Segment)

      • Piano Track (Music Track with MIDI clips)

      • Drum Track (Music Track with MIDI clips)

      • Guitar (Music Track with audio clips)

In the previous example:

  • The Piano Track has a MIDI target reference to the Piano Blend Container object.

  • The Drum Track has a MIDI target reference to the Drum Kit Sound SFX object.

  • The Guitar Track has no MIDI target.

When playing a Music Segment with MIDI clips, the MIDI clip sends MIDI data to the specified MIDI target. The MIDI target (or instrument), located in a sound or motion object, receives the MIDI data and plays according to its MIDI settings.

To specify a MIDI target on a music object:

  1. Select a music object (Music Track, Music Segment, or any parent).

  2. In the Property Editor, enable Override Parent (if applicable).

  3. Click browse to browse to a MIDI target instrument.

For more information, see Creating MIDI instruments.

Mixing MIDI and audio content

When MIDI content is played, the music object sends MIDI data to the MIDI target (the instrument), located in a sound or motion object. The content played by the MIDI target plays in the context of the audio structure, not in the context of the MIDI source. This means the voice properties on music objects do not affect the instrument being played.

For example, the Voice Volume on a Music Segment or Music Track doesn't affect a piano instrument, located on a Sound SFX object. To modify the voice volume of the piano, you must modify the Voice volume on the Piano object directly, not on the MIDI source.

To help mixing, a bus hierarchy can be created to combine instrument content with music audio content. Routing the instrument and the music track to the same bus provides a single audio mixing point.

Understanding MIDI tempo

There is a significant difference between a MIDI clip and a WAV clip. A WAV clip's duration is determined by the content of the source file, while the duration of a MIDI clip depends on the tempo used. The tempo used is determined by the Tempo Source property.

MIDI files typically contain the tempo information for playback at the right speed. Sometimes this tempo information conflicts with the tempo information found in the music objects (Music Segment and its parents). You can choose to use either the tempo of the source MIDI file or the tempo of the MIDI clip's ancestors.

The following table lists the possible tempo sources:

Tempo Source

Definition

File

The tempo contained in the MIDI file is used.

Hierarchy

The tempo specified by the MIDI clip's ancestry is used.

To set the MIDI tempo source:

  1. Select a Music object.

  2. In the Property Editor, go to the MIDI Clip Tempo group.

  3. Select the Source to use.

A MIDI clip's tempo can be changed after creation, but the duration is not affected. The duration may be changed via the clip handles. For more information, refer to Working with clips.

Changing the playback speed of MIDI

Music objects don't have a voice pitch property. However, you can change their Playback Speed, which affects:

  • The pitch of audio clips.

  • The rate of playback of MIDI clips.

A playback speed of 1 will playback at the original speed. A playback speed of 2 will play back twice as fast as the original. A playback speed of 0.5 will play at half speed.

[Note]Note

The Playback Speed property can also be attached to a Game Parameter in the RTPC tab of the Primary Editor.

To change the playback speed:

  1. Inspect a Music Object (except Music Track).

  2. In the Property Editor, set the Playback Speed.


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