Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.misc > #12198

Re: White Noise Software For Linux

From JohnF <john@please.see.sig.for.email.com>
Newsgroups comp.os.linux.misc
Subject Re: White Noise Software For Linux
Date 2014-10-03 02:13 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <m0l0o1$sr7$1@reader1.panix.com> (permalink)
References <0eb566bb-5d54-47fd-b24a-53b85abda9ed@googlegroups.com> <lvm7ac$fv6$1@speranza.aioe.org> <lvmh1m$7uv$1@dont-email.me> <m0konm$ipq$1@reader1.panix.com> <m0kurv$v0j$1@dont-email.me>

Show all headers | View raw


Rich <rich@example.invalid> wrote:
> JohnF <john@please.see.sig.for.email.com> wrote:
>> Rich <rich@example.invalid> wrote:
>> > beforewisdom@gmail.com wrote:
>> > 
>> >> Can anyone recommend any white noise software
>> > 
>> > sox has a large number of "noise" (both white and colored) options.
>> > Here is one that someone posted somewhere on Usenet in the not too
>> > distant past to generate brown noise:
>> >   play -q -c 2 -n synth brownnoise band -n 1600 1500 tremolo .1 30
> 
>> Thanks, that works great. And I see from man sox (or man play)
>> that output can be saved to a file. And I suppose it's got to be
>> pretty obvious, but I'm not seeing (or getting it to work
>> by messing around) exactly how to do that with your above example.
>> That is, suppose I want to generate, say, a 1GB file containing
>> the above, something functionally like the second line below...
>>   play -q -c 2 -n synth brownnoise band -n 1600 1500 tremolo .1 30 \
>>        --size 1GB --format mp3 -o brownnoise.mp3
>> How would I correctly do that? Thanks again,
> 
> After many false starts (sox has a very convoluted CLI interface),
> I found the "hint" in the docs to make it work:
>   sox -q -c 2 -n out.wav synth brownnoise band -n 1600 1500 tremolo .1 30
> Produces brownnoise in out.wav.

Thanks so much, Rich. That works perfectly. I thought I'd looked at
that -n in man sox, and it said null device/file. Seems weird that
it works, but maybe I shouldn't be asking too many questions:).

> What it does not do is "stop" at a certain length. You could watch the
> file in another window, and kill the sox command when the file reaches
> the length you want. If you really want to directly output a specific
> length, then this will work (sox will complain that the wav header
> length value will be incorrect, but the file seems to play anyway):
>    sox -q -c 2 -n -t wav - synth brownnoise band -n 1600 1500 tremolo .1 30
>    | dd of=out.wav bs=1024 count=1000
> bs = block size
> count = number of blocks
> So total size is bs*count, adjust to the size you wish to obtain.

Thanks, again. Kind of "my bad" about that size thing, which I just
threw in without thinking much. Very sorry if it made you work more.
Ctrl-C is pretty much okay for me, or maybe --seconds for duration
of play would've been a more sensible -switch.
   By the way, I let it run for maybe ~10secs (on an i7-3770K), and
out.wav contained ~448MB. I was curious to see if sox ended abruptly
or terminated the file properly after Ctrl-C, but haven't listened
all the way to the end yet:). Thanks,
-- 
John Forkosh  ( mailto:  j@f.com  where j=john and f=forkosh )

Back to comp.os.linux.misc | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

White Noise Software For Linux beforewisdom@gmail.com - 2014-09-19 16:41 -0700
  Re: White Noise Software For Linux William Unruh <unruh@invalid.ca> - 2014-09-20 06:39 +0000
    Re: White Noise Software For Linux The Natural Philosopher <tnp@invalid.invalid> - 2014-09-20 09:32 +0100
      Re: White Noise Software For Linux floyd@apaflo.com (Floyd L. Davidson) - 2014-09-20 02:44 -0800
        Re: White Noise Software For Linux The Natural Philosopher <tnp@invalid.invalid> - 2014-09-20 11:53 +0100
          Re: White Noise Software For Linux floyd@apaflo.com (Floyd L. Davidson) - 2014-09-20 04:25 -0800
            Re: White Noise Software For Linux Michael Black <et472@ncf.ca> - 2014-09-20 11:52 -0400
        Re: White Noise Software For Linux William Unruh <unruh@invalid.ca> - 2014-09-22 18:31 +0000
          Re: White Noise Software For Linux floyd@apaflo.com (Floyd L. Davidson) - 2014-09-22 18:59 -0800
            Re: White Noise Software For Linux Michael Black <et472@ncf.ca> - 2014-09-22 23:30 -0400
              Re: White Noise Software For Linux floyd@apaflo.com (Floyd L. Davidson) - 2014-09-23 02:51 -0800
                Re: White Noise Software For Linux William Unruh <unruh@invalid.ca> - 2014-09-23 23:49 +0000
  Re: White Noise Software For Linux asdf <asdf@nospam.com> - 2014-09-21 09:55 +0000
    Re: White Noise Software For Linux Rich <rich@example.invalid> - 2014-09-21 12:41 +0000
      Re: White Noise Software For Linux JohnF <john@please.see.sig.for.email.com> - 2014-10-02 23:56 +0000
        Re: White Noise Software For Linux Rich <rich@example.invalid> - 2014-10-03 01:41 +0000
          Re: White Noise Software For Linux JohnF <john@please.see.sig.for.email.com> - 2014-10-03 02:13 +0000
            Re: White Noise Software For Linux Rich <rich@example.invalid> - 2014-10-03 02:55 +0000
              Re: White Noise Software For Linux JohnF <john@please.see.sig.for.email.com> - 2014-10-03 05:38 +0000
                Re: White Noise Software For Linux JohnF <john@please.see.sig.for.email.com> - 2014-10-03 11:50 +0000
                Re: White Noise Software For Linux Loki Harfagr <l0k1@thedarkdesign.free.fr.INVALID> - 2014-10-07 13:04 +0000
        Re: White Noise Software For Linux William Unruh <unruh@invalid.ca> - 2014-10-03 14:38 +0000
          Re: White Noise Software For Linux JohnF <john@please.see.sig.for.email.com> - 2014-10-08 03:18 +0000

csiph-web