Re: [Audacity-devel] Seeking advice on remote control of Play, Stop, Record, etc.
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
From: James C. <cr...@in...> - 2009-07-30 09:55:52
|
Marty, You should shift to using CVS HEAD and look at Dan Horgan's mod-script-pipe plug in. http://wiki.audacityteam.org/index.php?title=Scripting This plug in is designed to accept commands arriving in Audacity from an external perl script. It has its own thread to monitor communications, posts a message to the GUI thread from that and sends responses and statuses back. This is exactly what you want if driving Audacity from an external script. Note that the perl interpreter is not built in to Audacity. You can use any separate scripting language that supports named pipes. The mod-script-pipe plug in is mainly used for effects but does, of very recently, support menu commands. You should try it out with "play", "record", "pause" and "stop". If you want to drive from a completely separate C/C++ program then you would open a named pipe to the plug in from within your C/C++ program. I'd suggest you compile and get it working from Perl first. The scripting plug in is being developed as part of GSoC which has a 'pencils down' date of 10th-17th August. One way to get help in using this from Dan without taking too much of his time so close to the deadline is to add your questions about how to compile/use it on the scripting wiki page or associated talk page. This will help Dan in improving the page so that it is more useful to people new to the feature - which is on his things-to-do list. When the page is more mature it will become a page on the audacity manual wiki. Meanwhile, please tell us more about your application. What do you want to use this for? It may highlight for us missing commands that should be added to Audacity to make better use of remote control. --James. John Martin Goddard wrote: > Hello Everyone, > > I want to build a version of Audacity that accepts events from an external source and controls the record and playback functions of Audacity, and was hoping for advice on the best direction to go. > > Should I create and send command events into the WxWidgets part of the program? > I perused the Creating Custom Events part of the WxWidgets docs, but I believe I'm not really creating custom events, but rather generating existing events from a customized source. > > Also, should my command-event-generating module be compiled into a DLL and loaded as a module with the others in the “LoadModules()” code? I am concerned about marshalling my object for method calls, and about it running on its own thread. > > Thanks in advance for any advice. > > I see there’s a big effort to get a release out, and prefer to help rather than hinder in this regard. > > Best Regards, > Marty Goddard > > p.s. I’m compiling Audacity version 1.3.7 on Windows using Vista Business edition, and Visual Studio 9 (2008). > |