[Csnd] how to use csound api midi functions

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

[Csnd] how to use csound api midi functions

forrest
I've been bypassing csound's native midi routines, so my C program could directly get time & notes, then turn these into score strings sent to a csound thread.

What I find, doing this, is that I'm missing too many note-offs.

This wasn't a problem with direct midi -> csound messages. So it might be worthwhile to have csound catch midi signals, send the data from that for my C program to process, turn it into score lines & send these back via csoundReadScore().

?
I don't find the csound api documentation much use towards understanding how to do this. Examples of how to use the API midi functions in this way?

Forrest Curo
San Diego
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] how to use csound api midi functions

Victor Lazzarini
Examples of MIDI callbacks can be found in 
the sources directory InOut, e.g. pmidi.c.

Your program can set up these callbacks and dispatch MIDI data to Csound.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 14 Mar 2017, at 04:16, Forrest Curo <[hidden email]> wrote:

I've been bypassing csound's native midi routines, so my C program could directly get time & notes, then turn these into score strings sent to a csound thread.

What I find, doing this, is that I'm missing too many note-offs.

This wasn't a problem with direct midi -> csound messages. So it might be worthwhile to have csound catch midi signals, send the data from that for my C program to process, turn it into score lines & send these back via csoundReadScore().

?
I don't find the csound api documentation much use towards understanding how to do this. Examples of how to use the API midi functions in this way?

Forrest Curo
San Diego
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] how to use csound api midi functions

forrest

On Tue, Mar 14, 2017 at 12:09 AM, Victor Lazzarini <[hidden email]> wrote:
Examples of MIDI callbacks can be found inĀ 
the sources directory InOut, e.g. pmidi.c.

Your program can set up these callbacks and dispatch MIDI data to Csound.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 14 Mar 2017, at 04:16, Forrest Curo <[hidden email]> wrote:

I've been bypassing csound's native midi routines, so my C program could directly get time & notes, then turn these into score strings sent to a csound thread.

What I find, doing this, is that I'm missing too many note-offs.

This wasn't a problem with direct midi -> csound messages. So it might be worthwhile to have csound catch midi signals, send the data from that for my C program to process, turn it into score lines & send these back via csoundReadScore().

?
I don't find the csound api documentation much use towards understanding how to do this. Examples of how to use the API midi functions in this way?

Forrest Curo
San Diego
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] how to use csound api midi functions

Victor Lazzarini
That is one of them. There is also code in pmidi.c rtalsa.c rtjack.c rtwinmm.c and ipmidi.c

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 14 Mar 2017, at 13:31, Forrest Curo <[hidden email]> wrote:


On Tue, Mar 14, 2017 at 12:09 AM, Victor Lazzarini <[hidden email]> wrote:
Examples of MIDI callbacks can be found in 
the sources directory InOut, e.g. pmidi.c.

Your program can set up these callbacks and dispatch MIDI data to Csound.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 14 Mar 2017, at 04:16, Forrest Curo <[hidden email]> wrote:

I've been bypassing csound's native midi routines, so my C program could directly get time & notes, then turn these into score strings sent to a csound thread.

What I find, doing this, is that I'm missing too many note-offs.

This wasn't a problem with direct midi -> csound messages. So it might be worthwhile to have csound catch midi signals, send the data from that for my C program to process, turn it into score lines & send these back via csoundReadScore().

?
I don't find the csound api documentation much use towards understanding how to do this. Examples of how to use the API midi functions in this way?

Forrest Curo
San Diego
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