Git Product home page Git Product logo

Comments (8)

jbclements avatar jbclements commented on August 30, 2024

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.

samth avatar samth commented on August 30, 2024

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.

rfindler avatar rfindler commented on August 30, 2024

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.

jbclements avatar jbclements commented on August 30, 2024

No, they don't. Getting that right seems a bit fiddly, seems like I'd have to rewrite #%top or something.

from rsound.

rfindler avatar rfindler commented on August 30, 2024

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.

benoid avatar benoid commented on August 30, 2024

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.

rfindler avatar rfindler commented on August 30, 2024

from rsound.

benoid avatar benoid commented on August 30, 2024

Ah, thanks! It's helpful to know DrRacket works as such.

from rsound.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.