Description:

    The PianoPart is a OpenDoc part sample provided to anyone with
    an interest in OpenDoc for Windows 95/NT. It simulates a Piano keyboard
    and can create music at an elementary level using .WAV files for
    each key.

    Your machine will need a Sound card to hear what is played.

Files:

     makefile        --  NMAKE file (for building: see instructions below)

     iodpiano.txt    --  This file.

     iodpiano.idl    --  SOM idl definitions for SOM class PianoPart and
                         meta class M_PianoPart.
     iodpiano.h      --  Class definitions of PianoModel
     iodpiano.cpp    --  Class member functions + global objects
     iodpiano.def    --  Library definitions

     pkeys.zip    --  set of 48 wav files one for each key on the piano


How to Build:

    To build this part you will need the OpenDoc for Windows beta toolkit
    and the IBM VisualAge for C++ Version 3.5.

    Place this sample's files into a %ODBASE%\samples\src\piano
    directory.  From this directory, run:

    nmake

    To register the part with OpenDoc, use the convenience script:

    reg1part PianoPart  iodpiano.idl

    Lastly, expand the pkeys.zip file in the current directory using PKZIP
    or equivalent extractor to get the piano WAV files. The piano part looks
    in the current directory for these files.

Usage:

    To run the PianoPart:

    docshell -k PianoPart

    The docshell displays a piano keywboard with 4 octaves. The mouse is used
    to press a key. Each key pressed will play a note through the sound
    card attached speakers.

    The Piano may also be embedded within the StaffPart to create new music
    Each key pressed will be displayed on the staff using piano roll notation.

    In addition, the black areas surrounding the keyboard may be used to edit
    the staff music. Press the black area above the keys to add a rest. Press
    the black area to the left of the keys to backup one note. Press the black
    area to the right of the keys to step forward one note. Use the Piano menu
    to change note duration to whole note, half note, quarter note or
    eighth note.

    To exit the application select menu option Document | Close.

    If you wish to see the OpenDoc calls being made to the PianoPart, run
    the MSGDISP.EXE program.  While running the PianoPart the MSGDISP window
    will display messages being printed from the  iodpiano.cpp code, including
    when the PianoPart methods are being called.

Design Notes:

    The PianoPart application is written using the OpenDoc for Windows
    beta toolkit.

    The PianoPart is composed of two primary classes, the PianoModel class,
    and the PianoPart SOM class. The PianoModel handles the internals of the
    Piano and records what note duration was selected.

    The PianoPart class handles the screen representation, and mouse
    interaction. Both classes together comprise an embeddable component.

Known Restrictions:

    This version of the PianoPart does not provide printing support.
