Complex Timeline

Complex Timeline

Below is an example of a rather complicated timeline. This demonstrates how one might specify many optional parameters in order to create highly customized music. If you are unfamiliar with how to work with finding entities such as Descriptors, applicable Instruments, Scale Qualities, etc., please refer to an applicable example.

Note: The following example is annotated with comments for clarity and therefore is not valid JSON in its current form! In order to submit this as a request either remove the comments or use the uncommented version provided here.

{
    // Optional metadata
    "meta": {
        "notes": "A complex timeline example"
    },

    // Seed for the random number generator, remove if you want a different
    // piece of music every time you render
    "random_seed": 1337,

    // Spans
    "spans": [

        // First span = "metered"
        {
            "id": 100,
            "type": "metered",
            "time": 0,

            // Starting tempo is 100 BPM
            "tempo": 100,

            // Actions
            "actions": [

                // Add a 30 second region of "rock_indie_confident" in the key
                // of C Aeolian starting at 0 seconds
                {
                    "time": 0,
                    "add_region": {
                        "id": 101,
                        "descriptor": "rock_indie_confident",
                        "cut_at": 30,
                        "key": {
                            "tonic": "c",
                            "quality": "aeolian"
                        }
                    }
                },

                // Set the starting instruments at 0 seconds
                {
                    "time": 0,
                    "set_instruments": [
                        "airy_ludwig_22in_kick_hard_beater_snare_off",
                        "airy_ludwig_prepared_snare_stick",
                        "airy_zildjian_crash_medium_18inch",
                        "airy_zildjian_hihat_15inch",
                        "big_stand_tambourine",
                        "roomy_egg_shaker",
                        "telecaster_overdrive",
                        "thick_picked_jbass"
                    ]
                },

                // Start a tempo ramp at 20 seconds and ending at 30 seconds
                // (100 BPM -> 120 BPM)
                {
                    "time": 20,
                    "ramp_until": 30,
                    "ramp_tempo": 120
                },

                // Add more instruments at 25 seconds. Remember that
                // "add_instruments" only adds instruments; it does not affect
                // instruments that were already playing. If you want to replace
                // the active instruments with others, use "set_instruments".
                {
                    "time": 25,
                    "add_instruments": [
                        "chill_organ",
                        "chorus_picked_jbass",
                        "modern_black_beauty_rock_snare_stick",
                        "modern_clubdate_20in_kick_hard_beater_snare_off",
                        "modern_zildjian_crash_dark_18inch",
                        "modern_zildjian_hihat_14inch",
                        "telecaster_clean",
                        "wide_wood_shaker"
                    ]
                },

                // Add a 30 second region of "rock_indie_confident" in the key
                // of C# Aeolian starting at 30 seconds
                {
                    "time": 30,
                    "add_region": {
                        "id": 102,
                        "descriptor": "rock_indie_confident",
                        "cut_at": 60,
                        "key": {
                            "tonic": "cis",
                            "quality": "aeolian"
                        }
                    }
                },

                // Start a tempo ramp at 50 seconds and ending at 60 seconds
                // (120 BPM -> 140 BPM)
                {
                    "time": 50,
                    "ramp_until": 60,
                    "ramp_tempo": 140
                },

                // Add more instruments at 55 seconds
                {
                    "time": 55,
                    "add_instruments": [
                        "airy_ludwig_26in_kick_hard_beater_snare_off",
                        "airy_tama_brass_snare_stick",
                        "bright_wood_shaker",
                        "tight_p_bass",
                        "tornado_chaser_synth_pad"
                    ]
                },

                // Add a 30 second region of "rock_indie_confident" in the key
                // of D Aeolian starting at 60 seconds
                {
                    "time": 60,
                    "add_region": {
                        "id": 103,
                        "descriptor": "rock_indie_confident",
                        "cut_at": 90,
                        "key": {
                            "tonic": "d",
                            "quality": "aeolian"
                        }
                    }
                },

                // Start a tempo ramp at 80 seconds and ending at 90 seconds
                // (140 BPM -> 160 BPM)
                {
                    "time": 80,
                    "ramp_until": 90,
                    "ramp_tempo": 160
                },

                // Add more instruments at 85 seconds
                {
                    "time": 85,
                    "add_instruments": [
                        "big_five_string_bass",
                        "close_gretsch_22in_kick_soft_beater_snare_off",
                        "close_supraphonic_snare_stick",
                        "close_zildjian_hihat_14inch",
                        "studio_stand_tambourine"
                    ]
                },

                // Add a 30 second region of "rock_indie_confident" in the key
                // of D# Aeolian starting at 90 seconds
                {
                    "time": 90,
                    "add_region": {
                        "id": 104,
                        "descriptor": "rock_indie_confident",
                        "cut_at": 120,
                        "key": {
                            "tonic": "dis",
                            "quality": "aeolian"
                        }
                    }
                }
            ]
        },

        // Second span = "unmetered". Remember that the final span MUST be
        // "unmetered" for any timeline.
        {
            "id": 200,
            "type": "unmetered",
            "time": 120
        }
    ],
    "unmetered_hits": [

        // Play a "cymbal_crash" when the tempo starts to ramp at 20 seconds
        {
            "time": 20,
            "hit": "cymbal_crash"
        },

        // Play a "cymbal_swell_500ms" when a new region starts at 30 seconds
        {
            "time": 30,
            "hit": "cymbal_swell_500ms"
        },

        // Play a "cymbal_crash" when the tempo starts to ramp at 50 seconds
        {
            "time": 50,
            "hit": "cymbal_crash"
        },

        // Play a "cymbal_swell_500ms" when a new region starts at 60 seconds
        {
            "time": 60,
            "hit": "cymbal_swell_500ms"
        },

        // Play a "cymbal_crash" when the tempo starts to ramp at 80 seconds
        {
            "time": 80,
            "hit": "cymbal_crash"
        },

        // Play a "cymbal_swell_500ms" when a new region starts at 90 seconds
        {
            "time": 90,
            "hit": "cymbal_swell_500ms"
        },

        // Play a "cymbal_crash" when the region starts to end at 110 seconds
        {
            "time": 110,
            "hit": "cymbal_crash"
        }
    ]
}