Add piano_soundfont patch
This commit is contained in:
parent
cdfb10502a
commit
31c7935a91
@ -92,7 +92,20 @@ def better_soundfont(data):
|
||||
for track in data["tracks"]:
|
||||
pass
|
||||
|
||||
return json.dump(data)
|
||||
return json.dumps(data)
|
||||
|
||||
@register_patch(filename="audiosettings.json")
|
||||
def piano_soundfont(data):
|
||||
data = json.loads(data)
|
||||
|
||||
for track in data["tracks"]:
|
||||
if track["instrumentId"] != "metronome":
|
||||
track["in"]["resourceMeta"]["attributes"]["presetBank"] = "0"
|
||||
track["in"]["resourceMeta"]["attributes"]["presetProgram"] = "0"
|
||||
track["in"]["resourceMeta"]["attributes"]["presetName"] = "Grand Piano"
|
||||
track["in"]["resourceMeta"]["id"] = "MS Basic\\0\\0"
|
||||
|
||||
return json.dumps(data, indent=4)
|
||||
|
||||
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user