Csound Csound-dev Csound-tekno Search About

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

Date2017-03-29 15:50
FromTarmo Johannes
Subject[Csnd-dev] csoundGetMIDIDevList does not return anything with jack midi module
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;
}


----------

Date2017-04-05 09:11
FromTarmo Johannes
SubjectRe: [Csnd-dev] csoundGetMIDIDevList does not return anything with jack midi module
Attachmentsrtjack-names.c  
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 
> #include 
> 
> 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;
> }
> 
> 
> 
> ----------


Date2017-04-05 10:12
FromVictor Lazzarini
SubjectRe: [Csnd-dev] csoundGetMIDIDevList does not return anything with jack midi module
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  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 
>> #include 
>> 
>> 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;
>> }
>> 
>> 
>> 
>> ---