Hi Mark, I'm one of the least qualified around to answer this, as I'm not a Wndows user, but as no one else has responded maybe I can make some suggestions. I also may be completely wrong! As I understand it, Csound on Windows uses PortMidi, and I don't know if it is automatically installed. (On Linux distributions It seems to be,) I assume DAWs will have a more direct connection to Windows drivers. How to get PortMidi if it's not there, I have no idea. A couple of points about the test programs. I assume you're running them from the command-line (bypassing CsoundQT)? Eduardo's program runs fine on my systems (Linux and Haiku); I'm surprised it could cause an exception. Iain McCurdy's has a major omission in the CsOptions! No '-o dac' term. For a start, this makes it default to writing to disc, so you end up with one hour's worth of 'test.wav'! It also means that it runs for a few seconds -- not an hour as specified in the CsScore. You might get some more ideas from the FLOSS Manual's chapter on MIDI: http://write.flossmanuals.net/csound/c-configuring-midi/ Good luck! -- Pete -- On Tue, Apr 21, 2020 at 07:26:59PM -0400, Mark J Butsch wrote: > Hello, > > I am new to Csound, CsoundQT, and USB MIDI keyboards and I am, not having > any luck getting MIDI data into csound. I am running Version 0.9.7 of > CsoundQT with Csound 6.14 on Windows 10 Home version 1909 > > I have a nectar LX25+ keyboard that does with work with other DAW software > and I have used Pocket MIDI to verify that it does send data to the PC. > > I have tried lots of example .csd programs with midi input and have not > gotten any to work. Often, CsoundQT just locks up. I have run other example > .cds files and they do yield sound. > > I found a MIDI debugging .csd by Iain McCurdy, but it hasn't helped me. > > --- > > > > > > -Ma -m0 > > ; activates all midi devices, suppress note printings > > > > > > > > ; Example by Iain McCurdy > > > > ; no audio so 'sr' or 'nchnls' aren't relevant > > ksmps = 32 > > > > ; using massign with these arguments disables default instrument triggering > > massign 0,0 > > > > instr 1 > > kstatus, kchan, kdata1, kdata2 midiin ;read in midi > > ktrigger changed kstatus, kchan, kdata1, kdata2 ;trigger if midi data > changes > > if ktrigger=1 && kstatus!=0 then ;if status byte is non-zero... > > ; -- print midi data to the terminal with formatting -- > > printks "status:%d%tchannel:%d%tdata1:%d%tdata2:%d%n"\ > > ,0,kstatus,kchan,kdata1,kdata2 > > endif > > endin > > > > > > > > i 1 0 3600 ; instr 1 plays for 1 hour > > > > > > --- > > if I run in terminal I get "csound command: Segmentation violation". > > If I "run" it, I get "PortAudio: failed to obtain device info. > > Failed to initialise real time audio input" > > > > If "Render" it, it appears to run, but nothing is output. > > > > ---------------------------------------------------------------------------- > ---- > > I originally posted this in the csoundQT mailing list, where Eduardo > Moguillansky provided a .csd to try. > > "Use this .csd to check for midi in csound. In many cases, if csound crashes > it brings CsoundQt down with it. " > > https://github.com/CsoundQt/CsoundQt/wiki/Test-MIDI > > I did that and the results were as follows: > > ---- > > C:\Program Files\Csound6_x64\examples>csound miditest.csd > > 0dBFS level = 32768.0 > > --Csound version 6.14 (double samples) Feb 2 2020 > > [commit: ac9b164e308b64c9f09c945c8f956c071dddd918] > > libsndfile-1.0.29pre1 > > WARNING: could not open library 'C:\Program > Files\Csound6_x64\plugins64\\py.dll' (-1) > > UnifiedCSD: miditest.csd > > STARTING FILE > > Creating options > > Creating orchestra > > closing tag > > Creating score > > rtaudio: PortAudio module enabled ... > > using callback interface > > rtmidi: PortMIDI module enabled > > sorting score ... > > ... done > > midi channel 1 using instr 1 > > midi channel 2 using instr 1 > > midi channel 3 using instr 1 > > midi channel 4 using instr 1 > > midi channel 5 using instr 1 > > midi channel 6 using instr 1 > > midi channel 7 using instr 1 > > midi channel 8 using instr 1 > > midi channel 9 using instr 1 > > midi channel 10 using instr 1 > > midi channel 11 using instr 1 > > midi channel 12 using instr 1 > > midi channel 13 using instr 1 > > midi channel 14 using instr 1 > > midi channel 15 using instr 1 > > midi channel 16 using instr 1 > > midi channel 17 using instr 1 > > midi channel 18 using instr 1 > > midi channel 19 using instr 1 > > midi channel 20 using instr 1 > > midi channel 21 using instr 1 > > midi channel 22 using instr 1 > > midi channel 23 using instr 1 > > midi channel 24 using instr 1 > > midi channel 25 using instr 1 > > midi channel 26 using instr 1 > > midi channel 27 using instr 1 > > midi channel 28 using instr 1 > > midi channel 29 using instr 1 > > midi channel 30 using instr 1 > > midi channel 31 using instr 1 > > midi channel 32 using instr 1 > > midi channel 33 using instr 1 > > midi channel 34 using instr 1 > > midi channel 35 using instr 1 > > midi channel 36 using instr 1 > > midi channel 37 using instr 1 > > midi channel 38 using instr 1 > > midi channel 39 using instr 1 > > midi channel 40 using instr 1 > > midi channel 41 using instr 1 > > midi channel 42 using instr 1 > > midi channel 43 using instr 1 > > midi channel 44 using instr 1 > > midi channel 45 using instr 1 > > midi channel 46 using instr 1 > > midi channel 47 using instr 1 > > midi channel 48 using instr 1 > > midi channel 49 using instr 1 > > midi channel 50 using instr 1 > > midi channel 51 using instr 1 > > midi channel 52 using instr 1 > > midi channel 53 using instr 1 > > midi channel 54 using instr 1 > > midi channel 55 using instr 1 > > midi channel 56 using instr 1 > > midi channel 57 using instr 1 > > midi channel 58 using instr 1 > > midi channel 59 using instr 1 > > midi channel 60 using instr 1 > > midi channel 61 using instr 1 > > midi channel 62 using instr 1 > > midi channel 63 using instr 1 > > midi channel 64 using instr 1 > > displays suppressed > > 0dBFS level = 32768.0 > > 0: Impact LX25+ (portmidi) > > 1: MIDIIN2 (Impact LX25+) (portmidi) > > PortMIDI: Activated input device 0: 'Impact LX25+' (MMSystem) > > > > csound command: Segmentation violation > > > > C:\Program Files\Csound6_x64\examples> > > ---- > > Based on this result, Tarmo Johannes suggested that I post to this mailing > list. > > > > If you have any suggestions on how to resolve this, log files to look at, > others to ask, etc., I would appreciate it. > > > > Thank you, > > Mark Butsch > > > > > Csound mailing list > Csound@listserv.heanet.ie > 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 Csound@listserv.heanet.ie 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