[audacity4blind] Nolan: time shifter plug-in plus responses

  • From: "David R. Sky" <davidsky@xxxxxxxxxxxxxx>
  • To: audacity4blind@xxxxxxxxxxxxx
  • Date: Thu, 14 Jun 2007 23:21:14 -0700 (PDT)

Hi nolan,

If you really want to learn Nyquist, I'd suggest first becoming
comfortable by getting a version of Common LISP or some equivalent
and practising with non-audio-related stuff. I use two DOS versions
of XLISP so I can test some complex non-audio code before sticking
it into any of my plug-ins - it helps a lot!!!

There's also the news group comp.lang.lisp - I once saw a post
there by someone who said he was blind too, but I didn't contact
him.

There is a group for learning to write Nyquist plug-ins for
Audacity, I don't know it offhand but there's a link to it on my
Audacity nyquist resource page

www.shellworld.net/~davidsky/audnyq.htm

Nolan: I'd like to partially fade out bed music for podcast intros,
talk over the faded bits, fade back in then do a full fade.

David: This was a request on the regular Audacity group two or
three years ago, I understand it's call "ducking" audio. If I find
it on my computer I'll attach it to this post. As I recall, select
the portion of audio you want to drop, select 'Ducking audio' from
effects menu,  set volume to drop e.g. 3 db, give it the fade times
(how many milliseconds to fade down then fade back up).

Well, it's not on either of my computers, I'll have to write it up
for you.

I trust you know that this is an effect, and to make an effect
work, you first need to select some portion of audio in Audacity,
select the effect from the effects menu, fill in whatever edit
fields, then hit return or click on the okay button. This is like
selecting text in a document to alter its font.

Nolan: Is there any way to make the envelope tool accessible?

David: Not as far as I know.

Nolan: Failing that, perhaps partial fade plugins could be written?
They could accept, say, percentage of original amplitude as a
parameter, then fade the selection in or out to that percentage. Or
maybe just additional "Fade in/Fade out" effects with a single
control, so they'll appear as "Fade in..." near "Fade in" in the
menus?

David: If you can be specific what you want here, I can write it,
fade-in, fade-out and linear envelope plug-ins are very simple.
Just let me know what specifically _you_ would like. How would you
use it? - give me step-by-step picture of what you would do, such
as

select all audio
select percentage of duration to start fading (or time to start
fading)
select percentage or decibel value to fade audio
how long or what percentage of duration to keep at reduced volume
what the fade-in and fade-out times are to be

This is just an example. You set the parameters I'll write the
code. I've written several plug-ins for someone else, we have a lot
of back-and-forth as he more clearly defines what he wants, and
lets me know how or whether I'm getting his ideas.

Nolan: I'm also wanting to timeshift tracks such that, say, I can
insert bumpers and promos at various points.

David: Attached is timeshif.ny. Select audio, select 'Time shifter'
from the effects menu, set how much time to shift forward (a
positive value, which inserts silence), or a negative value - how
much audio to cut from the start of the selection.

If you'd like me to alter this plug in some way, let me know
specifically what you want.

Cheers

David

--
David R. Sky
http://www.shellworld.net/~davidsky/

;nyquist plug-in

;version 2

;type process

;name "Time shifter..."

;action "Time shifting..."

;info "timeshif.ny by David R. Sky www.shellworld.net/~davidsky/nyquist.htm 
\nReleased under terms of the GNU Public License"



;control shift "Time shift [milliseconds]" int "" 0 -1000 1000



#| Time shifter by David R. Sky, March 23, 2006

simplified June 14, 2007 with a single time shift value

http://www.shellworld.net/~davidsky/nyquist.htm

Released under terms of the GNU Public License

http://www.opensource.org/licenses/gpl-license.php



How it works - if time shift<0ms, chop out specified amount of

audio from start of track; otherwise insert specified amount of

silence before track and shift track forward specified amount of

time.

|#



; time shift function

(defun time-shift (sound dur time)

(if (< time 0)

; if time<0

(extract-abs (- time) dur sound)

; otherwise...

(sim (s-rest time)

(at-abs time (cue sound))

) ; end sim

) ; end if

) ; end defun



; determine selection duration in seconds

(setf dur (/ len *sound-srate*))



; convert ms to true time

(setf shift (/ (float shift) (float 1000)))





; applying time shift

(if (arrayp s)

; apply to stereo track

(vector (time-shift (aref s 0) dur shift)

(time-shift (aref s 1) dur shift)

) ; end vector

; apply to mono track

(time-shift s dur shift)

) ; end if



Other related posts:

  • » [audacity4blind] Nolan: time shifter plug-in plus responses