feat: assets volume instead of musics only
This commit is contained in:
committed by
Clément Le Bihan
parent
73e0890b3b
commit
17955a0525
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Bach: Minuet in G Minor (BWV Anh. 115)
|
||||
Artist=Christian Petzold
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Bach: Polonaise in g Minor (BWV Anh. 119)
|
||||
Artist=Johann Sebastian Bach
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Beethoven Symphony 7 2nd Movement (Allegretto) Simple Piano arrangement
|
||||
Artist=Ludwig Van Beethoven
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
21
assets/musics/Canon in D (easy)/Canon in D (easy).ini
Normal file
21
assets/musics/Canon in D (easy)/Canon in D (easy).ini
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Canon in D (easy)
|
||||
Artist=Johann Pachelbel
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
BIN
assets/musics/Canon in D (easy)/Canon in D (easy).midi
Normal file
BIN
assets/musics/Canon in D (easy)/Canon in D (easy).midi
Normal file
Binary file not shown.
BIN
assets/musics/Canon in D (easy)/Canon in D (easy).mxl
Normal file
BIN
assets/musics/Canon in D (easy)/Canon in D (easy).mxl
Normal file
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=El pequeño tamborilero (The little drummer boy)
|
||||
Artist=Misc Christmas
|
||||
Genre=Soundtrack
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Erik Satie - Gnossienne No.1. {Professional production score.}
|
||||
Artist=Erik Satie
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=French National Anthem "La Marseillaise"
|
||||
Artist=Misc Tunes
|
||||
Genre=Solo
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=German National Anthem " Das Lied der Deutschen"
|
||||
Artist=Joseph Haydn
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Jesus Alegria dos Homens
|
||||
Artist=Johann Sebastian Bach
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
21
assets/musics/Liebestraum (easy)/Liebestraum (easy).ini
Normal file
21
assets/musics/Liebestraum (easy)/Liebestraum (easy).ini
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Liebestraum (easy)
|
||||
Artist=Franz Liszt
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
BIN
assets/musics/Liebestraum (easy)/Liebestraum (easy).midi
Normal file
BIN
assets/musics/Liebestraum (easy)/Liebestraum (easy).midi
Normal file
Binary file not shown.
BIN
assets/musics/Liebestraum (easy)/Liebestraum (easy).mxl
Normal file
BIN
assets/musics/Liebestraum (easy)/Liebestraum (easy).mxl
Normal file
Binary file not shown.
21
assets/musics/Mary, Did You Know?/Mary, Did You Know?.ini
Normal file
21
assets/musics/Mary, Did You Know?/Mary, Did You Know?.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Mary, Did You Know?
|
||||
Artist=Misc Christmas
|
||||
Genre=Soundtrack
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
BIN
assets/musics/Mary, Did You Know?/Mary, Did You Know?.midi
Normal file
BIN
assets/musics/Mary, Did You Know?/Mary, Did You Know?.midi
Normal file
Binary file not shown.
BIN
assets/musics/Mary, Did You Know?/Mary, Did You Know?.mxl
Normal file
BIN
assets/musics/Mary, Did You Know?/Mary, Did You Know?.mxl
Normal file
Binary file not shown.
21
assets/musics/SCORO_TEST/SCORO_TEST.ini
Normal file
21
assets/musics/SCORO_TEST/SCORO_TEST.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
[Metadata]
|
||||
Name=Symphony No 9 in D Minor
|
||||
Artist=Beethoven
|
||||
Genre=Classical
|
||||
Album=Symphony No 9
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=4
|
||||
NoteCombo=0
|
||||
Arpeggio=6
|
||||
Distance=0
|
||||
LeftHand=2
|
||||
RightHand=1
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=1
|
||||
PedalPoint=0
|
||||
Precision=10
|
||||
|
||||
BIN
assets/musics/SCORO_TEST/SCORO_TEST.midi
Normal file
BIN
assets/musics/SCORO_TEST/SCORO_TEST.midi
Normal file
Binary file not shown.
BIN
assets/musics/SCORO_TEST/SCORO_TEST.midi.bak
Normal file
BIN
assets/musics/SCORO_TEST/SCORO_TEST.midi.bak
Normal file
Binary file not shown.
BIN
assets/musics/SCORO_TEST/SCORO_TEST.mxl
Normal file
BIN
assets/musics/SCORO_TEST/SCORO_TEST.mxl
Normal file
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Sarabande - William Gillock
|
||||
Artist=William Gillock
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
21
assets/musics/Short/Short.ini
Normal file
21
assets/musics/Short/Short.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Short
|
||||
Artist=Test
|
||||
Genre=Abstract
|
||||
Album=Trololol
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
BIN
assets/musics/Short/Short.mid
Normal file
BIN
assets/musics/Short/Short.mid
Normal file
Binary file not shown.
BIN
assets/musics/Short/Short.midi
Normal file
BIN
assets/musics/Short/Short.midi
Normal file
Binary file not shown.
BIN
assets/musics/Short/Short.mxl
Normal file
BIN
assets/musics/Short/Short.mxl
Normal file
Binary file not shown.
21
assets/musics/Silent Night/Silent Night.ini
Normal file
21
assets/musics/Silent Night/Silent Night.ini
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Silent Night
|
||||
Artist=Franz Xaver Gruber
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
BIN
assets/musics/Silent Night/Silent Night.midi
Normal file
BIN
assets/musics/Silent Night/Silent Night.midi
Normal file
Binary file not shown.
BIN
assets/musics/Silent Night/Silent Night.mxl
Normal file
BIN
assets/musics/Silent Night/Silent Night.mxl
Normal file
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Tango La Cumparsita - Piano Solo (Tutorial Parte B)
|
||||
Artist=Gerardo Matos Rodríguez
|
||||
Genre=Classical
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=Twinkle Twinkle Little Star
|
||||
Artist=Misc Children
|
||||
Genre=Soundtrack
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
|
||||
[Metadata]
|
||||
Name=На сопках Маньчжурии (On the Hills of Manchuria)
|
||||
Artist=Misc Traditional
|
||||
Genre=Folk
|
||||
Album=
|
||||
|
||||
[Difficulties]
|
||||
TwoHands=0
|
||||
Rhythm=0
|
||||
NoteCombo=0
|
||||
Arpeggio=0
|
||||
Distance=0
|
||||
LeftHand=0
|
||||
RightHand=0
|
||||
LeadHandChange=0
|
||||
ChordComplexity=0
|
||||
ChordTiming=0
|
||||
Length=0
|
||||
PedalPoint=0
|
||||
Precision=0
|
||||
Binary file not shown.
Binary file not shown.
72
assets/populate.py
Executable file
72
assets/populate.py
Executable file
@@ -0,0 +1,72 @@
|
||||
#!/bin/env python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
import requests
|
||||
import glob
|
||||
from configparser import ConfigParser
|
||||
|
||||
url = os.environ.get("API_URL")
|
||||
|
||||
def getOrCreateAlbum(name, artistId):
|
||||
if not name:
|
||||
return
|
||||
res = requests.post(f"{url}/album", json={
|
||||
"name": name,
|
||||
"artist": artistId,
|
||||
})
|
||||
out = res.json()
|
||||
print(out)
|
||||
return out["id"]
|
||||
|
||||
def getOrCreateGenre(names):
|
||||
ids = []
|
||||
for name in names.split(","):
|
||||
res = requests.post(f"{url}/genre", json={
|
||||
"name": name,
|
||||
})
|
||||
out = res.json()
|
||||
print(out)
|
||||
ids += [out["id"]]
|
||||
#TODO handle multiple genres
|
||||
return ids[0]
|
||||
|
||||
def getOrCreateArtist(name):
|
||||
res = requests.post(f"{url}/artist", json={
|
||||
"name": name,
|
||||
})
|
||||
out = res.json()
|
||||
print(out)
|
||||
return out["id"]
|
||||
|
||||
def populateFile(path, midi, mxl):
|
||||
config = ConfigParser()
|
||||
config.read(path)
|
||||
metadata = config["Metadata"];
|
||||
difficulties = dict(config["Difficulties"])
|
||||
artistId = getOrCreateArtist(metadata["Artist"])
|
||||
print(f"Populating {metadata['Name']}")
|
||||
res = requests.post(f"{url}/song", json={
|
||||
"name": metadata["Name"],
|
||||
"midiPath": f"/assets/musics/{midi}",
|
||||
"musicXmlPath": f"/assets/musics/{mxl}",
|
||||
"difficulties": difficulties,
|
||||
"artist": artistId,
|
||||
"album": getOrCreateAlbum(metadata["Album"], artistId),
|
||||
"genre": getOrCreateGenre(metadata["Genre"]),
|
||||
})
|
||||
print(res.json())
|
||||
|
||||
|
||||
def main():
|
||||
global url
|
||||
if url == None:
|
||||
url = "http://localhost:3000"
|
||||
print("Searching for files...")
|
||||
for file in glob.glob("**/*.ini", recursive=True):
|
||||
print(f"File found: {file}")
|
||||
path = os.path.splitext(file)[0]
|
||||
populateFile(file, path + ".midi", path + ".mxl")
|
||||
|
||||
if __name__ == "__main__":
|
||||
exit(main())
|
||||
Reference in New Issue
Block a user