RPE Chart Utils
    Preparing search index...

    Function validateChart

    • Validate an RPE chart for common structural issues.

      Checks performed:

      • BPM list is non-empty and all BPM values are positive.
      • father references are in range and not self-referential.
      • No circular parent chains.
      • Lines have at least one event layer.
      • Notes have valid type (1–4), above (1 or 2), and non-zero hold length.

      Parameters

      Returns ValidationIssue[]

      Array of ValidationIssue objects (empty = no issues).

      const issues = validateChart(chart);
      const errors = issues.filter(i => i.severity === 'error');
      if (errors.length > 0) {
      console.error('Chart has errors:', errors);
      }