I just tried it. It definitely works in that it fades to zero, but it looks like it actually reaches zero about 5-6 samples before the border of the clip. This is causing just a minor little audible "tick" when I loop it. Any idea why that might be happening? Can you get it to reach zero at the sample closest to the border?steve wrote:Copy and paste this code into the Nyquist Prompt text window and apply
Auto-Zero
-
Steve Bender
- Posts: 152
- Joined: Wed Feb 11, 2015 5:59 pm
- Operating System: Please select
Re: Auto-Zero
-
Steve Bender
- Posts: 152
- Joined: Wed Feb 11, 2015 5:59 pm
- Operating System: Please select
Re: Auto-Zero
Ya know, now I'm starting to doubt my last comment on this. I just tried to make the same type of loop, but doing the edits the way I have been doing it "by hand," without the Nyquist prompt, and I'm getting essentially the same results. So I don't think it's actually anything wrong with the script you wrote.
And it looks like I can fiddle with the fade length myself by adjusting the fade length in the code, so I can try out different things, see if any other value sounds better. Is there anything else in that code I can adjust to experiment?
So, can I save this particular Nyquist prompt as a setting somehow? Or would I have to paste it in every time I use it?
And it looks like I can fiddle with the fade length myself by adjusting the fade length in the code, so I can try out different things, see if any other value sounds better. Is there anything else in that code I can adjust to experiment?
So, can I save this particular Nyquist prompt as a setting somehow? Or would I have to paste it in every time I use it?
Re: Auto-Zero
This is a slightly modified version that is accurate to the sample:
As you can probably guess, the length of the fade is set by the first line.
Code: Select all
(setq fade-length 0.005)
(setq dur (get-duration 1))
(abs-env
(control-srate-abs *sound-srate*
(let* ((fl fade-length)
(env (pwlv 0 fl 1 (- dur fl) 1 dur 0)))
(mult s env))))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Steve Bender
- Posts: 152
- Joined: Wed Feb 11, 2015 5:59 pm
- Operating System: Please select
Re: Auto-Zero
Sweet, it works. I think the first one actually works well, too. I was just getting odd results with that one sample for some reason. I've since tried a few others and the results are what I was expecting.steve wrote:This is a slightly modified version that is accurate to the sample
So, it works!
So, can I save this particular Nyquist prompt as a setting somehow? Or would I have to paste it in every time I use it?
-
Robert J. H.
- Posts: 3633
- Joined: Thu May 31, 2012 8:33 am
- Operating System: Windows 10
Re: Auto-Zero
The oddity is due to different sample-rates.Steve Bender wrote:Sweet, it works. I think the first one actually works well, too. I was just getting odd results with that one sample for some reason. I've since tried a few others and the results are what I was expecting.steve wrote:This is a slightly modified version that is accurate to the sample
So, it works!
So, can I save this particular Nyquist prompt as a setting somehow? Or would I have to paste it in every time I use it?
A Sample at control-rate comprises 20 ordinary samples.
Thus, the initial number of samples is probably not divisible by 20 and this produces those offsets.
The second version that works at the track's sample-rate just needs to make more calculations.
However, that's not a problem because only the beginning and ending have to be calculated, anything else is 1.0.
It's fairly easy to embed the code in a plugin that can be accessed with e.g."0".
Steve will you guide thru this, I'm sure.
Re: Auto-Zero
We can make this code into a "plugin", then it can be "installed" as an effect that will appear in the Effect menu, and (optionally) you can assign a keyboard shortcut to the effect.Steve Bender wrote:So, can I save this particular Nyquist prompt as a setting somehow?
As we are now getting into the detail of making a new plugin, I'll close this topic and start a new one in the "New Plugins" section.
I'll give you a link to the new topic when I've written it - back soon
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
-
Steve Bender
- Posts: 152
- Joined: Wed Feb 11, 2015 5:59 pm
- Operating System: Please select
Re: Auto-Zero
Perfect. I’m all about keyboard shortcuts.steve wrote: you can assign a keyboard shortcut to the effect.
I’m looking forward to it. Thanks.steve wrote: I'll give you a link to the new topic when I've written it
Re: Auto-Zero
I've started a new topic here: http://forum.audacityteam.org/viewtopic ... 89#p267189
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)