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

Re: [sc-users] buffer address and OSC



On Sat, Mar 04, 2006 at 05:34:08PM -0800, George Tourtellot wrote:
> > I have a C program that creates and fills a float
> > array.  I want to have SC play the data in this
> > buffer
> > using TGrains.  I want to tell SC to do this by
> > sending it an OSC message.

you could use b_setn (see Server-Command-Reference), but
then you're limited to the UDP packet size; you can chunk
the source buffer if necessary.

> > Because I don't want my program to write the buffer
> > to
> > a file and then have SC read it (this would be very
> > slow!), I'd like to just pass SC the address of my
> > buffer.

on linux you can make this very fast by using a (RAM based)
tmpfs for i/o, with the downside of doubled memory
consumption.

you have to copy the data in any case, scsynth doesn't
support shared memory buffers.

<sk>