View Single Post
Old 10-12-2019, 11:50 AM   #71
jahudka
Human being with feelings
 
Join Date: Jul 2010
Posts: 49
Default Sends & receives & envelopes

@tparker24, just as a side note about the compatibility of reapy.Track and the native MediaTrack - the native MediaTrack object should be available as track.id if I'm reading reapy source well - so you should be able to do this:

Code:
x = project.get_selected_track()
RPR.GetMediaTrackInfo_Value(x.id, 'IP_TRACKNUMBER')
Anyway, I wanted to ask about APIs for track send / receive envelopes. When I'm working on a larger project with lots of aux busses for stuff like reverbs and delays I often need to toggle visibility for a lot of send volume envelopes, preferably with a single keystroke. I've tried writing a ReaScript for that, but I'm stuck because the ReaScript API doesn't have nice methods for working with send / receive envelopes' states - there is just the RPR_SetEnvelopeStateChunk method for setting the state as XML, but that's just such a pain to work with.. So I'd like to ask if you have any pointers about working with the XML chunk (like a documentation link), and also suggest a couple of features for reapy which would allow me to do this (and which might be of interest to others as well):
  • Implement __eq__ magic methods throughout the API to allow checking object identity ("is this track from project.tracks the same as this track from project.selected_tracks?")
  • Add reapy.Track.receives (now there's only Track.sends, which I believe doesn't include receives)
  • Add methods to reapy.Envelope to allow changing envelope state (active, visible, armed)
  • Add reapy.Send.envelopes and reapy.FX.envelopes - those two would be awesome, but also I think they'd be the hardest to implement, because from the ReaScript perspective there's no such thing as a send's envelope - it's the track's envelope - so I think these envelope lists should somehow proxy and filter the owning track's envelopes list (but not sure how you'd do that since I'm not sure you can check that a given track's envelope actually corresponds to a given send's or effect's parameter)

Also I'm loving this API! Truly amazing work, sir, even though I'm not all too proficient in Python I can appreciate how much easier it would be to develop custom actions and extensions using reapy than the native API. Thank you for all the time and effort you're putting into this!
jahudka is offline   Reply With Quote