Académique Documents
Professionnel Documents
Culture Documents
Muhammad. Iman
https://web.facebook.com/MumblingManGames
ptrusted@gmail.com
Surabaya, Indonesia
Abstract Finding time data of specific sound in a music file That time data and specified sound then inputted manually
may be hard and time consuming, though sound and timing are into the game. It may be easy when we work on a short music
the crucial part of rhythm games. This paper presents an idea of clip, but will be much harder when we using a longer music
finding the time stamp of simple beat consisted of kick, snare, that may consisted of hundreds of sounds to be processed. And
and hi-hat sound automatically. The purpose of this automatic
so the purpose of this paper is giving you a better solution with
time stamp is extracting the needed part of music like what sound
it is and when it's played in the timeline, and store it somewhere the use of Automatic Time Stamp that will processing your
that can be used later. There are three main processes involved, music and store the data into something you can use to make
those are attack detection, time stamping, and saving result. The the development of rhythm game faster and easier. There are
time stamps for each sound (kick, snare, and hi-hat) will be three main processes involved in this Automatic Time Stamp
represented as a list of float and then will be saved as an XML as showed in picture 2 below, those are attack detection, time
file in Unity Game Engine, and finally it can be implemented stamping, and saving result. All those processes are
later in rhythm game projects. In the end, it is known that the implemented using Unity Game Engine to make it efficient
result value has 0.015 to 0.043 seconds latency to the actual time while we develop a game in the same engine.
stamp value so it may need a little tweaking in the algorithm for
the next research.
I. INTRODUCTION
Rhythm games is a type of game that challenges player's
sense of rhythm [1]. The rhythm can be interpreted as a
sequenced objects or object movements or any other visual
expressions that is matched well with the music played. Some
of the most popular rhythm games are Guitar Hero, Rock Band,
PaRappa the Rapper, Just Dance, and Symphonic Rain [2].
In order to match the game visual with the music rhythm,
we may need a time data corresponded to the specific sound
played. But when we do it manually based on the music file, it
will be time consuming and inefficient. As we can see in the
picture 1 below, it shows one of many ways to find the time
data (circle number 2) of the specific sound (circle number 1) Picture 2 Automatic time stamping process
in Audacity software manually.
V. SAVING RESULT
When the music ends and attack detection process finished,
lists of float data are written into an XML file. It can be done
by using the .NET XML and SOAP Serialization. XML format
is chosen because it is an open standard and the XML stream Picture 6 Processes finished
can be processed by any application [6]. Table 6 below shows
how to save the lists of float into an XML file with a specific
file name. VII. CONCLUSION
To check how well the result of this automatic time stamp
Table 6 Saving result function is, the comparison between manual and automatic calculation
1 /// <summary>
should be done. It used a simple music file consist of 3 kick
2 /// Saving the result into an xml file. sounds, 2 snare sounds, and 5 hi-hat sounds. The latency is
3 /// </summary> calculated by subtracts the manual and automatic calculation.
4 private void SavingResult (string fileName) { As you can see in picture 7 below, the automatic time stamp
5 XmlSerializer serializer = new XmlSerializer(typeof(List<float>[]));
results 12 detected sounds. It means that there are 2 sounds that
had been time stamped twice. And it clearly seen in picture 7 REFERENCES
that the latency ranged from 0.015 to 0.043. For a practical use, [1] What is Rhythm Game,
those latency and double detected sound may be forgivable https://en.wikipedia.org/wiki/Rhythm_game, 2017.
since it is a quite small value. But the further research is [2] List of Rhythm Game, http://www.ranker.com/list/all-rhythm-
needed, to find a better yet more efficient method to time game-games-list/reference?ref=dshare&source=tshare, 2017.
stamping the music file, to make the development of rhythm [3] Unity Company Facts, https://unity3d.com/public-relations,
game easier. 2017.
[4] Unity Spectrum Data,
https://docs.unity3d.com/530/Documentation/ScriptReference/A
udioSource.GetSpectrumData.html, 2017.
[5] C# List Class, https://msdn.microsoft.com/en-
us/library/6sh2ey19(v=vs.110).aspx, 2017.
[6] .NET XML and SOAP Serialization,
https://docs.microsoft.com/en-
us/dotnet/framework/serialization/xml-and-soap-serialization,
2017.