Coder Social home page Coder Social logo

Is Live playing about liveosc2 HOT 4 CLOSED

stufisher avatar stufisher commented on July 20, 2024
Is Live playing

from liveosc2.

Comments (4)

ccerrillos avatar ccerrillos commented on July 20, 2024

UPDATED
It'll work if you add the line at the end in def __init__

        s = self.song()
        self._on_metronome_changed.subject = s
        self._on_signature_numerator_changed.subject = s
        self._on_signature_denominator_changed.subject = s
        self._on_tempo_changed.subject = s
        self._on_playing_changed.subject = s

I think the API needs to be reworked a bit. For example, what if I want to manually fetch the is_playing status? If you add that line, the status is pushed when it changes under /live/play but this is a conflict with actually calling /live/play which is akin to hitting the play button. It'll easily cause confusion when two operations share the same call path. There should be some /live/play/status or /live/status/[play, record, etc] calls instead to avoid confusion.

I'm open to input on how the API should be reorganized, but I'm not sure if @stufisher will accept it in the end.

from liveosc2.

stufisher avatar stufisher commented on July 20, 2024

This should probably live in TransportComponent, where the listener is :)
I am reading, just not had a lot of time to respond yet, sorry!

from liveosc2.

stufisher avatar stufisher commented on July 20, 2024

Urgh the subject slot is not assigned a target. TransportComponet needs:
self. _on_playing_changed.subject = s
at the top

from liveosc2.

ccerrillos avatar ccerrillos commented on July 20, 2024

Ah, so that's how it works!

I've updated my comment, thanks!

from liveosc2.

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.