[Csnd] Csound message callback

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] Csound message callback

neithanmo
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
Csound mailing list [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Csound message callback

Benjamin Niemann
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 <[hidden email]> wrote:

> 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
> Csound mailing list [hidden email]
> 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

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Csound message callback

Victor Lazzarini-2
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 <[hidden email]> wrote:
>
> 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 <[hidden email]> wrote:
>> 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
>> Csound mailing list [hidden email]
>> 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
>
> Csound mailing list
> [hidden email]
> 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

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] Csound message callback

neithanmo

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


thanks for your help

On Wed, Jan 31, 2018 at 10:33 AM, Victor Lazzarini <[hidden email]> wrote:
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 <[hidden email]> wrote:
>
> 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 <[hidden email]> wrote:
>> 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
>> Csound mailing list [hidden email]
>> 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
>
> Csound mailing list
> [hidden email]
> 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

Csound mailing list
[hidden email]
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

Csound mailing list [hidden email] 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