Re: MIDI input

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Ursprüngliche Nachricht-----
> Von: "Dave Phillips" <dlphillips@xxxxxxxxxx>

> x.zupftom@xxxxxx 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 pressing a key on the MIDI keyboard, it can take several seconds until the program reacts to it.  What can I do about that?

> 
> The problem is latency, probably system latency. What distribution are 
> you using ?

I'm using Ubuntu 8.04 "Hardy" AMD64 on a dual core machine.

> 
> 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 not.  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 second.  That's more than enough for my purposes (precise timing is not a problem, I only need step time input).

The behaviour is really strange.  I tried playing a chromatic scale (staccato 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 are dropped, and the final eight notes appear again.  The notes (the program 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 slightly, but I'm not sure.
- If I play at 92 bpm, the first nine notes appear.  The 1.5 second intervals 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 never heard reports about such a bug under native MS DOS.  Maybe the program simply does not "like" the way MIDI input is implemented in Dosemu.

Sometimes the program hangs after inputting MIDI.  It does neither react 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 trigger that some notes are shown, but those notes do not correspond with the 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 appear upon one keystroke, sometimes only one.  Sometimes it hangs completely and does not even respond to the MIDI keyboard any more.

Maybe some background information can help finding a solution:  With DOS (or Windows), up to now, no user of this program has MIDI input working on a machine without ISA MIDI card.  Some of them even consider buying 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.  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 this working properly.

Thomas W.
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066

--
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux