My controller outputs in the key of C major. I'm not sure what your use case for generating all major or minor chords, but note that a minor key does not always use minor chords, and a major key does not always use major chords! For minor triads, just add 3 to get the minor third, and 7 to get the perfect fifth. You already have the formula for generating major triads.
Is there a way to generate all major ( or minor ) triads for any given root note? The formula for each type of chord in terms of number of semitones is always the same. Another way of looking at this is that the diatonic scale 'skips' some notes in the chromatic scale, which is why you get different numbers of semitones, and why triads based on different degrees of a major scale are sometimes major, sometimes minor.īut MIDI note numbers aren't based on degrees of the diatonic scale - they're purely numbers of semitones. For example, on the major scale, the third between degrees 1 and 3 is a major third, and the third between 2 and 4 is a minor third. When you talk about "major or minor depending on the starting note", maybe you are thinking of intervals between degrees of the diatonic scale, like 'a third', which can have different sizes. However, I don't think it works like that because adding a fixed number will result in a major or minor triad depending on the starting note.ĭon't worry, it does work like that - starting with a root note and adding intervals with a fixed number of semitones, which is what the MIDI note numbers represent, will always result in the same chord. As I understand it the fifth is generated by always adding seven to the MIDI note number, and the third is generated by adding four.Ĭorrect - even more specifically, the perfect fifth is generated by always adding seven to the MIDI note number, and the major third is generated by adding four.