I was inspired by a recent forum discussion about the cross fader script. I seldom use iTunes, because I never have free time that I have to fill. I have to go from one singer immediately to the next all night.
But what I DO use is an app to record the audio of a singer, so I can play it back after they are done. I use the hardware mixer to help crossfade, but it is a very rough solution. So I wrote two scripts. The first automates recording the audio clips. It also gives me the option of recording them to disk when they are finished, but that is not necessary, even for the second script to work.
The second script fades the end of the current track in kJams out smoothly, and cross fades the most recent recording into the mix. It can then either play all the way through, or you can hit the stop playback button, which will then fade it back out, return the kJams volume to max, and then bring kJams back to the frontmost application.
Here is a link to the code:
http://karaoke.kjams.com/wiki/Code/AudioClip_Recorder
Hope someone finds it useful.
Audio clip generator and playback crossfader
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Audio clip generator and playback crossfader
That sounds brilliant! I'm still trying to get the whole recording of the singers to work for me though. I tried it last week pre-gig and while audio recorder looked to be recording via the griffin imic (the green bars were certainly moving) I was getting nothing through playback? I need to spend some time looking at this rather then 15 minutes before we start a gig.
Re: Audio clip generator and playback crossfader
I remember you saying, it just seems a bit "overkill"
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Audio clip generator and playback crossfader
If you are using audio recorder, make sure to check the drop down menu to make sure that you are using that mic as input.
If you are using my script, which triggers quicktime, open a new audio recording and use the disclosure triangle to make sure that the input is set to your mic. From the sound of it, the application is not getting the input.
If you are using my script, which triggers quicktime, open a new audio recording and use the disclosure triangle to make sure that the input is set to your mic. From the sound of it, the application is not getting the input.
Re: Audio clip generator and playback crossfader
Pretty kewl recorder but it times out on me about half way through the song. Any suggestions?
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Audio clip generator and playback crossfader
Oh, I forgot, I had to modify the script to fix that, but I guess I forgot to post the code (or maybe I did, and you got the unupdated version?) Hold on, I'll check… .
…
Okay, back.
Yup, my fault. The updated code has been posted, but here it is here, too:
As you can see, all you need to do is wrap the original in a timeout conditional. Normally, Applescript defaults to a very short timeout, as you have seen. Setting it to 600 seconds (10 minutes) lets the script last long enough to record just about any full-length song.
Sorry about the confusion. Hope that helps.
P.S. I would rather use Audio Recorded than QuickTime, but I have not quite figured out how to script it yet.
…
Okay, back.
Yup, my fault. The updated code has been posted, but here it is here, too:
Code: Select all
with timeout of 600 seconds
tell application "QuickTime Player"
activate
new audio recording
start document 1
set question to display dialog "Recording started" buttons {"Stop recording", "Save Recording"}
set answer to button returned of question
stop document 1
if answer is equal to "Save Recording" then save document 1
end tell
end timeout
Sorry about the confusion. Hope that helps.
P.S. I would rather use Audio Recorded than QuickTime, but I have not quite figured out how to script it yet.
Re: Audio clip generator and playback crossfader
What do i do with this? copy and paste it before and after the original recorder script? I looked for the updated recorder script so i could just replace the whole thing but it only shows the 600 timeout script and the playback script. Am i looking in the wrong place? Thanks in advance -Brendan
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Audio clip generator and playback crossfader
Just replace the entire recorder script with that one. If you look closely, you'll see that it is identical, except for the "timeout" wrapper.
Alternately, you could also replace it with this one, which removes the dialogue box, thus requiring you to save using quicktime. That is what I have ended up using, since it occurred to me that the dialogue box was not really simplifying anything. I REALLY want to figure out how to do it with "Audio Recorder" as it has many advantages, but I still can't figure out some scripting issues.
Alternately, you could also replace it with this one, which removes the dialogue box, thus requiring you to save using quicktime. That is what I have ended up using, since it occurred to me that the dialogue box was not really simplifying anything. I REALLY want to figure out how to do it with "Audio Recorder" as it has many advantages, but I still can't figure out some scripting issues.
Code: Select all
tell application "QuickTime Player"
activate
new audio recording
start document 1
end tell
Last edited by DeusExMachina on Mon Jul 05, 2010 1:51 pm, edited 1 time in total.
Re: Audio clip generator and playback crossfader
I get it. Great, everything works fine now, thanks for your help, we will have fun with this one.