Skip to content

Support min/max ranges for note mappings #116

Open

Description

@cpmpercussion

Split out from #36.

Ranges now work for CC mappings in both directions: ["control_change", channel, controller, min, max] scales output into [min, max], and on input clamps and maps back to 0–1 (#105, #104). Note mappings don't support ranges yet.

The main use case is limiting the pitch range of note output, e.g. keeping a melody inside two octaves, or a drum machine that only responds to a few notes. On input, the same range would map a small keyboard or pad controller onto the full 0–1 dimension.

Format needs care, since ["note_on", channel, velocity] already means a fixed output velocity (#108). One option that parallels CCs is ["note_on", channel, velocity, min, max], with the same behaviour as ranged CCs:

  • Output: round(min + value * (max - min)).
  • Input: clamp the note to [min, max], then (note - min) / (max - min), with min == max giving 0.

Config changes should be careful here: docs/config.md, the example configs, the conformance vectors and impsy-auv3/impsy-web all need to agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions