GithubHelp home page GithubHelp logo

Comments (8)

filips123 avatar filips123 commented on June 29, 2024

Yes, this happens when a lot of plays are sent to Sonic Pi in a small time. Note that this can also happen even with sleep.

I temporarily fixed this with restarting Sonic Pi, but after some time, this happened again.

from python-sonic.

filips123 avatar filips123 commented on June 29, 2024

@gkvoelkl Do you know how to fix this? It is annoying and probably an important bug.

from python-sonic.

gkvoelkl avatar gkvoelkl commented on June 29, 2024

Python-Sonic is a very direct Interface for Sonic Pi. It sends a message to Sonic Pi and Sonic Pi makes the sound. All the timing is made by the Python application. Perhaps you can post your example.

from python-sonic.

filips123 avatar filips123 commented on June 29, 2024

@gkvoelkl I will post example and more details later today.

from python-sonic.

filips123 avatar filips123 commented on June 29, 2024

@gkvoelkl I tested this few more times and sometimes there is a bug and sometimes not.


Here is my example code:

while True:
    sample(AMBI_LUNAR_LAND, amp=0.5)

First, it will work. But then, the error will appear in Sonic Pi.

Here is the error:

Runtime Error: [eval] - ThreadError
 can't create Thread: Not enough space
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:934:in `initialize'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:934:in `new'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:934:in `block in __in_thread'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/util.rb:583:in `block in __no_kill_block'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/util.rb:581:in `synchronize'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/util.rb:581:in `__no_kill_block'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:931:in `__in_thread'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/lang/core.rb:4240:in `in_thread'
eval:in `block in __spider_eval'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:780:in `eval'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:780:in `block in __spider_eval'```

And another error:

Runtime Error: [eval] - NoMemoryError
 failed to allocate memory
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:934:in `new'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:934:in `block in __in_thread'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/util.rb:583:in `block in __no_kill_block'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/util.rb:581:in `synchronize'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/util.rb:581:in `__no_kill_block'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:931:in `__in_thread'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/lang/core.rb:4240:in `in_thread'
eval:in `block in __spider_eval'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:780:in `eval'
D:/Users/filips/Downloads/SonicPiPortable/App/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:780:in `block in __spider_eval'

After that, the sound will disappear and there will be this in the log:

=> Starting run 10687
=> Aborted Run 10687

So this is probably problem with Sonic Pi.

from python-sonic.

gkvoelkl avatar gkvoelkl commented on June 29, 2024

I started the sample program on my computer.

It called about 25.000 times Sonic Pi in one second. That's too much.

You have to use sleep for time management.

from python-sonic.

filips123 avatar filips123 commented on June 29, 2024

I know this. But sometimes (I currently don't have this problem), this happened a lot earlier and also with (small) sleeps. But this is probably a problem with Sonic Pi.

from python-sonic.

gkvoelkl avatar gkvoelkl commented on June 29, 2024

It can happen, when python-Sonic sends too many messages to Sonic Pi. And that depends on the performance of the computer. Thanks.

from python-sonic.

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.