Create Action

Create Action

The Simple Timeline example demonstrates the minimum amount of information you need to supply in a timeline, provided that you know the Descriptor you are interested in. However that is not always desirable, especially as doing so requires a user to have knowledge of the current entities, which typically implies having a UI to display them and their previews.

The create action attempts to make it possible to request music when you only know something about what you want to hear. This could be a mood (e.g. “happy”) or style (e.g. “hiphop”), both of which are common ways to talk about Descriptors. It could also be an instrument (e.g. “guitar”) that you would like the music to include.

Example minimal timeline using the create action:

{
    "spans": [
        {
            "id": 0,
            "time": 0,
            "type": "metered",
            "actions": [
                {
                    "create": [
                        {
                            "using": "playful"
                        }
                    ]
                }
            ]
        },
        {
            "time": 30,
            "type": "unmetered"
        }
    ]
}

This will create 30 seconds of “playful” music, whatever that may be. The Composer will then look for Descriptors which could be described as “playful”, and choose instrumentation and tempo to match.