Description
Generate caller-defined percussion lanes on a fixed integer subdivision grid with Bernoulli hits, inclusive MIDI velocities, explicit rests and delegated quarter-tempo/PPQN timing; no audio, MIDI file or percussion-map assumptions.
A musical fixture expresses pitch or timing through explicit numeric conventions such as MIDI numbers, semitone intervals, beats, and durations. A reproducible symbolic sequence is separate from a performed sound or a judgment of musical quality.
Generate caller-defined percussion lanes on a fixed integer subdivision grid with Bernoulli hits, inclusive MIDI velocities, explicit rests and delegated quarter-tempo/PPQN timing; no audio, MIDI file or percussion-map assumptions.
When to use this tool
Use this generator to create reproducible drum pattern cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.
How to use the tool and how it works
- Supply bars, meterNumerator, meterDenominator, subdivisionsPerQuarter, pulsesPerQuarter, beatsPerMinute, lanes, minimumVelocity, maximumVelocity in the field shapes below. Set seed when you need an explicit replay.
- Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
- Read lanes, velocityGrid, hits, totalSteps, totalTicks, stepDurationSeconds, durationSeconds, microsecondsPerPulse. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.
Derive a finite step grid from meter, bars, and subdivisions. Draw each lane's hit flag and positive velocity, convert steps to ticks and nominal seconds, and return the velocity matrix plus time-ordered hits and MIDI clock timing.1
Delegated operations used for this result: midi clock us per quarter ppqn. Their calculation or parsing conventions apply to the corresponding result fields.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| bars | Bars | Required. Safe integer; minimum 1; maximum 16. |
| meterNumerator | Meter Numerator | Required. Safe integer; minimum 1; maximum 16. |
| meterDenominator | Meter Denominator | Required. Safe integer; one of 1, 2, 4, 8, 16. |
| subdivisionsPerQuarter | Subdivisions Per Quarter | Required. Safe integer; minimum 1; maximum 24. |
| pulsesPerQuarter | Pulses Per Quarter | Required. Safe integer; minimum 1. |
| beatsPerMinute | Beats Per Minute | Required. Finite number; strictly above 0. |
| lanes | Lanes | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 16. |
| lanes[].id | Literal identifier used independently of display labels. | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| lanes[].midiNote | Midi Note | Required. Safe integer; minimum 0; maximum 127. |
| lanes[].hitProbability | Hit Probability | Required. Finite number; minimum 0; maximum 1. |
| minimumVelocity | Minimum Velocity | Required. Safe integer; minimum 1; maximum 127. |
| maximumVelocity | Maximum Velocity | Required. Safe integer; minimum 1; maximum 127. |
| seed | Optional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed. | Optional. Safe integer. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| lanes | Lanes | Required. Array of Object; no unknown keys.; minimum items 1; maximum items 16. |
| lanes[].id | Literal identifier used independently of display labels. | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| lanes[].midiNote | Midi Note | Required. Safe integer; minimum 0; maximum 127. |
| lanes[].hitProbability | Hit Probability | Required. Finite number; minimum 0; maximum 1. |
| velocityGrid | Velocity Grid | Required. Array of Array of Safe integer; minimum 0; maximum 127.; minimum items 1; maximum items 4096.; minimum items 1; maximum items 16. |
| hits | Hits | Required. Array of Object; no unknown keys.; maximum items 4096. |
| hits[].laneId | Lane Id | Required. Text; minimum UTF-16 length 1; maximum UTF-16 length 64. |
| hits[].midiNote | Midi Note | Required. Safe integer; minimum 0; maximum 127. |
| hits[].step | Step | Required. Safe integer; minimum 0; maximum 4095. |
| hits[].tick | Tick | Required. Safe integer; minimum 0. |
| hits[].onsetSeconds | Onset Seconds | Required. Finite number; minimum 0. |
| hits[].velocity | Velocity | Required. Safe integer; minimum 1; maximum 127. |
| totalSteps | Total Steps | Required. Safe integer; minimum 1; maximum 4096. |
| totalTicks | Total Ticks | Required. Safe integer; minimum 1. |
| stepDurationSeconds | Step Duration Seconds | Required. Finite number; strictly above 0. |
| durationSeconds | Duration Seconds | Required. Finite number; strictly above 0. |
| microsecondsPerPulse | Microseconds Per Pulse | Required. Finite number; strictly above 0. |
| randomness | Replay source and normalized 32-bit seed, or null seed for an advancing context source. | Required. Object; no unknown keys. |
| randomness.seed | Optional safe-integer replay seed; normalization and precedence are explained below. | Required. Safe integer. or Null. |
| randomness.source | Source | Required. Text; one of "context", "seed". |
An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.
{
"input": {
"bars": 1,
"meterNumerator": 4,
"meterDenominator": 4,
"subdivisionsPerQuarter": 2,
"pulsesPerQuarter": 24,
"beatsPerMinute": 120,
"lanes": [
{
"id": "kick",
"midiNote": 36,
"hitProbability": 0.6
},
{
"id": "snare",
"midiNote": 38,
"hitProbability": 0.3
}
],
"minimumVelocity": 60,
"maximumVelocity": 100,
"seed": 42
},
"output": {
"lanes": [
{
"id": "kick",
"midiNote": 36,
"hitProbability": 0.6
},
{
"id": "snare",
"midiNote": 38,
"hitProbability": 0.3
}
],
"velocityGrid": [
[
0,
94,
0,
81,
85,
0,
70,
0
],
[
0,
0,
80,
0,
0,
79,
0,
84
]
],
"hits": [
{
"laneId": "kick",
"midiNote": 36,
"step": 1,
"tick": 12,
"onsetSeconds": 0.25,
"velocity": 94
},
{
"laneId": "snare",
"midiNote": 38,
"step": 2,
"tick": 24,
"onsetSeconds": 0.5,
"velocity": 80
},
{
"laneId": "kick",
"midiNote": 36,
"step": 3,
"tick": 36,
"onsetSeconds": 0.75,
"velocity": 81
},
{
"laneId": "kick",
"midiNote": 36,
"step": 4,
"tick": 48,
"onsetSeconds": 1,
"velocity": 85
},
{
"laneId": "snare",
"midiNote": 38,
"step": 5,
"tick": 60,
"onsetSeconds": 1.25,
"velocity": 79
},
{
"laneId": "kick",
"midiNote": 36,
"step": 6,
"tick": 72,
"onsetSeconds": 1.5,
"velocity": 70
},
{
"laneId": "snare",
"midiNote": 38,
"step": 7,
"tick": 84,
"onsetSeconds": 1.75,
"velocity": 84
}
],
"totalSteps": 8,
"totalTicks": 96,
"stepDurationSeconds": 0.25,
"durationSeconds": 2,
"microsecondsPerPulse": 20833.333333333332,
"randomness": {
"seed": 42,
"source": "seed"
}
}
} Limitations and assumptions
- PPQN must divide cleanly by subdivisions and total steps/ticks must fit budgets. The result is symbolic data, not a MIDI file, synthesized audio, or a guarantee of rhythmic or instrumental suitability.
- A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
- The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.
Alternative or Complementary methods
For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.
References
Similar or alternative tools
- Random Cadence Chord Progression Generator
Sample supplied reviewed progression templates into target keys with delegated spelling-aware transposition and elementary cadence labels.
- Sequential Pattern Mining Tool
Mine bounded frequent ordered subsequences of single-event string sequences using prefix projection, allowing arbitrary gaps and repeated events and counting each source sequence at most once per pattern.