This page provides information about MusicTrain, a media art piece
in which a model train moves when you play an electronic piano.
About Music Train
Promotion Video
Music Train is a media art piece
that visualizes the composition of music.
When you play the electronic piano, model trains
move. The 12 rails correspond to the seven notes
of Do(C), Re(D), Mi(E), Fa(F), Sol(G), La(A),
Si(B) and the five sharp & flat notes in
between. When you play Do(C), the train on the
Do(C) track moves forward, and when you play
Re(D), the train on the Re(D) track moves
forward.If you stop playing for a while, the
train will automatically return to the starting
line.
You can use this system to play a game like
horse racing. Before you start playing, line up
the trains at the starting point. Predict which
train will be in the lead after the song is
finished. The position of the trains represents
the frequency of each note of Do(C), Re(D), Mi(E)
in the song. Generally, Do(C) and Sol(G) appear
more frequently in songs in C major, but as
shown in the video above, Sol(G) appears most
frequently in Twinkle, Twinkle, Little Star.
In this way, Music Train makes it possible to
visualize the composition of music in a
particular song.
When you play an musical instrument, MIDI
signals are sent to your computer.
Power is sent from the PC to each rail via
Arduino and the motor driver.
Electricity from the tracks is sent to the
motors on each train.
Not only digital pianos but also guitar-type
controllers can be used as long as they are
capable of sending MIDI signals.
At the exhibition, anyone can freely play the
electronic piano and make the trains run.
Concept
(1) Visualize the musical components contained
in the song.
(2) Incorporate game-like elements.
System Configuration
The rails and vehicles are commercially
available N gauge model railroad products, and
the system is set up so that power is supplied
from the rails to the vehicles.
An electronic piano and Arduino Mega are
connected to a PC via USB. Motor controllers
that can control forward, backward, and stop is
connected to the Arduino Mega. The motor
controllers are connected to the rails.
To organize the wiring, I made a shield for the
Arduino Mega.
Structure
When you play a key on the keyboard, the vehicle
with the corresponding note will move forward.
The vehicle's position is displayed on the
monitor. The signal lights on the bollard at the
end will light up as the vehicle moves.
If no notes are played for a certain period of
time, the vehicle will return to the starting
point. When the song ends, the vehicles will be
sparsely positioned. Even if one vehicle gets
far away and goes all the way to the edge, all
vehicles will be reversed long enough to return
to the starting point. Once a vehicle reaches
the bollard at the starting point, it cannot go
any further, so it will stay there and wait for
other vehicles while spinning its wheels.
Development process
Production began in July 2025. The first version
was completed in August and exhibited at NT
Tokyo in early September.
Previously, a relay controller capable of
reversing polarity was used, but this was
changed to a motor driver that can do the same
thing.
Changed from Z gauge to N gauge. With Z gauge,
it was difficult to place the train on the
rails, and the trains often stopped midway.
The basic parts were completed on August 7,
2025.
Music Train is a media art piece that visualizes
the composition of music.
When you play the electronic piano, model trains
move. The 12 rails correspond to the seven notes
of Do(C), Re(D), Mi(E), Fa(F), Sol(G), La(A),
Si(B) and the five sharp & flat notes in
between. When you play Do(C), the train on the
Do(C) track moves forward, and when you play
Re(D), the train on the Re(D) track moves
forward.If you stop playing for a while, the
train will automatically return to the starting
line.
The position of the trains represents the
frequency of each note of Do(C), Re(D), Mi(E) in
the song.
In this way, Music Train makes it possible to
visualize the composition of music in a
particular song.
At the exhibition, anyone can freely play the
electronic piano and make the trains run.