Opcode to get information on which output devices are connected? (CsoundQt)
Date | 2016-01-04 11:31 |
From | MarieCurie |
Subject | Opcode to get information on which output devices are connected? (CsoundQt) |
Is there an Opcode to know which output device will be used? I'm just starting with Csound. I'm working on multichannel output (5.1). The preferences in CsoundQt for output are set to dac2, which ist the multichannel sound card if connected. In case that it is not connected and I run some code in CsoundQt it sends a warning message to the control window, that the default will be used and I can hear the sound of the first two channels (L,R). The sound of the other channels gets lost. In such a case I want to do the mapping of the 6 channels to two channels: L=L+SL+C*sqrt(2) and R=R+SR+C*sqrt(2) (LFE I don't need because this is redundant - there is no high pass filter applied to the other channels) and to switch from using outch to outs (or giving only 2 outputs to outch). Is there an Opcode to detect if dac1 or dac2 is used (or which dac is connected), such that I can switch accordingly? ----- cheers, Karin -- View this message in context: http://csound.1045644.n5.nabble.com/Opcode-to-get-information-on-which-output-devices-are-connected-CsoundQt-tp5745914.html Sent from the Csound - General mailing list archive at Nabble.com. 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 |
Date | 2016-01-04 11:54 |
From | Rory Walsh |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
No, there isn't one. And you won't be able to switch dynamically during a performance. You need to pick your soundcard in advance, and then stick with it for the duration of the performance. On 4 January 2016 at 11:31, MarieCurie <karin.daum@desy.de> wrote: Is there an Opcode to know which output device will be used? |
Date | 2016-01-04 12:14 |
From | MarieCurie |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
I try always to be lazy. I did not want to switch dynamically during the performance. I simply wanted the signals from the other channels to the first two channels if only stereo is available. Since I get the warning message I thought this could be also accessible on the opcode level such that the piece of code could look like this if gistereo then ; gistereo would be such a global variable which would be set once at the beginning aoutL = aoutL+aoutSL+aoutC*0.707 aoutR = aoutR+aoutSR+aoutC*0.707 outch 1, aoutL, 2 aoutR else outch 1, aoutL, 2, aoutR, 3, aoutC, 4, aoutLFE, 5, aoutSL, 6, aoutSR endif internally this info exists, otherwise I would not expect the warning to be printed. It’s a pity that this is not available on the opcode level Any manual intervention is a potential source of problems. I may simply forget what I did before and spend my time looking for bugs until I realise that I’ve changed something. cheers, Karin
cheers,
Karin View this message in context: Re: [Csnd] Opcode to get information on which output devices are connected? (CsoundQt) Sent from the Csound - General mailing list archive at Nabble.com. 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 |
Date | 2016-01-04 12:20 |
From | Rory Walsh |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
It looks like CsoundQT chooses the default audio card if the one specified is not connected. Csound won't do this on its own. It will just tell you that it can't connect to the chosen audio card. In this case CsoundQT is providing you the information, it's not coming from Csound. You could ask the CsoundQT devs to create a NumberOfChannels macro that you could access in your code. With that information you could set up your instrument as you wish. On 4 January 2016 at 12:14, MarieCurie <karin.daum@desy.de> wrote: I try always to be lazy. I did not want to switch dynamically during the performance. I simply wanted the signals from the other channels to the first two channels if only stereo is available. Since I get the warning message I thought this could be also accessible on the opcode level such that the piece of code could look like this |
Date | 2016-01-04 19:20 |
From | Karin Daum |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
there is no need to change nchnls. It is sufficient to get this information and use the to control the flow of this kind (in my case) if giNumberOfCahnnels==2 then ; where giNumberOfChannels is what you get independently from the nchnls setting aoutL = aoutL+aoutSL+aoutC*0.707 aoutR = aoutR+aoutSR+aoutC*0.707 outch 1, aoutL, 2 aoutR else outch 1, aoutL, 2, aoutR, 3, aoutC, 4, aoutLFE, 5, aoutSL, 6, aoutSR endif Cheers, Karin
|
Date | 2016-01-04 20:13 |
From | jpff |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
On Mon, 4 Jan 2016, Michael Gogins wrote: > Very useful! > when documented....... > Thanks, > Mike > > ----------------------------------------------------- > Michael Gogins > Irreducible Productions > http://michaelgogins.tumblr.com > Michael dot Gogins at gmail dot com > > > On Mon, Jan 4, 2016 at 2:28 PM, Victor Lazzarini > |
Date | 2016-01-04 21:29 |
From | Andres Cabrera |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
Also you could hardcode your device in the CsOptions section of the csd file to override the CsoundQt settings. Cheers,On Mon, Jan 4, 2016 at 12:30 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote: That’s probably a different matter, needing a different approach. You would need to name |
Date | 2016-01-04 21:48 |
From | Anders Genell |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
That's true of course. I was just thinking it would be nice to have the new opcode report how many channels the sound card has to which the Jack server was connected at start-up. I was kind of hoping there would be some simple Jack-API call to find out that could be included in Victors new code. Regards, Anders
|
Date | 2016-01-05 07:38 |
From | MarieCurie |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
thanks, that’s great! Karin
cheers,
Karin View this message in context: Re: [Csnd] Opcode to get information on which output devices are connected? (CsoundQt) Sent from the Csound - General mailing list archive at Nabble.com. 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 |
Date | 2016-01-05 08:22 |
From | Victor Lazzarini |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
It might be possible. Let me thing about it. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 4 Jan 2016, at 21:48, Anders Genell |
Date | 2016-01-05 08:23 |
From | MarieCurie |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
wouldn’t it be nice to have it also for coreaudio for Mac users? This is what I’m using. Or does both work for Macs?
cheers,
Karin View this message in context: Re: [Csnd] Opcode to get information on which output devices are connected? (CsoundQt) Sent from the Csound - General mailing list archive at Nabble.com. 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 |
Date | 2016-01-05 09:06 |
From | Victor Lazzarini |
Subject | Re: Opcode to get information on which output devices are connected? (CsoundQt) |
documented now. ======================== Dr Victor Lazzarini Dean of Arts, Celtic Studies and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 4 Jan 2016, at 20:13, jpff |