On Sat, Oct 24, 2009 at 12:00:28PM +0000, John Martin Goddard wrote:
> I’m continuing with Mod-Script-Pipe as interapplication communication.
Sorry about my lack of response to your earlier message - at the time I
was travelling, and now I'm back at university and comparatively pressed
for time. That said, I do hope to have the occasional couple of hours
spare for Audacity-related pursuits!
> Please consider the following commands to be added:
> 1. GetTrackInfo: Type=Selection
> Rationale: Mute/Solo and several other commands apply to the selected track, so knowing the selected is good.
Am I right in thinking this would return a 'y/n' depending on whether
the specified track is selected? I think this is a good idea, but that
it should probably be 'Type=IsSelected' for clarity.
> Alternately, or perhaps in addition, it would be good also to have commands to get and set the selected track by number.
I believe it's possible to set the selected track by number already,
using something like: "Select: Type=Range FirstTrack=2 LastTrack=2",
although it might still be good to have a more direct way of doing this.
Since more than one track may be selected, any 'GetSelected' command
would need to return a list of track numbers. This could be useful, but
if it would already be covered by the modified GetTrackInfo then it
might be best to leave it at this stage, for simplicity. However, I
don't mind having both options if you think it'd be worth it.
> 2. Add to GetTrackInfo: Type=Pan and Type=Volume
> This will allow remote update of status after incremental changes are made to these settings.
This seems like a good idea. It'd probably make sense to add these types to
SetTrackInfo as well.
> 3. Refresh after renaming a track, and perhaps some other changes, do not appear until a refresh happens.
Yes, it might be safest to just refresh after executing any received
command. I haven't looked into how to force a refresh, but I know where
to add the code.
> I can look further into actually doing this, but I wanted to run the ideas past you guys first.
> The command set is quite rich and useful. I'm making progress and seeing some results. More to come.
Glad to hear it, I hope the project goes well.
As a side note: I believe it should (in theory) be possible for an Audacity
module to add new commands to the set, which can then be used via the
pipe. Not that it ought to be necessary in the above cases, but it does
mean that specialised modules can extend the scripting capabilities if
I'm also looking into using macros to make command definitions more
concise, as there are a lot of similar class declarations at the moment.