omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. apiarian
    3. Posts

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    Posts made by apiarian

    • Audio Generation with Screen Off

      I've written a tool that generates and plays an infinite stream of music. Currently by riffing on Satie's Gnossiennes 1. It's fun! https://github.com/apiarian/twisted_music/blob/master/infinite_gnossiennes_1.py (inspired by Mouse Reeve's Infinite Gnossienne https://github.com/mouse-reeve/infinite_gnossienne ).

      It works pretty well, but it only works while the screen is on or the app is on at least a part of my screen on my iPad. I've got a context manager which prevents device sleep with the console.set_idle_timer_disabled function, but it would be really nice to just let this run in the background.

      Since this is a musical use-case, is there a way to convince iOS to let it run in the background with the screen off indefinitely?

      The app currently works by taking an infinite generator (doesn't have to be infinite, but in this case it is) of sound description objects, chunking them up and building temporary WAV files, and playing them with the appropriate delays, one after the other (sometimes overlapping slightly as necessary) using the sound.play_effect function. Since it is an infinite stream, I can't just ask Pythonista to play an infinitely long file.

      posted in Pythonista
      apiarian
      apiarian