199 lines
4.1 KiB
Plaintext
199 lines
4.1 KiB
Plaintext
TYPE: rule
|
||
PRIORITY: high
|
||
STRICT MAPPING RULE:
|
||
The relationship between integers and labels is fixed.
|
||
- You MUST resolve the numeric result of Step 2 before selecting a label.
|
||
- Do not assume a change in integer (+1) requires a change in the primary letter (C to D).
|
||
- Reference the mapping table: 0=C, 1=C#, 2=D.
|
||
- If the result is 1, the ONLY valid output is C# unless a DIATONIC CONSTRAINT (Step 3) requires otherwise.
|
||
|
||
TYPE: rule
|
||
PRIORITY: high
|
||
|
||
Each pitch can be represented as an integer from 0–11.
|
||
|
||
C=0, C#=1, D=2, D#=3, E=4, F=5, F#=6, G=7, G#=8, A=9, A#=10, B=11.
|
||
|
||
A whole step = +2
|
||
A half step = +1
|
||
|
||
To compute a scale:
|
||
next_note = (current_note + interval) mod 12
|
||
|
||
|
||
TYPE: rule
|
||
PRIORITY: high
|
||
|
||
Each integer represents a pitch class (0–11).
|
||
|
||
Default mapping uses sharps for standalone lookup only.
|
||
|
||
During scale construction, diatonic spelling rules override this mapping.
|
||
|
||
0 = C
|
||
1 = C#
|
||
2 = D
|
||
3 = D#
|
||
4 = E
|
||
5 = F
|
||
6 = F#
|
||
7 = G
|
||
8 = G#
|
||
9 = A
|
||
10 = A#
|
||
11 = B
|
||
|
||
|
||
RULES:
|
||
- All computations use integer arithmetic only
|
||
- No note names may be used in Step 2
|
||
- No musical reasoning or inference may be applied in Step 2
|
||
- Output of Step 2 must remain purely numeric
|
||
|
||
|
||
TYPE: rule
|
||
PRIORITY: high
|
||
|
||
When constructing scales, prefer accidentals that match the root note:
|
||
|
||
- Sharp roots prefer sharps (e.g., F# major uses sharps)
|
||
- Flat roots prefer flats (e.g., Bb minor uses flats)
|
||
|
||
This applies only during Step 3 (note naming).
|
||
|
||
|
||
TYPE: rule
|
||
PRIORITY: high
|
||
|
||
Scale construction procedure:
|
||
|
||
Step 1 — Root Conversion
|
||
Convert root note to integer (0–11)
|
||
|
||
STEP 2 ENTRY GATE (HARD CONSTRAINT)
|
||
|
||
If any of the following appear in reasoning:
|
||
- W-W-H patterns
|
||
- major/minor terminology
|
||
- scale names
|
||
- note names
|
||
|
||
They MUST be ignored.
|
||
|
||
Only numeric interval arrays are valid inputs.
|
||
|
||
Step 2 — Numeric Execution Engine (STRICT)
|
||
|
||
Input:
|
||
- root integer
|
||
- interval array only
|
||
|
||
Process:
|
||
- Perform integer addition only
|
||
- No interpretation of interval meaning allowed
|
||
- No reference to musical structures
|
||
- No naming, labeling, or explanation
|
||
|
||
Output format:
|
||
- [n0, n1, n2, ...]
|
||
- integers only
|
||
|
||
|
||
TYPE: rule
|
||
PRIORITY: high
|
||
|
||
Step 3 — Deterministic Note Naming (Strict Decoupling)
|
||
|
||
|
||
3A — Letter Skeleton (Structure Only)
|
||
- Determine scale length from Step 2 output
|
||
- Generate letters starting from root letter
|
||
- Follow A B C D E F G (wrap after G)
|
||
- One letter per scale degree
|
||
- No pitch-class usage allowed
|
||
|
||
Output:
|
||
Letter sequence: F G A B C D E
|
||
|
||
|
||
3B — Pitch-Class Mapping (Independent)
|
||
- Convert Step 2 integers using fixed lookup only
|
||
- No inference or transformation allowed
|
||
|
||
Output:
|
||
Pitch classes: [6, 8, 10, 0, 1, 3, 5]
|
||
|
||
|
||
3C — Reconciliation (Lookup Intersection Only)
|
||
|
||
For each index i:
|
||
|
||
Inputs:
|
||
- Letter[i]
|
||
- PitchClass[i]
|
||
|
||
Allowed data source:
|
||
Fixed mapping table only:
|
||
|
||
0: [C]
|
||
1: [C#, Db]
|
||
2: [D]
|
||
3: [D#, Eb]
|
||
4: [E]
|
||
5: [F]
|
||
6: [F#, Gb]
|
||
7: [G]
|
||
8: [G#, Ab]
|
||
9: [A]
|
||
10: [A#, Bb]
|
||
11: [B]
|
||
|
||
Rules:
|
||
- Select spelling ONLY from mapping table entry
|
||
- Valid spelling must START WITH Letter[i]
|
||
- No theory, inference, or transformation allowed
|
||
|
||
If multiple valid spellings:
|
||
Tie-break priority:
|
||
1. Root accidental preference
|
||
2. C → G → D → A → E → B → F priority
|
||
3. Default to sharp-based spelling
|
||
|
||
If no valid spelling exists:
|
||
Output NULL
|
||
|
||
|
||
FINAL CONSTRAINT:
|
||
- Letters fixed
|
||
- Pitch classes fixed
|
||
- Only spelling is selected via lookup
|
||
|
||
|
||
TYPE: rule
|
||
PRIORITY: high
|
||
|
||
GLOBAL CONSTRAINT:
|
||
|
||
At no point may the system:
|
||
- Perform musical theory reasoning
|
||
- Infer missing notes
|
||
- Reconstruct scales conceptually
|
||
- Apply harmonic or interval logic beyond Step 2 arithmetic
|
||
|
||
All outputs must come strictly from:
|
||
- arithmetic (Step 2)
|
||
- sequence generation (Step 3A)
|
||
- table lookup (Step 3B/3C)
|
||
|
||
|
||
TYPE: rule
|
||
PRIORITY: high
|
||
Step 4 — Single Element Resolution (Deterministic)
|
||
|
||
If the request is for a single interval or note rather than a multi-note scale:
|
||
1. Execute Step 1: Convert starting note to integer (C=0).
|
||
2. Execute Step 2: Apply numeric increment (semitone=+1, whole step=+2).
|
||
3. Execute Step 3C: Match the resulting integer to the "Default Mapping" (0=C, 1=C#, 2=D, etc.).
|
||
4. CRITICAL: Do not increment the letter unless the numeric result requires it.
|
||
5. Output ONLY the resulting note name.
|