Note Event Channel Partition
Partition explicit note events by channel in first-appearance order while retaining event order and numerical evidence.
Description
Partition explicit note events by channel in first-appearance order while retaining event order and numerical evidence.
Channel partitioning separates note-event records without interpreting an audio signal or a MIDI byte stream.
When to use this tool
Partition explicit note events by channel in first-appearance order while retaining event order and numerical evidence.
- Prepare the supplied eventsJson fields for this operation.
- Compare the complete example with the representation used by your own input before carrying the result into another step.
How to use the tool and how it works
- Enter eventsJson. Use the exact text syntax, units and index conventions explained below.
- Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
- Read result.channels. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.
Parse eventsJson with nonnegative integer start/duration, pitch 0 to 127 and channel 0 to 15. Group by channel in first-appearance order and retain event order within each group.1
| Input field | Meaning and representation | Accepted input |
|---|---|---|
| eventsJson | JSON text, entered as one text field. The decoded structure is illustrated below; it is not a separate file. | Text |
For the JSON text fields, the following decoded structures show the example records before they are serialized into input strings. Keep field names, list nesting and value types as shown.
[
{
"field": "eventsJson",
"decoded": [
{
"start": 1,
"duration": 3,
"pitch": 60,
"channel": 0
}
]
}
] | Output field | Interpretation |
|---|---|
| result | Object containing the named outputs below. |
| result.channels | The channels list in the ordering and representation described above. |
{
"input": {
"eventsJson": "[{\"start\":1,\"duration\":3,\"pitch\":60,\"channel\":0}]"
},
"output": {
"result": {
"channels": [
{
"channel": 0,
"events": [
{
"start": 1,
"duration": 3,
"pitch": 60,
"channel": 0
}
]
}
]
}
}
} Limitations and assumptions
- Timing units are caller-defined and must be consistent. The tool does not sort events, synthesize sound or validate a MIDI file.
- Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
- Lists are limited to 128 entries. JSON text must meet bounded size and depth checks, and numeric outputs beyond the safe finite magnitude are rejected. Exact large integers use decimal strings.
- Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.
Alternative or Complementary methods
Retain the tick unit, channel numbering and event-pairing policy with the result. Use a MIDI-file parser or audio analysis when the task requires actual messages, playback behavior or recorded sound.
References
Similar or alternative tools
- Note Event Duration Scaler
Scale note durations by an explicit rational factor while preserving starts, pitch and channel; fractional ticks are allowed and not rounded.
- Note Event Overlap Audit
Audit positive temporal overlap of same-pitch same-channel note events; zero durations and touching endpoints do not overlap.