Avid Pro Audio Community

Avid Pro Audio Community

How to Join & Post  •  Community Terms of Use  •  Help Us Help You

Knowledge Base Search  •  Community Search  •  Learn & Support


Avid Home Page

Go Back   Avid Pro Audio Community > Dev > Pro Tools Scripting SDK Toolkit

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-11-2023, 02:43 PM
marcuswuest marcuswuest is offline
Member
 
Join Date: Jan 2023
Location: Mainz Germany
Posts: 13
Default Python Transport Monitoring

Hey There,
I'm just starting out programming, so bear with me -
I'm trying to build a little app that monitors the PT Transport, using JamieHards Python Implementation.

currently I'm using a timer to call the Transport state every 100ms.
but I notice the ProTools GUI becoming pretty sluggish, so that seems to not work well.
Code:
self.timer = QTimer(self)
        self.timer.timeout.connect(self.get_ptstatus)
        self.timer.start(100)
        
    def get_ptstatus(self):
        with open_engine(os.getenv('PTSL_KEY')) as engine:
            self.lbl_ptstatus.setText(str(engine.transport_state()))
is there a more efficient way to monitor the transport state?
(probably - the sound radix guys are getting it right in Muteomatic..)

Thanks,
Marcus
Reply With Quote
  #2  
Old 03-14-2023, 03:35 PM
marcuswuest marcuswuest is offline
Member
 
Join Date: Jan 2023
Location: Mainz Germany
Posts: 13
Default Re: Python Transport Monitoring

Got it!
Reply With Quote
  #3  
Old 03-15-2023, 01:52 AM
Felix Rost Felix Rost is offline
Member
 
Join Date: Feb 2006
Location: Berlin, Germany
Posts: 600
Default Re: Python Transport Monitoring

Nice, so how did you do it?
__________________
http://felixrost.de
Reply With Quote
  #4  
Old 03-17-2023, 01:42 PM
JamieHardt JamieHardt is offline
Member
 
Join Date: Jan 2023
Location: Los Angeles, CA
Posts: 54
Default Re: Python Transport Monitoring

You might experiment with the streaming RPC response and see how it behaves with this.
__________________
___
Jamie Hardt MPSE
Pro Tools Ultimate 2022.12.0
Mac OS X 12.6.2
Mac Pro (Late 2013)
Reply With Quote
  #5  
Old 03-26-2023, 02:47 PM
marcuswuest marcuswuest is offline
Member
 
Join Date: Jan 2023
Location: Mainz Germany
Posts: 13
Default Re: Python Transport Monitoring

Quote:
Originally Posted by JamieHardt View Post
You might experiment with the streaming RPC response and see how it behaves with this.
Thanks for the tip! - however, I'm not experienced enough to really know how to do that.
but I managed to get my tool working ok for now -

Quote:
Originally Posted by Felix Rost View Post
Nice, so how did you do it?
the problem was that it was always re-registering every cycle.
now, only doing so at startup, and only polling the transport state every 100ms, it works ok.
PT is greying out all the menus at the moment when polling occurs, but this is workable at the moment, and it might get fixed in PT.
Reply With Quote
  #6  
Old 03-28-2023, 05:21 AM
Adam Venn's Avatar
Adam Venn Adam Venn is offline
Venn Audio
 
Join Date: Jan 2022
Location: Canada
Posts: 19
Default Re: Python Transport Monitoring

Hi Marcus,

How did you figure this out in the end? I am currently doing this in the same way as Sound Radix in a plugin (through the AAX interface in C++). It's interesting to hear that it's possible through this new scripting interface in Python!
Reply With Quote
  #7  
Old 03-29-2023, 02:50 PM
marcuswuest marcuswuest is offline
Member
 
Join Date: Jan 2023
Location: Mainz Germany
Posts: 13
Default Re: Python Transport Monitoring

Quote:
Originally Posted by Adam Venn View Post
Hi Marcus,

How did you figure this out in the end? I am currently doing this in the same way as Sound Radix in a plugin (through the AAX interface in C++). It's interesting to hear that it's possible through this new scripting interface in Python!
Yes, it does work!
apart from above mentioned disabling of menus, which I can live with for now.

Sound Radix was able to circumvent my problem somehow, so Im curious to see what you will end up with regarding this..
Reply With Quote
  #8  
Old 04-02-2023, 06:51 AM
marcuswuest marcuswuest is offline
Member
 
Join Date: Jan 2023
Location: Mainz Germany
Posts: 13
Default Re: Python Transport Monitoring

Quote:
Originally Posted by Adam Venn View Post
Hi Marcus,

How did you figure this out in the end? I am currently doing this in the same way as Sound Radix in a plugin (through the AAX interface in C++). It's interesting to hear that it's possible through this new scripting interface in Python!
well, it kinda works for now - querying the Transport State every 100ms.
However PT disables all menu commands when polling, so that's not optimal.
also, on intel machines the GUI becomes a little sluggish (on Apple Silicon it's much better interestingly..)

hopefully Avid will relax PT's behaviour for monitoring commands (=not "action" commands) at some point.

also, sound radix managed to do this more elegantly without the above mentioned issues, so I'm hoping for info on how and if this can be done better.
Reply With Quote
  #9  
Old 04-04-2023, 02:08 PM
marcuswuest marcuswuest is offline
Member
 
Join Date: Jan 2023
Location: Mainz Germany
Posts: 13
Default Re: Python Transport Monitoring

Update:
Sound Radix just used the isRecording flag, which finally got added into the AAX SDK a few months ago.
(hardly anyone noticed, it was kinda "sneaked" in)
So that's the best and easiest way for their plugin.

So this is no help for our PTSL based issues unfortunately.
Avid needs to improve PTSLs behaviour for us to succeed.
Reply With Quote
  #10  
Old 04-04-2023, 04:09 PM
JamieHardt JamieHardt is offline
Member
 
Join Date: Jan 2023
Location: Los Angeles, CA
Posts: 54
Default Re: Python Transport Monitoring

The other way you do this is as an MMC slave, I believe this is what Kraken does.
__________________
___
Jamie Hardt MPSE
Pro Tools Ultimate 2022.12.0
Mac OS X 12.6.2
Mac Pro (Late 2013)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Python Support? chibop Pro Tools Scripting SDK Toolkit 5 01-12-2023 04:08 AM
Native Python Implementation JamieHardt Pro Tools Scripting SDK Toolkit 3 01-08-2023 07:32 PM
ARTIST TRANSPORT: Transport knobs do not light up when pushed smallchamber Artist Series 0 02-26-2013 05:36 AM
The official Monty Python quoting thread..... graveleye 003, Mbox 2, Digi 002, original Mbox, Digi 001 (Win) 168 08-27-2009 10:50 AM
OT - Python on Broadway? spkguitar 003, Mbox 2, Digi 002, original Mbox, Digi 001 (Win) 1 07-08-2004 07:24 AM


All times are GMT -7. The time now is 03:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Limited. Forum Hosted By: URLJet.com