Keywords

1 Introduction

Thai classical music is an integral part of the lives of Thais. It is the focal point of their way of life, tradition, culture, arts, education, religion, and philosophy. Throughout Thai history, a valuable and impressive musical foundation was set up with a variety of instruments, compositions, and playing techniques that could clearly express a range of emotions and feelings [1, 2]. Thai Government gives an important on development of pre-primary school children to improve their knowledge and motivate them to learn by themselves. Urgently, public policy of the Thai Government exposed on August 2011, to support and distribute tablet PCs to schools throughout the country. The project initialized with pilot primary schools on grade 1 or Prathomseuksa 1 students in academic year 2012 [3]. Nowadays, the project is an ongoing implementation, but there is a lack of performance handwriting application for the students. It is a good chance for us to propose better application to the students.

In our previous work [4], we have proposed a prototype of “Ranaad-Xek.” The Ranaad-Xek application supports iOS and runs on Apple trademark tablet computer: the iPad [5]. In addition, we distribute it for iPhone and it can compatible with other Apple’s iDevices. This paper proposes a prototype of an architectural and GUI design and implementation of Ranaad-Xek for Android table PCs. We have improved the application based on the Ranaad-Xek’s iOS. The player can freely multitouches on wooden bar to produce instrument sounds and record the players’ own songs.

2 Ranaad-Xek

Ranaad is a traditional Thai musical trough-resonated keyboard percussion instrument generally played with two mallets in Thai classical music and performance [6]. The traditional Thai system of organology classifies “Ranaad-Xek” as a higher-tone xylophone with bars usually made of hardwood. In addition, the Ranaad-Xek is also a symbolic representative of Thai classical music [2].

2.1 Ranaad-Xek’s Composition

Ranaad-Xek has evidently occurred since The Kingdom of Ayutthaya, 1350–1767. The Ranaad-Xek composes of three parts [1, 2, 7]. The first part is boat-shaped resonated trough for amplifying reverberation and bright sounds. Ranaad-Xek consists of 21 or 22 wooden bars shown in Fig. 1.

Fig. 1
figure 1

Wooden bars or Rang-Ranaad of Ranaad-Xek instrument

Tone adjustment is achievable using a combination between lead (malleable metal) and paraffin to attach under each wooden bar in both leading ends. Moreover, the tones of some wooden bars are used as reference tones for other instrument in the ensemble. We play Ranaad-Xek with two mallets. There are two types of mallets. The soft mallets provide relaxed, silky, and softer tones for playing slow songs. Meanwhile, the hard mallets provide sharp bright sounds when wooden bars are being percussed for faster playing. Both of the mallets types are shown in Fig. 2.

Fig. 2
figure 2

The soft mallets and the hard mallets

2.2 Ranaad-Xek Percussions

Basic Ranaad-Xek percussion is beating methods. When the player holds mallets and strikes double wooden bars concurrently, both sound tones are generated concurrently. There are many ways to play Ranaad-Xek. Main and basic percussions are classified into four methods: gep (Thai: ), graw (Thai: ), seaw (Thai: ), and gwaad (Thai: ) [1, 7]. Gep in Thai means ‘to keep or clean up’ and it is the most important basic percussion when a player holds mallets and hits double wooden bars concurrently as shown in Fig. 3.

Fig. 3
figure 3

Basic or 8-double percussion

The second percussion, ‘graw’ or repeat, is for playing long notes when the player frequently swaps hitting double wooden bars with equal weight of left and right hands, as shown in Fig. 4. The third percussion, ‘seaw’ or portion, is a way to percuss wooden bars when a hand is repeatedly hitting the same bar while another hand synchronizing hits through wooden bars producing resonated sound tones and harmony melodies, as shown in Fig. 5. The last one is ‘gwaad’ or sweep percussion, as shown in Fig. 6. In music, it refers to the player running the mallets along the entire wooden bars keyboard in one long draw, slow or fast, same or different directions, generating charming sounds. These basic percussions are fundamental practice for the beginning player. These also support the capable player for later applying in adaptive and advanced percussion styles or more interesting rhythms. Therefore, our application will support and focus on these main and basic percussions.

Fig. 4
figure 4

‘Graw’ or repeat percussion

Fig. 5
figure 5

‘Seaw’ or portion percussion

Fig. 6
figure 6

‘Gwaad’ or sweep percussion

3 Application Specification and Architecture

3.1 Framework

The Cocos2d-x is an Object-oriented APIs framework. Cocos2d-x is a cross-platform game engine branched from Cocos2d-iPhone, which consists of expanding supported platforms, with multiple choices of programming languages that shares the same API structure [8]. Our application supports 2D graphical interfaces and implement following the OpenGL ES standard with Cocos2d-x.We choose the Android NDK environment development with C++ programming language that helps us to embed native machine code compiled from our C++ source files into application packages.

3.2 Application Specification

The application provides both of traditional Thai and universal tuning and notes. The application provides recording system that consists of record, pause, play, save, and list recorded song functions by user’s interaction. The application provides sample songs. The player can play these bundled songs on the playing mode. It consists of pitches and delay times. The sample songs provide note sheets and video clips for percussions suggested by The Arts Cultural Center of Prince of Songkla University. The note sheets are in Thai musical systematic style. However, the user can play the songs with different tunings of percussions. The sample songs named one-class rhythm Khae-Bor-Ra-Ted (Thai: ), two-class rhythm Lao-Siang-Tian (Thai: ), Lao-Kruan (Thai: ), and famous Moonlight Serenade or Lao-Duang-Duen (Thai: ).

3.3 Application Architecture

We have revised our previous architecture because the practicing mode is not well as we design and we have hardcoded that initialized with only one song, which is the Khae-Bor-Ra-Ted. We have decided to remove practice mode and will investigate in the future. For this work, we propose recoding system. We have to improve all related modules for recording system consists of State Saving and Resuming Engine (SSRE), Rhythms Synchronizing Engine (RSE), Sound Engine (SE), Multitouch Detecting Engine (MDE), Presentation Engine (PE), and Playing Manager Engine (PME).We design the application architecture and divide it into 6 modules, as shown in Fig. 7.

Fig. 7
figure 7

The architecture of the application

The first module, MDE, is a module for detecting all concurrent touches from the user. There are wooden bars in our application starting from the far left to the far right. Each produces an identical sound tone of organology. For traditional Thai organology, it is from the lowest Sal to the highest Far tone. For universal organology, the wooden bar is the virtual instrument tone bridge of Bb (or A#) cord tuning. Therefore, in this work, there are 21 monotones (or 14 8-double percussion tones) in traditional Thai organology and there are 21 pitches of Bb’s cord in universal organology. Both of the organologies also support the note sounds of soft and hard mallets. Therefore, there are 48 monotones in the application.

The second module, SE, is a module for playing each sound of each wooden bar. The third module, RSE, is for managing the song rhythm that is classified according to the speed of playing into one-class, two-class, and three-class in the traditional Thai system of organology. In previous work [4], our application supports the sounds of ching, a traditional Thai musical instrument for controlling rhythm. The forth module, SSRE, is a module for collecting pitches and delay times of a recording song in case that the player records, pauses, stop, and save it into a file. The fifth module, Song note Inputting Engine (SIE), is a module for inputting song pitches and delay times. Therefore, it transforms of these data into the PME. The application supports all percussion methods as a minimum requirement.

The last module is Presentation Engine (PE). Our application will run in user-event-driven orientation such that the interaction between the application and the player will achieve by PE module.

Due to the public policy of the Thai Government, the application distribution platform is Android tablet PCs. The device should run on a fitting 7.0 inches and 600 × 1,024 pixels at least 170 ppi pixel density resolutions. User inputs are established via multitouch in order to do Ranaad-Xek percussions that the user concurrently touches double wooden bars with two fingers.

3.4 The Playing Mode

The player can choose soft or hard mallets and rhythm classes, respectively. The player can freely multitouches. Even though they play wrong percussions, the application still generates note sounds located on the touched wooden bars. Furthermore, we enhance the recording module into the playing mode. The state diagram is shown in Fig. 8. In this work, we improve and propose the playing mode. On the main screen, a player can select to enable playing mode or to view tutorial information. The On Recording state is responsible to record the player’s percussions consisting of pitches and delay times. When the player has pressed a stop recording button, the application has finalized a record timer. Then, the application is into the On Waiting to the Save a Song state. If the player has pressed a save button, the application will save percussion information into a file.

Fig. 8
figure 8

The overview of improved-state diagram of the application

3.5 Recording System

We propose preliminary of algorithms for recording system in user-driven event oriented using timers to count notes’ delay times and dynamic array to store all notes’ information such as pitches and delay time as shown below. Due to the application supports 84 monotones, we configure button’s tag for each wooden bar. The tag identifies a note’s sound for sending it to play and record which depends on the user’s percussion. The algorithm is shown in the hit Sound Button () function.

3.6 GUI Design

We are still keeping the golden motif theme and supporting landscape orientation 21 wooden bars from the previous work. The design in this work is for 7 inches screen due to the OTPC Project of Thai Government [3]. Figure 9 shows a wooden bars or Rang-Ranaad in the Thai organology sound system of the application when the user has pressed the playing mode. It consists of two button groups. The first set consists of five buttons such as home, mallet type, class rhythm, Thai, and universal organography, from the left to the right, respectively. The second set is control buttons for the recording system. There are six buttons consisting of record, stop, play, save, list, and information, respectively. The information screen provides application information and demonstrates song video footages and developer team contacts.

Fig. 9
figure 9

The Rang-Ranaad screen in the playing mode of the application

4 Conclusions

This paper proposes a prototype of an architectural, algorithms and GUI design of Ranaad-Xek for Android tablet PCs. The player can freely multitouches on wooden bar to produce instrument sounds and record the players’ own songs. The full implementation and testing are on progress.