HISE Logo Forum
    • Categories
    • Register
    • Login

    Reset Internal Clock on Transport Change

    Scheduled Pinned Locked Moved Unsolved Scripting
    2 Posts 2 Posters 30 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      obolig
      last edited by

      I'm building a plugin that includes a step sequencer that can either sync with the DAW or a custom BPM. This is done using a transportHandler that is set to PreferExternal or InternalOnly.

      While using a custom BPM, I would like the transportHandler clock to reset when the user presses play within the DAW. I tried using th.setOnTransportChange(), but it is not triggered when using th.setSyncMode(th.InternalOnly).

      Do you have any ideas of how to reset and retrigger the transpotHandler on Transport Change?

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @obolig
        last edited by

        @obolig Mmmm... That seems an expected behaviour if you set InternalOnly...

        the MasterClock class shows:

        	enum class SyncModes
        	{
        		Inactive, //> No syncing going on
        		ExternalOnly, //< only reacts on external clock events
        		InternalOnly, //< only reacts on internal clock events
        		PreferInternal, //< override the clock value with the internal clock if it plays
        		PreferExternal, //< override the clock value with the external clock if it plays
        		SyncInternal, //< sync the internal clock when external playback starts
        		numSyncModes
        	};
        

        SyncInternal might do the job

        Hise made me an F5 dude, browser just suffers...

        1 Reply Last reply Reply Quote 1
        • First post
          Last post

        36

        Online

        2.0k

        Users

        12.9k

        Topics

        111.7k

        Posts