Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

AGBMidi: Difference between revisions

From GameBrew
(Created page with "{{#seo: |title= (Media players) - GameBrew |title_mode=append |image=agbmidi2.png |image_alt=AGBMidi }} {{Infobox GBA Homebrews |title=AGBMidi |image=agbmidi2.png |description...")
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#seo:
|title= (Media players) - GameBrew
|title_mode=append
|image=agbmidi2.png
|image_alt=AGBMidi
}}
{{Infobox GBA Homebrews
{{Infobox GBA Homebrews
|title=AGBMidi
|title=AGBMidi
Line 11: Line 5:
|author=Ruben Nunez (AikenToAki)
|author=Ruben Nunez (AikenToAki)
|lastupdated=2008/12/12
|lastupdated=2008/12/12
|type=Media players
|type=Media Players
|version=1.0a
|version=1.0a
|license=Mixed
|license=Mixed
|download=https://dlhb.gamebrew.org/gbahomebrews/agbmidi.7z
|download=https://dlhb.gamebrew.org/gbahomebrews/agbmidi_v1.0a.zip
|website=https://www.gbadev.org/demos.php?showinfo=1369
|website=https://www.gbadev.org/demos.php?showinfo=1369
|source=
}}
}}
{{#seo:
|title= (Media players) - GameBrew
|title_mode=append
|image=agbmidi2.png
|image_alt=AGBMidi
}}
AGBMidi is a MIDI player targeted at the GBA.  
AGBMidi is a MIDI player targeted at the GBA.  


Line 118: Line 118:
* GBADev - https://www.gbadev.org/demos.php?showinfo=1369
* GBADev - https://www.gbadev.org/demos.php?showinfo=1369
* GBAtemp - https://gbatemp.net/threads/agbmidi-1-0a.126205/post-1671244
* GBAtemp - https://gbatemp.net/threads/agbmidi-1-0a.126205/post-1671244
[[Category:GBA homebrew applications]]
[[Category:Media players on GBA]]

Latest revision as of 08:42, 23 Haziran 2024

AGBMidi
Agbmidi2.png
General
AuthorRuben Nunez (AikenToAki)
TypeMedia Players
Version1.0a
LicenseMixed
Last Updated2008/12/12
Links
Download
Website


AGBMidi is a MIDI player targeted at the GBA.

Features

  • 4 configurable music players.
  • 8 frequency setting (10512, 11468, 13379, 18157, 20068, 21024, 26758 and 31536 Hz).
  • 32 fully panable channels.
  • 128 point reverb setting.
  • Frequency can be changed without altering sounds or music.
  • Average speed mixing routines (~1.8% CPU per channel, non-looped or quick looped* @ 18157Hz).
  • Slightly above average RAM consumption. (~4.5KB EWRAM, ~3.1KB IWRAM).
  • Plays MIDI (MOD and S3M support planned).

User guide

The demos included in the Demo folder are identical, except for Demo2.

  • Demo1 shows the engine's capabilities without interpolation.
  • Demo2 shows the engine's capabilities with interpolation.

Check readme file for more information.

Converter

The AGBMidi converter is a MIDI type 0 with tick-based timing converter.

Usage: agbmidi_conv file1.mid [file2.mid ...]

However, there is a small note about the converter:

  • The converter itself will output song data just fine, but it needs a sample bank (not included).
  • (Though even without a sample bank, song data is still exported).

The converter will look in the "PatchDat" directory for patch files. It should be structured like so:

root
  |-PatchDat
  |   |-Patch0
  |   |   |-Patch0.amp
  |   |   |-Patch0_0.dat
  |   |   |-Patch0_1.dat
  |   |   |...
  |   |-Patch1
  |   |   |-Patch1.amp
  |   |   |-Patch1_0.dat
  |   |   |...

Drum kits are set out as the drum kit number plus 128. For example, Standard1 (127:000) would be Patch128. Standard2 (127:001) would be Patch129. Etc.

File format Patch[].amp:

AMP stands for 'Agb Midi Patch.' It is a little-endian file. The format is set out as (in psuedo-C)...

patch {
 s8  volume;   //Volume  control
 s8  tune;     //Tuning  control
 u16 attack;   //Attack  envelope (.8 fixed point)
               //This is the value x increments with until reaching 127
               //Note on to enter this stage
 u16 decay;    //Decay   envelope (.8 fixed point)
               //This is the value y decrements with until reaching 0
               //Enters this state after attack is over
 u16 releas;   //Release envelope (.8 fixed point)
               //This is the value z decrements with until reaching 0
               //Key off to enter this stage

 u8  smpcnt;   //Sample count
 u8  smpdat[]; //The range to which this sample goes to.
               //For example...
               //{65, 89, 98, 127} (MIDI Key numbers, including C-1)
               //This would indicate that sample 0 (Patch_0.dat)
               //ranges from 0..65
               //Then sample 1 (Patch_1.dat) ranges from 66 (65+1)
               //to 89. Then sample 2 ranges from 90 to 98, etc.
}

File format Patch[]_[].dat:

DAT stands for "Data." It is also a little-endian file. This is also the format SFX files use. The format is (also set out in psuedo-C)...

sample {
 u16 root;   //Root key (MIDI key-style, including C-1) (Ignored by SFX)
 u16 stat;   //Status (4000h: Forward loop, 0h: No loop)
 u32 freq;   //Frequency calculation value (Frequency in a .10 format)
 u32 loop;   //Loop start position
 u32 size;   //Sample length/Loop end position (limited to 1MB)
 u8  data[]; //Sample data. This is unsigned, linear sample data in 8 bit
             //formatting. Convert from/to s8/u8 by XOR'ing 128.
}

Controls

Up/Down - Select the song/variable

Left/Right - Adjust

Compatibility

Does not work well with no$gba.

External links

Advertising: