Skip to content

Issues with GrainBuf #498

Closed Answered by josephine-wolf-oberholtzer
dayunbao asked this question in Q&A
Discussion options

You must be logged in to vote

You crashes aren't a supriya problem, but a general scsynth usage problem.

Server is crashing because you attempt to access a buffer that has not yet been allocated. Remember that buffer allocation, like SynthDef allocation, is asynchronous and must be waited on. You can either sync the server or - more elegantly - use a "completion" to allocate your synth once the buffer is allocated:

I had to change the sample file path to something built into Supriya, buf this will work if you run it from inside supriya's root directory (or just replace my sample path with yours again).

import logging
import time
from pathlib import Path

from supriya import Server, synthdef
from supriya.ugens import G…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
6 replies
@josephine-wolf-oberholtzer
Comment options

Answer selected by dayunbao
@dayunbao
Comment options

@josephine-wolf-oberholtzer
Comment options

@josephine-wolf-oberholtzer
Comment options

@josephine-wolf-oberholtzer
Comment options

Comment options

You must be logged in to vote
1 reply
@dayunbao
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants