editing & combining sound files?

Stephen Barncard stephen at barncard.com
Thu Aug 23 03:32:37 EDT 2018


if you have a lot of files to convert, I'd go for using Livecode for "glue"
while making calls to SOX.
SOX can convert and move in one operation;

forget doing anything in Livecode with sound - the internals are not
equipped to be easy to manipulate.
I actually made an editor that could draw out an imbedded sound in a stack
and export to AIFF by moving binary blocks around and reconstructing the
headers and jump tables. There are several ambiguities in audio file
standards to make things messy, although the audio blocks of WAV and AIFF
files are almost identical. Look out for little and big endian variations,
etc.

SOX did everything I needed, including conversion to MP3.


sqb

--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org

On Wed, Aug 22, 2018 at 10:52 PM, Nicolas Cueto via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Well, maybe some day I'll put the time in to study Geoff's and Tom's
> solutions. But, for future reference, below is my easier-for-me solution.
>
> First, use a sound-editor (Goldwave) to convert all AU files to RAW (i.e.,
> snd).
>
> Second, run this LC script to merge those converted files (interleaved with
> silence) into a new .snd file:
>
>  put URL "binfile:C:/the_path/faster/{file ID}.snd" into tNewSnd
>  put URL "binfile:C:/the_path/1_sec_silence.snd" after tNewSnd
>  put URL "binfile:C:/the_path/slow/{file ID}.snd" after tNewSnd
>  put tNewSnd into URL  "binfile:C:/the_path/CD/{file ID}.snd"
>
> Third, use the sound-editor again, this time to convert those new .snd
> files into .mp3.
>
> That's it. But if someone wants to post exact details of how to LC script
> what Geoff suggests, i.e., stripping headers from an .au (or any!) sound
> file type, I'm still all ears.
>
> Cheers.
>
> --
> Nicolas Cueto
>
> On 23 August 2018 at 13:40, Tom Glod via use-livecode <
> use-livecode at lists.runrev.com> wrote:
>
> > sox is good for this kind of stuff, you can automate the command-lines
> > using livecode....but you can skip some of the bs you would probably
> > encounter with LC and audio "processing".
> >
> > http://sox.sourceforge.net/
> >
> > On Wed, Aug 22, 2018 at 10:30 PM Geoff Canyon via use-livecode <
> > use-livecode at lists.runrev.com> wrote:
> >
> > > I did something very much like this way, way, way long ago (in the
> > MetaCard
> > > days...). I don't remember the sound format, and it was mono, not
> stereo,
> > > but it turned out that the format for the sound file was *really*
> > simple: a
> > > few bytes of easily-managed header, a bunch of binary data that
> > represented
> > > the sound file data, and a few bytes of footer.
> > >
> > > So the steps above would be roughly:
> > >
> > > 1. Read in the binary data from the sound file, strip the
> header/footer.
> > > 2. Figure out what the "silence" value is for that sound format,
> append a
> > > certain number of that value to the data.
> > > 3,4. Read in the binary data from the second file, strip the
> > header/footer
> > > and append to the data.
> > > 5. ??? Not sure how to do this. Instead, might add the appropriate
> > > header/footer and write out the data in the same format as the input
> > files.
> > > 6. Close the access to the original files.
> > >
> > > If MP3 isn't comprehensible, then you could bulk convert the resulting
> > > files from AU to MP3 using any number of tools.
> > >
> > > gc
> > >
> > >
> > > On Wed, Aug 22, 2018 at 5:14 PM Nicolas Cueto via use-livecode <
> > > use-livecode at lists.runrev.com> wrote:
> > >
> > > > Hello List,
> > > >
> > > > I wish to automate a repetitive (and tedious!) process that's now
> being
> > > > done manually using a sound-file editor (Goldwave).
> > > >
> > > > The process is:
> > > >
> > > > 1. Open an AU sound file.
> > > > 2. Append 1 second of silence to that file.
> > > > 3. Open a 2nd AU sound file.
> > > > 4. Copy and append that 2nd file to the 1st file.
> > > > 5. Save as MP3 with a new title that now-modified 1st file.
> > > > 6. Close that 1st file unmodified.
> > > > 7. [Repeat 1-6.]
> > > >
> > > > If this is possible (easily possible!) with LC, what LC commands
> ought
> > I
> > > be
> > > > studying/using?
> > > >
> > > > Many thanks.
> > > >
> > > > --
> > > > Nicolas Cueto
> > > > _______________________________________________
> > > > use-livecode mailing list
> > > > use-livecode at lists.runrev.com
> > > > Please visit this url to subscribe, unsubscribe and manage your
> > > > subscription preferences:
> > > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > > >
> > > _______________________________________________
> > > use-livecode mailing list
> > > use-livecode at lists.runrev.com
> > > Please visit this url to subscribe, unsubscribe and manage your
> > > subscription preferences:
> > > http://lists.runrev.com/mailman/listinfo/use-livecode
> > >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list