Recording without DAW

Support & discussion regarding DAWs and MIDI sequencers.

Moderators: MattKingUSA, khz

Post Reply
squarewav
Established Member
Posts: 4
Joined: Fri Sep 28, 2018 8:52 pm

Recording without DAW

Post by squarewav »

Is there a daemon that has no GUI that can do multi-track recording with a control surface and audio interface only?

More specifically, I am envisioning something like the following:

1) Control Surface with Transport Controls (like Korg nonoKONTROL Studio, Behringer X-TOUCH Universal Control Surface or other Mackie / HUI control service with all of the necessary controls - transport, arming tracks, etc).

2) Audio Interface (like any of the countless USB interfaces with lots of analog IO and quality ADCs / DACs)

3) A computer running said daemon (no DAW running or any GUI) that simply listens for commands from the Control Surface and plays / records audio from said Audio Interface to / from disk. Recordings must be sample aligned properly with tracks being played simultaneously (something that even some DAWs have trouble with). Recording bitwidth and rate should be limited only by the Audio Interface and configuration (so 24 bit 96 kHz should be no problem).

4) Recordings are saved to designated storage device such as disk in a way that can optionally be manipulated with a DAW (but again, the DAW must not be required).

I have no idea if Linux is good at this sort of thing. As a communications software developer, I have numerous Linux machines but I have no idea what the driver situation is for recording high res audio. Obviously even a single dropout in any recording ever would completely disqualify the solution. Running a different Kernel would be fine though. I was thinking of having an old laptop running with the lid closed in proximity to the Control Service and Audio Interface.

So is there any such thing? Or is this something that no one is interested in? The motivation here is to get away from the mojo-killing keyboard and mouse as much as possible and make something that can just arm a track on the Control Surface and go.
Last edited by squarewav on Fri Sep 28, 2018 11:36 pm, edited 1 time in total.
tavasti
Established Member
Posts: 2047
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 369 times
Been thanked: 208 times
Contact:

Re: Recording without DAW

Post by tavasti »

You might want to change your subject. There is program non-daw, so most people who know it and are not interested will ignore your post :-)

I changed subject of this reply, but it does not change yours.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

jonetsu
Established Member
Posts: 2036
Joined: Sat Jun 11, 2016 12:05 am
Has thanked: 10 times
Been thanked: 22 times

Re: Non-DAW Recording

Post by jonetsu »

I do not know why after expecting no dropouts (xruns) it goes on with 'running on an old laptop'. Would the same be done with Windows and Mac ? I expect them to not miss a single sound event and I'll run them on old laptops ?
squarewav
Established Member
Posts: 4
Joined: Fri Sep 28, 2018 8:52 pm

Re: Non-DAW Recording

Post by squarewav »

jonetsu wrote:I do not know why after expecting no dropouts (xruns) it goes on with 'running on an old laptop'. Would the same be done with Windows and Mac ? I expect them to not miss a single sound event and I'll run them on old laptops ?
So are "xruns" a thing? I would fully expect that there be NO dropouts / xruns at all regardless of OS or even if the machine vaguely "old". Mmapping data around should be super easy. Is that not true?

If I can't find the software I'm looking for, perhaps I can write something myself. Is there a good example of code that reads / writes multiple streams concurrently and aligns them properly? Is there a technique for that (like reading time codes or something)?
tavasti
Established Member
Posts: 2047
Joined: Tue Feb 16, 2016 6:56 am
Location: Kangasala, Finland
Has thanked: 369 times
Been thanked: 208 times
Contact:

Re: Non-DAW Recording

Post by tavasti »

jonetsu wrote:I do not know why after expecting no dropouts (xruns) it goes on with 'running on an old laptop'.
Definition of of old laptop is unclear. With 20 years old with Pentium 166, no go. With 10+ years old Core2duo, maybe. With 5 years old normal laptop, should be fine.

Linux veteran & Novice musician

Latest track: https://www.youtube.com/watch?v=ycVrgGtrBmM

Jack Winter
Established Member
Posts: 381
Joined: Sun May 28, 2017 3:52 pm

Re: Recording without DAW

Post by Jack Winter »

I think you ought to be able to do what you want, with a few caveats.

If you are willing to settle for high latency (say 1024 or 2048 samples buffer and 3 periods, there should be no problem at all to reliably record and playback audio. You could most likely use most distros, probably with a preference for a lowlatency kernel, some of the basic configuration like memlock/rtprio, and possibly the rtirq script. I really haven't tested how much of the configuration is needed in such a scenario.

One very annoying aspect of using USB class 2.0 audio on linux (and often on windows too), is that the real world round trip latency doesn't get properly reported. So the application will know of the latency given by buffer*periods/samplerate, but it won't know of any other latency added by the usb protocol, the hardware itself, etc. I just tested my babyface at 1024/3/44k1, the reported latency is 664 samples (~15ms) off, so this has to be tested and compensated for.. :?

I don't know about other linux daws, but reaper can even run on armv7 and be built headless. You can enable it to have a webif that you can control from your phone. You can also run it from the command line to run batch jobs on your audio.

How well the existing control surface support works is something I can't attest to, especially as I don't think it has been much tested on linux yet. But there is a third party work in progress to improve control surface support for reaper, at the moment only for windows/osx, but it will apparently also come to linux once more mature, this will do stuff like osc, and explicitly support most available devices.
Reaper/KDE/Archlinux. i7-2600k/16GB + i7-4700HQ/16GB, RME Multiface/Babyface, Behringer X32, WA273-EQ, 2 x WA-412, ADL-600, Tegeler TRC, etc 8) For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
squarewav
Established Member
Posts: 4
Joined: Fri Sep 28, 2018 8:52 pm

Re: Recording without DAW

Post by squarewav »

Thanks for the great response Jack Winter.

It is interesting that Reaper can run headless and be controlled from a Web UI and potentially from a control surface. That is basically what I want to do. But it does seem a little overkill in my case to run a whole daw seeing as how I really just want a loop that is marshaling data from one I/O/file to another which, in theory, I think should be possible to do ever without threads. That could make for a very tight little loop using async and mmap wihch could have a significant impact on latency and thus xruns. For recording and overdubbing I don't suppose latency is a huge issue but no doubt it will have an impact on the accuracy of aligning tracks. I'm still clueless as to how to do that at runtime and account for I/O starting faster / slower each time. Maybe I can use a dummy loopback track.

Right now I'm looking at the source of http://libsound.io/ which looks quite nice in itself but also it at least clearly demonstrates how to do basic IO and on various different platforms which is a huge plus depending on what combination of machine / USB audio interface someone has.
Jack Winter
Established Member
Posts: 381
Joined: Sun May 28, 2017 3:52 pm

Re: Recording without DAW

Post by Jack Winter »

squarewav wrote: It is interesting that Reaper can run headless and be controlled from a Web UI and potentially from a control surface. That is basically what I want to do. But it does seem a little overkill in my case to run a whole daw seeing as how I really just want a loop that is marshaling data from one I/O/file to another which, in theory, I think should be possible to do ever without threads. That could make for a very tight little loop using async and mmap wihch could have a significant impact on latency and thus xruns. For recording and overdubbing I don't suppose latency is a huge issue but no doubt it will have an impact on the accuracy of aligning tracks. I'm still clueless as to how to do that at runtime and account for I/O starting faster / slower each time. Maybe I can use a dummy loopback track.
I read that you wanted more than just a program that copies streams back and forth :)

Of course if you want to make something new, I'm sure that is warmly welcomed, hopefully open source too.

Regarding proper latency compensation the only way I know is to test it, and then configure jack or the application for how much extra compensation is needed.
Reaper/KDE/Archlinux. i7-2600k/16GB + i7-4700HQ/16GB, RME Multiface/Babyface, Behringer X32, WA273-EQ, 2 x WA-412, ADL-600, Tegeler TRC, etc 8) For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
alex stone
Established Member
Posts: 350
Joined: Fri Jun 06, 2008 7:39 am
Has thanked: 61 times
Been thanked: 53 times

Re: Recording without DAW

Post by alex stone »

Maybe something like Nama?

https://freeshell.de/~bolangi/cgi1/nama ... tures.html

There are debian and ubuntu packages available, and should be in deb/ubu audio based repos already.

Alex.
squarewav
Established Member
Posts: 4
Joined: Fri Sep 28, 2018 8:52 pm

Re: Recording without DAW

Post by squarewav »

Jack Winter wrote: I read that you wanted more than just a program that copies streams back and forth :)
Well ok, there would have to be some minimal mixing and level control. But otherwise, it really would be fairly simple. After thinking about this a little more I can be much more specific. What I envision is a daemon that just listens for command from a Control Surface (or it could be a Web UI on a phone - how the daemon is controlled can be abstracted and is not terribly important). When "Record" is pressed, the daemon loads a configuration from a file that describes the USB audio interface channels to be used, filename templates, bit width / sample rate, busses and so fourth. Inputs and outputs can be audio interface channels or files. All of this is largely represented as a matrix of structs. Then the daemon accesses the USB audio interface and starts routing audio to the monitor busses only. If the operator then presses "Play" (while the Record function is engaged), file I/O actually begins. Meaning the project audio files are played / recorded. Pressing "Play" again pauses or un-pauses file I/O. Pressing "Stop" closes all files, audio interface channels, releases the audio interface(s) completely and goes back to listening for commands. Note that if there are multiple sources on a buss, those signals will need to be mixed together. I don't think it should be necessary to control input levels (the source level should be adjusted to full-scale) but there will need to be output level controls which ideally are controlled by the Control Surface faders and pan pots. Every channel on the Control surface corresponds to a buss which could be a regular mono channel, stereo, aux, monitor or whatever. So there would literally be no GUI at all. It is just a software equivalent of a Reel-to-Reel or ADAT recorder. If you want to see what's going on, you look at a log file.
Jack Winter wrote: Regarding proper latency compensation the only way I know is to test it, and then configure jack or the application for how much extra compensation is needed.
That's a disappointment. I have to wonder if the startup latency is always the same from one recording to the next though. It would be nice if there is some way to write data to the audio interface and then immediately read it back (meaning "loopback") so that I can briefly send a click or impulse on startup. Then once the precise latency is determined, the samples are discarded to align the tracks and then I actually route the audio to the configured busses. Just thinking out loud though.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Recording without DAW

Post by CrocoDuck »

What about Ecasound?

http://www.eca.cx/ecasound/

Not a recorder, but maybe useful: http://sox.sourceforge.net/
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Recording without DAW

Post by CrocoDuck »

squarewav wrote: That's a disappointment. I have to wonder if the startup latency is always the same from one recording to the next though. It would be nice if there is some way to write data to the audio interface and then immediately read it back (meaning "loopback") so that I can briefly send a click or impulse on startup. Then once the precise latency is determined, the samples are discarded to align the tracks and then I actually route the audio to the configured busses. Just thinking out loud though.
Use jack_iodelay. I used that with a bash script to get the exact value to configure jack. You can make a bash script that:

Launches jack.
Launches jack_iodelay and connects it. Then, it streams its output to a file.
Extract the latency from the file.
Kill jack.
Launch again jack with the compensation parameter tuned in.

Then you can start your Ecasound - Nama - whatever multi track command line DAW.

I think I probably have a script that does few of the things above. I can share it if it can be useful for you.

jack_iodelay works really well, it is very accurate. I would strongly recommend against using clicks or pulses: you will be fighting against background noise to get a reliable figure. If you really want to write a latency meter yourself, use short chirps and analyze the cross-correlation. This plugin uses, indeed, chirps, and you can find its source code here.

And by the way, that's not a disappointment :wink: . Only buffering latency can be known a priori, but hardware latency is instead unknown, and it can be only measured. By measurement, you get very good compensation. As for stability of latency, if your stack is stable (xruns) it is stable. In my experience, latency changes slightly only when you have xruns.

By the way, if I am not wrong, the buffering latency as actually compensated automatically by most software. The additional compensation you do with jack_iodelay (or other measuring method) is for the extra loopback latency. Which is, the latency of hardware.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Recording without DAW

Post by CrocoDuck »

42low wrote:Don't understand the question exactly. You want to record in an easy way all sound you computer has to handle together? Correct?
He wants no GUI programs. In essence, he would like to have a "recording service" which runs without any need for GUIs.
CrocoDuck
Established Member
Posts: 1133
Joined: Sat May 05, 2012 6:12 pm
Been thanked: 17 times

Re: Recording without DAW

Post by CrocoDuck »

squarewav wrote:
I have no idea if Linux is good at this sort of thing. As a communications software developer, I have numerous Linux machines but I have no idea what the driver situation is for recording high res audio. Obviously even a single dropout in any recording ever would completely disqualify the solution.
You will have dropouts with any OS. I could observe many on MacOS by using Baudline. I would say, though, that Linux offers the advantage of telling you when a dropout happens. So, listen for Jack. If xruns happens, you know you need bigger buffers or lower rate. At some point you will get to xrun free configuration. If low latency is not a requirement for you, then you can be essentially sure you should be able to get dropout free performance.
emillo
Established Member
Posts: 21
Joined: Fri Dec 05, 2008 11:26 am
Contact:

Re: Recording without DAW

Post by emillo »

You may want to check out ecasound http://nosignal.fi/ecasound/
It should be able to handle that.
Emiliano Grilli
Linux user #209089
http://www.emillo.net
Post Reply