Skip to content

Commit

Permalink
Dialing in envelopes, unexpanded params
Browse files Browse the repository at this point in the history
  • Loading branch information
josiah-wolf-oberholtzer committed Feb 22, 2024
1 parent 958cbed commit d22da4b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions supriya/ext/mypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ def transform(self) -> bool:
print("B", output_proxy, type(output_proxy))

# Union[Default, OutputProxy, SupportsFloat]
init_scalar_param_type = make_simplified_union(
[supports_float, output_proxy]
)
init_scalar_param_type = make_simplified_union([supports_float, output_proxy])
print(init_scalar_param_type)
# Sequence[Union[OutputProxy, SupportsFloat]]
init_vector_param_type = make_simplified_union(
Expand Down
6 changes: 3 additions & 3 deletions supriya/synthdefs/envelopes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def __init__(
amplitudes: Sequence[Union[SupportsFloat, OutputProxy]] = (0, 1, 0),
durations: Sequence[Union[SupportsFloat, OutputProxy]] = (1, 1),
curves: Sequence[Union[EnvelopeShapeLike, OutputProxy, SupportsFloat]] = (
"linear",
"linear",
EnvelopeShape.LINEAR,
EnvelopeShape.LINEAR,
),
release_node: Optional[int] = None,
loop_node: Optional[int] = None,
Expand Down Expand Up @@ -221,7 +221,7 @@ def serialize(self, for_interpolation=False) -> UGenArray:
shape = 5
result.append(shape)
result.append(curve)
return UGenArray(result)
return result

@classmethod
def triangle(cls, duration=1.0, amplitude=1.0) -> "Envelope":
Expand Down
2 changes: 1 addition & 1 deletion supriya/ugens/bases.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Param(NamedTuple):


class UGenSerializable(Protocol):
def serialize(self) -> "UGenOperable":
def serialize(self) -> Sequence[Union[SupportsFloat, "OutputProxy"]]:
pass


Expand Down

0 comments on commit d22da4b

Please sign in to comment.