Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn on /fail responses #348

Merged
merged 2 commits into from
Jan 5, 2024
Merged

Warn on /fail responses #348

merged 2 commits into from
Jan 5, 2024

Conversation

josiah-wolf-oberholtzer
Copy link
Contributor

@josiah-wolf-oberholtzer josiah-wolf-oberholtzer commented Jan 5, 2024

In response to #347 let's issue warnings when the client receives /fail responses from the server.

>>> from supriya import Server
>>> from supriya.patterns import EventPattern, ParallelPattern, SequencePattern
>>>
>>> server = Server().boot()
>>> pattern = ParallelPattern([
...     EventPattern(
...         frequency=SequencePattern([440, 550]),
...     ),
...     EventPattern(
...         frequency=SequencePattern([1500, 1600, 1700]),
...         delta=0.75,
...     ),
... ])
>>> player = pattern.play(context=server)
>>> /Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /s_new SynthDef not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /s_new SynthDef not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /s_new SynthDef not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /s_new SynthDef not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /n_set Node 1000 not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /n_set Node 1001 not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /s_new SynthDef not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /n_set Node 1002 not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /n_set Node 1003 not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)
/Users/josiah/Source/github.com/josiah-wolf-oberholtzer/supriya/supriya/contexts/realtime.py:210: FailWarning: /n_set Node 1004 not found
  warnings.warn(" ".join(str(x) for x in message.contents), FailWarning)

@josiah-wolf-oberholtzer josiah-wolf-oberholtzer merged commit a350963 into main Jan 5, 2024
10 checks passed
@josiah-wolf-oberholtzer josiah-wolf-oberholtzer deleted the failure-warnings branch January 5, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant