Merging audio externally
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Merging audio externally
Currently I have an example stack that bernd kindly did for me that loads two audio files into 2 player objects, then merges them into 1 wav file via QT External export.
I have a list of 20 different audio loops that a user can select via a checkbox, then the files are combined into 1 wav file in the order of selection.
My problem is, I have found that having 20 player objects in the stack to store each audio loop individually really makes the "exe" sluggish on start up but I would eventually like to have up to 100 loops. I'm afraid to put so may player objects into the stack as it would make the exe almost impossible to load.
so, is there a way to select the audio files via checkbox first, THEN have them loaded and merged using I player objec? Can the operation be done externally from a library or do the audio files need to be imported into the their own player first?
Thanks for any help
Bidge
I have a list of 20 different audio loops that a user can select via a checkbox, then the files are combined into 1 wav file in the order of selection.
My problem is, I have found that having 20 player objects in the stack to store each audio loop individually really makes the "exe" sluggish on start up but I would eventually like to have up to 100 loops. I'm afraid to put so may player objects into the stack as it would make the exe almost impossible to load.
so, is there a way to select the audio files via checkbox first, THEN have them loaded and merged using I player objec? Can the operation be done externally from a library or do the audio files need to be imported into the their own player first?
Thanks for any help
Bidge
Could someone please tell me if something like this could be a possible solution to stringiing 2 wav files together from an external library?
on MouseUp
put "C:\test.wav" into mc
qtInitializeEditing mc
qtSelectAll mc
qtCopy mc
set the currenttime of player "player1" to the duration of player "player1"
qtAddMovieSegment mc, false
put "C:\test2.wav" into mc
qtInitializeEditing mc
qtSelectAll mc
qtCopy mc
set the currenttime of player "player1" to the duration of player "player1"
qtAddMovieSegment mc, false
qtExport mc, 0, tPathAndName, "wav", "myStoredSettings"
end MouseUp
I can't get this to work.
Cheers
Bidge
on MouseUp
put "C:\test.wav" into mc
qtInitializeEditing mc
qtSelectAll mc
qtCopy mc
set the currenttime of player "player1" to the duration of player "player1"
qtAddMovieSegment mc, false
put "C:\test2.wav" into mc
qtInitializeEditing mc
qtSelectAll mc
qtCopy mc
set the currenttime of player "player1" to the duration of player "player1"
qtAddMovieSegment mc, false
qtExport mc, 0, tPathAndName, "wav", "myStoredSettings"
end MouseUp
I can't get this to work.

Cheers
Bidge
Hi Bidge,
you can do it with 2 player objects. One is the receiving object that you append via copy paste to. The other is the one that holds the audio file that you want to append. In the example I send you that is player "player2".
You would set up a repeat loop to load a file into player2 and every time you copy the content from player2 to the end of player1.
You can easily do this from a list of files in a repeat loop.
Watch out: in the code you posted you pass a filename to the external. That does not work.
The external expects a reference to a player object like in the example:
If you want more than 1 audio appeded load new audio into player 2 and repeat the appending by setting first the filename of player 2 to another file. Than basically as in the eport button.
regards
Bernd
you can do it with 2 player objects. One is the receiving object that you append via copy paste to. The other is the one that holds the audio file that you want to append. In the example I send you that is player "player2".
You would set up a repeat loop to load a file into player2 and every time you copy the content from player2 to the end of player1.
You can easily do this from a list of files in a repeat loop.
Watch out: in the code you posted you pass a filename to the external. That does not work.
The external expects a reference to a player object like in the example:
Code: Select all
-- pass the controllerID to the external
put moviecontrollerid of player "player1" into mc
regards
Bernd
Bidge,
I uploaded a stack that shows how to choose a folder that conatains .wav files and it displays those files in a field. Then you can select files from that field and it gives you the full path and name of the selected audio files.
The stack is "ChooseAudioFiles"
You could use this for your repeat loop to append wav files. Just load player2 after copying from player2 with the next file (set the fiilename of player "player2" etc)
regards
Bernd
I uploaded a stack that shows how to choose a folder that conatains .wav files and it displays those files in a field. Then you can select files from that field and it gives you the full path and name of the selected audio files.
The stack is "ChooseAudioFiles"
You could use this for your repeat loop to append wav files. Just load player2 after copying from player2 with the next file (set the fiilename of player "player2" etc)
regards
Bernd
Hi bernd.
I really appreciate you spending the time on that stack bernd.
Here I have uploaded a small stack of exactly what I am trying to achieve with all this.
http://www.errolgray.com.au/CheckboxWav ... ombine.rev
It's a non working stack but shows what I am trying to achieve.
The biggest problem for me is getting the audio loaded into a player in the order that the Checkbox's are selected, ie, if I select Track 5 then Track 1 the audio loads into the player in that order from a library.
I have managed to create a stack that works this way but it uses a .bat file shell operation to merge the files. Now I am trying to get the same results but Using QT External and wav files rather than mp3 files.
Many thanks
Bidge
I really appreciate you spending the time on that stack bernd.
Here I have uploaded a small stack of exactly what I am trying to achieve with all this.
http://www.errolgray.com.au/CheckboxWav ... ombine.rev
It's a non working stack but shows what I am trying to achieve.
The biggest problem for me is getting the audio loaded into a player in the order that the Checkbox's are selected, ie, if I select Track 5 then Track 1 the audio loads into the player in that order from a library.
I have managed to create a stack that works this way but it uses a .bat file shell operation to merge the files. Now I am trying to get the same results but Using QT External and wav files rather than mp3 files.
Many thanks
Bidge
Sorry bernd. 
I have zipped it up. Maybe that will work.
http://www.errolgray.com.au/Checkboxaudio.zip
Please let me know if that does'nt work.
Cheers
Bidge

I have zipped it up. Maybe that will work.
http://www.errolgray.com.au/Checkboxaudio.zip
Please let me know if that does'nt work.
Cheers
Bidge
Hello bernd. That stack is fantastic! Thank you so much. The only adjustment I cannot figure out how to make is to have the tracks combine in the order of selection....lets say checkbox 5 is selected before checkbox 1... then the order they would be combineded would be Track5 then Track1. This has been the problem I can't figure out how to do.
In the old one I made , when Track 5 is selected, a library is entered into a hidden text field. Each checkbox has this code:
This way a list is built no matter what order the user selects the checkbox tracks.
I can't figure ot how to implement this with QT? I thought possibly have a field that takes the pathname of the Track and adds it dynamically to the player object?
Cheers
Bidge
In the old one I made , when Track 5 is selected, a library is entered into a hidden text field. Each checkbox has this code:
Code: Select all
on mouseUp
if the hilite of me then
put label of me after fld "mp3"
else
put empty into fld "mp3"
end if
end mouseUp
I can't figure ot how to implement this with QT? I thought possibly have a field that takes the pathname of the Track and adds it dynamically to the player object?
Cheers
Bidge
Hi Bidge,
from reading this thread it sounds like your task could be done
with the help of my little SMIL library, "mk_libSMIL1":
http://www.major-k.de/xtalke.html
It lets you create a QT playlist of two or more sounds, that you
can load into a player and then export it as one file.
Best
Klaus
from reading this thread it sounds like your task could be done
with the help of my little SMIL library, "mk_libSMIL1":
http://www.major-k.de/xtalke.html
It lets you create a QT playlist of two or more sounds, that you
can load into a player and then export it as one file.
Best
Klaus