Create a song template

Our engine excels at generating original musical ideas. Sometimes it lacks some structure like long term dependencies and musical events.

We think that those missing parts should be brought by an artist. In the end, a MusicLang track will always be a co-creation between the artist and our engine.

We propose a high-level textual representation of a musical piece called MusicLang Template which ****standardize a macro description of a song. This template is then used by our engine to generate a thousand songs on this template.

Here is an example a raw song template used by MusicLang to generate music. We will try to break it down afterward to explain how to write a clean one.

{
		"description": "A small 4 chord piece with a strong bass line composed of a       fretless bass and doubled by a contrabass. An ocarina plays a very dense melody in the second part",
    "tonality": "a",
    "tempo": 121,
    "time_signature": [
        4,
        4
    ],
    "chords": [
        {
            "orchestration": [
                {
                    "instrument_name": "fretless_bass",
                    "instrument_voice": 0,
                    "amplitude": "mf",
                    "octave": -3,
                    "density": 1.54
                },
                {
                    "instrument_name": "contrabass",
                    "instrument_voice": 0,
                    "amplitude": "mf",
                    "octave": -3,
                    "density": 1.29
                },
                {
                    "instrument_name": "clavi",
                    "instrument_voice": 0,
                    "amplitude": "mf",
                    "octave": -3,
                    "density": 1.03
                },
								{
                    "instrument_name": "clavi",
                    "instrument_voice": 1,
                    "amplitude": "mf",
                    "octave": -3,
                    "density": 1.03
                }
            ],
            "chord": "I"
        },
        {
            "orchestration": [
                {
                    "instrument_name": "fretless_bass",
                    "instrument_voice": 0,
                    "amplitude": "f",
                    "octave": -3,
                    "density": 2.5
                },
                {
                    "instrument_name": "contrabass",
                    "instrument_voice": 0,
                    "amplitude": "f",
                    "octave": -3,
                    "density": 2.75
                },
                {
                    "instrument_name": "clavi",
                    "instrument_voice": 0,
                    "amplitude": "f",
                    "octave": -3,
                    "density": 3.0
                }
            ],
            "chord": "V/V"
        },
        {
            "orchestration": [
                {
                    "instrument_name": "fretless_bass",
                    "instrument_voice": 0,
                    "amplitude": "f",
                    "octave": -2,
                    "density": 0.5
                },
                {
                    "instrument_name": "contrabass",
                    "instrument_voice": 0,
                    "amplitude": "f",
                    "octave": -2,
                    "density": 0.5
                },
                {
                    "instrument_name": "ocarina",
                    "instrument_voice": 0,
                    "amplitude": "ff",
                    "octave": 0,
                    "density": 4.0
                }
            ],
            "chord": "V7"
        },
        {
            "orchestration": [
                {
                    "instrument_name": "fretless_bass",
                    "instrument_voice": 0,
                    "amplitude": "f",
                    "octave": -2,
                    "density": 0.5
                },
                {
                    "instrument_name": "contrabass",
                    "instrument_voice": 0,
                    "amplitude": "f",
                    "octave": -2,
                    "density": 0.5
                },
                {
                    "instrument_name": "ocarina",
                    "instrument_voice": 0,
                    "amplitude": "ff",
                    "octave": 1,
                    "density": 4.0
                }
            ],
            "chord": "i"
        }
    ]
}

If it does not make sense right now it is perfectly normal let’s deep dive on this document step by step.

Song Metadata

{
		"description": "A small 4 chord piece in a minor with a strong bass line featuring a fretless bass doubled by a contrabass. An ocarina plays a very dense melody in the second part",
    "tonality": "a",
    "tempo": 121,
		"time_signature": [
        4,
        4
    ]
}

The metadata is a global description of the song’s characteristics. It features an important textual description that explains what’s the song is about and some musical information such as the tonality, tempo and time signature.