Now Robert seems to suggest an effect that would rewrite some selection plus context. I only want something adjusting the boundaries of the selection, examining context. Or in my example could I fold the deletion operation into it so it’s an “effect?”
Maybe the parameter comments at the head of all Nyquist files might specify an amount of context? Radical.
I hope that I don’t sound like I’m putting a damper on your enthusiasm Paul - quite the opposite is my intention, but it is hard enough to attract developer attention for developing features for which there is a compelling need. It is unlikely that we would be able to attract developer attention for a feature that can already be accomplished in other ways, or for a feature that would require a major redesign of Audacity. Much of the “fun” of writing Nyquist plug-ins is the creative thinking required to work around its limitations
You have not yet given a lot of detail about your proposed plug-in, but from the description so far I think that it will be possible to achieve the desired result without waiting for a developer to expand the capabilities of Nyquist plug-ins in the way that you envisage (which could be a very long wait). What I would suggest is that you start a new topic in the New Plug-Ins forum, about your proposed new plug-in. I will be happy to try and help you develop a plug-in to do the job (and I’m sure that Robert will too), though it may require a slightly different approach to your current concept.
Well, if you’ve read my example, I think I am already imagining a hack-around. You already wrote me a script that has some global-variable memory, so maybe I can call my thingy once with one selection, then again after moving the left boundary leftward: the second call could remember the length from the first, subtract that from the right boundary, and thus have the information of a range plus a selected point inside it. So one call gathers info, the second does the work, and it’s enough that the second call includes all of the pause. I could make it an analyzer that labels what I want to delete. Or just make an effect that does the deletion.
The keystrokes might not be as few as I’d hoped but it could still automate something that takes more care to do now.
So that’s how I might use a range plus point inside, but it’s less clear how to do a range in a range if there is no notion of global positioning of the samples.
Make the current locale available to Nyquist.
This would allow comma as decimal separator to be handled correctly (same as built-in Audacity effects) when text widgets are used for numerical input.
Make the Audacity configuration directory known to Nyquist. This would be useful to allow Nyquist effects to save and recall settings, and even to read audacity.cfg.
Some means of conditional execution of plug in code depending on the date of the plugin file and of other files that it loads.
In other words: execute certain things only the first time an effect is invoked in a session (for most users) but still allow those who experiment with Nyquist to update effects during a session.
Because my crazy ambition is a faster compiled XLisp (at least compiled to some more rapidly interpreted intermediate form), but I don’t want recompilation with every use of an effect.
Even without that, I suspect that each invocation of an effect is repeating the parsing and replacing function definitions in the Lisp runtime needlessly. There is opportunity for some small performance improvement of effects. Function definitions should go in a .lsp file, then conditional load of the file should happen. Scanning the conditionally loaded file is avoided the second and later times. Only the control comments and top level calls need be in the .ny file.
That is pretty huge.
You could try asking Roger Dannenberg about extending the maximum size, but perhaps you would be better to use MatLab for such specialised work.
I think that for most Audacity users, that would be too much “clutter” in the effect menus.
Also, not all of the plug-ins that are available (here on the forum and on the wiki) meet the high standards for inclusion in the official Audacity release.
If there are specific plug-ins that you would like to see included, then they could be considered on their individual merits.
(A “Noise Gate” plug-in will be included in the next release)
If you use the same scripts regularly, I’d recommend that you turn them into plug-ins and install them.
For scripts that you only use occasionally, you can select them with the “Load” button.