How to interface a MIDI keyboard with E-Prime

Paul Gr pauls_postbus at hotmail.com
Wed Sep 12 14:16:43 UTC 2007


Hello Alain,
 
Although interfacing MIDI equipment is a completely new topic for me, you might find the folowing helpful.
 
I can think of the following approaches to interface EPrime to MIDI devices:
 
1)      Use an existing software library to establish a connection with the Windows audio/MIDI drivers. This would be the preferred method because you only have to create EPrime inline script. However, the difficulty with this approach is that there is no trivial implementation possible to handle time critical input events in EPrime. (This would normally require an EPrime compatible input device object.) How MIDI input events should be handled is described in the ‘Inputting MIDI data’ at http://www.borg.com/~jglatt/tech/lowmidi.htm. If you don’t require accurate time stamps on the ‘keystroke’ events, then it might be possible to use the so called polling technique to handle all input. Sending information (i.e. commands) to MIDI devices should not be a big problem with this technique. The low level MIDI application programming interface (API) is described at the microsoft developers site: http://msdn2.microsoft.com/en-us/library/ms712733.aspx
 
2)      Use a dedicated hardware interface that maps MIDI input events to one of the input devices which are supported by EPrime (i.e. parallel printer port, RS232, …) The advantage of this approach is that (translated) keystrokes can be handled very accurately by EPrime itself. The downside is that you need a special piece of hardware. If development of such a piece of digital hardware yourself is not an option, then you could consider having a second computer that interfaces between MIDI and one of the input ports (such as the serial RS232 port) at the EPrime side. You still have to create (or modify) an application to handle all I/O at the interfacing PC.
 
3)      In theory it should also be possible to bypass the windows MIDI API and implement the serial MIDI protocol in EPrime inline script to interface directly to the MIDI hardware. I wouldn’t advise this though, because the script could become very complex and will not be very easy to merge with the experiment itself.
 
Perhaps other E-Prime or MIDI expert have alternative suggestions.
 
best,Paul
 
Paul Groot
VU University, Amsterdam


Subject: How to interface a MIDI keyboard with E-PrimeDate: Wed, 12 Sep 2007 08:01:49 -0400From: damch at uottawa.caTo: eprime at mail.talkbank.org






Hello E-Prime users,
 
I am calling on the expertise of the E-Prime user community for suggestions on how to interface a digital keyboard (piano) with E-Prime. I would like to investigate how piano students learn to decode musical notation. To do so I would like to present musical score on the monitor and record participants’ responses through a digital keyboard with a MIDI interface. The primary hurdle to overcome is to get E-Prime to receive and record responses to the keyboard with accurate time stamping and response detail (e.g., the key chosen, the force applied, the duration of the key press). May I ask for suggestions, recommendations or directions on how such an interface could be developed? Thank you in advance for your assistance.
 
Sincerely,
 
Alain Desrochers
School of Psychology
University of Ottawa
Ottawa, Canada
 
_________________________________________________________________
Jouw nieuws en entertainment, vind je op MSN.nl!
http://nl.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20070912/166046f8/attachment.htm>


More information about the Eprime mailing list