Add support for integers in passing overtones to synth

This commit is contained in:
Bartłomiej Pluta
2019-07-29 17:59:38 +02:00
parent 13b069dc7d
commit 07f08b0557

View File

@@ -29,7 +29,7 @@ def getOvertones(config):
if key in config.value:
overtones = config.value[key]
rawOvertones = [overtone.value for overtone in overtones.value]
if overtones.type != Type.LIST or not all(overtone.type == Type.FLOAT for overtone in overtones.value):
if overtones.type != Type.LIST or not all(overtone.type in [Type.FLOAT, Type.INTEGER] for overtone in overtones.value):
raise RuntimeException("The 'overtones' property must be list of floats", None)
if len(rawOvertones) < 1: