Skip to content

Add chord transposition functionality #3

@KaykCaputo

Description

@KaykCaputo

Description

Allow users to transpose chords up or down to match their vocal range or capo position. This is a common feature in songbook applications.

User Story

As a musician, I want to transpose song chords to different keys so that I can play songs in a comfortable range for my voice or instrument.

Proposed UI

Add buttons to the lyrics screen:

  • ➕ Transpose up (semitone)
  • ➖ Transpose down (semitone)
  • 🔄 Reset to original key

Implementation Approach

  1. Parse chords from the displayed content
  2. Map chords to semitone values
  3. Apply transposition algorithm
  4. Update displayed chords

Chord Mapping Example

CHORD_MAP = {
    'C': 0, 'C#': 1, 'Db': 1, 'D': 2, 'D#': 3, 'Eb': 3,
    'E': 4, 'F': 5, 'F#': 6, 'Gb': 6, 'G': 7, 'G#': 8,
    'Ab': 8, 'A': 9, 'A#': 10, 'Bb': 10, 'B': 11
}

def transpose_chord(chord, semitones):
    # Extract root note, handle modifiers (m, 7, sus, etc.)
    # Apply transposition
    # Return transposed chord
    pass

Considerations

  • Support for different chord notations (English vs Latin)
  • Handle complex chords (7th, sus, add, etc.)
  • Preserve chord formatting
  • Consider using the existing guitar.json database

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions