On Fri, 13 Jul 2007, Rohan Drape wrote:

> On Thu, July 12, 2007 7:36 pm, Henning Thielemann wrote:
> >
> > On Wed, 11 Jul 2007, Henning Thielemann wrote:
> >
> >> I want to write the SuperCollider output into a file.
> >> Server-Architecture.rtf tells me that I must use the -N option. However
> >> I
> >> need a file of OSC messages. Shall I replace all 'send' actions by
> >> commands that write the messages to a file? Has someone already done
> >> this?
> >
> > Maybe it's just another type to implement for the OSC.Transport class,
> > which writes to files rather than the network. I'll try that.
>
> Yes, SC3 NRT files are just length prefixed sequences of OSC bundles,
> see SC3 documentation for details.  NRT works as expected, though recall
> to have a null event to end the score (ie. processing ends at last bundle
> timestamp).  Timestamps are zero indexed.

I have used the TCP transport data type and derived a File data type from
it. However I got the error that the OSC message is longer than 8192
bytes. Thus I reversed the byte order in the length encoding:

      let b = encodeOSC msg
          n = fromIntegral (B.length b)
      in  B.hPut fd (B.append (B.reverse (encode_u32 n)) b)

Now it seems that the times are not interpreted properly:

$ scsynth -D 0 -o 2 -N glissando.osc _ glissando.aiff 44100 AIFF int16
Using Altivec: no
*** ERROR: open directory failed 'synthdefs'
start time 0.501933
nextOSCPacket 1.10536e+07
*** Exception: waitForProcess: interrupted (Interrupted system call)

Maybe this is still an issue of byte ordering. Server-Architecture.rtf
states that values must be in network byte order.  What is 'network byte
order' in the case of files?
_______________________________________________
haskell-art mailing list
haskell-art@lists.lurk.org
http://lists.lurk.org/mailman/listinfo/haskell-art

Reply via email to