Return the triad on note in key as a list. Examples: >>> triad('E', 'C') ['E', 'G', 'B'] >>> triad('E', 'B') ['E', 'G#', 'B']
(note, key)
| 166 | |
| 167 | |
| 168 | def triad(note, key): |
| 169 | """Return the triad on note in key as a list. |
| 170 | |
| 171 | Examples: |
| 172 | >>> triad('E', 'C') |
| 173 | ['E', 'G', 'B'] |
| 174 | >>> triad('E', 'B') |
| 175 | ['E', 'G#', 'B'] |
| 176 | """ |
| 177 | return [note, intervals.third(note, key), intervals.fifth(note, key)] |
| 178 | |
| 179 | |
| 180 | def triads(key): |