overtone

Joakim Verona 2024-04-27T21:20:43.645329Z

Hello, is it possible to record to disk somehow from supercollider? I have some tracks that I usually record connecting via jack to audacity (for example https://soundcloud.com/joakimv/you-will-pack-what-you-need) but I would like to have the live mix recorded as well as the individual instruments to separate tracks, perhaps with some kind of middleware installed in the instruments. Is this possible?

plexus 2024-04-29T07:23:24.065579Z

I do the same, connect to Audacity. Seems there are some facilities in SC to do recording. https://github.com/supercollider/supercollider/wiki/Recording-in-SuperCollider#non-real-time-recording- Would also be possible to use clj-jack to capture the output from supercollider and save it, there's probably good Java libs to handle raw pcm data -> file format conversions. That way you could orchestrate the start/stop of the recording and the song you're recording.

Joakim Verona 2024-04-29T07:24:29.823599Z

alright, tnx, do you record individual instruments?

Joakim Verona 2024-04-29T07:25:33.181559Z

im just guessing, but it would seem like there would be a way to insert a monitor ... thing... into the instrument, and that monitor would be used to record a separate track to disc

plexus 2024-04-29T07:30:09.678479Z

If I wanted that I would use Ardour, hook up the individial SC outputs to separate tracks, put individiual instruments each on their own track, and then record that way.

plexus 2024-04-29T07:30:44.589999Z

In that case you can even have your song start when ardour starts recording by listening for jack transport events (using clj-jack)

plexus 2024-04-29T07:31:52.900679Z

I think you should also be able to use SC buffers, write to those, and then save them to disk. Not sure if SC can save them directly, otherwise you need to read them out from Overtone.

Joakim Verona 2024-04-29T07:33:16.289969Z

ok, but lets say i do the ardour way(or <<rythm) how do i put instruments on individual outputs?

plexus 2024-04-29T07:45:22.945809Z

I think insts can take a :bus parametere. :bus 0, :bus 1, etc. Otherwise use defsynth with an explicit out.

Joakim Verona 2024-04-29T07:46:06.282029Z

ok, tnx, will have a look

diego.videco 2024-04-29T15:46:48.526639Z

I use this when i want to record directly from SC:

(defn rec
  "
  Options:

  :n-chans     - Number of channels for the buffer
                 Default 2
  :size        - Buffer size
                 Default 65536
  :header      - Header format: \"aiff\", \"next\", \"wav\", \"ircam\", \"raw\"
                 Default \"wav\"
  :samples     - Sample format: \"int8\", \"int16\", \"int24\", \"int32\",
                                \"float\", \"double\", \"mulaw\", \"alaw\"
                 Default \"int16\"
  Example:  (rec \"prueba-4ch\" :n-chans 4)
  "
  [filename & opts]
  (apply o/recording-start
         (str (System/getProperty "user.dir")
              "/recordings/"
              filename
              "-"
              (str/replace (.format (java.time.ZonedDateTime/now)
                                    java.time.format.DateTimeFormatter/ISO_INSTANT)
                           #":"
                           "-")
              ".wav")
         opts))
Not sure if n-chans was working for me the last time, though

diego.videco 2024-04-29T15:47:06.712799Z

basically this: o/recording-start

Joakim Verona 2024-04-29T20:11:32.791609Z

thanks!