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"]:
|
for track in data["tracks"]:
|
||||||
pass
|
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)
|
||||||
|
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -144,4 +157,4 @@ def apply(source, dest, patches):
|
|||||||
for func in patches_by_filename[inzipinfo.filename]:
|
for func in patches_by_filename[inzipinfo.filename]:
|
||||||
data = func(data)
|
data = func(data)
|
||||||
|
|
||||||
outzip.writestr(inzipinfo.filename, data)
|
outzip.writestr(inzipinfo.filename, data)
|
||||||
|
Loading…
Reference in New Issue
Block a user