Sorry for the very basic question, but my only experience comes from using DAW software.
The rule I use to create a triad is playing three notes at {0,4,7}
semitones for a major chord and {0,3,7}
semitones for a minor chord. I apply the same rules for other degree of the scale, ie starting from E instead of C. This is quite easy to do in a piano roll. The question is, does this rule apply on any degree and on any scale?