stuffing a group into a database or other file

stephen barncard stephenREVOLUTION2 at barncard.com
Sun Jun 9 17:47:29 EDT 2013


Damn, I'd promised it but never did it. I didn't want anyone to see the
messy experimental code.... very sloppy and I made up functions that could
have been handled by native code - I didn't know they existed, like
BinaryDecode.

 I discovered that later when I was checking out (late) Mark Smith's code
for his audio waveform stack. I was too ashamed of my short cuts and didn't
want to re-write the thing. It was also about "protecting my secret" at
first, but I don't feel that way now... anybody could have done this. It
just took heaps of trial and error, I had no help from anyone.

Also it was incomplete, I could only get AIF conversion to work , WAV gave
me problems, so I stopped when I proved audio could be exported.

The specs for AIF and WAV are out there (although parts are vague). The
hardest thing was to try to understand the way Rev handled audio files of
different types and sample rates and the function of the numbers at the end
of the file.

Audio in LiveRev is VERY basic to begin with. Sample rates limited up to
48k. Sample depth limited to 16 bit. Stereo is interleaved. No compressed
format can be stored, except the really old .au format, and I failed to
export those, although I spent an inordinate time investigating and trying.

LiveRev stores an exact, full size binary of the audio file after the
headers are stripped no matter what the source was, so to recreate the
file, the appropriate headers and jump tables need to be re-created. The
audio type doesn't seem to be part of the spec that is stored so that must
be derived from the suffix of the name of the stored audio clip. Perhaps
these are the reasons why the creators of the engine gave up on the idea of
exporting. I also found you don't want to create custom properties imbedded
in an audio clip, even though the engine doesn't try to prevent that; it
just bungs up the audio file, sometimes disastrously!

I was just about to share with the late Mark Smith, and he was excited
about the prospect. We were going to collaborate when I found out he had
died.

Lastly there was talk about improved AV in Livecode, so I shelved the
project, and the client that brought up the possibility of wanting it
disappeared, so I moved on.

Now that the engine is open sourced, perhaps some of the mysteries are now
in the open, but how can I use knowledge of the audio system to make a
commercial application using this ?   Gives me a headache.

I think I promised Jerry a copy but forgot if I did or not; apologies if I
didn't. He was really the only other person that asked besides you, Al...

I need to see if these stacks even work any more in the latest version, I
haven't checked since my mom passed. I will report back.

sqb


On Sun, Jun 9, 2013 at 12:38 PM, Alejandro Tejada <capellan2000 at gmail.com>wrote:

> Hi Stephen,
>
>
> Stephen Barncard-4 wrote
> > the copy command can obtain the binary image of any object, which then
> > resides in clipboardData[ objects]  and can be  stored as a custom
> > property
> > or a binary 'blob' for your db
> > This is what I did to create a way to export  sound clips from a stack to
> > see if it could be done.
>
> Did you released the script that allows to export
> embedded sounds from stacks?
>
> Al
>
>
>
Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>



More information about the use-livecode mailing list