overriding CsOptions?
Date | 2017-01-18 09:12 |
From | Rory Walsh |
Subject | overriding CsOptions? |
Is there a way to override a users CsOptions using the Csound API? I'm already setting "-n" using csoundSetOption() but it seems that as soon as I pass "-odac" in the CsOptions<> section it renders the -n useless. I would rather not have to parse the .csd file for that section, but perhaps it's the only way?
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 | 2017-01-19 09:12 |
From | Victor Lazzarini |
Subject | Re: overriding CsOptions? |
for this particular case, you might setHostImplementedAudioIO() (or whatever it is) and maybe implement a non-op audio IO function. More generally, I don’t know, I think there isn’t a way, unless you start Csound and then call CompileCSD() (or whatever it is). ======================== Prof. 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 18 Jan 2017, at 09:12, Rory Walsh |
Date | 2017-01-19 15:49 |
From | Steven Yi |
Subject | Re: overriding CsOptions? |
This reminds me of conversations from many years ago regarding overriding values and precedence. One option would be to use "-+ignore_csopts=1", parse any found CsOptions, then set only the values you want to support. It's not particularly nice, but will work. 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 | 2017-01-19 16:09 |
From | Rory Walsh |
Subject | Re: overriding CsOptions? |
Thanks Steven, I was aware of that one. You're right, t's not the prettiest. it would also render any other CsOptions as useless. I think I may just have to parse the CsOptions myself. Btw, if I set setHostImplementedAudioIO(), does that stop Csound from trying to interface with any audio IO devices? On 19 January 2017 at 15:49, Steven Yi <stevenyi@gmail.com> wrote: This reminds me of conversations from many years ago regarding |
Date | 2017-01-19 17:04 |
From | Bernt Isak Wærstad |
Subject | Re: overriding CsOptions? |
Semi-related: Would it be possible to set up several CsOptions for different platform? Like <CsOptions>> #ifdef Linux -+rtaudio=alsa #endif #ifdef OSX -odac #endif </CsOptions> Perhaps a minor thing, but still annoying to change these options back and forth when working on multiple platforms with the same code. On 19 January 2017 at 17:09, Rory Walsh <rorywalsh@ear.ie> wrote:
Mvh.
Bernt Isak Wærstad |
Date | 2017-01-19 17:20 |
From | Steven Yi |
Subject | Re: overriding CsOptions? |
I've argued against these kinds of things being in portable projects. I usually recommend system configuration values to be written into .csound6rc files for the user. That way, things that a project truly depends upon are in the file. You could also use multiple local .csound6rc files and swap them on each system. (I.e. have .csound6rc.linux, .csound6rc.osx, and symlink or copy the file when moving the project.) I'd prefer not to have ifdefs in CsOptions myself. On Thu, Jan 19, 2017, 12:04 PM Bernt Isak Wærstad <berntisak@gmail.com> wrote:
|
Date | 2017-01-19 18:33 |
From | Michael Gogins |
Subject | Re: overriding CsOptions? |
I agree with Steven here. Regards, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jan 19, 2017 at 12:20 PM, Steven Yi |
Date | 2017-01-19 18:46 |
From | "Dr. Richard Boulanger" |
Subject | Re: overriding CsOptions? |
Hum. I sort of liked the ifdef. It's right there and not lost/hidden in another file. And it is a common/best practice - standard programming convention. Sent from my iPhone > On Jan 19, 2017, at 1:33 PM, Michael Gogins |
Date | 2017-01-19 19:04 |
From | Michael Gogins |
Subject | Re: overriding CsOptions? |
The reason for not doing this is so that, as far as possible, any Csound csd or orc/sco will run on any platform without errors or confusion to a novice user. Regards, Mike ----------------------------------------------------- Michael Gogins Irreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Thu, Jan 19, 2017 at 1:46 PM, Dr. Richard Boulanger |
Date | 2017-01-23 14:20 |
From | Rory Walsh |
Subject | Re: overriding CsOptions? |
Just to note, I followed Victor's advice here and used SetHostImplementedAudioIO(). It seems to have done the trick. On 19 January 2017 at 19:04, Michael Gogins <michael.gogins@gmail.com> wrote: The reason for not doing this is so that, as far as possible, any |