Re: [sc-users] Read single channel of external file into buffer
stefan kersten <
sk@...>
2006-06-07 14:02:34 GMT
On Tue, Jun 06, 2006 at 01:21:46PM +0200, stefan kersten wrote:
> this might be true for PlayBuf, but there are other buffer
> access ugens that fail on multichannel data (like
> TGrains). i think adding channel selection arguments to both
> b_read and b_allocRead would be a very valuable addition.
i've attached a patch to /b_allocRead and /b_read to allow
selecting individual channels from the source files.
the channel indexes are expected after the completion
message for backwards compatibility; any better ideas?
btw, why doesn't /b_read set the buffer sample rate to the
file sample rate? BufRateScale and friends don't work
correctly with files loaded with /b_alloc+/b_read.
<sk>
Index: headers/server/SC_SequencedCommand.h
===================================================================
--- headers/server/SC_SequencedCommand.h (revision 5397)
+++ headers/server/SC_SequencedCommand.h (working copy)
<at> <at> -214,6 +214,10 <at> <at>
///////////////////////////////////////////////////////////////////////////
+const int kBufReadMaxNumChannels = 32;
+
+///////////////////////////////////////////////////////////////////////////
(Continue reading)