MidiToAIMS: Difference between revisions

From GMN Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 42: Line 42:


=== Naming a Song ===
=== Naming a Song ===
You don't have to type a whole file name. Any words from it will do: ''minuet'' finds ''Minuet in A minor'', and ''too sweet'' finds ''Hozier - Too Sweet (piano arrangement)''. Quotes are optional. A song's pieces (see [[#Long Songs: Several Pastes|Long Songs]]) count as one song. If several songs match, MidiToAims lists them: type more of the name. A name that matches a song exactly wins.
You don't have to type a whole file name. Any words from it will do: ''minuet'' finds ''Minuet in A minor'', and ''too sweet'' finds ''Hozier - Too Sweet (piano arrangement)''. Quotes are optional. A song's pieces (see [[#Long Songs: Several Posts|Long Songs]]) count as one song. If several songs match, MidiToAims lists them: type more of the name. A name that matches a song exactly wins.


MidiToAims looks in the folder you're in, and in its own folder. To use another folder, name it: ''songs\minuet''.
MidiToAims looks in the folder you're in, and in its own folder. To use another folder, name it: ''songs\minuet''.
Line 137: Line 137:
== Getting It Into the Game ==
== Getting It Into the Game ==
# Open the .rzr file in Notepad and copy all of the text (Ctrl+A, Ctrl+C).
# Open the .rzr file in Notepad and copy all of the text (Ctrl+A, Ctrl+C).
# In game, open a blank music composition book, click on its first page and paste (Ctrl+V). The whole text goes in at once and flows across the pages. The client wraps long lines for you.
# In game, put a blank music composition book in your backpack, right-click it and choose '''Paste'''.
# Click '''Post Message''', click in the message box, paste (Ctrl+V) and click '''Post'''. The whole composition goes into the book at once, line by line.
# Preview it with '''[play preview''', or with '''Start''' in the book's context menu. '''Stop''' ends the preview.
# Preview it with '''[play preview''', or with '''Start''' in the book's context menu. '''Stop''' ends the preview.
# Edit in the book as you would any composition, and preview again.
# Edit in the book as you would any composition, and preview again.
# When you're happy with it, use [[Sheet Music|manuscript paper]] on the book to make sheet music.
# When you're happy with it, use [[Sheet Music|manuscript paper]] on the book to make sheet music.


The header at the top of the composition (# Song:, # Author:) gives the book its title and author.
The header at the top of the composition (# Song:, # Author:) gives a new book its title and author.


=== Long Songs: Several Pastes ===
=== Long Songs: Several Posts ===
The game client crashes if a single paste is too big (more than about 12 pages). So MidiToAims cuts a long book into pieces, each one safe to paste:
One post takes up to 250 lines, so MidiToAims cuts a long book into pieces:


  Long Song.paste1.rzr    paste 1 of 3
  Long Song.post1.rzr    post 1 of 2
  Long Song.paste2.rzr    paste 2 of 3
  Long Song.post2.rzr    post 2 of 2
Long Song.paste3.rzr    paste 3 of 3


Paste them into the same book, in order. After a paste, the cursor waits at the end of what you pasted, so don't click in the book between pastes. Open the next file, copy all of it, and paste again. Pieces always break between phrases.
Post them into the same book, in order: each one goes in after the last. Pieces always break between phrases. If a post won't fit in the book, nothing is written, and you're told how many pages it needs.


If an older conversion left other .rzr files for the song, MidiToAims tells you. Don't paste those.
If an older conversion left other .rzr files for the song, MidiToAims tells you. Don't paste those.
=== Songs Longer Than One Book ===
=== Songs Longer Than One Book ===
A book holds 96 pages. MidiToAims fills at most 95 of them, which leaves room for your own lines: lyrics, extra settings, notes to yourself.
A book holds 96 pages. MidiToAims fills at most 95 of them, which leaves room for your own lines: lyrics, extra settings, notes to yourself.
Line 160: Line 159:
When a song needs more than one book, each book gets its own files:
When a song needs more than one book, each book gets its own files:


  Long Song.book1.paste1.rzr    book 1, paste 1 of 2
  Long Song.book1.post1.rzr    book 1, post 1 of 2
  Long Song.book1.paste2.rzr    book 1, paste 2 of 2
  Long Song.book1.post2.rzr    book 1, post 2 of 2
  Long Song.book2.rzr           book 2 (one paste)
  Long Song.book2.rzr         book 2 (one post)


Use a new book for each book number. Each book starts with its place in the song, for example ''# Book: 2/3''. Books always break between phrases. Keep all of a song's books together in your backpack or in one bag. Previewing or transcribing any of them uses the whole song. A song can span up to 9 books.
Use a new book for each book number. Each book starts with its place in the song, for example ''# Book: 2/3''. Books always break between phrases. Keep all of a song's books together in your backpack or in one bag. Previewing or transcribing any of them uses the whole song. A song can span up to 9 books.


=== Sharing the Text ===
=== Sharing the Text ===
To share an arrangement, share the MIDI and your .m2a: anyone with MidiToAims can make the same books from them. If you want a book's text as one file, join its pieces at a command prompt, for example:
To share an arrangement, share the MIDI and your .m2a: anyone with MidiToAims can make the same books from them. If you want the whole song as one file, set '''Format: whole''' in the .m2a, or add ''--format whole'': MidiToAims writes ''Long Song.rzr'', all of its books one after another, each starting with its ''# Book: n/m'' line.


copy /b "Long Song.paste1.rzr" + "Long Song.paste2.rzr" + "Long Song.paste3.rzr" "Long Song (whole).rzr"
Don't paste a whole file into the game if it's bigger than one post. MidiToAims says when it is.
 
Don't paste the joined file into the game: it is too big for one paste.


== The Arrangement Settings (.m2a) ==
== The Arrangement Settings (.m2a) ==
Line 196: Line 193:
|-
|-
| Book pages || 95 || Pages filled per book (1 to 96). The rest is room for your own lines.
| Book pages || 95 || Pages filled per book (1 to 96). The rest is room for your own lines.
|-
| Format || post || '''post''': files for the book's Paste (see [[#Getting It Into the Game|Getting It Into the Game]]). '''whole''': the song in one file (see [[#Sharing the Text|Sharing the Text]]).
|}
|}


Line 223: Line 222:
  MidiToAims "Minuet in A minor.mid" --arranger "Mira" --composer "J. S. Bach" --notes 2
  MidiToAims "Minuet in A minor.mid" --arranger "Mira" --composer "J. S. Bach" --notes 2


Available options: --song, --composer, --arranger, --notes, --bars, --pages. You can also name the output file: ''MidiToAims "Minuet in A minor.mid" "My Minuet.rzr"''.
Available options: --song, --composer, --arranger, --notes, --bars, --pages, --format. You can also name the output file: ''MidiToAims "Minuet in A minor.mid" "My Minuet.rzr"''.


== Reading the Report ==
== Reading the Report ==
Each conversion prints a summary:
Each conversion prints a summary:


  Minuet in A minor: 165 notes (165 kept, 0 dropped, 14 folded by octave); melody: track 1; melody octave -1, accompaniment 0; 22 [play lines, 63 s, 1.7 KB; 1 book (11 pages; 1 paste)
  Minuet in A minor: 165 notes (165 kept, 0 dropped, 14 folded by octave); melody: track 1; melody octave -1, accompaniment 0; 22 [play lines, 63 s, 1.6 KB; 1 book (12 pages; 1 post)
  Song: Minuet in A minor; Composer: J. S. Bach; Arranged by: Mira; Timer: Anchored; Notes at once: 3; Bars per block: 2; Book pages: 95
  Song: Minuet in A minor; Composer: J. S. Bach; Arranged by: Mira; Timer: Anchored; Notes at once: 3; Bars per block: 2; Book pages: 95


* '''Dropped''' notes didn't fit within Notes at once.
* '''Dropped''' notes didn't fit within Notes at once.
* '''Pages''' and '''pastes''' are per book: a longer song might say ''4 books (30, 29, 30, 4 pages; 3, 3, 3, 1 pastes)''.
* '''Pages''' and '''posts''' are per book: a longer song might say ''2 books (93, 40 pages; 2, 1 posts)''.
* '''Folded''' notes were outside AIMS's two octaves, so MidiToAims moved them by an octave.
* '''Folded''' notes were outside AIMS's two octaves, so MidiToAims moved them by an octave.
* After the summary, the report lists the bars where notes were dropped or folded, so you know where to listen and where to edit.
* After the summary, the report lists the bars where notes were dropped or folded, so you know where to listen and where to edit.
Line 277: Line 276:
* '''--list''': list sounds without playing them (sound).
* '''--list''': list sounds without playing them (sound).
* '''--uo "folder"''': where your Ultima Online client is (remembered).
* '''--uo "folder"''': where your Ultima Online client is (remembered).
* '''--song, --composer, --arranger, --notes, --bars, --pages''': override the .m2a for one conversion.
* '''--song, --composer, --arranger, --notes, --bars, --pages, --format''': override the .m2a for one conversion.


== Credit Where It's Due ==
== Credit Where It's Due ==

Revision as of 12:20, 3 November 2026

Overview

MidiToAims turns a MIDI file into an AIMS composition that you paste into a music composition book. It is a workbench for musicians, not a song generator: it does the transcription, and you make the musical decisions. It chooses the melody and accompaniment, fits the music into AIMS's range, and writes every note and pause with exact timing. You decide what to change, then refine the result in the book like any other composition.

MidiToAims also plays your music on your own computer, the way the game will: a whole song before you paste it, or a single [play line while you try ideas.

The finished book follows the usual path: preview it, transcribe it to Sheet Music, and submit it to the Music Box.

You don't need any UO skills. MidiToAims runs on your own computer, and you choose the MIDI files.

Download

MidiToAims is a single Windows program. Nothing needs to be installed.

Unzip it wherever you like, for example in Documents. The MidiToAims folder contains:

  • MidiToAims.exe, the program.
  • Minuet in A minor.mid, by J. S. Bach (public domain), to try first.
  • README.txt, a quick start.

Put the MIDI files you want to arrange in the same folder.

The first time you run it, Windows may say "Windows protected your PC". Click More info, then Run anyway.

Quick Start

The fastest way: drag a MIDI file onto MidiToAims.exe. Try it with the minuet. Minuet in A minor.rzr appears next to the MIDI. That is your composition.

The m2a> Prompt

Double-click MidiToAims.exe. It opens a window with an m2a> prompt, where you type commands:

m2a> [play preview minuet
m2a> [play c e g 0.5 c e g

Press the up arrow to bring back an earlier line, change it, and press Enter to run it again. help lists the commands, and exit closes the window.

The commands are the game's own where the game has one, so you don't learn two sets: [play c e g, [play tempo 150, [play config and [play preview work here as they do in game. The [ is optional.

Every command also works from a command prompt, with MidiToAims in front. Open the folder, type cmd in the address bar and press Enter, then:

MidiToAims [play preview minuet

Naming a Song

You don't have to type a whole file name. Any words from it will do: minuet finds Minuet in A minor, and too sweet finds Hozier - Too Sweet (piano arrangement). Quotes are optional. A song's pieces (see Long Songs) count as one song. If several songs match, MidiToAims lists them: type more of the name. A name that matches a song exactly wins.

MidiToAims looks in the folder you're in, and in its own folder. To use another folder, name it: songs\minuet.

Making It Yours

m2a> init minuet
m2a> minuet

The first command writes Minuet in A minor.m2a, the arrangement settings, next to the MIDI. Open it in Notepad, set Arranged by to your character's name, and change anything else you like. The second command converts the MIDI using those settings. Edit the .m2a and convert again as often as you like.

Hear It Before You Paste It

m2a> [play preview minuet

MidiToAims plays the composition the way the game will, using the harp, lap harp and lute sounds of your own Ultima Online client. It reads the song as the game reads a book: sections, repeats, settings (# Timer:, # Tempo:, # Instrument:), instrument offsets and sound effects all play as they would in game. Ctrl+C stops. Lyrics (say lines) appear as they come.

  • Which file plays: if the song has a .rzr, that's what plays. It's what you'll paste, with any edits you made in it. If the .mid or the .m2a is newer, MidiToAims says so.
  • To convert again first, after changing the .m2a, add .mid: [play preview minuet.mid. This replaces the .rzr, including any edits you made in it.
  • --check shows the report without playing.

Before playing, MidiToAims tells you what the game will do differently from what is written:

  • Skipped notes. The game client won't play the same sound again within about half its length: about 0.2 seconds for the harp and lap harp, 0.15 for the lute. A fast repeated note on one instrument loses some of its repeats. MidiToAims lists the lines where it happens, and you hear them missing, as in game.
  • Notes cut short by the same note starting again.
  • Words the game ignores. A word that isn't a note, a pause or a setting stops the game reading the rest of that [play line.
  • Sound effects that need music karma (see Sound Effects).

Finding Your Client

MidiToAims finds your client by itself: through the Angel Island launcher, ClassicUO's settings, or the usual install folders. If it can't, tell it once where the client is, and it remembers:

m2a> [play preview minuet --uo "C:\...\UO Angel Island"

It needs the client's sound.mul and soundidx.mul. It only reads them.

Try a Phrase

Type [play just as in the game, and hear it at once:

m2a> [play c e g 0.5 c e g
m2a> [play instrument lute
m2a> [play tempo 150
m2a> [play timer anchored
m2a> [play config
m2a> [play reset

As in the game, a setting stays until you change it, so set the instrument or tempo once, then try phrase after phrase. MidiToAims remembers the settings between sessions. config shows them, and reset goes back to harp, the Classic timer and tempo 100. A song you preview uses its own # directives, not these settings.

A line plays to its end, or until Ctrl+C, before the prompt comes back. To hear two phrases as one, put them on one line.

[play musickarma, volume, concertmode, chatter, macro and list are game-only. MidiToAims says so if you try them.

Sound Effects and Percussion

A song can use the game's sound effects: +81 in a [play line plays sound 81. To hear them and find their numbers:

m2a> sound 81             one sound
m2a> sound 300-330        a range, one after another
m2a> sound wood           every sound with "wood" in its name
m2a> sound percussion     the sounds anyone may use

Add --list to see the numbers and names without playing them. Each sound listed says whether it is free for everyone or needs 1,000 music karma. In MidiToAims every sound plays, whatever your karma.

In the game, most sound effects need 1,000 music karma. The 26 percussion sounds are free for everyone: in typed [play, in a book's preview, and in sheet music.

Sound Name Sound Name
+42 anvil +563 blunt01
+51 dropgem2 +569 swish02
+66 hamer01 +737 dropgem1
+73 lever01 +835 feet_wood_a
+81 switch01 +836 feet_wood_b
+295 feet08a +931 hit10
+296 feet08b +937 hit16
+304 feet14b +942 hit20 (b)
+309 hit01 +944 hit22
+310 hit02 +946 hit4
+328 hit20 +1285 windchimes_01
+1334 weaponhit_04 +1336 weaponmiss_01
+1337 weaponmiss_02 +1338 weaponmiss_03

See Sound List for every sound.

Getting It Into the Game

  1. Open the .rzr file in Notepad and copy all of the text (Ctrl+A, Ctrl+C).
  2. In game, put a blank music composition book in your backpack, right-click it and choose Paste.
  3. Click Post Message, click in the message box, paste (Ctrl+V) and click Post. The whole composition goes into the book at once, line by line.
  4. Preview it with [play preview, or with Start in the book's context menu. Stop ends the preview.
  5. Edit in the book as you would any composition, and preview again.
  6. When you're happy with it, use manuscript paper on the book to make sheet music.

The header at the top of the composition (# Song:, # Author:) gives a new book its title and author.

Long Songs: Several Posts

One post takes up to 250 lines, so MidiToAims cuts a long book into pieces:

Long Song.post1.rzr    post 1 of 2
Long Song.post2.rzr    post 2 of 2

Post them into the same book, in order: each one goes in after the last. Pieces always break between phrases. If a post won't fit in the book, nothing is written, and you're told how many pages it needs.

If an older conversion left other .rzr files for the song, MidiToAims tells you. Don't paste those.

Songs Longer Than One Book

A book holds 96 pages. MidiToAims fills at most 95 of them, which leaves room for your own lines: lyrics, extra settings, notes to yourself.

When a song needs more than one book, each book gets its own files:

Long Song.book1.post1.rzr    book 1, post 1 of 2
Long Song.book1.post2.rzr    book 1, post 2 of 2
Long Song.book2.rzr          book 2 (one post)

Use a new book for each book number. Each book starts with its place in the song, for example # Book: 2/3. Books always break between phrases. Keep all of a song's books together in your backpack or in one bag. Previewing or transcribing any of them uses the whole song. A song can span up to 9 books.

Sharing the Text

To share an arrangement, share the MIDI and your .m2a: anyone with MidiToAims can make the same books from them. If you want the whole song as one file, set Format: whole in the .m2a, or add --format whole: MidiToAims writes Long Song.rzr, all of its books one after another, each starting with its # Book: n/m line.

Don't paste a whole file into the game if it's bigger than one post. MidiToAims says when it is.

The Arrangement Settings (.m2a)

The .m2a file is plain text, one setting per line. Write your value right after the colon: Arranged by: Mira. A blank value keeps the default.

A # starts a comment when it begins a line, or when it stands on its own with a space on each side (Notes at once: 2 # fewer). A # inside a word is kept, so Song: Prelude in C# minor works.

Each conversion's report lists the settings it used, so you can see at a glance whether a change took effect. The report also warns you if a name has a word that starts with #, or is "say" or "wait", because the book may start a new line there and the shard would cut the name.

Setting Default Meaning
Song the MIDI's file name The song's title.
Composer (blank) Who wrote the music. It's recorded in the composition.
Arranged by MidiToAims You. This becomes the book's author, the name the Music Box shows. Set it to your character's name.
Timer Anchored The AIMS timer. Anchored keeps every pause exactly on time.
Notes at once 3 At most 1 to 6 notes together. The melody comes first, then the bass, then inner notes from the top.
Bars per block 2 How many bars go into each phrase block (1 to 8). Each block ends with a wait of exactly its length.
Book pages 95 Pages filled per book (1 to 96). The rest is room for your own lines.
Format post post: files for the book's Paste (see Getting It Into the Game). whole: the song in one file (see Sharing the Text).

Tracks

The starter .m2a lists every track in the MIDI with its name, note count and range, and shows what MidiToAims chose for it:

Track 2:                # Violin; 312 notes, G3 to E6
  Role: auto            # melody (the highest track)
  Instrument: auto
  Octave: auto
Setting Choices Meaning
Role auto, melody, harmony, bass, off melody is the line that leads. bass is preferred as the low note. off leaves the track out.
Instrument auto, harp, lapharp, lute By default the melody is on the lap harp and everything else on the harp.
Octave auto, or -4 to +4 Moves the track by whole octaves.

By default, the track with the highest notes is the melody. A MIDI with only one track uses the top note at each moment as the melody. Drums are left out.

Command-Line Overrides

These options override the .m2a for one conversion:

MidiToAims "Minuet in A minor.mid" --arranger "Mira" --composer "J. S. Bach" --notes 2

Available options: --song, --composer, --arranger, --notes, --bars, --pages, --format. You can also name the output file: MidiToAims "Minuet in A minor.mid" "My Minuet.rzr".

Reading the Report

Each conversion prints a summary:

Minuet in A minor: 165 notes (165 kept, 0 dropped, 14 folded by octave); melody: track 1; melody octave -1, accompaniment 0; 22 [play lines, 63 s, 1.6 KB; 1 book (12 pages; 1 post)
Song: Minuet in A minor; Composer: J. S. Bach; Arranged by: Mira; Timer: Anchored; Notes at once: 3; Bars per block: 2; Book pages: 95
  • Dropped notes didn't fit within Notes at once.
  • Pages and posts are per book: a longer song might say 2 books (93, 40 pages; 2, 1 posts).
  • Folded notes were outside AIMS's two octaves, so MidiToAims moved them by an octave.
  • After the summary, the report lists the bars where notes were dropped or folded, so you know where to listen and where to edit.

What AIMS Can Play

  • Three instruments: harp, lap harp and lute.
  • Two octaves, from low C to high C (25 notes).
  • Up to 2,000 lines per song, across up to 9 books.
  • The same note on the same instrument can't sound again within about 0.2 seconds (see Skipped notes).

Music written for a full orchestra will be simplified. Pieces with a clear melody and accompaniment, such as dances, folk tunes and keyboard pieces, often sound good straight away. Try lowering Notes at once, turning off busy tracks, or moving a track an octave.

Command Reference

At the m2a> prompt, type these as shown. At a command prompt, put MidiToAims in front.

Command What it does
(drag a .mid onto MidiToAims.exe) Converts it.
(double-click MidiToAims.exe) Opens the m2a> prompt.
init song Writes the song's .m2a, the arrangement settings.
song Converts the song's .mid to .rzr files, using its .m2a.
[play preview song Plays the song as the game will. Its .rzr if it has one; song.mid converts again first. Also preview song.
[play notes and pauses Plays a [play line, as in the game.
[play instrument / tempo / timer / newtimer / prefetch value Changes a setting and remembers it.
[play config Shows the settings.
[play reset Back to harp, the Classic timer, tempo 100.
sound 81, 300-330, a name, or percussion Plays the client's sound effects, with their numbers and names.
help, exit At the m2a> prompt: lists the commands, closes the window.

Options:

  • --check: report without playing (preview and [play).
  • --list: list sounds without playing them (sound).
  • --uo "folder": where your Ultima Online client is (remembered).
  • --song, --composer, --arranger, --notes, --bars, --pages, --format: override the .m2a for one conversion.

Credit Where It's Due

Arranging a piece doesn't make you its composer. Put the original composer in Composer and your own name in Arranged by. The arrangement is your work, and the composition is theirs.

Use music you have the right to arrange: your own, or music in the public domain. The Mutopia Project has a large library of free, public-domain MIDI files.

See Also