Table of Contents

ARR Load Policy (APS)

This document defines the ARR loading policy for APS (Ardule Pattern Studio). It specifies how a source ARR is applied to the currently edited chain (target), including chain entries, sections, and metadata handling.


0. Terminology


1. Core Principles

  1. ARR loading is treated as inserting or appending the source chain into the target chain.
  2. The chain itself is a linear time axis without implicit loops.
  3. Sections are metadata only and must not break the chain structure.
  4. ARR loading should always succeed if possible; conflicts are resolved by renaming and offsetting, not by rejection or silent overwrite.

2. Chain Entry Handling

2.1 Filename integrity (P/B/H suffix)

APS treats the referenced pattern filename as an opaque identifier during ARR load. In particular, suffix conventions such as:

MUST be preserved exactly as they appear in the source ARR. ARR loading MUST NOT rewrite these suffixes, normalize them, or edit the referenced ADT files.

Note: Actual 1-bar playback behavior is determined at playback time by the ADT load policy (e.g., PLAY_BARS=1 in the ADT header, with _H### as a fallback hint).

2.2 Insertion positions


3. Target Section Handling (Split Rule)

Existing sections in the target are processed relative to the insertion point ins.

3.1 Sections Completely Before the Insertion Point

Condition:

section.end < ins

3.2 Sections Covering the Insertion Point (Split)

Condition:

section.start < ins <= section.end

Given an original section:

S = [a .. b]

It is replaced by two sections:

The original section S is removed.


3.3 Sections Completely After the Insertion Point

Condition:

section.start >= ins

4. Source Section Handling (Import Rule)

All sections defined in the source ARR are imported into the target.

4.1 Name Prefix

i_

Examples:

This prefix unconditionally marks imported sections.


4.2 Range Offset


4.3 Name Uniqueness

This guarantees uniqueness without merging semantics.


5. #PLAY Handling


6. Validation and Error Handling


7. Policy Summary

ARR loading applies the source chain to the target chain via insertion or append.
Target sections crossing the insertion point are split into _L and _R.
Source sections are imported with an i_ prefix and offset ranges.
Section conflicts are resolved by renaming, not merging.
Pattern filenames (including P/B/H suffixes) are preserved as-is during load.
The chain load operation should succeed whenever possible.

Last updated: 2026-01-03