Jump to content

Working (and Playing!) with REXX and OS/2 Multimedia: Difference between revisions

From EDM2
No edit summary
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
By [[Timothy F. Sipples]]
''By [[Timothy F. Sipples]]''
 
This are the notes of a presentation gave by [[Timothy F. Sipples]] on 15 May 1994 on the Fifth Annual REXX Symposium.


This are the notes of a presentation gave by [[Timothy F. Sipples]] on 15 May 1994 at the [[Fifth Annual REXX Symposium]].


==What is Multimedia?==
==What is Multimedia?==
* Combining still images (bitmaps), animation, software motion video, text, and/or audio to present information
* Combining still images (bitmaps), animation, software motion video, text, and/or audio to present information
* Principle technologies: CD-ROM, laserdisc, digital audio, MIDI, high resolution displays with more colors
* Principle technologies: CD-ROM, laserdisc, digital audio, MIDI, high resolution displays with more colors
* Principle file formats: WAV, MID, and AVI
* Principle file formats: WAV, MID, and AVI
* Multimedia NOT invented by Comptons
* Multimedia NOT invented by Comptons
...We like to call it ULTIMEDIA
...We like to call it ULTIMEDIA


==Why use Multimedia?==
==Why use Multimedia?==
* "It's the market, stupid."
* "It's the market, stupid."
* Triggers: to "describe" events
* Triggers: to "describe" events
Line 24: Line 20:


==Requirements for OS/2 Multimedia==
==Requirements for OS/2 Multimedia==
* OS/2 2.1 with Multimedia Presentation Manager/2 (included)
* OS/2 2.1 with Multimedia Presentation Manager/2 (included)
* Standard OS/2 hardware requirements
* Standard OS/2 hardware requirements
Line 35: Line 30:


==Major Features in MMPM/2 1.1==
==Major Features in MMPM/2 1.1==
* Multimedia folder
* Multimedia folder
* Sound setup object (for system sounds)
* Sound setup object (for system sounds)
Line 46: Line 40:


==Principle File Formats==
==Principle File Formats==
* Generally a superset of Windows file formats
* Generally a superset of Windows file formats
* WAV: Digital audio (pulse code modulation, and variants)
* WAV: Digital audio (pulse code modulation, and variants)
Line 55: Line 48:


==Principle REXX Features==
==Principle REXX Features==
* Multimedia with REXX help file
* Multimedia with REXX help file
* PLAY.CMD
* PLAY.CMD
Line 63: Line 55:


==Key Limitations==
==Key Limitations==
* REXX is unable to deal with loss of device (meaning ACQUIRE EXCLUSIVE must be used)
* REXX is unable to deal with loss of device (meaning ACQUIRE EXCLUSIVE must be used)
* REXX program should not hold device exclusive for long
* REXX program should not hold device exclusive for long
Line 71: Line 62:


==Sample REXX Script==
==Sample REXX Script==
  /* Load and initialize Multimedia REXX support */
  /* Load and initialize Multimedia REXX support */
  call RXFUNCADD 'mciRxInit','MCIAPI','mciRxInit'
  call RXFUNCADD 'mciRxInit','MCIAPI','mciRxInit'
Line 122: Line 112:


==Live Demos==
==Live Demos==
* PLAY.CMD
* PLAY.CMD
* FOR..DO
* FOR..DO
Line 131: Line 120:


==Links==
==Links==
* [http://www.rexxla.org/rexxlang/mfc/rexxsr94.txt Aditional info about the event]
* [http://www.rexxla.org/rexxlang/mfc/rexxsr94.txt Additional info about the event]


[[Category:Scripting Articles]]
[[Category:REXX Articles]]

Latest revision as of 22:46, 18 January 2020

By Timothy F. Sipples

This are the notes of a presentation gave by Timothy F. Sipples on 15 May 1994 at the Fifth Annual REXX Symposium.

What is Multimedia?

  • Combining still images (bitmaps), animation, software motion video, text, and/or audio to present information
  • Principle technologies: CD-ROM, laserdisc, digital audio, MIDI, high resolution displays with more colors
  • Principle file formats: WAV, MID, and AVI
  • Multimedia NOT invented by Comptons

...We like to call it ULTIMEDIA

Why use Multimedia?

  • "It's the market, stupid."
  • Triggers: to "describe" events
  • Education/training
  • Kiosks (point-of-sale)
  • Presentations and demos
  • Better human interfaces generally
  • Entertainment and games

Requirements for OS/2 Multimedia

  • OS/2 2.1 with Multimedia Presentation Manager/2 (included)
  • Standard OS/2 hardware requirements
  • Some additional RAM (to 12 MB) recommended
  • CD-ROM drive
  • Audio adapter (Creative Labs, MediaVision, IBM, etc.)
  • Display with at least 256 colors recommended
  • Video capture adapter (optional)
  • Laserdisc player with computer control (optional)

Major Features in MMPM/2 1.1

  • Multimedia folder
  • Sound setup object (for system sounds)
  • Applets
  • Volume control
  • Drivers
  • Sample files
  • Lotus 1-2-3 and Excel audio macros
  • External function library for REXX and help file

Principle File Formats

  • Generally a superset of Windows file formats
  • WAV: Digital audio (pulse code modulation, and variants)
  • MID: Standard MIDI file format (for instrumental music)
  • AVI: Audio-video interleaved (IBM Ultimotion and Intel Indeo)
  • Conversion applet for some additional file formats included (AVC, VOC, DIB, DMP, ADPCM, M-Motion)
  • High degree of modularity permits addition of more file formats (e.g. FLI/FLC)

Principle REXX Features

  • Multimedia with REXX help file
  • PLAY.CMD
  • RECORD.CMD
  • Entire MCI (media control interface) command set available, not just subset described in online help
  • External function library (MCIAPI.DLL) provides access to MCI command set

Key Limitations

  • REXX is unable to deal with loss of device (meaning ACQUIRE EXCLUSIVE must be used)
  • REXX program should not hold device exclusive for long
  • Unless using PMREXX (or one of the visual REXX builders), MCI commands which require Presentation Manager (such as Ultimotion playback) will fail
  • REXX does not receive PM messages (to easily monitor the status of playback and devices)
  • MCI's implicit opens are assumed shareable (and not necessarily desired with REXX)

Sample REXX Script

/* Load and initialize Multimedia REXX support */
call RXFUNCADD 'mciRxInit','MCIAPI','mciRxInit'
call mciRxInit 

/* Open default digital audio device, exclusive use */
rc = mciRxSendString('open waveaudio alias wave wait','RetStr','0','0') 

/* Check error, call function to return error string */
if rc <> 0 then
do
	MacRC = mciRxGetErrorString(rc,'ErrStVar')
	say 'rc =' rc ', ErrStVar =' ErrStVar
end

/* Load a digital audio file */
rc = mciRxSendString('load wave sample.wav wait','RetStr','0','0') 

/* Obtain ID for device context that was just opened */
DevID = mciRxGetDeviceID(wave) 

say 'DevID =' DevID

/* Set the time format to milliseconds */
call mciRxSendString 'set wave time format ms','RetStr','0','0'

/* Determine whether the microphone connection enable */
call mciRxSendString 'connector wave query type microphone wait','RetStr','0','0'

say 'connector query microphone:  RetStr =' RetStr

/* Query length of the opened file, value in ms */
call mciRxSendString 'status wave length wait','RetStr','0','0'

say 'status wave length:  RetStr =' RetStr

/* Play the multimedia file, wait for completion */
call mciRxSendString 'play wave wait','RetStr','0','0'

/* "Rewind" to the beginning of the file */
call mciRxSendString 'seek wave to start wait','RetStr','0','0' 

/* Close the device context */
call mciRxSendString 'close wave','RetStr','0','0'

/* Ensure proper termination of Multimedia REXX */
call mciRxExit

exit(0)

Live Demos

  • PLAY.CMD
  • FOR..DO
  • Ultimotion
  • RECORD.CMD
  • Modifications to the sample .CMD files
  • Dial 1.1 by Helge Hafting

Links