Re: [Csnd-dev] possible issue with ALSA midi?

vlz <[email protected]>
Newsgroups gmane.comp.audio.csound.devel
Message-ID <[email protected]>
I checked and this error message comes from the MIDI side of things in the alsa module

static int32_t listDevicesM(CSOUND *csound, CS_MIDIDEVICE *list, int32_t isOutput){
    int32_t count = 0;
    char *s;
    s = (char*) csound->QueryGlobalVariable(csound, "_RTMIDI");
    if (strncmp(s, "alsaraw", 8) == 0) { /* ALSA Raw MIDI */
      count = listRawMidi(csound, list, isOutput);
    } else if (strncmp(s, "alsaseq", 8) == 0) {/* ALSA Sequencer */
      count = listAlsaSeq(csound, list, isOutput);
    } else if (strncmp(s, "devfile", 8) == 0) {

    } else {
      csound->ErrorMsg(csound, Str("rtalsa: Wrong callback."));
    }
    return count;
}

So maybe you can try one of the options: alsaraw, alsaseq or devfile (from the code, it’s raw midi, alsa sequencer midi or
midi file). These are the three options for listing but I guess “alsaraw” should have also been the same as “alsa” but
currently is not there.



> On 11 Nov 2024, at 20:04, Dave Seidel <[email protected]> wrote:
> 
> Yes, -odac is working fine. I went back and checked, and I've been specifying "-+rtmidi=portmidi" for several years now on my Pis, going back to Cs6. So maybe this is an old/existing issue, which might make it low priority. 
> 
> On Mon, Nov 11, 2024 at 2:52 PM vlz <[email protected]> wrote:
> It could well be. Can you run -odac to it, does it make any sound?
> 
> 
> Prof. Victor Lazzarini
> Maynooth University
> Ireland
> 
>> On 11 Nov 2024, at 19:48, Dave Seidel <[email protected]> wrote:
>> 
>> I recently acquired a Pi 5, which I've equipped with a Pisound board (like my older Pis). I can build Cs7 without any issues, but I notice that when I query MIDI devices using ALSA as the interface, I get an error:
>> 
>> dave@phonon:~/src/csound/build $ csound -+rtmidi=alsa --midi-devices
>> rtalsa: Wrong callback.0 MIDI input devices
>> rtalsa: Wrong callback.rtalsa: Wrong callback.0 MIDI output devices
>> rtalsa: Wrong callback.            overall amps:      0.0
>>            overall samples out of range:        0
>> 0 errors in performance
>> Elapsed time at end of performance: real: 0.001s, CPU: 0.001s
>> 
>> If I specify portmidi, no errors:
>> 
>> dave@phonon:~/src/csound/build $ csound -+rtmidi=portmidi --midi-devices
>> rtmidi: PortMIDI module enabled
>> 3 MIDI input devices
>>  0: 0 (Midi Through Port-0)
>>  1: 1 (pisound MIDI PS-28625BA)
>>  2: 2 (pisound-ctl)
>> 3 MIDI output devices
>>  0: 0 (Midi Through Port-0)
>>  1: 1 (pisound MIDI PS-28625BA)
>>  2: 2 (pisound-ctl)
>>                    overall amps:      0.0
>>            overall samples out of range:        0
>> 0 errors in performance
>> Elapsed time at end of performance: real: 0.003s, CPU: 0.003s
>> 
>> Same results on my Pi 4 running Cs7. I don't have a Pi running Cs6 for comparison. The Pi 4 is running bullseye; the Pi 5 is running bookworm.
>> 
>> FWIW, I don't really care which interface I use, and I'm fine with using portmidi, but I thought this might indicate an issue.
>> 
>> - Dave
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.