SGI Audio Tools: Difference between revisions

Jump to navigation Jump to search
Add MIDI convert/compress
m (Partial work on audio sample compression steps)
(Add MIDI convert/compress)
Line 9:
* Linear predictive coding
* AIFF format
* the PATH environment variable (for program quick access)
If you're a bit unfamiliar, a quick search, tutorial, or Wikipedia skim should suffice.
 
This article assumes you have the SGI Audio Tools as part of the Nintendo 64 SDK. The programs in particular you're going to need are:
Line 24 ⟶ 25:
 
== Authoring a Song with the SGI Audio Tools ==
=== Compressing Sequence Data ===
==== Converting Your MIDI File(s) ====
MIDI files are generally either '''Type 0''' or '''Type 1'''. The former specifies all of the notes in a single "track" while the latter has multiple tracks, typically for each instrument. The SGI tools require MIDI files to be in Type 0 and provides the `midicvt` tool to convert to it. Programs such as [https://musescore.org/ MuseScore] likely export in Type 1, so it's usually a good idea to convert to Type 0 before continuing.
 
For each of your original MIDI files, run the following:
<br ><code>midicvt some_midi.mid some_midi_converted.mid</code>
 
<code>some_midi_converted.mid</code> is the name of the converted file in this example.
 
==== Compressing Your MIDI File(s) ====
Once your MIDI files have been converted to Type 0, we'll be converting them to a compressed sequence format specialized for embedded playback on the Nintendo 64.
 
For each of your converted MIDI files, run the following:
<br ><code>midicomp some_midi_converted.mid some_midi_compressed.cmf</code>
 
You'll now have various `cmf` files for each of your songs.
 
==== Compiling Your MIDI File(s) ====
Now that we've compressed each MIDI file, its time to compile them into one "song bank". This will be added to your ROM and loaded in at runtime. To do this, we'll be using the <code><sbc></code> tool.
 
Run the following command with each of your <code>cmf</code> files as parameters.
<br ><code>sbc -Osongs.sbk first_song_compressed.cmf second_song_compressed.cmf third_song_compressed.cmf</code>
 
The '''ordering is important''' here! Keep note of the order of each parameter, as when you're selecting your songs in your game's source code, you'll be indexing them as they're ordered here (eg: <code>first_song_compressed.cmf</code> will be <code>0</code>, second_song_compressed.cmf </code> will be <code>1</code>, etc.).
 
Note the lack of space between the <code>-O</code> flag and the output file name. This seems to be intended. 🤷
 
=== Compressing Sounds ===
==== Converting samples with SoX ====
Line 50 ⟶ 78:
On each of your samples, run the following:
<br /><code>vadpcm_enc -c song_sample.table song_sample.aiff compressed_song_sample.aifc</code>
 
The following <code>.aifc</code> file(s) will be compiled in to make a sound bank.
 
=== Authoring the Bank File ===
84

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu