From 6de6634586c2c48b570dd489b31d1644aa207fe8 Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Wed, 17 Jun 2020 20:08:59 +0200 Subject: [PATCH] notes & start parsing --- stt.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/stt.py b/stt.py index 96fd43b..b021059 100755 --- a/stt.py +++ b/stt.py @@ -65,5 +65,54 @@ print( "BPM: " + str( jsondata["data"]["part"]["measures"][0]["voices"][0]["beat # S Snare { "string": 4, "fret": 38 } # BD Bass Drum { "string": 5, "fret": 35 } +### CC|-Crash cymbal----| +### HH|-Hi-hat----------| +### Rd|-Ride cymbal-----| +### SN|-Snare-drum------| +### T1|-High-tom--------| +### T2|-Low-tom---------| +### FT|-Floor-tom-------| +### BD |-Bass-drum------| +### Hf/FH|-Hi-hat-w/foot| +### +###Cymbals +### +### |-x-| Strike cymbal or hi-hat +### |-X-| Strike loose hi-hat, or hit crash hard +### |-o-| Open hi-hat +### |-#-| Choke cymbal (grab cymbal with hand after striking it) +### |-s-| Splash cymbal +### |-c-| China cymbal +### |-b-| Bell of ride +### |-x-| Click hi-hat with foot +### +###Drums +### +### |-o-| Strike +### |-O-| Accent +### |-g-| Ghost note +### |-f-| Flam +### |-d-| Drag +### |-b-| Soft one-handed roll +### |-B-| Accented one-handed roll +### |-@-| Snare rim + +print("") +print( str( jsondata["data"]["part"]["measures"][5]["voices"][0]["beats"] ) ) +print( "Type: " + str( jsondata["data"]["part"]["measures"][5]["voices"][0]["beats"][0]["type"] ) ) +for i in range(len(jsondata["data"]["part"]["measures"][5]["voices"][0]["beats"])): + beats = jsondata["data"]["part"]["measures"][5]["voices"][0]["beats"][i] + print( str(i+1) + " note " + str( jsondata["data"]["part"]["measures"][5]["voices"][0]["beats"][i]["notes"] ) ) + for beat in beats: + if note == { "string": 5, "fret": 35 }: + print("BD") + elif note == { "string": 4, "fret": 38 }: + print("S") + elif note == { "string": 0, "fret": 51 }: + print("Rd") + elif note == { "string": 0, "fret": 57 }: + print("CC") + else: + print(note)