Fork me on GitHub
#overtone
<
2024-04-27
>
Joakim Verona21:04:43

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?

plexus07:04:24

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 Verona07:04:29

alright, tnx, do you record individual instruments?

Joakim Verona07:04:33

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

plexus07:04:09

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.

plexus07:04:44

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

plexus07:04:52

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 Verona07:04:16

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

plexus07:04:22

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

Joakim Verona07:04:06

ok, tnx, will have a look

diego.videco15:04:48

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.videco15:04:06

basically this: o/recording-start