[PD-cvs] pd/portmidi CHANGELOG.txt, NONE, 1.1 license.txt, NONE, 1.1 README.txt, 1.1, 1.2 Makefile, 1.1, NONE portmidi.dsp, 1.1, NONE portmidi.dsw, 1.1, NONE

Miller Puckette millerpuckette at users.sourceforge.net
Sun Aug 19 01:32:45 CEST 2007


Update of /cvsroot/pure-data/pd/portmidi
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12807/portmidi

Modified Files:
	README.txt 
Added Files:
	CHANGELOG.txt license.txt 
Removed Files:
	Makefile portmidi.dsp portmidi.dsw 
Log Message:
Download and adjust sources for new portaudio, portmidi.
Add experimental callback scheduling.



--- portmidi.dsw DELETED ---

--- portmidi.dsp DELETED ---

--- NEW FILE: CHANGELOG.txt ---
/* CHANGELOG FOR PORTMIDI
 *
 * 17Jan07 Roger Dannenberg
 * - Lots more help for Common Lisp user in pm_cl
 * - Minor fix to eliminate a compiler warning
 * - Went back to single library in OS X for both portmidi and porttime
 *
 * 16Jan07 Roger Dannenberg
 * - OOPS! fixed bug where short messages all had zero data
 * - Makefile.osx static library build now makes universal (i386 + ppc)
 *    binaries
 *
 * 15Jan07 Roger Dannenberg
 *  - multiple rewrites of sysex handling code to take care of 
 *     error-handling, embedded messages, message filtering,
 *     driver bugs, and host limitations.
 *  - fixed windows to use dwBufferLength rather than 
 *     dwBytesRecorded for long buffer output (fix by Nigel Brown)
 *  - Win32 MME code always appends an extra zero to long buffer
 *     output to work around a problem with earlier versions of Midi Yoke
 *  - Added mm, a command line Midi Monitor to pm_test suite
 *  - Revised copyright notice to match PortAudio/MIT license (requests 
 *     are moved out of the license proper and into a separate paragraph)
 *
 * 18Oct06 Roger Dannenberg
 *  - replace FIFO in pmutil with Light Pipe-based multiprocessor-safe alg.
 *  - replace FIFO in portmidi.c with PmQueue from pmutil
 *
 * 07Oct06 cpr & Roger Dannenberg
 *  - overhaul of CoreMIDI input to handle running status and multiple
 *  -    messages per packet, with additional error detection
 *  - added Leigh Smith and Rick Taube support for Common Lisp and
 *  -    dynamic link libraries in OSX
 *  - initialize static global seq = NULL in pmlinuxalsa.c
 *
 * 05Sep06 Sebastien Frippiat
 *  - check if (ALSA) seq exists before closing it in pm_linuxalsa_term()
 *
 * 05Sep06 Andreas Micheler and Cecilio
 *  - fixed memory leak by freeing someo objects in pm_winmm_term()
 *  - and another leak by freeing descriptors in Pm_Terminate()
 *
 * 23Aug06 RBD
 *  - various minor fixes
 *
 * 04Nov05 Olivier Tristan
 *  - changes to OS X to properly retrieve real device name on CoreMidi
 *
 * 19Jul05 Roger Dannenberg
 *  - included pmBufferMaxSize in Pm_GetErrorText()
 *
 * 23Mar05 Torgier Strand Henriksen
 *  - cleaner termination of porttime thread under Linux
 *
 * 15Nov04 Ben Allison
 *  - sysex output now uses one buffer/message and reallocates buffer
 *  -    if needed
 *  - filters expanded for many message types and channels
 *  - detailed changes are as follows:
 *  ------------- in pmwinmm.c --------------
 *  - new #define symbol: OUTPUT_BYTES_PER_BUFFER
 *  - change SYSEX_BYTES_PER_BUFFER to 1024
 *  - added MIDIHDR_BUFFER_LENGTH(x) to correctly count midihdr buffer length
 *  - change MIDIHDR_SIZE(x) to (MIDIHDR_BUFFER_LENGTH(x) + sizeof(MIDIHDR))
 *  - change allocate_buffer to use new MIDIHDR_BUFFER_LENGTH macro
 *  - new macros for MIDIHDR_SYSEX_SIZE and MIDIHDR_SYSEX_BUFFER_LENGTH 
 *  -    similar to above, but counts appropriately for sysex messages
 *  - added the following members to midiwinmm_struct for sysex data:
 *  -    LPMIDIHDR *sysex_buffers;   ** pool of buffers for sysex data **
 *  -    int num_sysex_buffers;      ** how many sysex buffers **
 *  -    int next_sysex_buffer;      ** index of next sysexbuffer to send **
 *  -    HANDLE sysex_buffer_signal; ** to wait for free sysex buffer **
 *  - duplicated allocate_buffer, alocate_buffers and get_free_output_buffer 
 *  -    into equivalent sysex_buffer form
 *  - changed winmm_in_open to initialize new midiwinmm_struct members and 
 *  -    to use the new allocate_sysex_buffer() function instead of 
 *  -    allocate_buffer()
 *  - changed winmm_out_open to initialize new members, create sysex buffer 
 *  -    signal, and allocate 2 sysex buffers
 *  - changed winmm_out_delete to free sysex buffers and shut down the sysex
 *  -    buffer signal
 *  - create new function resize_sysex_buffer which resizes m->hdr to the 
 *  -    passed size, and corrects the midiwinmm_struct accordingly.
 *  - changed winmm_write_byte to use new resize_sysex_buffer function,
 *  -    if resize fails, write current buffer to output and continue
 *  - changed winmm_out_callback to use buffer_signal or sysex_buffer_signal
 *  -    depending on which buffer was finished
 *  ------------- in portmidi.h --------------
 *  - added pmBufferMaxSize to PmError to indicate that the buffer would be
 *  -    too large for the underlying API
 *  - added additional filters
 *  - added prototype, documentation, and helper macro for Pm_SetChannelMask
 *  ------------- in portmidi.c --------------
 *  - added pm_status_filtered() and pm_realtime_filtered() functions to
 *       separate filtering logic from buffer logic in pm_read_short
 *  - added Pm_SetChannelMask function
 *  - added pm_channel_filtered() function
 *  ------------- in pminternal.h --------------
 *  - added member to PortMidiStream for channel mask
 *
 * 25May04 RBD
 *  - removed support for MIDI THRU
 *  - moved filtering from Pm_Read to pm_enqueue to avoid buffer ovfl
 *  - extensive work on Mac OS X port, especially sysex and error handling
 *
 * 18May04 RBD
 *  - removed side-effects from assert() calls. Now you can disable assert().
 *  - no longer check pm_hosterror everywhere, fixing a bug where an open
 *    failure could cause a write not to work on a previously opened port
 *    until you call Pm_GetHostErrorText().
 * 16May04 RBD and Chris Roberts
 *  - Some documentation wordsmithing in portmidi.h
 *  - Dynamically allocate port descriptor structures
 *  - Fixed parameter error in midiInPrepareBuffer and midiInAddBuffer.
 *
 * 09Oct03 RBD
 *  - Changed Thru handling. Now the client does all the work and the client
 *    must poll or read to keep thru messages flowing.
 *
 * 31May03 RBD
 *  - Fixed various bugs.
 *  - Added linux ALSA support with help from Clemens Ladisch
 *  - Added Mac OS X support, implemented by Jon Parise, updated and 
 *       integrated by Andrew Zeldis and Zico Kolter
 *  - Added latency program to build histogram of system latency using PortTime.
 *
 * 30Jun02 RBD Extensive rewrite of sysex handling. It works now.
 *             Extensive reworking of error reporting and error text -- no
 *             longer use dictionary call to delete data; instead, Pm_Open
 *             and Pm_Close clean up before returning an error code, and 
 *             error text is saved in a system-independent location.
 *             Wrote sysex.c to test sysex message handling.
 *
 * 15Jun02 BCT changes:
 *  - Added pmHostError text handling.
 *  - For robustness, check PortMidi stream args not NULL.
 *  - Re-C-ANSI-fied code (changed many C++ comments to C style)
 *  - Reorganized code in pmwinmm according to input/output functionality (made
 *    cleanup handling easier to reason about)
 *  - Fixed Pm_Write calls (portmidi.h says these should not return length but Pm_Error)
 *  - Cleaned up memory handling (now system specific data deleted via dictionary
 *    call in PortMidi, allows client to query host errors).
 *  - Added explicit asserts to verify various aspects of pmwinmm implementation behaves as
 *    logic implies it should. Specifically: verified callback routines not reentrant and
 *    all verified status for all unchecked Win32 MMedia API calls perform successfully
 *  - Moved portmidi initialization and clean-up routines into DLL to fix Win32 MMedia API 
 *    bug (i.e. if devices not explicitly closed, must reboot to debug application further).
 *    With this change, clients no longer need explicitly call Pm_Initialize, Pm_Terminate, or
 *    explicitly Pm_Close open devices when using WinMM version of PortMidi.
 *
 * 23Jan02 RBD Fixed bug in pmwinmm.c thru handling
 *
 * 21Jan02 RBD Added tests in Pm_OpenInput() and Pm_OpenOutput() to prevent 
 *               opening an input as output and vice versa.
 *             Added comments and documentation.
 *             Implemented Pm_Terminate().
 *
 */

--- Makefile DELETED ---

--- NEW FILE: license.txt ---
/*
 * PortMidi Portable Real-Time MIDI Library
 *
 * license.txt -- a copy of the PortMidi copyright notice and license information
 *
 * Latest version available at: http://www.cs.cmu.edu/~music/portmidi/
 *
 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk
 * Copyright (c) 2001-2006 Roger B. Dannenberg
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files
 * (the "Software"), to deal in the Software without restriction,
 * including without limitation the rights to use, copy, modify, merge,
 * publish, distribute, sublicense, and/or sell copies of the Software,
 * and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */

/*
 * The text above constitutes the entire PortMidi license; however, 
 * the PortMusic community also makes the following non-binding requests:
 *
 * Any person wishing to distribute modifications to the Software is
 * requested to send the modifications to the original developer so that
 * they can be incorporated into the canonical version. It is also
 * requested that these non-binding requests be included along with the 
 * license above.
 */

Index: README.txt
===================================================================
RCS file: /cvsroot/pure-data/pd/portmidi/README.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** README.txt	30 May 2005 03:01:37 -0000	1.1
--- README.txt	18 Aug 2007 23:32:43 -0000	1.2
***************
*** 1,11 ****
  README for PortMidi
  Roger Dannenberg
- 6 April 2003
- revised May 2004
  
! For Windows, please see also README_WIN.txt and debugging_dlls.txt
! in pm_win.
  
! For Linux, please see also README_LINUX.txt in pm_linux.
  
  POINTERS VS DEVICE NUMBERS
--- 1,16 ----
  README for PortMidi
  Roger Dannenberg
  
! VERSION: this is the 17-Jan-07 version of PortMidi.
  
! Documentation for PortMidi is found in pm_common/portmidi.h.
! 
! Additional documentation:
!   - Windows: see pm_win/README_WIN.txt and pm_win/debugging_dlls.txt
!   - Linux: see pm_linux/README_LINUX.txt
!   - Mac OSX: see pm_mac/README_MAC.txt
!   - Common Lisp: see pm_cl/README_CL.txt
! 
! ---------- some notes on the design of PortMidi ----------
  
  POINTERS VS DEVICE NUMBERS
***************
*** 23,30 ****
  Error handling turned out to be much more complicated than expected.
  PortMidi functions return error codes that the caller can check.
! In addition, errors may occur asynchronously due to MIDI input. In
! this case, the error code is transferred to the next call to
! Pm_Read or Pm_Write. Furthermore, an error can arise during a MIDI THRU
! operation that is also invoked as a side effect of polling for input.
  
  Ordinarily, the caller checks for an error code. If the error is
--- 28,38 ----
  Error handling turned out to be much more complicated than expected.
  PortMidi functions return error codes that the caller can check.
! In addition, errors may occur asynchronously due to MIDI input. 
! However, for Windows, there are virtually no errors that can
! occur if the code is correct and not passing bogus values. One
! exception is an error that the system is out of memory, but my
! guess is that one is unlikely to recover gracefully from that.
! Therefore, all errors in callbacks are guarded by assert(), which
! means not guarded at all in release configurations.
  
  Ordinarily, the caller checks for an error code. If the error is
***************
*** 32,46 ****
  call Pm_GetHostErrorText to get a text description of the error.
  
! Host errors are recorded in the system-specific data allocated for
! each open MIDI port. However, if an error occurs on open or close,
  we cannot store the error with the device because there will be
  no device data (assuming PortMidi cleans up after devices that
! are not open). For open and close, we will store the host error
! in a global variable. The PortMidi is smart enough to look here
! first when the user asks for ErrorText.
  
! Because output to a MIDI Thru stream can be invoked as a side-effect
! of a MIDI read operation, some errors normally associated with
! writing MIDI can be returned from Pm_Read.
  
  DEBUGGING
--- 40,63 ----
  call Pm_GetHostErrorText to get a text description of the error.
  
! Host error codes are system-specific and are recorded in the 
! system-specific data allocated for each open MIDI port. 
! However, if an error occurs on open or close,
  we cannot store the error with the device because there will be
  no device data (assuming PortMidi cleans up after devices that
! are not open). For open and close, we will convert the error
! to text, copy it to a global string, and set pm_hosterror, a
! global flag.
  
! Similarly, whenever a Read or Write operation returns pmHostError,
! the corresponding error string is copied to a global string
! and pm_hosterror is set. This makes getting error strings
! simple and uniform, although it does cost a string copy and some
! overhead even if the user does not want to look at the error data.
! 
! The system-specific Read, Write, Poll, etc. implementations should
! check for asynchronous errors and return immediately if one is
! found so that these get reported. This happens in the Mac OS X 
! code, where lots of things are happening in callbacks, but again,
! in Windows, there are no error codes recorded in callbacks.
  
  DEBUGGING





More information about the Pd-cvs mailing list