notes & start parsing
This commit is contained in:
parent
0d5e449688
commit
6de6634586
1 changed files with 49 additions and 0 deletions
49
stt.py
49
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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue