[Csnd] Csound with DC-coupled audio interfaces
Date | 2020-11-22 03:01 |
From | Dave Seidel |
Subject | [Csnd] Csound with DC-coupled audio interfaces |
Hi all,
Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here
I'm intrigued by audio interfaces like the Expert Sleepers ES-8, which allow software to send CV as well as audio into a modular synth. Software like Silent Way, Max/MSP, Pd and others apparently know how to do this. But I don't understand how they're doing it. How would I do this with Csound, assuming I was using an ES-8 as my audio interface? That is, what kind of signal would I need to emit from Csound such that it would be interpreted as control voltage (DC)? It is possible? (I know it's possible to use a MIDI-to-CV device to do this -- I do this to send gate signals to my modular system -- but then one is stuck with MIDI resolution, which isn't ideal for applications such as LFOs.) - Dave |
Date | 2020-11-22 04:31 |
From | Michael Gogins |
Subject | Re: [Csnd] Csound with DC-coupled audio interfaces |
Try just sending the control voltage out your DAC. out 1 Should send a DC level of 1 normalized to the maximum signal amplitude of your DAC. That should equate to about .445 volts for the -10 dBV line level of semiprofessional audio gear. You would need an amplifier to get that up to the 1 V/octave range of modular synthesizer gear. Be careful not to go too high, control voltages don't exceed 9 or 10. Best, Mike On Sat, Nov 21, 2020, 22:01 Dave Seidel <dave.seidel@gmail.com> wrote:
|
Date | 2020-11-22 11:44 |
From | Dave Seidel |
Subject | Re: [Csnd] Csound with DC-coupled audio interfaces |
Thanks, Mike. I don't have a suitable interface yet to try this with, but this does make me think it should be possible. I'm not necessarily seeking to send pitch voltages (this would be very cool, but probably an additional challenge to get the output calibrated properly for really accurate pitch tracking), but I'd certainly want to be able to produce a +/-5V signal (10V peak to peak). I'm not sure I understand how to amplify the signal, unless the audio interface handles that -- software like Silent Way (which is a VST) and Reaktor require only a DC-coupled interface like the ES-8 I'm contemplating and no other special hardware. - Dave On Sat, Nov 21, 2020 at 11:31 PM Michael Gogins <michael.gogins@gmail.com> wrote:
|
Date | 2020-11-23 20:25 |
From | Justin Smith |
Subject | Re: [Csnd] Csound with DC-coupled audio interfaces |
It looks like the ES-8 is specifically a eurorack device, so it should "just work" for your purpose as advertised Pardon if I'm stating the obvious, but normal devices with digital input and analog output are going to have an amplifier of some sort on the output. The settings on the device and/or the software mixer controls will decide what that amplification factor is for both voltage and amperage (and often the choice of output port will as well, eg. dedicated line out vs. headphone out vs. balanced output). If you don't have an oscilloscope you can borrow / use, a cheap digital volt meter can show you DC voltages. Usually gains / levels are shown in db factor of some reference level, but that does translate to specific voltages. The hottest standard line level for pro audio gear is only +/-1.2 volts, so without designated synth equipment I'd expect that you'd need to do a gain stage on the modular side. I'd definitely double check which "cv" standard the interface works with, because there are multiple definitions. I'd expect a c/v amplifier that takes consumer or pro level line signal (maybe with a handly switch), and then amplifies it to +/-5v or 0-8v range would be a cheap / simple thing to make (simple enough that you might prefer to make it an optional plug-in on some other module). On Sun, Nov 22, 2020 at 3:45 AM Dave Seidel |
Date | 2020-11-23 21:15 |
From | Dave Seidel |
Subject | Re: [Csnd] Csound with DC-coupled audio interfaces |
Thanks, Justin. I understand what you're saying, but the fact is that there is plenty of software that works out of the box with the ES-8 (and other DC-coupled interfaces) with any additional hardware, so perhaps the interfaces themselves handle the differences in voltage. What I am trying to understand is specifically how to tell Csound to emit a suitable DC signal. If it's as simple as Mike suggests using "out N", then great. I guess I'd have to measure the output of the ES-8 (since I have one) given different output levels from Csound, so that I'd understand how the scaling works. I have both a standalone scope and a Eurorack scope, so it should be easy enough to figure out. On Mon, Nov 23, 2020 at 3:25 PM Justin Smith <noisesmith@gmail.com> wrote: It looks like the ES-8 is specifically a eurorack device, so it should |
Date | 2020-11-24 00:20 |
From | Justin Smith |
Subject | Re: [Csnd] Csound with DC-coupled audio interfaces |
Regarding "out N", that's all I'd expect to be necessary from csound, and I'm sure you could verify by writing to a file or using jack to route directly to a DAW to examine the signal. In terms of scaling, I'd be surprised by anything other than full-scale being translated linearly to the cv range. On Mon, Nov 23, 2020 at 1:15 PM Dave Seidel |
Date | 2020-11-24 03:28 |
From | alexandre burton <000007362cd17e7a-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd] Csound with DC-coupled audio interfaces |
the ES-8 is designed to match 0dBfs to +10VDC, so yes “out .5” will provide +5V, and "out .707” will give out +7.07V. negative voltages are possible, so for conventional CV behavior the main concern would be to shift your LFOs to positive: “out 0.5+oscil(0.5, 2,1)”. and take note that standard interfaces may output suprinsingly hot signals. MOTU has a CV product called Volta and documents the DC output of their interfaces here: https://motu.com/techsupport/technotes/testing-analog-outputs-for-control-voltage-compatibility (make sure to click the gray zones at the botttom to reveal the data). some interfaces go up to 9V. that page also explain a multimeter method to match the output to CV values that could be replicated in Csound. alex. > On Nov 23, 2020, at 7:20 PM, Justin Smith |
Date | 2020-11-24 08:59 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
Looks like the ES-8 is the way to go. If it can match 0dbfs -> 10 V, and drop change in signal amplitude as a linear voltage, then it’s game on. All you need is a little RPi running Csound beside it and you have a custom eurorackable Csound system. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 24 Nov 2020, at 03:28, alexandre burton <000007362cd17e7a-dmarc-request@LISTSERV.HEANET.IE> wrote: > > *Warning* > > This email originated from outside of Maynooth University's Mail System. Do not reply, click links or open attachments unless you recognise the sender and know the content is safe. > > the ES-8 is designed to match 0dBfs to +10VDC, so yes “out .5” will provide +5V, and "out .707” will give out +7.07V. negative voltages are possible, so for conventional CV behavior the main concern would be to shift your LFOs to positive: “out 0.5+oscil(0.5, 2,1)”. > > and take note that standard interfaces may output suprinsingly hot signals. MOTU has a CV product called Volta and documents the DC output of their interfaces here: https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmotu.com%2Ftechsupport%2Ftechnotes%2Ftesting-analog-outputs-for-control-voltage-compatibility&data=04%7C01%7CVictor.Lazzarini%40mu.ie%7C8e9c45061ee543a47ad708d89029122a%7C1454f5ccbb354685bbd98621fd8055c9%7C1%7C0%7C637417853375782565%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=U2SLQkZt8JpeoKYmz%2FW6%2FRZBcVzwVZrvymQJvgYqytI%3D&reserved=0 (make sure to click the gray zones at the botttom to reveal the data). some interfaces go up to 9V. that page also explain a multimeter method to match the output to CV values that could be replicated in Csound. > > alex. > >> On Nov 23, 2020, at 7:20 PM, Justin Smith |
Date | 2020-11-24 10:15 |
From | Dave Seidel |
Subject | Re: [Csnd] Csound with DC-coupled audio interfaces |
Thanks, Alex, this is precisely what I need to know! - Dave On Mon, Nov 23, 2020 at 10:28 PM alexandre burton <000007362cd17e7a-dmarc-request@listserv.heanet.ie> wrote: the ES-8 is designed to match 0dBfs to +10VDC, so yes “out .5” will provide +5V, and "out .707” will give out +7.07V. negative voltages are possible, so for conventional CV behavior the main concern would be to shift your LFOs to positive: “out 0.5+oscil(0.5, 2,1)”. |
Date | 2020-11-24 10:34 |
From | Dave Seidel |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
Victor, excellent. I bought one last night, can't wait to get it and try it out. As you may know, I'm already running Csound on a headless RPi 4, a combination I'm very happy with, so this should be great. I'm currently using the Pi with a USB audio interface and a small MIDI-to-CV box (so I can send gates), both going to Eurorack, and it will be very cool to be able to use the ES-8 for both functions. When I can travel and perform again (I hope before 2022), this will be very good for portability. - Dave On Tue, Nov 24, 2020 at 3:59 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote: Looks like the ES-8 is the way to go. If it can match 0dbfs -> 10 V, and drop change in signal amplitude as a linear voltage, then it’s |
Date | 2020-11-24 10:43 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
Great.
Please give us a report when it arrives. I was thinking the Pi could be mounted behind an eurorack panel into the rack beside the ES-8.
I was thinking that this combination may give all the needed connectivity, without needing to use an extra arduino etc for digital controls. Just audio-rate CV for everything.
Prof. Victor Lazzarini
Maynooth University
Ireland
On Nov 24, 2020, at 10:34 AM, Dave Seidel <dave.seidel@gmail.com> wrote:
|
Date | 2020-11-24 11:04 |
From | Dave Seidel |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
That's possible, of course. The Qu-Bit Nebulae module has a Pi 3 embedded, though not usable for this purpose. However, I don't mind having the Pi in its own sturdy metal enclosure, because rack space is always at a premium. For me at least -- I have two 104 HP racks (one 7U, one 6U, each of which has a cover and can travel as carry-on luggage), and a 64 HP / 3U skiff, and I don't want to expand beyond that. For UI (when I need one), I run an Open Stage Control server on the Pi alongside Csound, using the Pi as a wifi hotspot, and use a tablet to display and operate the interface, giving me all the real time controls I need. Speaking of the skiff, I got this to house a WMD Performance Mixer, which I got very recently and is fantastic. I like to process audio in two or more parallel channels and then mix them together before they leave the rack, so this mixer is perfect. - Dave On Tue, Nov 24, 2020 at 5:43 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
|
Date | 2020-11-24 12:09 |
From | Tetsuya Miwa |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
Dear Dave, This is a very interesting discussion because I’m thinking of buying ES-8/ES-9. My plan is to connect my modular synth to Csound on my PC. As Victor mentioned, ‘just audio-rate CV for everything’ is the way to go. Tetsuya Miwa > 2020/11/24 20:04、Dave Seidel |
Date | 2020-11-24 16:15 |
From | Dave Seidel |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
Thanks, Tetsuya, I will report on my experiences once I have the ES-8. - Dave On Tue, Nov 24, 2020 at 7:10 AM Tetsuya Miwa <izc07036@nifty.com> wrote: Dear Dave, |
Date | 2020-11-29 03:40 |
From | Dave Seidel |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
I am happy to report that the Expert Sleepers ES-8 works very well with Csound -- for both audio and control voltage. For audio, I had to specify "--format=long" and get the channel count correct. The ES-8 has 16 output channels (8 usables ones if you're not using ADAT, which I'm now) and 8 input channels (4 usable ones without ADAT). I'm using it at 96k and it sounds great. For CV, I am seeing 0.1 output from Csound equal to 1 volt, so for example line(0, 1, 0.5) produces an upward ramp starting at 0v and ending at 5v. I appear to have a usable range of +/- 10v (20v P-P), so this is more than capable of the range needed for pitch voltages. You can also use negative values, thus bipolar CV. One crucial bit for CV is to use outch() (or whatever outxxx variation) with k-rate signals, not a-rate. I haven't tested this yet, but since the ES-8 has 4 input channels, I should be able to receive CV as well. This is a pretty amazing capability! My current setup is Csound on a Raspberry Pi 4 with an external USB audio interface (sending audio into the modular system) and an external MIDI-to-CV interface (sending gates to the modular). Now, I'll be able to eliminate both external interfaces and stop having to use MIDI just to send gate signals, plus I'll now be able to send arbitrary CV signals. Very exciting. - Dave On Tue, Nov 24, 2020 at 11:15 AM Dave Seidel <dave.seidel@gmail.com> wrote:
|
Date | 2020-11-29 12:00 |
From | Dave Seidel |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
Correction -- I stated "One crucial bit for CV is to use outch() (or whatever outxxx variation) with k-rate signals, not a-rate." which is completely wrong. In fact, the opposite is true: it's necessary to coerce/cast the control signal to a-rate. For example:
On Sat, Nov 28, 2020 at 10:40 PM Dave Seidel <dave.seidel@gmail.com> wrote:
|
Date | 2020-11-29 13:25 |
From | Tetsuya Miwa |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
Dear Dave, Thank you for sharing the report. This is definitely a good news for Cyber Monday. I need to buy ES-8/ES-9! Tetsuya Miwa > 2020/11/29 12:40、Dave Seidel |
Date | 2020-11-29 15:49 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
Surprised about --format=long, because that is supposed to affect only soundfiles, not realtime audio. Prof. Victor Lazzarini
Maynooth University
Ireland
On Nov 29, 2020, at 12:00 PM, Dave Seidel <dave.seidel@gmail.com> wrote:
|
Date | 2020-11-29 17:32 |
From | Dave Seidel |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
I was surprised as well, but I could not open the ES-8 for output without it. Unless there was some other factor and this was just a coincidence. On Sun, Nov 29, 2020 at 10:49 AM Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote:
|
Date | 2020-11-29 17:33 |
From | Dave Seidel |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
I am making a set of UDOs for CV, will make them available maybe later today after some testing. On Sun, Nov 29, 2020 at 8:25 AM Tetsuya Miwa <izc07036@nifty.com> wrote: Dear Dave, |
Date | 2020-11-29 18:28 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
are you using alsa for output, or portaudio? ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 29 Nov 2020, at 17:32, Dave Seidel |
Date | 2020-11-29 18:36 |
From | Victor Lazzarini |
Subject | Re: [Csnd] [EXTERNAL] [Csnd] Csound with DC-coupled audio interfaces |
I just had a peak in the code and the alsa module code does indeed differentiate between floating point, long and short. So the --format option does make a difference in this case. It doesn’t matter in other input/output backends, all of which use floats. I had never noticed that. ======================== Prof. Victor Lazzarini Maynooth University Ireland > On 29 Nov 2020, at 18:28, Victor Lazzarini |