HISE Logo Forum
    • Categories
    • Register
    • Login

    Midi Player - DAW Sync problem

    Scheduled Pinned Locked Moved General Questions
    1 Posts 1 Posters 103 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.
    • M
      mehmethand
      last edited by mehmethand

      const var TH=Engine.createTransportHandler();
      
      TH.stopInternalClockOnExternalStop(true);
      TH.startInternalClock(0);
      TH.setSyncMode(TH.ExternalOnly);
      MIDIPlayer.setSyncToMasterClock(false);
      
      TH.setOnBeatChange(false, function(beat, isNew)
      {
      	
      	if (playButton.getValue()==1 && MIDIPlayer.getPlayState()==0 && isNew==1) 
      	{
      	MIDIPlayer.play(0);
      	}	
      	
      	if (playButton.getValue()==0) 
      	{
      	MIDIPlayer.stop(0);
      	}
      	
      
      });
      

      Hi, I'm using this code to make sure that when DAW is playing and Play button is pressed, MIDIPlayer won't start immediately and wait for next bar to start. It work as expected but there is slight sync problem with DAW. Is there a way to fix this?

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

      23

      Online

      1.7k

      Users

      11.9k

      Topics

      103.4k

      Posts