[Csnd] Csound message callback
Date | 2018-01-29 21:33 |
From | Natanael Mojica |
Subject | [Csnd] Csound message callback |
Hi I am develop a audio app using csound like audio engine. The app has a system log which is enable when the user pass a specific parameter for that, just before to run the application. When the log system is enable, all csound messages are showed using the csound message calback api functions.. But there is a message which is always showed when the application running and I dont know why and how to get that message through the message Callback, this message is: virtual_keyboard real time MIDI plugin for Csound 0dBFS level = 32768,0 --Csound version 6.08 (double samples) 2016-12-01 [commit: none] libsndfile-1.0.27 It is the only message from csound that the log system not catch, and I need to block this message and show it only when the log system is enabled Please do you know a proper way to do this? (I used C for write the app) Thanks |
Date | 2018-01-31 16:25 |
From | Benjamin Niemann |
Subject | Re: [Csnd] Csound message callback |
Hi Natanael, these messages are emitted right after you call csoundCreate(), but before you have a chance to install a message callback for that instance using csoundSetMessageCallback(). But you can capture those message, too, by using csoundSetDefaultMessageCallback() to install a global callback once at the beginning of your app. It's a bit unfortunate that this is basically a global variable and not tied to a csound instance. -Ben On Mon, Jan 29, 2018 at 10:33 PM, Natanael Mojica |
Date | 2018-01-31 16:33 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Csound message callback |
yep, these messages are printed on creation, before anything is setup so a global callback is needed. For Csound 7, we could possibly add a no-print flag or something to the csoundCreate() is done. ======================== 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 31 Jan 2018, at 16:25, Benjamin Niemann |
Date | 2018-02-01 17:55 |
From | Natanael Mojica |
Subject | Re: [Csnd] Csound message callback |
Hi Benjamin, using the default message callback solved my issue. and Victor, it will be a great feature, to leave to the user define if the message, generaded when a new csound instance is created, will showed or not through stdout directly or using a message callback On Wed, Jan 31, 2018 at 10:33 AM, Victor Lazzarini <Victor.Lazzarini@mu.ie> wrote: yep, these messages are printed on creation, before anything is setup so a global callback is needed. For Csound 7, we could |
Date | 2018-04-17 22:25 |
From | Natanael Mojica |
Subject | Re: [Csnd] Csound message callback |
Hi thanks.I have another questions about csound messages.. When I interrupt my application using ctrl+c, there appear : CCsound tidy up: Interrupt so, the default message callback does not catch this message there is any way to avoid this message appear in my terminal and redirect it to my log system? or disable it. On Thu, Feb 1, 2018 at 11:55 AM, Natanael Mojica <neithanmo@gmail.com> wrote:
|
Date | 2018-04-18 20:06 |
From | Benjamin Niemann |
Subject | Re: [Csnd] Csound message callback |
Hi Natanael, this can be solved by disabling the interrupt handler. Pass CSOUNDINIT_NO_SIGNAL_HANDLER to your call of csoundInitialize(). Or perhaps it was CSOUNDINIT_NO_ATEXIT. Or both... Not sure though, what you're losing when you disable those things, but I didn't see any issue when I did that (setting both flags). -Ben On Tue, Apr 17, 2018, 23:26 Natanael Mojica <neithanmo@gmail.com> wrote:
|