Skip to content

[english] How to Include new Compositions

José Amuedo Salmerón edited this page Jul 23, 2017 · 2 revisions

So, OK, you want to suply a new composition for the project. We aim you to do that, we need your help to keep improving the application, and of course, one important part of it is the set of compositions available. For sure, Please! Don't try to suply compositions with copyrights. We will ignore them.

How to Include new Compositions (The most easy way)

The easy way is just to ask us to add a new composition. Just ask it in the issues page, but please consider that this is a non profit project. We work on this in our very limited free time. So, please, go to at least to the next section if possible.

How to Include new Compositions (The easy way)

In the hard way you will need to deal with github, repositories, pull request... and so on... So, to avoid you to deal with that, at least you could provide us the prepared files and info for the new composition and we could add it for you. Please, if you plan to do this, first add an issue with your intentions before working on this to check our avaibility and if we consider reasonable (for instance due to copyrights problems and so on). So let me explain you what files we need to include your new composition:

Files needed to include a new Composition

The compositions loaded by backing trainer are stored in github, as well as the source code. You can find all the compositions directly from the branch compositions: https://github.com/spheras/backingtrainer/tree/compositions

You will see there a numerated set of files, with a nomenclature like:

[00000]-test.mid
[00000]-test.xml

In this case is a test composition used to analyze problems in the application, but you can observe that all the compositions always have 2 files:

[00001]-mozart-andante-in-c-major-flutesolo.xml
[00001]-mozart-andante-in-c-major.mid

The first part of the file name is a number that identify the composition and then the rest of the filename: [XXXXX]-FileName

It is important to suply both files with the same number, and use the following number after the last number used (check the last number used). For example we could suply a new composition called 'MyComposition':

[00100]-MyComposition.mid
[00100]-MyComposition.xml

The XML file is the score of the composition stored as MusicXML format. The MIDI file is the same composition stored as a midi file with all the tracks needed to play it (the front track and the backing tracks, we will see it later).

Last but not least, wee need to touch an existent file: index-compositions.json (which is stored at the same level of all the compositions). This file contains all the basic info of all the compositions available. For that you will need to suply us the info for the new composition in the following format (example):

    {
        "id": "00001",
        "name": "Andante in C Major (KV315)",
        "author": "Wolfgang Amadeus Mozart",
        "description": "",
        "wikipediaLink": "https://en.wikipedia.org/wiki/Andante_in_C_for_Flute_and_Orchestra_(Mozart)",
        "level": 2,
        "midiURL": "mozart-andante-in-c-major.mid",
        "scoreURL": "mozart-andante-in-c-major-flutesolo.xml",
        "frontInstrument": {
            "name": "Flute",
            "track": 1
        },
        "backInstruments": [
            {
                "name": "Piano",
                "track": 2
            },
            {
                "name": "Piano",
                "track": 3
            }
        ],
        "version": 1
    }

As you see you need to suply the Id used in the files, the name of the composition, the author, a description (if needed), a link to external reference (not needed to be from wikipedia), a level number (from 1-5), the file name (without the [XXXXX]-) for the midi file, the file name for the MusicXML format, the Front Instrument and the Back Instruments.

Regarding the Front and Back Instruments, them references to the track used at the midi file. The front instrument is the instrument that the player will see at the musicxml format, the score. The Back instruments are the rest instruments that will be played as well during the play. The name of the instruments indicates what instrument will hear.

MusicXML File

The MusicXML file is the score file in the MusicXML format. For that you will need a tool like musescore. It gives you the option to export a score to that format. The score need to be in that format to be understood and rendered by backing trainer.

MIDI File

The MIDI file is an usual midi file with all the tracks to be played (the front track will not be played usually as it is off). Regarding the front track of the midi file it is very important that it fits exactly with the score. All the notes of the front track played at the midi file need to exist at the score to render it properly.

MP3 File (optional)

Yes, it is possible to add a MP3 file for those cases where the midi is too complex, or we need an high quality backing track. Contact us in the issues panel if you want to add a mp3 file instead a midi file. Anyway, "Agua de Beber" is a good example of that.

So, suply us the 2 files (xml and midi/mp3) and the info schema at the issues page. We will try to add it to the github repository as soon as possible. But, remember, create the issue before to talk us your intention in order to check our avaibility and other issues.

Thanks!!

How to Include new Compositions (The hard way)

This is our prefered way 😄. But for that you will need to clone the repository, make the changes (described before) at the compositions branch and make a pull request. You have a lot of documentation about this here, but you can allways ask us in the issues panel how to do it.