Trouble with patterns #347
-
I can't even get the simplest pattern (based on an old example from the project description on pypi) to produce any sound. I'm clearly missing something, but what is it? 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) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
Short answer: you need to send the pattern's SynthDef to the server before you can create Synths that use it. In this case, it's the default SynthDef
Longer answer: if you turn on logging output you can see the failure messages coming back from the server. This is gonna be very verbose - in the current version of Supriya the failure messages are output at the same logging level as just about everything else (DEBUG). After you run
... and then run your pattern block. You'll see
|
Beta Was this translation helpful? Give feedback.
-
And mea culpa re: why this category of problem is non-obvious. I need to find a clean way to surface these failures that still plays nice with the logging regime. |
Beta Was this translation helpful? Give feedback.
-
I opened a PR to print warnings when those |
Beta Was this translation helpful? Give feedback.
Short answer: you need to send the pattern's SynthDef to the server before you can create Synths that use it. In this case, it's the default SynthDef
supriya.default
. This is basically the same behavior you'd also get with sclang: gotta send the SynthDef before you can use it.Longer answer: if you turn on logging output you can see the failure messages coming back from the server. This is gonna be very verbose - in the current version of Supriya the failure messages are output at the same logging level as just about everything else (DEBUG).
After you run
server = Server().boot()
, r…