Quantcast

[Csnd-dev] csoundGetMIDIDevList does not return anything with jack midi module

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd-dev] csoundGetMIDIDevList does not return anything with jack midi module

Tarmo Johannes-3
Hi,

Maybe I am doig somthing wrong but maybe it is a bug - I cannot get list of jack MIDI clients with csoundGetMIDIDevList. Jack is running, there are several MIDI ports and otherwise Csound works with -+rtmidi=jack

Test C code below.

Tested on Linux, Csound built from develop branch on Marc 22, 2017.

My output:

---

Module alsaseq 3 devices found
Device no 0: name: Timer interfacename: System
Device no 1: name: Announce interfacename: System
Device no 2: name: Midi Through Port-0 interfacename: Midi Through

Module jack 0 devices found

---


Thanks!
tarmo

-------
// compile gcc -DUSE_DOUBLE -o cs-test cs-test.c -lcsound64 

#include <csound/csound.h>
#include <stdio.h>

void getMidiNames(const char *module) {
    CSOUND *cs = csoundCreate(NULL);
    csoundSetMIDIModule(cs, module);
    int i,newn, n = csoundGetMIDIDevList(cs,NULL,0);
    CS_MIDIDEVICE *devs = (CS_MIDIDEVICE *) malloc(n*sizeof(CS_MIDIDEVICE));
    newn = csoundGetMIDIDevList(cs,devs,0);

    printf("Module %s %i devices found\n", module, newn);
    for (i = 0; i < n; i++) {
            printf("Device no %d: name: %s interfacename: %s\n", i, devs[i].device_name, devs[i].interface_name);
    }
    free(devs);
    csoundDestroy(cs);
}


int main(int argc, char **argv)
{
  getMidiNames("alsaseq");
  getMidiNames("jack");
  return 0;
}


----------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] csoundGetMIDIDevList does not return anything with jack midi module

Tarmo Johannes-3
Hi,

this is not of high priority at all but to check, perhaps someone has an idea:

On kolmapäev, 29. märts 2017 17:50.16 EEST Tarmo Johannes wrote:

> Hi,
>
> Maybe I am doig somthing wrong but maybe it is a bug - I cannot get list of
> jack MIDI clients with csoundGetMIDIDevList. Jack is running, there are
> several MIDI ports and otherwise Csound works with -+rtmidi=jack
>
> Test C code below.
>
> Tested on Linux, Csound built from develop branch on Marc 22, 2017.
>
> My output:
>
> ---
>
> Module alsaseq 3 devices found
> Device no 0: name: Timer interfacename: System
> Device no 1: name: Announce interfacename: System
> Device no 2: name: Midi Through Port-0 interfacename: Midi Through
>
> Module jack 0 devices found
> ---
>
>
> Thanks!
> tarmo
>
> -------
>
> // compile gcc -DUSE_DOUBLE -o cs-test cs-test.c -lcsound64
>
> #include <csound/csound.h>
> #include <stdio.h>
>
> void getMidiNames(const char *module) {
>     CSOUND *cs = csoundCreate(NULL);
>     csoundSetMIDIModule(cs, module);
>     int i,newn, n = csoundGetMIDIDevList(cs,NULL,0);
>     CS_MIDIDEVICE *devs = (CS_MIDIDEVICE *) malloc(n*sizeof(CS_MIDIDEVICE));
> newn = csoundGetMIDIDevList(cs,devs,0);
>
>     printf("Module %s %i devices found\n", module, newn);
>     for (i = 0; i < n; i++) {
>             printf("Device no %d: name: %s interfacename: %s\n", i,
> devs[i].device_name, devs[i].interface_name);
>     }
>     free(devs);
>     csoundDestroy(cs);
> }
>
>
> int main(int argc, char **argv)
> {
>   getMidiNames("alsaseq");
>   getMidiNames("jack");
>   return 0;
> }
>
>
>
> ----------


rtjack-names.c (766 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd-dev] csoundGetMIDIDevList does not return anything with jack midi module

Victor Lazzarini
I think device listing was never implemented in jack-midi, it’s an “enhancement” ticket for github, I think.
========================
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 5 Apr 2017, at 09:11, Tarmo Johannes <[hidden email]> wrote:
>
> Hi,
>
> this is not of high priority at all but to check, perhaps someone has an idea:
>
> On kolmapäev, 29. märts 2017 17:50.16 EEST Tarmo Johannes wrote:
>> Hi,
>>
>> Maybe I am doig somthing wrong but maybe it is a bug - I cannot get list of
>> jack MIDI clients with csoundGetMIDIDevList. Jack is running, there are
>> several MIDI ports and otherwise Csound works with -+rtmidi=jack
>>
>> Test C code below.
>>
>> Tested on Linux, Csound built from develop branch on Marc 22, 2017.
>>
>> My output:
>>
>> ---
>>
>> Module alsaseq 3 devices found
>> Device no 0: name: Timer interfacename: System
>> Device no 1: name: Announce interfacename: System
>> Device no 2: name: Midi Through Port-0 interfacename: Midi Through
>>
>> Module jack 0 devices found
>> ---
>>
>>
>> Thanks!
>> tarmo
>>
>> -------
>>
>> // compile gcc -DUSE_DOUBLE -o cs-test cs-test.c -lcsound64
>>
>> #include <csound/csound.h>
>> #include <stdio.h>
>>
>> void getMidiNames(const char *module) {
>>    CSOUND *cs = csoundCreate(NULL);
>>    csoundSetMIDIModule(cs, module);
>>    int i,newn, n = csoundGetMIDIDevList(cs,NULL,0);
>>    CS_MIDIDEVICE *devs = (CS_MIDIDEVICE *) malloc(n*sizeof(CS_MIDIDEVICE));
>> newn = csoundGetMIDIDevList(cs,devs,0);
>>
>>    printf("Module %s %i devices found\n", module, newn);
>>    for (i = 0; i < n; i++) {
>>            printf("Device no %d: name: %s interfacename: %s\n", i,
>> devs[i].device_name, devs[i].interface_name);
>>    }
>>    free(devs);
>>    csoundDestroy(cs);
>> }
>>
>>
>> int main(int argc, char **argv)
>> {
>>  getMidiNames("alsaseq");
>>  getMidiNames("jack");
>>  return 0;
>> }
>>
>>
>>
>> ----------
>
> <rtjack-names.c>

Loading...