English / Japanese

# MIDITrail Ver.1.1.2 for Windows User Manual

Copyright (c) 2010, WADA Masashi All rights reserved.
Web: http://sourceforge.jp/projects/miditrail/
Mail:

## 0. Contents

1. Introduction
2. System requirement
3. How to install and execute
4. Usage
5. Restriction
6. FAQ
7. How to customize
8. Copyright and license
9. Appendix
10. History

## 1. Introduction

"MIDITrail" is a MIDI player which provides 3D visualization of MIDI datasets.
You can enjoy not only listening but also viewing.
MIDITrail supports SMF format 0/1, and multiple MIDI ports.
MIDITrail is available for Windows and Mac OS X.

Screenshot: PianoRoll3D
Screenshot: PianoRollRain

## 2. System requirement

OS: Windows 2000 / XP / Vista / 7
VIDEO: Support for DirectX 9.0c graphics

It is recommended that your PC has high performance graphics for smooth animation.
If the MIDI datasets contains a lot of notes, the software needs more performance graphics.
As long as the performance of your PC allows, please enjoy MIDITrail with large window.

## 3. How to install and execute

### (1) How to install

Extract ZIP file, and execute "MIDITrail.exe".

NOTICE:
If you are using Windows 2000, you must move "msvc*.dll" files to the folder "MIDITrail.exe" exists from "Microsoft.VC90.CRT" folder, before executing "MIDITrail.exe".
If you are using Windows XP / Vista / 7, do not move DLL files.

### (2) First setup

At first, you must setup the MIDI OUT port.
Select "MIDI OUT..." from "Option" menu, then "MIDI OUT configuration" dialog will appear. At least, you must select the MIDI OUT device of "port A". Ordinary MIDI datasets is sent to "Port A".

If you want to play the MIDI datasets which uses multiple ports, you must select the MIDI OUT device of port B, C, and so on.
NOTICE: To play the MIDI datasets which uses multiple ports, it is necessary to prepare MIDI interface and MIDI module which supports multiple ports.

### (3) How to uninstall

Delete "MIDITrail" folder which contains "MIDITrail.exe". MIDITrail doesn't use registry.

### (4) How to open Recomposer data files

Recomposer is an old popular MIDI sequence software in Japan.
MIDITrail can open Recomposer data files(*.rcp *.r36 *.g36) using RCPCV.DLL(Recomposer File Converter) which Mr. Fummy releases. If you want to open Recomposer data files, please download RCPCV.DLL and copy it to the folder "MIDITrail.exe" exists.
RCPCV.DLL http://www.vector.co.jp/soft/win95/art/se114143.html

## 4. Usage

### (1) How to open a MIDI file

Select "Open..." from "File" menu, the Open File dialog will appear. And choose a Standard MIDI File (*.mid).
Or you can drag and drop a MIDI file into the window of MIDITrail.

If you prepared RCPCV.DLL, MIDITrail can open the Recomposer data files(*.rcp *.r36 *.g36). Please refer to "3.(4) How to open Recomposer data files" for details.

### (2) How to play/pause/resume/stop

Push the following keys, or use "Playback" menu.

Key | Action
--- | ---
SPACE | Play / Pause / Resume
ESC | Stop
F2 | Double speed playback

### (3) How to move viewpoint in 3D space

You can move freely in 3D space, and look at MIDI datasets from all directions by operation of keyboard and mouse, like FPS(First Person Shooter) game.
Although there is sense of incongruity in the beginning, it will be very comfortable as experience is gained.

#### Mouse operation

When you click the window, it will become the view control mode by the mouse, and mouse cursor will disappear.
The eye direction synchronizes movement of your mouse.
If you click once again, view control mode will be canceled.
And you can rotate piano roll using mouse wheel.

#### Keyboard operation

Put your index finger on D, middle finger on W, third finger on A.

Key | Action
--- | ---
W / S | It moves forward and backward.
A / D | It moves left and right.
Q / E | It goes up and down.
Z / C | It moves along the direction of MIDI datasets. (In PinoRollRain, it moves along the piano keyboard.)
SHIFT + [W/S] SHIFT + [A/D] SHIFT + [Z/C] | When you push move key with SHIFT key, you can move at high speed.
CTRL + [W/S] CTRL + [A/D] | You can control the eye direction.

#### For a left-handed person

You can also use a cursor key. If you use a mouse with your left hand, this one may be convenience.

Key | Action
--- | ---
↑ / ↓ | It moves forward and backward.
← / → | It moves left and right.
PgUp / PgDn | It goes up and down.
, / . | It moves along the direction of MIDI datasets. (In PinoRollRain, it moves along the piano keyboard.)
SHIFT + [↑/↓] SHIFT + [← / →] SHIFT + [PgUp/PgDn] | When you push move key with SHIFT key, you can move at high speed.
CTRL + [↑/↓] CTRL + [← / →] | You can control the eye direction.

### (4) Preservation of the viewpoint

When you do the following operation, your viewpoint returns to the default position.

- When you open a MIDI file.
- When you select stop menu.
- When you select play menu again, after end of playing.

At first, the default position is the viewpoint which looks at MIDI datasets from just beside.
If you want to change the default position, move to your favorite position, and select "Save viewpoint" from "View" menu.
If you want to restore default position which looks at MIDI datasets from just beside, select "Reset viewpoint".

### (5) Change of window size

Select "Window size..." from "View" menu, the Window size configuration dialog will appear.
Select your favorite window size, and push the OK button.
You can not change window size while playing or pausing.

The window size you can select is depends on your PC.
If you want to customize window size, please check FAQ.

### (6) Display counters

Counter | Details
--- | ---
FPS | Frame Per Second.
TITLE | Title of music.
TIME | Elapsed time.
BPM | Tempo (Beats Per Minute).
BEAT | Time signature.
BAR | Number of bars.
NOTES | Number os notes.

### (7) Structure of 3D piano roll visualization

(a) The structure of "Piano roll 3D" visualization

When MIDITrail open the MIDI datasets uses multiple ports, unused port will be not displayed.
For example, if the MIDI datasets uses port A, C and E, MIDITrail displays port A, C and E side by side, and omits port B and D.

(b) The structure of "Piano Roll Rain" visualization

When MIDITrail open the MIDI datasets uses multiple ports, only piano keyboards of port A will be displayed.
However piano roll bars of all ports will be displayed.

### (8) View mode select

You can select the view mode from "View" menu. You can not change the view mode while playing or pausing.

### (9) Display/Effect switch

You can switch the display/effect at "View" menu.

The piano roll bar will move up/down or right/left with change of pith bend.
Some MIDI animation works are using pitch bend to shift the piano roll bars without change keys. If the MIDI animation is not displayed correctly, please disable the pitch bend effect to fix the piano roll bars.

### (10) MIDITrail command line interface

If you want to start MIDITrail by command line, you can use following arguments.

    MIDITrail.exe [-p] [-q] ["path\to\file"]

argument | detail
--- | ---
-p | Play MIDI file after startup of MIDITrail. If you did not specify "path\to\file", this option will be ignored.
-q | End MIDITrail after end of playback. If option "-p" was not specified, this option will be ignored.
path\to\file | MIDI file path. When you specify a path including a space character, please surround with a double quotation mark.

If you drop a MIDI file to the shortcut of MIDITrail, MIDITrail open the file on startup.

### (11) Graphic configuration

Select "Graphic..." from "Option" menu, the graphic configuration dialog will appear.
You can not change graphic configuration while playing or pausing.

Anti-aliasing
If anti-aliasing is enabled, a notch (jaggy) will decrease and a more beautiful picture will be displayed.
However, since processing of anti-aliasing is heavy, performance may be poor when you select a upper level.
If your PC does not support anti-aliasing, it is displayed as "Not supported".

## 5. Restriction

### (1) Synchronization of MIDI sound and display

If you use the MIDI module which delays sound (such as software sound modules), the MIDI sound and display may not synchronize.

### (2) Performance of graphics

MIDITrail renders all notes of the MIDI file in real time.
Therefore if MIDI file has a large number of notes, the load of rendering becomes high.
In order to enjoy MIDI file which contains tens of thousands of notes comfortably, you have to use PC which has high performance graphics.

### (3) Multiple ports

In specification of SMF(Standard MIDI File), a method to select port is not defined.
However there is the unofficial method(*1) to select port. MIDITrail supports that method, but may be unable to play the MIDI file. It depends on the MIDI file.
(*1) Meta event (FF 21 01 pp) is the command to select port.

### (4) Time format of standard MIDI file

MIDITrail can't open the MIDI file whose delta time represents actual time.

## 6. FAQ

### (1) Q. I got "d3dx9_**.dll was not found" error. I can't start MIDITrail.

The error occurs when the version of DirectX in your PC is old. Please install the latest version of "DirectX End-User Runtime".

Microsoft DirectX
http://www.microsoft.com/games/en-US/aboutGFW/pages/directx.aspx

### (2) Q. The animation is not smooth.

Please try to change window size to small, and turn off anti-aliasing. Then the load of rendering becomes low.
Check FPS value in window title. If the FPS value is under 60, the performance of graphics is insufficient.
When MIDI file has a large number of notes, the load of rendering becomes high.
To confirm the performance of your PC, please try to open MIDI file which contains few notes. If the animation does not improve, please use PC which has high performance graphics.

### (3) Q. When I play the music, my viewpoint returns to just beside each time.

Move your viewpoint to your favorite position, and select "Save viewpoint" from "View" menu. Then your current viewpoint will be saved.

### (4) Q. I want to customize the window size.

You can customize the window size. Please open following file by text editor, and edit "Width" and "Height".

    Windows 2000 / XP
    C:\Documents and Settings\(user name)\Application Data\yknk\MIDITrail\View.ini
    Windows Vista / 7
    C:\Users\(user name)\AppData\Roaming\yknk\MIDITrail\View.ini

    [WindowSize]
    Width=800
    Height=600

### (5) Q. I want to display in full screen.

In present version, MIDITrail can not display in full screen. It may support in the future.

### (6) Q. When I display the menu, the animation stops.

Sorry, it is a specification.

### (7) Q. I got "The application failed to initialize properly." error on Windows 2000. I can't start MIDITrail.

If you are using Windows 2000, you must move "msvc*.dll" files to the folder "MIDITrail.exe" exists from "Microsoft.VC90.CRT" folder, before executing "MIDITrail.exe".

### (8) Q. I got "DirectX API error. / FUNC: DXRenderer::Initialize / INFO: 8876086A" error.

If your PC does not support Direct3D, this error occurs.
Please execute "DirectX Diagnostic Tool"(dxdiag.exe), and select "Display" tab. Is the "Direct3D Acceleration" enabled?
If you can't change "Direct3D Acceleration" to "Enabled", your PC does not support Direct3D. Please use the PC which supports DirectX 9.0c graphics.

### (9) Q. I want to change the ripple more showily.

You can change size of the ripple by editing configuration file.
Please Check "7. Customize - (2) Piano roll".
Change the value of "RippleHeight" and "RippleWidth" larger.

## 7. How to customize

You can customize MIDITrail as your like, by editing the file "PianoRoll3D.ini", "PianoRoll2D.ini" and "PianoRollRain.ini" which is in "conf" folder.

### (1) Moving speed of viewpoint

Edit [FirstPersonCam] section.

Name | PR-3D/2D | PR-Rain | Details
--- | --- | --- | ---
VelocityFB | o | o | Velocity of forward and backward. (m/s)
VelocityLR | o | o | Velocity of left and right. (m/s)
VelocityUD | o | o | Velocity of up and down. (m/s)
VelocityPT | o | o | Angular velocity of look. (degree/s)
AcceleRate | o | o | The rate of acceleration when push SHIFT key. (n times)
VelocityAutoRoll | o | o | Angular velocity of auto rotation of piano roll (degree/s)
VelocityManualRoll | o | o | Angular velocity of manual rotation of piano roll (degree/s)

### (2) Display of piano roll

Edit [Scale] section.

Name | PR-3D/2D | PR-Rain | Details
--- | --- | --- | ---
QuarterNoteLength | o | o | Length of quarter note (m)
NoteBoxHeight | o | x | Height of note box (m)
NoteBoxWidth | o | x | Width of note box (m)
NoteStep | o | x | Interval length of notes in a channel (m)
ChStep | o | x | Interval length of channels (m)
RippleHeight | o | x | Height of ripple (m)
RippleWidth | o | x | Width of ripple (m)
PictBoardRelativePos | o | x | The relative position which crosses perpendicularly the board and the playback section. 0.0 - The left edge of board crosses playback section 0.5 - The center of board crosses playback section 1.0 - The right edge of board crosses playback section

If you set small value to QuarterNoteLength, you can enjoy MIDI datasets like miniature garden.

### (3) Color

Edit [Color] section. "A" of "RGBA" means alpha value.

Name | PR-3D/2D | PR-Rain | Details
--- | --- | --- | ---
Ch-01-NoteRGBA Ch-02-NoteRGBA : Ch-16-NoteRGBA | o | o | Color of the piano roll bar at each channel.(RGBA)
GridLineRGBA | o | x | Color of the grid line and bar line. (RGBA)
PlaybackSectionRGBA | o | x | Color of the playback section. (RGBA)
CaptionRGBA | o | o | Color of the caption/counter string.(RGBA)

### (4) Active note effect

Edit [ActiveNote] section.

Name | PR-3D/2D | PR-Rain | Details
--- | --- | --- | ---
Duration | o | x | Duration of active note flash.(msec)
WhiteRate | o | x | White rate at "NOTE ON". 0.0 Same color as piano roll bar. It means no flash. 0.5 Neutral color of piano roll bar and white. 1.0 White.
EmissiveRGBA | o | x | Emissive color of active note. (RGBA) This value will be ignored on PianoRoll2D.

### (5) Ripple

Edit [Ripple] section.

Name | PR-3D/2D | PR-Rain | Details
--- | --- | --- | ---
Duration | o | x | Duration of a ripple.(msec)

### (6) Stars

Edit [Stars] section.

Name | PR-3D/2D | PR-Rain | Details
--- | --- | --- | ---
NumberOfStars | o | o | The number of stars to draw.

### (7) Bitmap

Edit [Bitmap] section.
Place your bitmap file to "data" folder which exists under the MIDITrail folder. And write the bitmap file name to INI file.
If the height or width of bitmap is too big, your PC may be unable to draw the bitmap.

Name | PR-3D/2D | PR-Rain | Details
--- | --- | --- | ---
Board | o | x | Bitmap file name of the picture board.(ex. "data\Board.bmp") Instead of piano keyboard, you can display your favorite wallpaper. The aspect ratio of bitmap is arbitrary. To adjust the relative position which crosses perpendicularly the board and the playback section, please edit "[Scale] / PictBoardRelativePos".
Ripple | o | x | Bitmap file name of the ripple.(ex. "data\Ripple.bmp") You can change ripple which is displayed on "NOTE ON". The aspect ratio of bitmap is arbitrary. To adjust ripple display size, please edit "[Scale] / RippleHeight, RippleWidth".
Keyboard | x | o | Bitmap file name of piano keyboard.(ex. "data\Keyboard.bmp") Texture image of Piano keyboard. You can not change the aspect ratio of this bitmap.

### (8) Piano keyboard

Edit [PianoKeyboard] section.

Name | PR-3D/2D | PR-Rain | Details
--- | --- | --- | ---
KeyDownDuration | x | o | Duration of key down (msec)
KeyUpDuration | x | o | Duration of key up (msec)
KeyboardStepY | x | o | Keyboard step interval: Horizontal direction (m)
KeyboardStepZ | x | o | Keyboard step interval: Vertical direction (m)
KeyboardMaxDispNum | x | o | The number of the maximum keyboards (0-16)
WhiteKeyColor | x | o | Color of white key. (RGBA)
BlackKeyColor | x | o | Color of black key. (RGBA)
ActiveKeyColor | x | o | Color of active key. (RGBA)
ActiveKeyColorDuration | x | o | Duration of change from the color of note ON to the last neutral color. (msec)
ActiveKeyColorTailRate | x | o | Definition of the last neutral color. Color ratio of the color of note ON(red) and the color of key(white/black) (0.0-1.0)

## 8. Copyright and license

WADA Masashi holds the copyright of MIDITrail.
MIDITrail is released under the BSD license.

    Copyright (c) 2010, WADA Masashi <>
    All rights reserved.

    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions
    are met:

    * Redistributions of source code must retain the above copyright
      notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright
      notice, this list of conditions and the following disclaimer in the
      documentation and/or other materials provided with the distribution.
    * Neither the name of the MIDITrail nor the names of its contributors
      may be used to endorse or promote products derived from this
      software without specific prior written permission.

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
    FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
    COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
    INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
    BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
    ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    POSSIBILITY OF SUCH DAMAGE.

## 9. Appendix

### (1) Story of development

I was enjoying "MIDI ANIMATION" videos which were made by artisans of NICO NICO DOUGA community. (NICO NICO DOUGA is the video hosting service in Japan.) Then I got the image that I am walking through the trail, there are many floating piano roll bars. In order to actualize this image, I started development of MIDITrail.
However, after a few days, I found the demo video of "MIDIPlayer" which supports 3D piano roll at NICO NICO DOUGA. It dejected me a little, but I continued development to actualize my image.

### (2) Aapplication software witch supports 3D visualization of MIDI datasets

In Google and Youtube, you can find many videos which converted MIDI datasets into 3D CG animation. But there is few software which synchronize MIDI sound and display with 3D visualization.
The software I found are shown below.

#### 3D MiDi / Author: Marc Cardle / 1998-2000

"3D MiDi" is a MIDI player for Windows using OpenGL.
Cubes and balls move about with MIDI sound. Now, it has been hard to get the software.

    MADO NO MORI: "3D MiDi" Alpha 0.1, synchronizes MIDI sound and 3D animation.
    http://www.forest.impress.co.jp/article/1999/11/18/threedmidi.html

#### comp-i (Comprehensible MIDI Player-Interactive) / Author: Reiko Miyazaki, Issei Fujishiro, Rumi Hiraga / 2002-2004

"comp-i" is the software which provides 3D visualization of MIDI datasets. Its target is intuitive editing of MIDI datasets.
comp-i has been trying to visualize not only a pitch but various parameters of MIDI datasets.
This software is explained in the paper which tackled 3D visualization of MIDI datasets.

    Reiko Miyazaki, Issei Fujishiro: "3D Visualization of MIDI Datasets" July, 2002.
    http://ci.nii.ac.jp/naid/110002935789

    Reiko Miyazaki, Issei Fujishiro, Rumi Hiraga: "A System for Visual Exploration of MIDI Datasets" March, 2004.
    http://ci.nii.ac.jp/naid/110002712125

You can get some related papers by searching web.
comp-i seems to a software for Windows, using World-ToolKit.
It is not opened to the public. I want to see it someday...

#### MIDIJam / Author: Scott Haag / 2005?-2007

"MIDIJam" is a MIDI player for Windows using OpenGL.
This software displays the 3D musical instruments which are performing in real time. MIDIJam supports 92 different instruments in the latest version.

    MIDIJam
    http://www.gamesbyscott.com/midijam.htm

#### MIDIPlayer / Author: rz / 2010-

"MIDIPlayer" is a MIDI player for Java environment using OpenGL.
MIDIPlayer has rendering plug-ins, and one of them supports 3D piano roll.
It can display 3D piano roll which received from MIDI keyboard in real time.

    MIDIPlayer
    http://sourceforge.jp/projects/midiplayer/

#### Music Master / Author: Music Master / 2010-

"Music Master" is a MIDI player for Mac OS X and Windows using Mono.
This software displays the 3D upright piano and piano roll. The keyboard action synchronizes to play.
Additionally the keyboard action synchronizes to a MIDI keyboard in real time.

    Music Master
    http://www.musicmaster.cz/

## 10. History

Date | Version | Changelog
--- | --- | ---
2010/03/08 | Ver.0.0.0 | Development start.
2010/05/18 | Ver.1.0.0 beta | Beta release.
2010/06/02 | Ver.1.0.0 | First formal release.
2010/06/05 | Ver.1.0.1 | #22102 Fixed bug. (execution fails by missing Visual C++ runtime library) #22106 Fixed bug. (size of about dialog is big on Windows English version)
2010/06/20 | Ver.1.0.2 | #22218 Added English manual. #22108 Fixed bug. (crash when opening the MIDI file exported from VOCALOID) #22217 Fixed bug. (overlapped ripples flicker)
2010/07/11 | Ver.1.0.3 | #22319 Added color effect to active piano roll bar. #22412 Added pitch bend effect to piano roll bar. #22425 Added view mode of piano roll 2D. #22442 Added switch interface of display and effect. #22413 Fixed bug. (rendering performance has declined by specular effect) #22414 Fixed bug. (total count of notes is incorrect) #22424 Fixed bug. (duration of a ripple is not constant)
2010/07/25 | Ver.1.0.4 | #22320 Added application icon. #22522 Added support for Recomposer data file. #22523 Added command line interface. #22582 Added double speed playback mode. #22585 Added function of piano roll rotation by a mouse wheel. #22566 Fixed bug. (Playback time was slightly short) #22506 Fixed bug. (Note may continue sounding after the end of playback)
2010/08/06 | Ver.1.0.5 | #22633 Fixed bug. (Piano roll rotation status is not saved by "Save viewpoint") #22652 Fixed bug. (Parse error when opening 55MCMDL1.MID "WATANABE Michiaki MEDLEY") #22709 Fixed bug. (MIDITrail sends redundant "F7" to MIDI-OUT with multi-packet system exclusive message) #22710 Fixed bug. (Auto rotation speed of piano roll is not constant)
2010/08/29 | Ver.1.1.0 beta | Beta release.(Added "Piano Roll Rain")
2010/09/19 | Ver.1.1.0 | #23174 Added view mode "Piano Roll Rain" #23175 Fixed bug. (File open dialog is not modal)
2010/10/17 | Ver.1.1.1 | #23439 Added Anti-aliasing support #23347 Fixed bug. (Key down timing and a piano roll don't synchronize in PianoRollRain) #23348 Fixed bug. (Spelling error in file open dialog) #23422 Fixed bug. (Position of black is not correct in PianoRollRain)
2010/12/26 | Ver.1.1.2 | This version was released with MIDITrail for Mac OS X. #23970 Added eye direction control by key operation. #23971 Updated texture images. #23972 Updated application icon. #23497 Fixed bug. ("Piano Roll Rain" item in "View" menu is always enable) #23968 Fixed bug. (Time signature was always 4/4 after loading file) #23969 Fixed bug. (Space charactor in the title string has been ignored)