Comments (8)
It's not clear to me what the right thing here is. In particular, as I understand it, the "stop" button currently means "raise an exception on the user's computation, and return control to the REPL. If I run (play long-sound), then the evaluation of this expression returns immediately to the REPL, while the sound plays.
Put differently, It seems like hitting the "stop" button when the cursor is at the REPL prompt is currently a no-op, and it seems like changing that behavior might be difficult to implement or have unforseen consequences.
However, you could always call the '(stop)' function...
from rsound.
Can you spawn a thread that kills the sound on stop? It seems like this ought to be already possible in DrRacket. @rfindler, any thoughts?
from rsound.
Stop breaks the thread. Rsound's prims just enquque the sounds to some
other thread I guess?
Do sounds stop when there are runtime errors?
Robby
On Monday, September 22, 2014, Sam Tobin-Hochstadt [email protected]
wrote:
Can you spawn a thread that kills the sound on stop? It seems like this
ought to be already possible in DrRacket. @rfindler
https://github.com/rfindler, any thoughts?—
Reply to this email directly or view it on GitHub
#12 (comment).
from rsound.
No, they don't. Getting that right seems a bit fiddly, seems like I'd have to rewrite #%top or something.
from rsound.
I guess the question is how do you want to decide how to stop a sound. What
is the criterion that's best to use? The prompt appearing?
On Monday, September 22, 2014, John Clements [email protected]
wrote:
No, they don't. Getting that right seems a bit fiddly, seems like I'd have
to rewrite #%top or something.—
Reply to this email directly or view it on GitHub
#12 (comment).
from rsound.
I think the confusion here is that pressing the stop button in DrRacket seems to do nothing if the repl is waiting for user input. It doesn't even clear the current line of text like the command line repl does. If DrRacket does not throw an exn:break?
, there is nothing really for RSound to catch in order to know when to kill the sounds.
Regardless, I think that the sounds should not stop playing on a user-break. RSound is awesome to use for live synth coding, and sounds persisting on a user-break is really necessary for creating music via the repl.
However, I should add that when I first began using RSound about a year ago (I was new to Racket at the time), lack of sound stopping in DrRacket confused me for a while too. Maybe the solution to this issue is discussing behavior early in the documentation, including why it is beneficial to the library for it to remain this way.
from rsound.
from rsound.
Ah, thanks! It's helpful to know DrRacket works as such.
from rsound.
Related Issues (20)
- Request to implement pstream-stop and pstream-pause HOT 4
- Build issue on HEAD HOT 6
- make-harm3tone not exposed?
- note to self; make rs-overlay variable-arity
- Example program from docs fails HOT 1
- No sound when using bluetooth on macOS HOT 1
- rsound/draw: enabling drawing on user provided frame% HOT 2
- Weird interaction with racket-chipmunk HOT 5
- Question: mixing to avoid clicks
- cursor on the text HOT 5
- Return value of `pstream-play` doesn't match documentation HOT 1
- Unwanted noisy output on instantiation
- Cannot install rsound because of portaudio version specification HOT 4
- Raco exe does not work. HOT 1
- [CS] Wrong embedded lib path for buffer-add.so HOT 6
- Assertion #<procedure:negative?> failed on 0.0 HOT 11
- Don't hear any sound HOT 5
- Issue with portaudio dependency HOT 4
- katy-sliders example does not compile on Racket 8.8
- identifier `beginner-<=' not included in nested require spec in: lang/private/teachprims HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rsound.