Re: Recording specific channels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On May 13 15:57:43, D.Cottle@xxxxxxxx wrote:
> [* * * * * /Users… ]
> 
> This looks promising, and I apologize for my ignorance (I have a bad habit of learning just enough code to do what I need), but it didn’t work for me.
> 
> First, just to clarify, my sox folder is in the top level of my users account. I know it should be in the /bin/, but I get a new machine every year and keep forgetting how to move it and get the correct  path (~/.bash_profile?) and don’t want to pester our tech staff to do it, so in the command line I just have to type the extra ~/sox/rec.

The path can be whatever - as long as it is in your $PATH
you can just call 'sox'. You can also specify the PATH at the
beginning you your crontab. (This has nothing to do with sox.)

> Second, in this example I don’t understand where the file is
> being written to. 

Exactly where the command says: /tmp/file-`date +\%s`.wav
Look under /tmp, see the files named file-whatever.

> Last, it didn’t create a new file, but just stopped after 1 minute.

Yes - it creates a new one at the beginning of the next minute.

	Jan


PS: Please quote the emails you are replying to properly
and don't top-post. It is customary in tech mailing list
to quote the relevant portion verbatim and comment inline.
Also, please wrap your lines - some pople (me included)
read this in a text terminal. Long lines make it unnecessarily
difficult to quote a bit from one "line" which is in fact
a whole paragraph.



> 
> 
> 5/13/24, 08:47, "Jan Stary" <hans@xxxxxxxx>:
> 
> On May 13 09:26:10, hans@xxxxxxxx wrote:
> > On May 12 22:56:45, D.Cottle@xxxxxxxx wrote:
> > > If someone needs files from 1:35 to 3:15 we just give them 1 to 4.
> > > They combine them (with no seam at 2pm) [...] We routinely combine files
> > > into larger segments and we need them to be seamless.
> >
> > Ah, right, that's what you mean by "sample perfect". Let's try:
> >
> > $ sox -n sine.wav synth 10
> > $ sox sine.wav part%n.wav trim 0 5 : newfile : trim 0 5
> > $ soxi sine.wav part*.wav
> >
> > On my machine, that's 480000 split into 240000 + 240000 exactly
> > when I said 5s out of 10s.
> 
> On the contrary, this is not sample perfect:
> a line in my crontab, starting a recording of one minute every minute.
> 
> * * * * * /Users/hans/bin/rec -q /tmp/file-`date +\%s`.wav trim 0 00:01:00
> 
> This does indeed record each minute of audio into
> an appropriately named file, but the transition is not seamless
> (as verified by playing a song longer than one minute).
> 
> But if you change this to record your "predefined blocks"
> of a couple of hours, then perhaps overlaping a few samples
> will not matter if the seams are at silent times.
> Or you could record whole days, restarting at, say, 3 am.
> 
> Jan
> 
> 
> 
> _______________________________________________
> Sox-users mailing list
> Sox-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/sox-users


> _______________________________________________
> Sox-users mailing list
> Sox-users@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/sox-users



_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sox-users




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux