Enable support for types' properties
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
from smnp.library.model import CombinedFunction, Function
|
||||
from smnp.library.signature import signature, listOf, ofTypes, varargSignature
|
||||
from smnp.type.model import Type
|
||||
from smnp.type.value import Value
|
||||
|
||||
|
||||
_signature1 = varargSignature(ofTypes(Type.NOTE), ofTypes(Type.INTEGER), ofTypes(Type.INTEGER))
|
||||
def _function1(env, n, m, vararg):
|
||||
t = [Value(Type.NOTE, arg.value.withDuration(arg.value.duration * n.value / m.value)) for arg in vararg]
|
||||
return Value(Type.LIST, t).decompose()
|
||||
t = [Type.note(arg.value.withDuration(arg.value.duration * n.value / m.value)) for arg in vararg]
|
||||
return Type.list(t).decompose()
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user