Compile audio

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Compile audio

Post by bidgeeman » Sat May 16, 2009 10:39 am

Is there a way to compile several audio files, (like a drum loop), and copy them out to a folder as one longe track?

Many thanks for any help on this.
Bidge

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sat May 16, 2009 4:26 pm

bidge,
Rev is not good at audio/video editing, in fact you have to work around this if you want to do editing and it is not easy going. There is a Quicktime external that lets you do this kind of things by Trevor Devore
http://www.bluemangolearning.com/develo ... cedqt.html
it is powerful but not 'self evident'.
If what you want is editing audio files then this is the way to go.
(the shell might offer something, but I dont know, maybe lame?)
If you want to loop the sequence in Rev than you have other options in the player, that let you do that. It all depends on what you have in mind, so if you want to use audio in a stack then you might want to explain a bit and there might be a solution.
regards
Bernd

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Sat May 16, 2009 8:04 pm

Hi Bernd.

I tried installing the QTExternal plugin but everytime I try to load the QTExternal.rev plugin stack Runrev locks up??? I have posted a help me message to Bluemango but nothing has come back as et.

Cheers
Bidge

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sat May 16, 2009 8:15 pm

Bidge,

how did you install the external. You just put it into the folder
documents->My Revolution Studio->Externals, that is it. Then you use the example stacks.
You also could put it into the Revlution app folder into the externals folder, but with the next version you would have to reinstall the external. If you put it into the document->My Revolution Studio folder then it stays.

If you use Enterprise then the folder would be My Revolution Enterprise

You need Quicktime installed, obviously.

What version of Revolution are you using? Do you have access to RevOnline? I could post a mini version of appending 1 audio file to a second one that shows the idea.
regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sat May 16, 2009 8:24 pm

bidge,
maybe you could explain a little what you have in mind, it is easier to help you then.
Do you want user interaction, do you want a batch process, what file types are you trying to concatenate?
Just give us an idea.
regards
Bernd

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Sat May 16, 2009 9:02 pm

Hi bn
Thanks for offering to help. I have found out how to merge two mp3's together using a bat file operation. I want to make a little rythm maker that merges several mp3 loops together into one from a selection that via a checkbox list next to each rythm.

So, I need to get the name of the checkbox (say loop1.mp3, loop2.mp3 etc) placed in between this bat data. Then I need the data saved out as a bat file, then I need to run that bat file, (I have found that code), to merge the mp3's together. Normally I like to try to figure things out myself but I think this code is a bit too advanced for my level at this point putting all these bits of code together. But, I so far I have found this code to get the mp3 names but for some reason a comma keeps appearing after the mp3 name data I can't get rid of:

on mouseUp

put empty into b_list
repeat with i = 1 to the number of buttons of this card
if the style of button i = "checkbox" and the hilite of BUTTON i = true then
put the LABEL of btn i &"," after b_list
end if
end repeat

delete char -1 of b_liste
put b_list into field "Test"

go to card "EntriesInvoice"
end mouseUp

Any pointers would be great thank you.
Cheers
Bidge
Last edited by bidgeeman on Sun May 17, 2009 12:22 am, edited 1 time in total.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sat May 16, 2009 9:12 pm

bidge,

I dont know anything about bat, I am on a Mac.

Your code though with the trailing comma:

Code: Select all

put the LABEL of btn i &"," after b_list 
and then you try to delete the comma

Code: Select all

delete char -1 of b_liste


the variable b_liste is wrong set it to b_list

The joys of coding...

regards
Bernd

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Sat May 16, 2009 9:29 pm

Oh...wow! That was all it was a typo :( ....but it works...thanks.
Getting there. One more question.

how do I paste a text line before and after the name data I have extrac ted from the checkbox?

I have this data now
001.mp3+002.mp3

(I need to place data here) 001.mp3+002.mp3 (and here)

Thanks again
Bidge

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sat May 16, 2009 9:36 pm

if I get the format right

put "000.mp3+" before the variable
put "+003.mp3" after the variable

regards
bernd

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Sat May 16, 2009 9:42 pm

I used this and it worked.

put the LABEL of btn i &"copy /b " before b_list

Is that ok?
Bidge

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sat May 16, 2009 9:45 pm

shure, looks good. The syntax is alright for Rev, If it works then the syntax (format) must be ok for merge too.
Bernd

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Sat May 16, 2009 9:46 pm

Great!!!....many thanks again Bernd

Cheers
Bidge

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Sun May 17, 2009 7:57 am

Can you please tell me how to write or copy the text contents a text field to an external text file?

EDIT: Worked it out 8)


Cheers
Bidge

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4172
Joined: Sun Jan 07, 2007 9:12 pm

Post by bn » Sun May 17, 2009 8:33 am

bidge,

you have 2 options
look up:
option 1:
open file ...
write to file ...
close file ...

option 2
look up:

URL

from the dictionary: put field 3 into URL "file:test.txt"

but you have to supply a path. Otherwise if you provide just a filename it will store the file in the defaultFolder
look at this thread in the forum regarding defaultFolder
http://forums.runrev.com/phpBB2/viewtop ... highlight=
the easiest way to see the way Revolution wants a path (which is a unix way, not Windows style) is to just select a file with:

Code: Select all

on mouseUp
answer file "please choose a file"
if it is not emtpy then put it
end mouseUp
You will figure it out.

regards
Bernd

bidgeeman
Posts: 495
Joined: Wed Feb 21, 2007 7:58 am

Post by bidgeeman » Sun May 17, 2009 9:03 am

Hi Bernd
Thanks a heap for your tolerance with a new user mate.
I owe you a beer ;)

Cheers
Bidge

Post Reply