Description:

    The StaffPart is a OpenDoc part sample provided to anyone with
    an interest in OpenDoc for Windows 95/NT. It simulates a music staff
    and can create and playback music at an elementary level.

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

Files:

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

    iodstaff.txt    --  This file.

    iodstaff.idl    --  SOM idl definitions for SOM class StaffPart and
                        meta class M_StaffPart.
    iodstaff.h      --  Class definitions of StaffModel
    iodstaff.cpp    --  Class member functions + global objects
    iodstaff.msg    --  English message file
    iodstaff.cat    --  Binary version of english message file
    iodstaff.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\Staff
    directory.  From this directory run:

    nmake

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

    reg1part StaffPart iodstaff.idl

Usage:

    To run the StaffPart:

    docshell -k StaffPart

    The PianoPart 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 StaffPart, run
    the MSGDISP.EXE program.  While running the StaffPart the MSGDISP window
    will display messages being printed from the iodstaff.cpp code, including
    when the StaffPart methods are being called.

    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.

Design Notes:

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

    The StaffPart is composed of two primary classes, the StaffModel class,
    and the StaffPart SOM class. The StaffModel handles the internals of
    the Staff and records what note was selected and its duration.

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

Known Restrictions:

    This version of the StaffPart does not provide printing support.
