-2

I am trying to abstract the building blocks for a Musical Chord for a Music Composition Code Library, I am trying to fit this in a way that complex chords can be created and properly named.

This is one of the main building blocks on the Composition Core, so it must be very well implemented to prevent changing many thing on the future.

So in my head this is how chords work, The chord is composed of the chord factors, the voicing setup and the inversion.

The chord factors are composed by the quality of the chord (Major, Minor, Augmented, Diminished, Sus2 and Sus4), plus the Added Tones (6th, 7th, 9th, 11th and 13th), you can choose multiple Added Tones.

Once the chord factors are defined, you get to choose which note is played on which octave, which note repeats, and even which notes to omit.

Lastly the inversion, this tell us first the lowest note and the note order of the chord. The maximum inversion of a chord is equal to the number of chord factors minus one. So if a chord has 6 notes, it has 5 different inversions.

Chord Structure

Just to be clear, the numbers on the white boxes are the Intervals by semitone.

What do you think about this Musical Chord abstraction, what do you think is missing, or what do you think is wrong?

closed as off-topic by David Bowling, ggcg, Dom Dec 29 '18 at 16:20

  • This question does not appear to be about music practice, performance, composition, technique, theory, or history within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Your question isn't really a question. You are asking us to consult on your project. If you are also a musician then you should have some intuition about how to build this class. Some have commented that your approach is not intuitive. You may want to look up Pat Martino's approach to chord theory. Everything is seeded by the diminished chord and all other generated by moving one or more notes +/1 a half step (or something like that). Then you could have 1 data type and a method in your class that operates on the chord seed. – ggcg Dec 29 '18 at 14:15
  • 1
    But for this reason I am voting to close this. You are not asking a question about music but asking musicians to guide what might be work for hire. Not an appropriate use of a community site. – ggcg Dec 29 '18 at 14:16
  • 2
    I'm voting to close this question as off-topic because the OP is asking us to critique his code design for a chord constructor. I don't think this is a question about music or that the OP is interested in learning music. Rather it seems like he is asking the community to act as consultants and correct, or guide, his code design. Not appropriate. – ggcg Dec 29 '18 at 14:18
  • I can easily see this question rephrased to remove all references of this being for a computer program. Something like "What are the essentials of chord construction?", complete with a rephrased proposal of what the OP thinks the essentials are and an ending asking about what s/he is missing, would likely be the way this would be done. – Dekkadeci Dec 29 '18 at 16:42
  • Thanks, sorry for the bad use of the site, It won't happen again, It is just that there are some many harmony theories, and I got a bit lost, I'll be checking at Martino't approach to Chord Theory, Thanks for pointing that out. – Cheche Romo Dec 29 '18 at 21:20
2

There are also other chords to think about in your abstraction. In the quality you have Triads and Suspensions. To this I might add Clusters and Quartal/Quintal. https://en.wikipedia.org/wiki/Tone_cluster https://en.wikipedia.org/wiki/Quartal_and_quintal_harmony

2

Inputting a diminished 7th chord with your current interface is going to be pretty unintuitive. It won't be easy to remember that, since your interface has no diminished 7th added tone options, I need to add a M6 (major 6th) to my base diminished chord to get a diminished 7th chord.

Also, does your interface support open voicings? You say that "you get to choose which note is played on which octave", but also that "the inversion...tell us first the lowest note and the note order of the chord", implying that I may not be able to order the notes of my first-inversion dominant 7th chord as E-C-G-Bb.

0

This is one of the main building blocks on the Composition Core, so it must be very well implemented to prevent changing many thing on the future.

A general point would be that there are various ways of thinking about how harmony works; thinking in terms of triadic harmony and "named" chords is only one possible way. So by making this part of the core of your application, you are hard-coding it to think about harmony in a certain way. That's not necessarily bad, and I appreciate it is probably intentional.

From a coding point of view, it's a bit of a design 'smell' if you think that changing this will necessitate changing many things in the future; Is it possible to decouple other parts of the codebase from some of the things that you think might change here?

Once the chord factors are defined, you get to choose which note is played on which octave, which note repeats, and even which notes to omit.

I wonder here if you're trying to do too much with one class. A chord is an abstract idea - how the chord is actually played is a more concrete idea, and it also includes things like breaking the chord up into an arpeggio, riff, or ostinato, or sharing the notes between musical parts. Those aspects seem to be the concern of something other than the pure 'definition' of a chord; perhaps they should be dealt with by parts of the code that deal with the arrangement?

Not the answer you're looking for? Browse other questions tagged or ask your own question.