[haskell-art] [Rohan Drape] Re: Creating .wav or .aiff with SuperCollider/HSC3

2007-08-10 Thread Rohan Drape
apologies yet again, another two mis-directed replies...

--- Begin Message ---
Henning Thielemann <[EMAIL PROTECTED]> writes:
> I boiled the problems down to a simple example. There are no errors
> reported about the messages, but the result is not what we expect.

This is an NTP/UTC issue.

OSC timestamps are in NTP, but at a user level the 
hosc/hsc3 libraries (and sclang) work with UTC.

The encodeOSC function from hosc converts 
from UTC to NTP.

In your text, replacing:

> nonrealtime =
>do let tsMsgs = map (uncurry Bundle) msgs

with:

nonrealtime =
   do let tsMsgs = ntpZeroed (map (uncurry Bundle) msgs)

and adding:

ntpZeroed :: [OSC] -> [OSC]
ntpZeroed l = map f l
where f (Bundle t c) = Bundle (t - 2208988800.0) c
  f (Message _ _) = undefined

works here.

Also, given the a post 30-July-2007 version of

  http://slavepianos.org/rd/sw/sw-76/Rhs/Score.hs 

the below is the nrt test file i have, it first plays 
the score in rt, then writes a score to "/tmp/nrt.score"
and renders it to "/tmp/nrt.wav".

Regards,
Rohan

++

import Sound.OpenSoundControl (OSC(Bundle))
import Sound.SC3
import qualified Sound.SC3.UGen.Noise.Base as N
import Rhs.Score (Score(..), playScore, writeScore)
import System.Cmd

-- Illustrate Score

g = out 0 (pan2 o (N.rand (UGenId 0) (-1) 1) 1)
where f = Control KR "freq" 440
  o = sinOsc AR f 0 * envGen KR 1 1 0 1 RemoveSynth envPerc' * 0.1

s = Score (Bundle 0.0 [send_instr, make_group] : notes)
where send_instr = d_recv (graphdef "test" (graph g))
  make_group = g_new [(1, AddToTail, 0)]
  f (t,n) = Bundle t [s_new "test" (-1) AddToTail 1 [("freq", n)]]
  notes = take 128 (map f (zip [0.0, 0.05 ..] [330, 350 ..]))
  
main = do withSC3 ((flip playScore) s)
  writeScore "/tmp/nrt.score" s
  system "scsynth -N /tmp/nrt.score _ /tmp/nrt.wav 44100 WAVE float"
--- End Message ---
___
haskell-art mailing list
haskell-art@lists.lurk.org
http://lists.lurk.org/mailman/listinfo/haskell-art


[Rohan Drape] Re: [haskell-art] recording scsynth

2007-08-10 Thread Rohan Drape
--- Begin Message ---
Henning Thielemann <[EMAIL PROTECTED]> writes:
> On Tue, 24 Jul 2007, Rohan Drape wrote:
>> btw. for recording scsynth as it runs a jack recorder
>> can be simpler to manage, at least so i find.  i tend
[snip]
> But this means waiting for a song to be rendered in real-time, which is
> either slower than the fastest possible, or it prohibits recording of
> songs that are too complex for real-time generation.

yes, that is why it was 'by the way', i was
thinking of the case when working away
and stumbling on an interesting sound and 
wanting to preserve it before it disappears.
i've found it can be safer not to touch 
scsynth at such a time, and when using 
jackd it is simple to sidestep that...

rd
--- End Message ---
___
haskell-art mailing list
haskell-art@lists.lurk.org
http://lists.lurk.org/mailman/listinfo/haskell-art


[haskell-art] Re: Creating .wav or .aiff with SuperCollider/HSC3

2007-08-10 Thread Rohan Drape
Henning Thielemann <[EMAIL PROTECTED]> writes:
> I boiled the problems down to a simple example. There are no errors
> reported about the messages, but the result is not what we expect.

I've added encodeNRT and writeNRT to hsc3, these
ought to work out of the box.  Let me know if
that helps.  (They are in Sound.SC3.Server.NRT, 
but exported from Sound.SC3.Server and Sound.SC3)

Regards,
Rohan
___
haskell-art mailing list
haskell-art@lists.lurk.org
http://lists.lurk.org/mailman/listinfo/haskell-art