[sdiy] Generate WAV files with MacSpice?

Andre Majorel aym-htnys at teaser.fr
Sun Feb 28 22:42:47 CET 2010


On 2010-02-28 20:39 +0100, ASSI wrote:
> On Sunday 28 February 2010, Ingo Debus wrote:
> > SoundHack only reads 4 byte floats
> 
> Double to float is a one-liner in Perl:
> 
> perl -e '$/="";print pack("f*",unpack("d*",<>));' in > out

Yes but not *that* one-liner, it does not do quite what you think
it does. Better use something like

  perl -pe 'BEGIN { binmode STDIN; binmode STDOUT; $/ = \4096; }
    $_ = pack "f*", unpack "d*"' in >out

(Thanks to you and Jerry for the replies to the high input
impedance question, BTW.)

-- 
André Majorel http://www.teaser.fr/~amajorel/



More information about the Synth-diy mailing list