head_music 9.0.1 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +9 -3
- data/CHANGELOG.md +18 -0
- data/CLAUDE.md +35 -15
- data/Gemfile +7 -1
- data/Gemfile.lock +91 -3
- data/README.md +18 -0
- data/Rakefile +7 -2
- data/head_music.gemspec +1 -1
- data/lib/head_music/analysis/dyad.rb +229 -0
- data/lib/head_music/analysis/melodic_interval.rb +1 -1
- data/lib/head_music/analysis/pitch_class_set.rb +111 -14
- data/lib/head_music/analysis/{pitch_set.rb → pitch_collection.rb} +11 -5
- data/lib/head_music/analysis/sonority.rb +50 -12
- data/lib/head_music/content/staff.rb +1 -1
- data/lib/head_music/content/voice.rb +1 -1
- data/lib/head_music/instruments/alternate_tuning.rb +102 -0
- data/lib/head_music/instruments/alternate_tunings.yml +78 -0
- data/lib/head_music/instruments/instrument.rb +251 -82
- data/lib/head_music/instruments/instrument_configuration.rb +66 -0
- data/lib/head_music/instruments/instrument_configuration_option.rb +38 -0
- data/lib/head_music/instruments/instrument_configurations.yml +288 -0
- data/lib/head_music/instruments/instrument_families.yml +77 -0
- data/lib/head_music/instruments/instrument_family.rb +3 -4
- data/lib/head_music/instruments/instruments.yml +795 -965
- data/lib/head_music/instruments/playing_technique.rb +75 -0
- data/lib/head_music/instruments/playing_techniques.yml +826 -0
- data/lib/head_music/instruments/score_order.rb +2 -5
- data/lib/head_music/instruments/staff.rb +61 -1
- data/lib/head_music/instruments/staff_scheme.rb +6 -4
- data/lib/head_music/instruments/stringing.rb +115 -0
- data/lib/head_music/instruments/stringing_course.rb +58 -0
- data/lib/head_music/instruments/stringings.yml +168 -0
- data/lib/head_music/instruments/variant.rb +0 -1
- data/lib/head_music/locales/de.yml +23 -0
- data/lib/head_music/locales/en.yml +100 -0
- data/lib/head_music/locales/es.yml +23 -0
- data/lib/head_music/locales/fr.yml +23 -0
- data/lib/head_music/locales/it.yml +23 -0
- data/lib/head_music/locales/ru.yml +23 -0
- data/lib/head_music/{rudiment → notation}/musical_symbol.rb +3 -3
- data/lib/head_music/notation/staff_mapping.rb +70 -0
- data/lib/head_music/notation/staff_position.rb +62 -0
- data/lib/head_music/notation.rb +7 -0
- data/lib/head_music/rudiment/alteration.rb +17 -47
- data/lib/head_music/rudiment/alterations.yml +32 -0
- data/lib/head_music/rudiment/chromatic_interval.rb +1 -1
- data/lib/head_music/rudiment/clef.rb +1 -1
- data/lib/head_music/rudiment/consonance.rb +14 -13
- data/lib/head_music/rudiment/key_signature.rb +0 -26
- data/lib/head_music/rudiment/rhythmic_unit/parser.rb +2 -2
- data/lib/head_music/rudiment/rhythmic_value/parser.rb +1 -1
- data/lib/head_music/rudiment/rhythmic_value.rb +1 -1
- data/lib/head_music/rudiment/spelling.rb +3 -0
- data/lib/head_music/rudiment/tempo.rb +1 -1
- data/lib/head_music/rudiment/tuning/just_intonation.rb +0 -39
- data/lib/head_music/rudiment/tuning/meantone.rb +0 -39
- data/lib/head_music/rudiment/tuning/pythagorean.rb +0 -39
- data/lib/head_music/rudiment/tuning.rb +20 -0
- data/lib/head_music/style/guidelines/consonant_climax.rb +2 -2
- data/lib/head_music/style/modern_tradition.rb +8 -11
- data/lib/head_music/style/tradition.rb +1 -1
- data/lib/head_music/time/clock_position.rb +84 -0
- data/lib/head_music/time/conductor.rb +264 -0
- data/lib/head_music/time/meter_event.rb +37 -0
- data/lib/head_music/time/meter_map.rb +173 -0
- data/lib/head_music/time/musical_position.rb +188 -0
- data/lib/head_music/time/smpte_timecode.rb +164 -0
- data/lib/head_music/time/tempo_event.rb +40 -0
- data/lib/head_music/time/tempo_map.rb +187 -0
- data/lib/head_music/time.rb +32 -0
- data/lib/head_music/utilities/case.rb +27 -0
- data/lib/head_music/utilities/hash_key.rb +1 -1
- data/lib/head_music/version.rb +1 -1
- data/lib/head_music.rb +41 -13
- data/user_stories/active/string-pitches.md +41 -0
- data/user_stories/backlog/notation-style.md +183 -0
- data/user_stories/{todo → backlog}/organizing-content.md +9 -1
- data/user_stories/done/consonance-dissonance-classification.md +117 -0
- data/user_stories/{todo → done}/dyad-analysis.md +4 -6
- data/user_stories/done/expand-playing-techniques.md +38 -0
- data/user_stories/{active → done}/handle-time.rb +5 -19
- data/user_stories/done/instrument-architecture.md +238 -0
- data/user_stories/done/move-musical-symbol-to-notation.md +161 -0
- data/user_stories/done/move-staff-mapping-to-notation.md +158 -0
- data/user_stories/done/move-staff-position-to-notation.md +141 -0
- data/user_stories/done/notation-module-foundation.md +102 -0
- data/user_stories/done/percussion_set.md +260 -0
- data/user_stories/{todo → done}/pitch-class-set-analysis.md +0 -40
- data/user_stories/done/sonority-identification.md +37 -0
- data/user_stories/epics/notation-module.md +135 -0
- data/user_stories/{todo → visioning}/agentic-daw.md +0 -1
- metadata +55 -20
- data/check_instrument_consistency.rb +0 -0
- data/lib/head_music/instruments/instrument_type.rb +0 -188
- data/test_translations.rb +0 -15
- data/user_stories/todo/consonance-dissonance-classification.md +0 -57
- data/user_stories/todo/material-and-scores.md +0 -10
- data/user_stories/todo/percussion_set.md +0 -1
- data/user_stories/todo/pitch-set-classification.md +0 -72
- data/user_stories/todo/sonority-identification.md +0 -67
- /data/user_stories/{active → done}/handle-time.md +0 -0
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Pitch Set Classification
|
|
2
|
-
|
|
3
|
-
As a music theorist
|
|
4
|
-
|
|
5
|
-
I want to classify pitch sets by their size and properties
|
|
6
|
-
|
|
7
|
-
So that I can analyze and categorize harmonic structures
|
|
8
|
-
|
|
9
|
-
Note: A PitchSet is unlike a PitchClassSet in that the pitches have spellings with octaves rather than Spellings only or octave-less 0-11 designations.
|
|
10
|
-
|
|
11
|
-
## Scenario: Get size of pitch set
|
|
12
|
-
|
|
13
|
-
Given I have a pitch set with N pitches
|
|
14
|
-
|
|
15
|
-
When I call the size method
|
|
16
|
-
|
|
17
|
-
Then it should return the number of pitches in the set
|
|
18
|
-
|
|
19
|
-
## Scenario: Identify empty set
|
|
20
|
-
|
|
21
|
-
Given I have no pitches
|
|
22
|
-
|
|
23
|
-
When I create a pitch set
|
|
24
|
-
|
|
25
|
-
Then it should be identified as an EmptySet
|
|
26
|
-
|
|
27
|
-
## Scenario: Identify monad
|
|
28
|
-
|
|
29
|
-
Given I have a single pitch
|
|
30
|
-
|
|
31
|
-
When I check the pitch set type
|
|
32
|
-
|
|
33
|
-
Then it should be identified as a Monad
|
|
34
|
-
|
|
35
|
-
And monad? should return true
|
|
36
|
-
|
|
37
|
-
## Scenario: Identify dyad
|
|
38
|
-
|
|
39
|
-
Given I have exactly two pitches
|
|
40
|
-
|
|
41
|
-
When I check the pitch set type
|
|
42
|
-
|
|
43
|
-
Then it should be identified as a Dyad
|
|
44
|
-
|
|
45
|
-
And dyad? should return true
|
|
46
|
-
|
|
47
|
-
## Scenario: Distinguish triads from trichords
|
|
48
|
-
|
|
49
|
-
Given I have three pitches
|
|
50
|
-
|
|
51
|
-
When I analyze the pitch set
|
|
52
|
-
|
|
53
|
-
Then trichord? should return true for any 3-pitch set
|
|
54
|
-
|
|
55
|
-
And triad? should return true only if they form stacked thirds
|
|
56
|
-
|
|
57
|
-
## Scenario: Identify larger pitch sets
|
|
58
|
-
|
|
59
|
-
Given I have a pitch set with N pitches
|
|
60
|
-
|
|
61
|
-
When I check the classification
|
|
62
|
-
|
|
63
|
-
Then it should be identified as:
|
|
64
|
-
- Tetrachord (4 pitches) with seventh_chord? check
|
|
65
|
-
- Pentachord (5 pitches)
|
|
66
|
-
- Hexachord (6 pitches)
|
|
67
|
-
- Heptachord (7 pitches)
|
|
68
|
-
- Octachord (8 pitches)
|
|
69
|
-
- Nonachord (9 pitches)
|
|
70
|
-
- Decachord (10 pitches)
|
|
71
|
-
- Undecachord (11 pitches)
|
|
72
|
-
- Dodecachord (12 pitches)
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
# Sonority Identification
|
|
2
|
-
|
|
3
|
-
As a music theorist or composer
|
|
4
|
-
|
|
5
|
-
I want to identify and work with named sonorities
|
|
6
|
-
|
|
7
|
-
So that I can analyze and create harmonic structures
|
|
8
|
-
|
|
9
|
-
## Scenario: Get sonority by identifier
|
|
10
|
-
|
|
11
|
-
Given I need a specific sonority
|
|
12
|
-
|
|
13
|
-
When I call Sonority.get with an identifier like "major triad"
|
|
14
|
-
|
|
15
|
-
Then I should receive the corresponding sonority object
|
|
16
|
-
|
|
17
|
-
And it should contain the correct interval structure
|
|
18
|
-
|
|
19
|
-
## Scenario: Identify sonority from pitch set
|
|
20
|
-
|
|
21
|
-
Given I have a set of pitches
|
|
22
|
-
|
|
23
|
-
When I call Sonority.for with the pitch set
|
|
24
|
-
|
|
25
|
-
Then I should receive the identified sonority
|
|
26
|
-
|
|
27
|
-
And it should correctly name the harmonic structure
|
|
28
|
-
|
|
29
|
-
## Scenario: Generate pitch set from sonority
|
|
30
|
-
|
|
31
|
-
Given I have a sonority and a root pitch
|
|
32
|
-
|
|
33
|
-
When I call Sonority.pitch_set_for with root pitch and inversion
|
|
34
|
-
|
|
35
|
-
Then I should receive the correct pitches
|
|
36
|
-
|
|
37
|
-
And they should be in the specified inversion
|
|
38
|
-
|
|
39
|
-
## Scenario: Access sonority from pitch set
|
|
40
|
-
|
|
41
|
-
Given I have a PitchSet object
|
|
42
|
-
|
|
43
|
-
When I call the sonority method
|
|
44
|
-
|
|
45
|
-
Then I should receive the corresponding Sonority object
|
|
46
|
-
|
|
47
|
-
And it should correctly identify the harmonic content
|
|
48
|
-
|
|
49
|
-
## Scenario: Work with triads
|
|
50
|
-
|
|
51
|
-
Given I need to analyze triadic harmony
|
|
52
|
-
|
|
53
|
-
When I work with Triad objects
|
|
54
|
-
|
|
55
|
-
Then I should be able to identify major, minor, diminished, and augmented triads
|
|
56
|
-
|
|
57
|
-
And access their specific properties and methods
|
|
58
|
-
|
|
59
|
-
## Scenario: Work with seventh chords
|
|
60
|
-
|
|
61
|
-
Given I need to analyze seventh chord harmony
|
|
62
|
-
|
|
63
|
-
When I work with SeventhChord objects
|
|
64
|
-
|
|
65
|
-
Then I should be able to identify all common seventh chord types
|
|
66
|
-
|
|
67
|
-
And note that nothing beyond seventh chords is needed to analyze pre-Romantic music
|
|
File without changes
|