It only takes a Minuet to change your life

It has been so long since I posted, the reason is that I have been quite busy with my GSoC timeline. The GSoC period is about to end, but before I describe my GSoC journey and contributions, I would like to state that KDE will be launching the cool Minuet application for Android phones.

What’s Minuet?

Minuet music education Free Software, thoughtfully designed to push your musical skills to the next level. Enhance your ability to recognize intervals, chords, rhythm, and scales while enjoying all the power of Free Software.Yes it is open source 🙂

The application is currently available on GNU/Linux and Android(pre Marshmallow). We will be soon releasing it on other platforms.

Journey to GSoC

My GsoC journey begun in mid-February, when I started contributing to Minuet repository of KDE. Fast forward two months, and I was thrilled to be selected for Google Summer of Code 2016. My main aim was to develop an Android application using Qt(C++) that had the same feature as that of the Desktop version.

The project is currently being maintained by Sandro Andrade. He has been an amazing mentor and I am lucky to have him as my mentor 🙂

I guess it is time to summarize the whole 3 months work. You can find my contributions here.

I started the journey by looking for the cross platform MIDI libraries, believe me I had a tough time looking for these libraries until I came across Csound. Csound actually made my work easier by providing all the functionalities that I was looking for. Although on digging deep , we found out that Csound used Fluidsynth opcodes which again is a music synthesizer for Linux and currently used in Minuet desktop application. So may be in the near future we may use Fluidsynth in Minuet mobile application. The sound fonts currently being used is sf_GMbank.sf2.

My next task was to implement Scales, Chords, Rhythms and Intervals exercises. Currently the exercise data is stored in JSON format. The advantage of using this method is that new exercises can be added with literally no changes in the code. So you can add your exercises too 🙂

Once done with the above tasks, we(I and my mentor) had to design the UI of the application. Since smart phones are much smaller in size than desktops and laptops, our main challenge was to have an interactive user interface with  all the required elements in one page.

After spending days working on the UI, we finally managed to come up with a working design.

In the ending phase, we tried to fix all the bugs, make certain improvements and voila now finally we have a working Minuet Android application 🙂

So this is how it looks so far.

You can download Minuet from Google Play Store.Click here to download . It should be available within a week or you can build it from here.

For next year students?

I have learned a lot from previous students/mentors hints. And as a GSoC participant duty, I should give next generation of students some kind of advice, so they never get surprised. That feedback wouldn’t differ a lot from what others would tell, write code a lot, keep strong bonds with your mentor.

Keep asking questions, even if it is a silly one. Be patient on IRC also also keep contributing to the same organization even after GSoC period. The main aim of this program is to introduce students to open source projects.

Advertisements

Building of Minuet Application on Android- Part 2

In the previous post I had talked about how cmake can be using for building Qt based android applications.

Now in this article I would like to mention about a problem that I had faced loading the JSON files in the application and how it was solved.

I wanted to access the JSON files to extract the information about the exercises. I tried to access the JSON files by providing the ANDROID absolute path but unfortunately it didn’t work. My mentor gave me a hint on how one could access the files in an alternate way.

We could use QStandardPaths for accessing the JSON files by passing the variable AppDataLocation but for that the files needed to be present in the <APPROOT>

JSON files were present in assets folder. So we added all the required to resources.qrc file and copied all the JSON files from assets folder to the root folder which completely solved the problem and as a result I was able to load all the JSON files successfully 🙂

Now I would like to discuss about the current development stage of Minuet Android application.

We have been able to load the exercises on the screen. Now we would be looking forward to adding sounds so one could guess the answer on hearing the music.

The initial look of Minuet Android

Chord

The Chord Exercise

NavigationDrawer

Navigation Drawer

Rhythm

Rhythm Exercise

We are looking forward to improving the UI of the application and add other features to the application. You can download the application from here

Any suggestions regarding the features and design of the application would be most welcomed 🙂 You can contact me on kde-edu(freenode) – ayushshah

 

 

Building of Minuet Application on Android- Part 1

Hi all. I have started working with KDE on building Minuet Mobile as my GSoC’16 project.

The aim of my project is to port Minuet Desktop Application to Android.

Well the journey begun on 26th of May, 2016(PS: My exams were on till 26th May) and believe me when I say I have learned a lot during this ongoing period. I have faced many problems during this time but I was able to combat those problems  with the help of my mentor Sandro Andrade. He has been very supportive and helpful during this period and I am very thankful to him.

Well, I and my mentor have started developing the application on Android. The development phase started with building the android application using cmake commands. Then we went on to loading the exercises on the screen. Our next task is to improve and polish UI and include the sounds to be played for every exercise.

I wanted to mention about how we build the android application using cmake and Qt. And also wanted to talk about how the Exercise View was implemented.

We first started with building the application using cmake.

You can test the basic version of Minuet(still in development phase) by building it yourself.

The required dependencies are as followed

Qt for Android. You can download it from their official website.
Set up Android NDK and SDK
Kf5 Frameworks. For official build instructions you can look over here
Ant
JAVA (openJDK)

Building KF5 for Android

$ cd “your path” (It is preferable to build KF5 for Android libaraies along side NDK and SDK. Example /home/ayush/android)
$ git clone git://anongit.kde.org/scratch/cordlandwehr/kdesrc-conf-android.git
$ mkdir -p extragear/kdesrc-build
$ git clone git://anongit.kde.org/kdesrc-build extragear/kdesrc-build
$ ln -s extragear/kdesrc-build/kdesrc-build kdesrc-build
$ ln -s kdesrc-conf-android/kdesrc-buildrc kdesrc-buildrc

Once the above steps are completed open kdesrc-buildrc and change the following line to point to the insatlled location of Qt for Android

line 15: -DCMAKE_PREFIX_PATH= “path to your Qt5 Android libraries”  Example: /home/ayush/Qt5.5/5.5/android_armv7″

Setting up the Environment variables

$ export JAVA_HOME=”path to openJDK”
$ export ANT=”path to ANT”
$ export Qt5_android=”path to Qt for Android libraries”
$ export ANDROID_SDK_ROOT=”path to SDK”
$ export PATH=$ANDROID_SDK_ROOT/platform-tools/:$PATH
$ export ANDROID_NDK=”path to NDK”

Example

$ export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
$ export ANT=/usr/bin/ant
$ export Qt5_android=/home/ayush/Qt5.5.1/5.5/android_armv7
$ export ANDROID_SDK_ROOT=/home/ayush/android/android-sdk-linux/
$ export PATH=$ANDROID_SDK_ROOT/platform-tools/:$PATH
$ export ANDROID_NDK=/home/ayush/android/android-ndk-r10e/

Run the following script to set up all KDE android frameworks and ECM

$ ./kdesrc-build libintl-lite extra-cmake-modules frameworks-android
Note you might need to be a sudo user for it.

Building instructions

You will need to first clone the minuetandroid repository by running the following command

$ git clone -b minuetandroid git://anongit.kde.org/minuet

Once the files have been cloned completely follow the steps given below
$ export minuetandroid_DIR=`pwd`
$ mkdir -p export/minuetandroid
$ cd export/minuetandroid
$ mkdir -p ../../build/minuetandroid
$ cd ../../build/minuetandroid
$ export minuetandroid_PRODUCT_DIR=`pwd`

Once you have finished the above commands, you are good to start with running the cmake command to build the application.

$ cmake “${minuetandroid_DIR}” -DCMAKE_TOOLCHAIN_FILE=/usr/share/ECM/toolchain/Android.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=”${Qt5_android}” \
-DCMAKE_INSTALL_PREFIX=”${minuetandroid_PRODUCT_DIR}” \
-DQTANDROID_EXPORTED_TARGET=minuetandroid \
-DANDROID_APK_DIR=”${minuetandroid_DIR}”/data \
-DKF5I18n_DIR=/opt/android/kde/install/lib/cmake/KF5I18n/

$ make install/strip
“install/strip” makes sure the binaries only have minimal stuff needed to run.

It is compulsory to run the following command else you will get an error. ECM toolchain expects us to have a directory
$ mkdir -p “${minuetandroid_PRODUCT_DIR}”/lib/qml

Executing this command will create an apk
$ make create-apk-minuetandroid

You can install the application on your phone (Android to be specific) using the suggested command
$ adb install -r minuetandroid_build_apk/bin/QtApp-debug.apk

Now you have a Minuet Android application using cmake.

Google Summer of Code, 2016

GSoc2016

Well, the wait for the results of Google Summer of Code 2016 is over. My proposal has been accepted and is a GSoC project now. I will be spending the summer writing code for KDE for implementing the project Minuet Mobile(KDE-edu).

Minuet is a music software developed by KDE that  aims at providing Music Education to  students and teachers. With the rise in number of mobile phones in order to reach a wider audience and to let them enjoy their love for music on the go, the plan is to create a similar mobile application that has all the features of the Desktop Application.

I would like to thank my mentor Sandro Andrade for believing in me and giving me the opportunity to work on this project.

During the Community bonding period (23rd April  to 22rd May), I will be working on the necessary coding techniques needed for implementing the project and learn more about the KDE Community.

Looking forward to developing the application during the Summer’16 🙂