I do not understand most of what you say here (and your subsequent replies to yourself). If you are using a "simple text file format", then why are you dealing with binary integer data as if it were 16-bit audio samples?

If you are actually manipulating 16-bit integer values (not strings of digit characters), why do you start with a text file?

As for the kinds of "editing" you want to do (cutting, pasting, scaling, etc), you might need to look at some sort of binary data editing facility that is not tailored to audio data. Tools like Audacity, being focused on audio data, tend to have a lot of built-in assumptions about what "makes sense" for data manipulation, given that it's assumed to be audio. (For example, some operations will impose "dithering" - randomly adding 1 or -1 to each sample value, others will impose various kinds of frequency-domain filtering, etc.)

Since you are not dealing with audio data, those built-in assumptions will have unintended consequences, and might make it impossible to do what you really want to do (whatever that is, really... I still don't understand that part).


In reply to Re^3: Audio::WAV data problem by graff
in thread Audio::WAV data problem by spencoid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.