From mboxrd@z Thu Jan 1 00:00:00 1970 From: x.zupftom@web.de Subject: Re: MIDI input Date: Mon, 16 Jun 2008 23:22:27 +0200 Message-ID: <168480834@web.de> Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Sender: linux-msdos-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="iso-8859-1" To: Dave Phillips Cc: linux-msdos@vger.kernel.org > -----Urspr=FCngliche Nachricht----- > Von: "Dave Phillips" > x.zupftom@web.de wrote: > > ... I got MIDI input to work - somehow. Thanks again, Dave, that'= s already a huge success for me. The problem now is that after pressin= g a key on the MIDI keyboard, it can take several seconds until the pro= gram reacts to it. What can I do about that? >=20 > The problem is latency, probably system latency. What distribution ar= e=20 > you using ? I'm using Ubuntu 8.04 "Hardy" AMD64 on a dual core machine. >=20 > What's the hog threshold set for in dosemurc ? Do you mean dosemu.conf? Up to now the hogthreshold was commented out.= I tried to set it to 0, 1, 100, but it makes no difference. Someone (who's not on this list) suggested it might be a polling issue.= With the S debugging switch I checked how often Dosbox reads the MIDI= input buffer. I found it depends on whether the buffer is filled or n= ot. If it's empty, Dosemu checks it about twice per second - if I play= on my MIDI keyboard, it reads the buffer e.g. about 20 times per secon= d. That's more than enough for my purposes (precise timing is not a pr= oblem, I only need step time input). The behaviour is really strange. I tried playing a chromatic scale (st= accato to make sure notes do not overlap) over two octaves at different= speeds. The results are mostly well reproducible: - If I play at 120 bpm, the first eight notes appear, then nine notes a= re dropped, and the final eight notes appear again. The notes (the pro= gram actually writes out the note names in text form) appear one after = the other, one every 1.5 seconds or so. I believe the time varies slig= htly, but I'm not sure. - If I play at 92 bpm, the first nine notes appear. The 1.5 second int= ervals are the same as with 120 bpm. - At 126 bpm I have less consistent results. Most of the time it shows= the first eight notes correctly, then it either drops either 14 or 15 = notes and displays the two or three last ones. Sometimes the behaviour= is even stranger. The program simply shows garbage, even notes that I= never played. That looks more like a bug in the DOS program, but I ne= ver heard reports about such a bug under native MS DOS. Maybe the prog= ram simply does not "like" the way MIDI input is implemented in Dosemu. Sometimes the program hangs after inputting MIDI. It does neither reac= t to the keyboard nor to the mouse. I just discovered that if I press = some keys on the qwertz keyboard, they only appear if I press a key on = the MIDI keyboard afterwards. But the program does not accept any MIDI= input any more. The whole I/O seems to be messed up. If the program hangs, pressing some keys on the MIDI keyboard may trigg= er that some notes are shown, but those notes do not correspond with th= e pressed key. I first suspected they are notes that were still in the= input buffer, but at least sometimes it seems to me that it's complete= garbage that can't have been in the buffer. Sometimes two notes appea= r upon one keystroke, sometimes only one. Sometimes it hangs completel= y and does not even respond to the MIDI keyboard any more. Maybe some background information can help finding a solution: With DO= S (or Windows), up to now, no user of this program has MIDI input worki= ng on a machine without ISA MIDI card. Some of them even consider buyi= ng old used machines with ISA slots in order to work with MIDI input. = Output sometimes works fine, but input does not work at all without ISA= =2E What could be the cause for this? What consequences might it have= for running the program in Dosemu? Dosemu could be an option for many= users if MIDI input actually worked. I still don't give up hope, though it looks almost impossible to get th= is working properly. Thomas W. _____________________________________________________________________ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=3D100071&distributionid=3D000000000066 -- To unsubscribe from this list: send the line "unsubscribe linux-msdos" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html