|
Avid Pro Audio CommunityHow to Join & Post • Community Terms of Use • Help Us Help YouKnowledge Base Search • Community Search • Learn & Support |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
GetTrackList command still returns an empty array here - Pro Tools 2024.3/SDK 2024.3
Using Node.JS with the modules "@grpc/grpc-js" and "@grpc/proto-loader".
Despite reading in the release notes that the issues with the GetTrackList command are fixed with scripting SDK 2024.3 and Pro Tools 2024.3, I am still getting an emtpy array. Is this command working for someone? This is one of my responses, which seems complete except for the empty array as there's 8 tracks in the session: [ { task_id: 'fef2bd4a-be4e-44b8-af33-bd9cdfc2b54b', command: 'GetTrackList', status: 'Completed', progress: 100 }, { pagination_response: { total: null, offset: 0, limit: 0 }, track_list: [] }, '' ] I tried all sort of parameter combinations, both the deprecated and current pagination_request parameters, but can't get it to work. But maybe I am missing something? What should the offset and limit be set to, to return all tracks? For retrieving all Memory Locations I set those values to 0 and that does return all memory locations.
__________________
Geert van den Berg |
#2
|
||||
|
||||
Re: GetTrackList command still returns an empty array here - Pro Tools 2024.3/SDK 202
Dear Geert van den Berg,
Thank you for reaching out and bringing this issue to our attention. We would like to inform you that we officially support the C++ client for our SDK. Upon receiving your query, we conducted a thorough check on our end using the C++ client, and we were unable to reproduce the issue mentioned; the GetTrackList command is functioning as expected in our tests. Additionally, to ensure comprehensive coverage, we also attempted to replicate the scenario using a Python-based approach instead of the C++ client. Similarly, we encountered no issues in fetching the track list, which suggests that the problem may not lie within the SDK itself. Given this situation, it would be immensely helpful if you could provide us with more details about the requests you're making. Specifically, we are interested in how you are forming your requests using the Node.JS environment, including the exact parameters you are passing to the GetTrackList command. Also, please describe what kind of tracks (audio, MIDI, video, etc.) you have in the session. And btw do other commands besides GetTrackList work for you? This information will allow us to better understand the context and potentially identify any discrepancies or specific conditions under which the issue manifests. Thank you for your cooperation and understanding. We look forward to hearing from you soon. Best regards, Artem |
#3
|
|||
|
|||
Re: GetTrackList command still returns an empty array here - Pro Tools 2024.3/SDK 202
Dear Artem,
Thanks for looking into this issue. I am forming javascript objects for every command, convert the body to a JSON string and send that to Pro Tools as a grpc request using grpc.js. See my request and responses below. I am using the gRpc libraries which are in the code suggestions on the gRpc website ("@grpc/grpc-js", "@grpc/proto-loader" which uses "protobuf.js"). To me these libraries seemed to be the best option for gRpc with Node, with relatively recent maintenance updates. I saw there's also a google javascript protobuf library, but there isn't a gRpc library to accompany that and it doesn't have recent maintenance updates). For testing purposes I have also used the Postman application to send the commands, as it also supports gRpc but this returns the same results. So you could try that for testing purposes. https://blog.postman.com/postman-now-supports-grpc/ The requests that I am sending to retrieve the list are: { header: { command: 'RegisterConnection', session_id: '', task_id: '', version: 3 }, request_body_json: '{"company_name":"Wim Pel Productions","application_name":"WPP"}' } [ { task_id: '22795ad0-2c19-4c2b-9d8e-e1ef306e70de', command: 'RegisterConnection', status: 'Completed', progress: 100 }, { session_id: '645bc509-9724-4264-9aff-29a0d5be35cb' }, '' ] { header: { command: 'GetTrackList', session_id: '645bc509-9724-4264-9aff-29a0d5be35cb', task_id: '', version: 3 }, request_body_json: '{"pagination_request":{"limit":0,"offset":0}}' } [ { task_id: '0d0e5a77-4dcb-4fe0-90f2-d8564d4da2bc', command: 'GetTrackList', status: 'Completed', progress: 100 }, { pagination_response: { total: null, offset: 0, limit: 0 }, track_list: [] }, '' ] In my test session there are only 8 mono audio tracks. But I have tried variations, for example adding midi tracks. I have not tried all commands yet, but the other ones I have tried are working: GetSessionName, GetPlaybackMode, SetPlaybackMode, TogglePlayState, CreateNewTracks, SelectTracksByName, CreateMemoryLocation. GetMemoryLocations, GetTimelineSelection. Specifically GetMemoryLocations is interesting as it also has a pagination_request as part of the request that I am sending and that is returning a response and I copied that initially to form the GetTrackList request body. { header: { command: 'RegisterConnection', session_id: '', task_id: '', version: 3 }, request_body_json: '{"company_name":"Wim Pel Productions","application_name":"WPP"}' } [ { task_id: '70c02135-8b2f-4537-855a-2805ac4c4480', command: 'RegisterConnection', status: 'Completed', progress: 100 }, { session_id: 'e670d9d7-677d-4b86-8b44-22f0a6154b8e' }, '' ] { header: { command: 'GetMemoryLocations', session_id: 'e670d9d7-677d-4b86-8b44-22f0a6154b8e', task_id: '', version: 3 }, request_body_json: '{"pagination_request":{"limit":0,"offset":0}}' } [ { task_id: 'f7d71988-78c4-432b-ab8b-32deabeb74b0', command: 'GetMemoryLocations', status: 'Completed', progress: 100 }, { pagination_response: { total: 6, offset: 0, limit: 0 }, memory_locations: [ [Object], [Object], [Object], [Object], [Object], [Object] ] }, { errors: [ [Object] ] } ] The response body json (partially, I deleted the other 5 objects/markers) and the response error. { pagination_response: { total: 6, offset: 0, limit: 0 }, memory_locations: [ { number: 10003, name: '< 0003', location: 'MLC_Track', track_name: 'CHARACTER 1', reference: 'MLR_Absolute', start_time: '232320', end_time: '232320', time_properties: 'TP_Marker', general_properties: [Object], comments: 'Character 1 dialogue...', color_index: 9 } ] } { errors: [ { command_error_message: 'VENUE is not connected', is_warning: true, command_error_type: 'PT_UnknownError' } ] } Off topic: is there a way to prevent the Venue error from occurring in this command? Best, Geert
__________________
Geert van den Berg Last edited by GRT; 03-18-2024 at 09:08 AM. |
#4
|
||||
|
||||
Re: GetTrackList command still returns an empty array here - Pro Tools 2024.3/SDK 202
Hi Geert,
Thank you for providing detailed information. I suspect the problem might be because the request is being formed directly as JSON, rather than through gRPC structures. Let's examine the proto definition of the GetTrackList command request body: Code:
message GetTrackListRequestBody { /** * @deprecated since Pro Tools 2023.09, use pagination_request */ int32 page_limit = 1; repeated TrackListInvertibleFilter track_filter_list = 2; bool is_filter_list_additive = 3; // TRUE for OR, FALSE for AND /** * Supported starting in Pro Tools 2023.09 * Enable pagination and control limit and offset */ PaginationRequest pagination_request = 4; } message TrackListInvertibleFilter { TrackListFilter filter = 1; bool is_inverted = 2; } enum TrackListFilter { All = 0; Selected = 1; // in any way - explicitly or/and implicitly SelectedExplicitly = 2; SelectedImplicitly = 3; WithClipsOnMainPlaylist = 4; WithAutomationOnMainPlaylist = 5; Inactive = 6; // in any way - explicitly or/and implicitly InactiveExplicitly = 7; InactiveImplicitly = 8; Hidden = 9; // in any way - explicitly or/and implicitly HiddenExplicitly = 10; HiddenImplicitly = 11; Locked = 12; Muted = 13; Frozen = 14; Open = 15; Online = 16; } message PaginationRequest { int32 limit = 1; // maximum length of the list of data per one response int32 offset = 2; // size of the list of data for current response } Code:
'{ "track_filter_list": [ { "filter": "All", "is_inverted": false } ], "pagination_request": { "limit": 0, "offset": 0 }, "page_limit": 0, "is_filter_list_additive": true}' P.S. "Off topic: is there a way to prevent the Venue error from occurring in this command?" – Thank you for bringing this to our attention. We will discuss the necessity of returning this warning in cases where Venue-related parameters are not passed, and we will make the necessary changes in the upcoming releases. Regards, Artem |
#5
|
|||
|
|||
Re: GetTrackList command still returns an empty array here - Pro Tools 2024.3/SDK 202
Hi Artem,
Thanks, you are correct. When using: Code:
{ track_filter_list: [{ filter: "all", is_inverted: false }], pagination_request: { limit: 0, offset: 0 }, page_limit: 0, is_filter_list_additive: true, } I get a response. Woohoo! Code:
{ task_id: 'e8fc1d4e-807f-4c18-8b7b-303471e4bd73', command: 'GetTrackList', status: 'Completed', progress: 100 } { pagination_response: { total: 8, offset: 0, limit: 0 }, track_list: [ { name: 'CHARACTER 1', type: 'TT_Audio', format: 'TF_Mono', timebase: 'TTB_Samples', id: '{00000000-2a000000-11db1de2-78128240}', id_compressed: 'baGHj44H3BeqaaacOaaaaa', index: 1, color: '#ff13355f', track_attributes: [Object] } {other tracks deleted from post} ] } Geert
__________________
Geert van den Berg |
#6
|
||||
|
||||
Re: GetTrackList command still returns an empty array here - Pro Tools 2024.3/SDK 202
Hi Geert,
I'm glad you were able to get a correct response. You are among the pioneers using such an unconventional approach, so your experience is interesting to us. Wishing you success! Regards, Artem |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Command 8 works with Pro Tools 2024.3 on Win 10 64bit | unkJE | ProControl, Control|24, Command|8 | 5 | 07-01-2024 05:49 AM |
2024.3 Cycle Through Edit Modes Key Command changed? | Chevron | Pro Tools | 4 | 03-13-2024 02:24 PM |
Pro Tools 2024.6 | unkJE | Pro Tools | 1 | 03-07-2024 08:28 PM |
Pro Tools Update January 2024? | ButtercupFactory | Pro Tools | Intro Discussion | 3 | 02-05-2024 07:00 AM |