https://github.com/pd3v/diatonic
Diatonic transforms for music making.
https://github.com/pd3v/diatonic
c-plus-plus chords chromatic diatonic intervals keys music notes scales
Last synced: 3 months ago
JSON representation
Diatonic transforms for music making.
- Host: GitHub
- URL: https://github.com/pd3v/diatonic
- Owner: pd3v
- License: gpl-3.0
- Created: 2021-04-30T16:05:18.000Z (over 4 years ago)
- Default Branch: develop
- Last Pushed: 2024-07-26T15:34:56.000Z (about 1 year ago)
- Last Synced: 2025-06-01T16:20:33.862Z (4 months ago)
- Topics: c-plus-plus, chords, chromatic, diatonic, intervals, keys, music, notes, scales
- Language: C++
- Homepage:
- Size: 223 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# diatonic
You don't need to create lists of vectors/arrays to set pre-definitions for "all" scales, chords and a given tonality chords'; create them dynamically; do it by calling functions.
## Some examples
```
// create scales
auto DSharpMajor = scale(Ds,scale_::major);
auto DSharpPentaMajorOctave4 = scale("ds4",scale_::pentatonicmajor);
// create chords
auto Bminor7 = chord(B,m7);// create custom chords
auto myChord = {intervalT::t,intervalT::min2,intevalT::d5};
// or shorter version
auto myChord2 = {i::t,i::min2,i::d5};
// 2nd chord inversion
auto Bminor7_2nd = invert(Bminor7,2);// create all tonality chords (4 notes each chord)
toneT CMajorChords = tone(C,tone_::major);
// transpose tonality chords to the 3rd octave
toneT CMajorChords3 = transpose(CMajorChords,3);// get a tonality's Dominant chord
chordT GMajor7minorChord = CMajorChords3.at(dominant);// Write a melodic phrase where "x" (midi 127) is consired silence. Returns a vector of midi notes
phraseT aMelody = phrasing({"c1","c2","x","c3"});```
## Build
**In *diatonic*'s root directory**
mkdir build
cd build
cmake .
make