スキル一覧に戻る
EvanMcCormick

adding-scales-chords

by EvanMcCormick

Interactive Music Theory tool

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: adding-scales-chords description: Use when adding new scales, modes, or chord types to MusicTheory - ensures correct interval math, proper categorization, and sharp/flat preferences based on music theory conventions

Adding Scales and Chords

Overview

Scales and chords in this project are defined by their interval structure (semitones from root). Getting intervals wrong breaks the entire musical representation.

Core principle: Verify intervals against authoritative music theory sources before implementing.

When to Use

  • Adding a new scale or mode
  • Adding a new chord type
  • Modifying existing scale/chord intervals
  • Creating a new category of scales/chords

Interval System

Intervals are semitones from root note (0-11):

Interval NameSemitonesExample from C
Unison (Root)0C
Minor 2nd1Db
Major 2nd2D
Minor 3rd3Eb
Major 3rd4E
Perfect 4th5F
Tritone6F#/Gb
Perfect 5th7G
Minor 6th8Ab
Major 6th9A
Minor 7th10Bb
Major 7th11B

Adding a Scale

Location

client/src/app/services/music-theory.service.ts in the appropriate category within UNIFIED_CATEGORIES

Structure

{
  id: 'scale-name-lowercase',
  name: 'Display Name',
  intervals: [0, 2, 4, 5, 7, 9, 11],  // Semitones from root
  preferSharps: true,                  // Sharp or flat key signature
  type: 'scale' as const
}

preferSharps Rules

Key CenterpreferSharpsReason
Major scales (C, G, D, A, E, B)trueNatural sharps in key signature
Flat keys (F, Bb, Eb, Ab)falseNatural flats in key signature
Minor scalesMatch relative major
ModesMatch parent scale
Exotic scalestrue (default)Unless traditionally notated with flats

Common Scale Intervals

// Diatonic Modes (from major scale)
Ionian:     [0, 2, 4, 5, 7, 9, 11]  // Major
Dorian:     [0, 2, 3, 5, 7, 9, 10]
Phrygian:   [0, 1, 3, 5, 7, 8, 10]
Lydian:     [0, 2, 4, 6, 7, 9, 11]
Mixolydian: [0, 2, 4, 5, 7, 9, 10]
Aeolian:    [0, 2, 3, 5, 7, 8, 10]  // Natural Minor
Locrian:    [0, 1, 3, 5, 6, 8, 10]

// Common Variations
Harmonic Minor:  [0, 2, 3, 5, 7, 8, 11]
Melodic Minor:   [0, 2, 3, 5, 7, 9, 11]
Pentatonic Maj:  [0, 2, 4, 7, 9]
Pentatonic Min:  [0, 3, 5, 7, 10]
Blues:           [0, 3, 5, 6, 7, 10]

Adding a Chord

Location

Same file, chord categories within UNIFIED_CATEGORIES

Structure

{
  id: 'chord-name-lowercase',
  name: 'Display Name',
  intervals: [0, 4, 7],     // Semitones from root
  symbol: 'maj',            // Chord symbol suffix
  preferSharps: true,
  type: 'chord' as const
}

Common Chord Intervals

// Triads
Major:      [0, 4, 7]
Minor:      [0, 3, 7]
Diminished: [0, 3, 6]
Augmented:  [0, 4, 8]
Sus2:       [0, 2, 7]
Sus4:       [0, 5, 7]

// Seventh Chords
Major 7th:      [0, 4, 7, 11]
Dominant 7th:   [0, 4, 7, 10]
Minor 7th:      [0, 3, 7, 10]
Diminished 7th: [0, 3, 6, 9]
Half-Dim 7th:   [0, 3, 6, 10]

// Extended Chords
Major 9th:   [0, 4, 7, 11, 14]  // Note: 14 = 2 + 12 (2nd + octave)
Dominant 9th: [0, 4, 7, 10, 14]

Verification Checklist

Before committing any scale/chord addition:

  • Intervals verified against music theory reference (not memory)
  • Root note (0) is first in array
  • Intervals are in ascending order
  • No duplicate intervals
  • preferSharps matches convention
  • Type discriminator is correct ('scale' or 'chord')
  • ID is lowercase with hyphens
  • Name is proper display case
  • Symbol (for chords) follows standard notation
  • Tested by selecting in UI and verifying note display

Common Mistakes

MistakeImpactPrevention
Wrong mode intervalsCompletely wrong notes displayedVerify against reference
Missing root (0)Scale doesn't start on rootAlways include 0 first
Intervals > 11Works but inconsistentUse 0-11, extended intervals wrap
Wrong preferSharpsEnharmonic confusion (C# vs Db)Check key signature conventions

Quick Test

After adding, select the new scale/chord in the UI:

  1. Set root to C
  2. Verify notes match expected (C major = C D E F G A B)
  3. Set root to F# - verify sharps/flats display correctly
  4. Play through to hear if it sounds correct

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です