mus_file_format
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
mus_file_format [2011/11/05 02:31] – created javapimp | mus_file_format [2023/08/18 18:15] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 6: | Line 6: | ||
===== File Structure ===== | ===== File Structure ===== | ||
- | The MUS file format is similar to the [[Midi file format]]. It consists of a header, a variable length list of instruments used followed by music events. Unlike the Midi file, the MUS file has only a single track. | + | The MUS file format is similar to the [[MIDI file format]]. It consists of a header, a variable length list of instruments used followed by music events. Unlike the MIDI file, the MUS file has only a single track. |
===== Header ===== | ===== Header ===== | ||
Line 12: | Line 12: | ||
The header always starts with a magic value ' | The header always starts with a magic value ' | ||
- | The channels field specifies the number of channels that are used in the score not including channel 15. The sec_channels field specifies the number of secondary channels used. num_instruments indicates the number of instruments contained in the variable length instruments list. | + | The channels field specifies the number of channels that are used in the score not including channel 15. The '' |
'' | '' | ||
Line 29: | Line 29: | ||
}; | }; | ||
</ | </ | ||
+ | |||
+ | Because the length and offset specify the beginning of the score, extra space may be included between the last instrument in the instruments list and the beginning of the score to store other information such as author and copyright info. There is no standard format for this information and readers may or may not recognize it. | ||
+ | |||
+ | It is important to note that these 16 bit values are in little-endian format unlike MIDI which uses big-endian for integer values. | ||
+ | |||
+ | ===== Body ===== | ||
+ | |||
+ | +--7----6----5----4----3----2----1----0-+ | ||
+ | |Last| | ||
+ | +---------------------------------------+ | ||
+ | |||
+ | The MUS body is a single track of grouped sound events and time values. An event begins with a byte similar to a MIDI event. The left nibble (4 bits) contain the command in the three least significant bits. The most significant bit is 0 if more events follow in the group or 1 if the event is the last in the group and a time value follows. Events in a group are to be executed simultaneously. The time value specifies the number of ticks to wait before processing the next event (group). | ||
+ | |||
+ | The right nibble, 4 least significant bits of the event specifies the channel to which the event applies. Each instrument is assigned a channel which is used throughout the score. Channels 0 through 14 may be used for any instruments. Channel 15 is exclusively for percussion. | ||
+ | |||
+ | Following the event byte is one or more data bytes. The following table describes each event and the data that follows. | ||
+ | |||
+ | ^ Command ^ Data ^ Description ^ | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | |||
+ | ===== Notes ===== | ||
+ | |||
+ | The following table lists the numbers corresponding to notes for use in note on and note off commands. | ||
+ | |||
+ | ^ Octave ^ Notes | ||
+ | | | C | C# | D | D# | E | F | F# | G | G# | A | A# | B | | ||
+ | | 0 | ||
+ | | 1 | ||
+ | | 2 | ||
+ | | 3 | ||
+ | | 4 | ||
+ | | 5 | ||
+ | | 6 | ||
+ | | 7 | ||
+ | | 8 | ||
+ | | 9 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | | ||
+ | | | ||
+ | |||
+ | ===== Controller Codes ===== | ||
+ | |||
+ | ^ Number ^ MIDI ctrl ^ Description ^ | ||
+ | | 0 | ||
+ | | 1 | ||
+ | | 2 | ||
+ | | 3 | ||
+ | | 4 | ||
+ | | 5 | ||
+ | | 6 | ||
+ | | 7 | ||
+ | | 8 | ||
+ | | 9 | ||
+ | |||
+ | ===== Instrument Patch Map ===== | ||
+ | |||
+ | This is a list of 128 sounds, with corresponding MIDI program numbers. Most of these are imitative sounds, though the list includes synth sounds, ethnic instruments and a handful of sound effects. | ||
+ | |||
+ | The sounds fall roughly into sixteen families of eight variations each. Grouping sounds makes it easy to re-orchestrate a piece using similar sounds. The instrument map isn't the final word on musical | ||
+ | instruments of the world, but it's pretty complete. | ||
+ | |||
+ | ^ Prog# ^ Instrument | ||
+ | ^ (0-7 Piano) | ||
+ | | 0 | Acoustic Grand | 8 | Celesta | ||
+ | | 1 | Bright Acoustic | ||
+ | | 2 | Electric Grand | 10 | Music Box | | ||
+ | | 3 | Honky-Tonk | ||
+ | | 4 | Electric Piano 1 | 12 | Marimba | ||
+ | | 5 | Electric Piano 2 | 13 | Xylophone | ||
+ | | 6 | Harpsichord | ||
+ | | 7 | Clav | 15 | Dulcimer | ||
+ | ^ (16-23 Organ) | ||
+ | | 16 | Drawbar Organ | 24 | Acoustic Guitar(nylon) | | ||
+ | | 17 | Percussive Organ | 25 | Acoustic Guitar(steel) | | ||
+ | | 18 | Rock Organ | 26 | Electric Guitar(jazz) | ||
+ | | 19 | Church Organ | 27 | Electric Guitar(clean) | | ||
+ | | 20 | Reed Organ | 28 | Electric Guitar(muted) | | ||
+ | | 21 | Accoridan | ||
+ | | 22 | Harmonica | ||
+ | | 23 | Tango Accordian | ||
+ | ^ (32-39 Bass) |^ (40-47 Strings) | ||
+ | | 32 | Acoustic Bass | 40 | Violin | ||
+ | | 33 | Electric Bass(finger) | 41 | Viola | | ||
+ | | 34 | Electric Bass(pick) | ||
+ | | 35 | Fretless Bass | 43 | Contrabass | ||
+ | | 36 | Slap Bass 1 | 44 | Tremolo Strings | ||
+ | | 37 | Slap Bass 2 | 45 | Pizzicato Strings | ||
+ | | 38 | Synth Bass 1 | 46 | Orchestral Strings | ||
+ | | 39 | Synth Bass 2 | 47 | Timpani | ||
+ | ^ (48-55 Ensemble) | ||
+ | | 48 | String Ensemble 1 | 56 | Trumpet | ||
+ | | 49 | String Ensemble 2 | 57 | Trombone | ||
+ | | 50 | SynthStrings 1 | 58 | Tuba | | ||
+ | | 51 | SynthStrings 2 | 59 | Muted Trumpet | ||
+ | | 52 | Choir Aahs | 60 | French Horn | | ||
+ | | 53 | Voice Oohs | 61 | Brass Section | ||
+ | | 54 | Synth Voice | 62 | SynthBrass 1 | | ||
+ | | 55 | Orchestra Hit | 63 | SynthBrass 2 | | ||
+ | ^ (64-71 Reed) |^ (72-79 Pipe) |^ | ||
+ | | 64 | Soprano Sax | 72 | Piccolo | ||
+ | | 65 | Alto Sax | 73 | Flute | | ||
+ | | 66 | Tenor Sax | 74 | Recorder | ||
+ | | 67 | Baritone Sax | 75 | Pan Flute | | ||
+ | | 68 | Oboe | 76 | Blown Bottle | ||
+ | | 69 | English Horn | 77 | Skakuhachi | ||
+ | | 70 | Bassoon | ||
+ | | 71 | Clarinet | ||
+ | ^ (80-87 Synth Lead) |^ (88-95 Synth Pad) |^ | ||
+ | | 80 | Lead 1 (square) | ||
+ | | 81 | Lead 2 (sawtooth) | ||
+ | | 82 | Lead 3 (calliope) | ||
+ | | 83 | Lead 4 (chiff) | ||
+ | | 84 | Lead 5 (charang) | ||
+ | | 85 | Lead 6 (voice) | ||
+ | | 86 | Lead 7 (fifths) | ||
+ | | 87 | Lead 8 (bass+lead) | ||
+ | ^ (96-103 Synth Effects) | ||
+ | | 96 | FX 1 (rain) | ||
+ | | 97 | FX 2 (soundtrack) | ||
+ | | 98 | FX 3 (crystal) | ||
+ | | 99 | FX 4 (atmosphere) | ||
+ | | 100 | FX 5 (brightness) | ||
+ | | 101 | FX 6 (goblins) | ||
+ | | 102 | FX 7 (echoes) | ||
+ | | 103 | FX 8 (sci-fi) | ||
+ | ^ (112-119 Percussive) | ||
+ | | 112 | Tinkle Bell | 120 | Guitar Fret Noise | | ||
+ | | 113 | Agogo | 121 | Breath Noise | | ||
+ | | 114 | Steel Drums | 122 | Seashore | ||
+ | | 115 | Woodblock | ||
+ | | 116 | Taiko Drum | 124 | Telephone Ring | | ||
+ | | 117 | Melodic Tom | 125 | Helicopter | ||
+ | | 118 | Synth Drum | 126 | Applause | ||
+ | | 119 | Reverse Cymbal | ||
+ | |||
+ | ===== Percussion Key Map ===== | ||
+ | |||
+ | This mapping derives from the Roland/ | ||
+ | |||
+ | In channel #15, the note number does not affect the pitch but the instrument type. The default pitch for percussions is 60 (C-5). | ||
+ | |||
+ | ^ Note ^ Drum Sound ^ Note ^ Drum Sound ^ | ||
+ | | 35 | Acoustic Bass Drum | 59 | Ride Cymbal 2 | | ||
+ | | 36 | Bass Drum 1 | 60 | Hi Bongo | | ||
+ | | 37 | Side Stick | 61 | Low Bongo | | ||
+ | | 38 | Acoustic Snare | 62 | Mute Hi Conga | | ||
+ | | 39 | Hand Clap | 63 | Open Hi Conga | | ||
+ | | 40 | Electric Snare | 64 | Low Conga | | ||
+ | | 41 | Low Floor Tom | 65 | High Timbale | ||
+ | | 42 | Closed Hi-Hat | ||
+ | | 43 | High Floor Tom | 67 | High Agogo | | ||
+ | | 44 | Pedal Hi-Hat | ||
+ | | 45 | Low Tom | 69 | Cabasa | ||
+ | | 46 | Open Hi-Hat | ||
+ | | 47 | Low-Mid Tom | 71 | Short Whistle | ||
+ | | 48 | Hi-Mid Tom | 72 | Long Whistle | ||
+ | | 49 | Crash Cymbal 1 | 73 | Short Guiro | | ||
+ | | 50 | High Tom | 74 | Long Guiro | | ||
+ | | 51 | Ride Cymbal 1 | 75 | Claves | ||
+ | | 52 | Chinese Cymbal | ||
+ | | 53 | Ride Bell | 77 | Low Wood Block | | ||
+ | | 54 | Tambourine | ||
+ | | 55 | Splash Cymbal | ||
+ | | 56 | Cowbell | ||
+ | | 57 | Crash Cymbal 2 | 81 | Open Triangle | ||
+ | | 58 | Vibraslap | ||
+ | |||
+ | ===== Sources ===== | ||
+ | |||
+ | * "[[The MUS File Format]]" | ||
+ | |||
+ | ===== More Information ===== | ||
+ | |||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
mus_file_format.1320460269.txt.gz · Last modified: 2023/08/18 18:15 (external edit)