Plotting AIFF waveform

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Chris
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10
Joined: Tue Mar 27, 2007 1:24 pm

Plotting AIFF waveform

Post by Chris » Wed Mar 28, 2007 10:11 pm

Hello folks -

I seem to remember a while back that some clever person had produced a routine for parsing and plotting sound waveforms. Or am I dreaming it?

Can anyone point me in the right direction?

Thanx

Chris

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Mar 28, 2007 10:42 pm

Hi Chris,

It is in RevOnline.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Contact:

Re: Plotting AIFF waveform

Post by Mark Smith » Wed Mar 28, 2007 11:50 pm

It was me....

It's on RevOnline under user "Mark Smith"

or from my own site:


http://www.futility.co.uk/futsoft/revolutionstuff.html

Best,

Mark

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Plotting AIFF waveform

Post by FourthWorld » Thu Mar 29, 2007 8:15 am

Way cool, Mark.

What would be needed to also generate wave forms from MP3 files?

Chris
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10
Joined: Tue Mar 27, 2007 1:24 pm

Post by Chris » Thu Mar 29, 2007 10:33 am

Fantastic, thanks!

Chris

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Contact:

Re: Plotting AIFF waveform

Post by Mark Smith » Thu Mar 29, 2007 6:30 pm

FourthWorld wrote:Way cool, Mark.

What would be needed to also generate wave forms from MP3 files?
The difficulty with mp3s (or mp4s, or ogg etc) is that they're compressed, - so in order to draw a waveform, it would be necessary to uncompress them, which is what an mp3 player does.

There's really no reason that an mp3 could not be un-compressed to a wav or aif and then rendered, but it all takes time (which may or may not matter in a given application), and would either have to be done by an external (Trevor DeVores qt external?), or involve apple/vb scripting to get iTunes/WinAmp or whatever to do it.

If you have Lame or somesuch installed, it can be done with a call to the shell.

As it is, my waveform control is pretty slow, except on very short audio files, even with the compromises I made, so the range of applications for it is pretty limited (Scott Rossi used it in his tmAudio plug-in, but that mainly deals in short soundFX type files), and though I've tried various optimisations, I don't think I can do much more for the moment, unless I learn C and write an external!

Actually, this wouldn't be a huge job for someone who knows how to write C externals, as it's simply a question of mapping sample values to points in a graphic.

Best,

Mark

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Contact:

Re: Plotting AIFF waveform

Post by Mark Smith » Sun Apr 01, 2007 12:15 am

Actually, once again I must eat my words...having thought about it as a result of this thread, I've found a way to speed it up by a factor of 2 or 3.

I'm on the road at the moment, but I should be able to put an updated version up in the next couple of weeks.

Best,

Mark

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Tue Apr 03, 2007 8:37 am

Mark, you rock. :)

Looking forward to the spiffy new build....

jammmet
Posts: 1
Joined: Mon Nov 30, 2009 9:44 am

Re: Plotting AIFF waveform

Post by jammmet » Mon Nov 30, 2009 10:21 am

Hi Mark,
I realise it's been a while, but do you still have a working link to download the waveform plotter? Many thanks

Post Reply