Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions libraries/steve/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@

project(steve)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)

file(GLOB_RECURSE SOURCES src/*.cpp src/*.h)

add_library(steve ${SOURCES})

target_include_directories(steve PUBLIC ./src)
target_include_directories(steve PUBLIC src)
2 changes: 1 addition & 1 deletion libraries/steve/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Steve is a C++ program that composes music and generates MIDI files from scratch.

## Assumptions
- Harmony is defined such as, at any given time (preferably at a measure granularity), the set of all tones played fits inside a chord
- Harmony is defined such as, at any given time (at a beat granularity), the set of all tones played fits inside a chord
- Melody is defined by a scale (kept throughout an entire music and common to all instruments), all tones must be fit in the scale
- Rhythm is defined by the fact that notes can only have a power of two duration, and a note can only be placed on a position dividable by its duration
126 changes: 71 additions & 55 deletions scripts/midi/relaxed.json → libraries/steve/cfg/base.steve.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
{
"min_tempo": 20,
"max_tempo": 220,
"tempo": {
"min": 20,
"max": 220
},
"duration": {
"min": 60,
"max": 120
},
"time_signatures": {
"2/2":{}, "2/4":{}, "3/4":{}, "3/8": {}, "4/4":{}, "5/4":{}, "6/4":{}, "6/8":{}, "7/4":{}, "9/8":{}, "12/8": {}
"2/2":{}, "2/4":{}, "3/4":{}, "3/8": {}, "4/4":{}, "5/4":{}, "6/4":{}, "6/8":{}, "7/4":{}, "9/8":{}, "12/8":{}
},
"chords": {
"Power": {
"suffix": "",
"tones": [7]
},
"Major": {
"suffix": "maj",
"tones": [4, 7]
"suffix": "",
"tones": [4, 7],
"uppercase": true
},
"Minor": {
"suffix": "min",
Expand All @@ -33,19 +40,38 @@
"suffix": "sus4",
"tones": [5, 7]
},
"Major Sixth": {
"suffix": "maj6",
"tones": [4, 7, 9],
"uppercase": true
},
"Six-Nine": {
"suffix": "6/9",
"tones": [4, 7, 9, 14]
},
"Minor Six-Nine": {
"suffix": "min6/9",
"tones": [3, 7, 9, 14]
},
"Minor Sixth": {
"suffix": "min6",
"tones": [3, 7, 9]
},
"Dominant Seventh": {
"suffix": "dom7",
"tones": [4, 7, 10],
"uppercase": true
},
"Major Seventh": {
"suffix": "maj7",
"tones": [4, 7, 11]
"tones": [4, 7, 11],
"uppercase": true
},
"Minor Seventh": {
"suffix": "min7",
"tones": [3, 7, 10]
},
"Dominant Seventh": {
"suffix": "dom7",
"tones": [4, 7, 10]
},
"Minor Major Seventh": {
"Minor-Major Seventh": {
"suffix": "min/maj7",
"tones": [3, 7, 11]
},
Expand All @@ -61,22 +87,6 @@
"suffix": "aug7",
"tones": [4, 8, 10]
},
"Major Sixth": {
"suffix": "maj6",
"tones": [4, 7, 9]
},
"Minor Sixth": {
"suffix": "min6",
"tones": [3, 7, 9]
},
"Six-Nine": {
"suffix": "6/9",
"tones": [4, 7, 9, 14]
},
"Minor Six-Nine": {
"suffix": "min6/9",
"tones": [3, 7, 9, 14]
},
"Major Add Nine": {
"suffix": "maj+9",
"tones": [4, 7, 14]
Expand Down Expand Up @@ -131,53 +141,59 @@
}
},
"scales": {
"Augmented": {
"tones": [3, 4, 7, 8, 11]
},
"Blues": {
"tones": [3, 5, 6, 7]
},
"Byzantine": {
"tones": [1, 4, 5, 7, 8, 11]
},
"Chromatic": {
"tones": [1,2,3,4,5,6,7,8,9,10,11]
"tones": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
},
"Major": {
"tones": [2,4,5,7,9,11]
"Dorian": {
"tones": [2, 3, 5, 7, 9, 10]
},
"Harmonic Major": {
"tones": [2,4,5,7,8,11]
},
"Minor": {
"tones": [2,3,5,7,8,10]
"tones": [2, 4, 5, 7, 8, 11]
},
"Harmonic Minor": {
"tones": [2,3,5,7,8,11]
"tones": [2, 3, 5, 7, 8, 11]
},
"Melodic Minor": {
"tones": [2,3,5,7,9,11]
"Kumoi": {
"tones": [2, 3, 7, 9]
},
"Pentatonic Major": {
"tones": [2,4,7,9]
"Lydian": {
"tones": [2,4,6,7,9,11]
},
"Pentatonic Minor": {
"tones": [3,5,7,10]
"Major": {
"tones": [2, 4, 5, 7, 9, 11]
},
"Minor": {
"tones": [2, 3, 5, 7, 8, 10]
},
"Major Blues": {
"tones": [2,3,4,7,9]
"tones": [2, 3, 4, 7, 9]
},
"Minor Blues": {
"tones": [3,5,6,7,10]
"tones": [3, 5, 6, 7, 10]
},
"Mixolydian": {
"tones": [2,4,5,7,9,10]
"Melodic Minor": {
"tones": [2, 3, 5, 7, 9, 11]
},
"Lydian": {
"tones": [2,4,6,7,9,11]
"Mixolydian": {
"tones": [2, 4, 5, 7, 9, 10]
},
"Dorian": {
"tones": [2,3,5,7,9,10]
"Pentatonic Major": {
"tones": [2, 4, 7, 9]
},
"Byzantine": {
"tones": [1,4,5,7,8,11]
"Pentatonic Minor": {
"tones": [3, 5, 7, 10]
},
"Whole Tone": {
"tones": [2,4,6,8,10]
},
"Augmented": {
"tones": [3,4,7,8,11]
"tones": [2, 4, 6, 8, 10]
}
},
"chord_changes": {
Expand Down
105 changes: 105 additions & 0 deletions libraries/steve/cfg/classical.steve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"parents": ["sane.steve.json"],
"creators": {
"Drums": {
"blacklist": true
}
},
"scales": {
"Major": {
"whitelist": true
},
"Minor": {
"whitelist": true
}
},
"instruments": {
"Acoustic Grand Piano": {
"whitelist": true
},
"Harpsichord": {
"whitelist": true
},
"Clavinet": {
"whitelist": true
},
"Celesta": {
"whitelist": true
},
"Acoustic Bass": {
"whitelist": true
},
"Violin": {
"whitelist": true
},
"Viola": {
"whitelist": true
},
"Cello": {
"whitelist": true
},
"Contrabass": {
"whitelist": true
},
"Tremolo Strings": {
"whitelist": true
},
"Pizzicato Strings": {
"whitelist": true
},
"Orchestral Harp": {
"whitelist": true
},
"Timpani": {
"whitelist": true
},
"String Ensemble": {
"whitelist": true
},
"String Ensemble 2 (Slow)": {
"whitelist": true
},
"Choir Aahs": {
"whitelist": true
},
"Voice Oohs": {
"whitelist": true
},
"Trombone": {
"whitelist": true
},
"Tuba": {
"whitelist": true
},
"French Horn": {
"whitelist": true
},
"Brass Section": {
"whitelist": true
},
"Oboe": {
"whitelist": true
},
"English Horn": {
"whitelist": true
},
"Bassoon": {
"whitelist": true
},
"Clarinet": {
"whitelist": true
},
"Piccolo": {
"whitelist": true
},
"Flute": {
"whitelist": true
},
"Recorder": {
"whitelist": true
},
"Pan Flute": {
"whitelist": true
}
}
}
80 changes: 80 additions & 0 deletions libraries/steve/cfg/doom.steve.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"parents": ["base.steve.json"],
"tempo": {
"min": 80,
"max": 120,
"step": 5
},
"time_signatures": {
"2/2": {"weight": 2},
"2/4": {"weight": 2},
"4/4": {"weight": 4},
"7/4": {"weight": 0.5},
"9/8": {"weight": 0.1}
},
"creators": {
"Arpeggio": {
"min_count": 0,
"max_count": 1
},
"Bass": {
"min_count": 0,
"max_count": 2
},
"Chords": {
"min_count": 0,
"max_count": 3
},
"Drums": {
"min_count": 0,
"max_count": 1
},
"Melody": {
"min_count": 0,
"max_count": 3
}
},
"scales": {
"Harmonic Minor": {"whitelist": true},
"Pentatonic Minor": {"whitelist": true},
"Minor": {"whitelist": true}
},
"chords": {
"Power": {"whitelist": true},
"Major": {"whitelist": true},
"Minor": {"whitelist": true}
},
"chord_changes": {
"*": { "*": { "0": {"blacklist": true}}}
},
"instruments": {
"Acoustic Bass": {"whitelist": true},
"Electric Fingered Bass": {"whitelist": true},
"Electric Guitar (Clean)": {"whitelist": true},
"Electric Guitar (Muted)": {"whitelist": true},
"Electric Picked Bass": {"whitelist": true},
"Overdriven Guitar": {"whitelist": true},
"Distorted Guitar": {"whitelist": true},
"Fretless Bass": {"whitelist": true},
"Slap Bass 1": {"whitelist": true},
"Slap Bass 2": {"whitelist": true},
"Syn Bass 1": {"whitelist": true},
"Syn Bass 2": {"whitelist": true},
"String Ensemble": {"whitelist": true},
"String Ensemble 2 (Slow)": {"whitelist": true},
"Synth Drum": {"whitelist": true},

"Guitar Harmonics": {"blacklist": true},
"Bottle Blow": {"blacklist": true},
"Whistle": {"blacklist": true},
"Reverse Cymbal": {"blacklist": true},
"Guitar Fret Noise": {"blacklist": true},
"Breath Noise": {"blacklist": true},
"Seashore": {"blacklist": true},
"Bird Tweet": {"blacklist": true},
"Telephone Ring": {"blacklist": true},
"Helicopter": {"blacklist": true},
"Applause": {"blacklist": true},
"Gunshot": {"blacklist": true}
}
}
Loading