Click here to Skip to main content
15,886,199 members
Articles / Programming Languages / C#

C# MIDI Toolkit

Rate me:
Please Sign up or sign in to vote.
4.95/5 (177 votes)
18 Apr 2007MIT18 min read 3.2M   41.8K   303  
A toolkit for creating MIDI applications with C#.
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>Multimedia</name>
    </assembly>
    <members>
        <member name="T:Multimedia.Note">
            <summary>
            Constants representing the 12 Note of the chromatic scale.
            </summary>
        </member>
        <member name="F:Multimedia.Note.C">
            <summary>
            C natural.
            </summary>
        </member>
        <member name="F:Multimedia.Note.CSharp">
            <summary>
            C sharp.
            </summary>
        </member>
        <member name="F:Multimedia.Note.DFlat">
            <summary>
            D flat.
            </summary>
        </member>
        <member name="F:Multimedia.Note.D">
            <summary>
            D natural.
            </summary>
        </member>
        <member name="F:Multimedia.Note.DSharp">
            <summary>
            D sharp.
            </summary>
        </member>
        <member name="F:Multimedia.Note.EFlat">
            <summary>
            E flat.
            </summary>
        </member>
        <member name="F:Multimedia.Note.E">
            <summary>
            E natural.
            </summary>
        </member>
        <member name="F:Multimedia.Note.F">
            <summary>
            F natural.
            </summary>
        </member>
        <member name="F:Multimedia.Note.FSharp">
            <summary>
            F sharp.
            </summary>
        </member>
        <member name="F:Multimedia.Note.GFlat">
            <summary>
            G flat.
            </summary>
        </member>
        <member name="F:Multimedia.Note.G">
            <summary>
            G natural.
            </summary>
        </member>
        <member name="F:Multimedia.Note.GSharp">
            <summary>
            G sharp.
            </summary>
        </member>
        <member name="F:Multimedia.Note.AFlat">
            <summary>
            A flat.
            </summary>
        </member>
        <member name="F:Multimedia.Note.A">
            <summary>
            A natural.
            </summary>
        </member>
        <member name="F:Multimedia.Note.ASharp">
            <summary>
            A sharp.
            </summary>
        </member>
        <member name="F:Multimedia.Note.BFlat">
            <summary>
            B flat.
            </summary>
        </member>
        <member name="F:Multimedia.Note.B">
            <summary>
            B natural.
            </summary>
        </member>
        <member name="T:Multimedia.TimerMode">
            <summary>
            Specifies constants for multimedia timer event types.
            </summary>
        </member>
        <member name="F:Multimedia.TimerMode.OneShot">
            <summary>
            Timer event occurs once.
            </summary>
        </member>
        <member name="F:Multimedia.TimerMode.Periodic">
            <summary>
            Timer event occurs periodically.
            </summary>
        </member>
        <member name="T:Multimedia.TimerCallback">
            <summary>
            Represents the method that handles calls from a multimedia timer.
            </summary>
            <param name="state">
            An object containing application-specific information relevant to the 
            method invoked by this delegate, or a null reference.
            </param>
            <remarks>
            Use a TimerCallback delegate to specify the method that is called by a 
            multimedia timer.
            </remarks>
        </member>
        <member name="T:Multimedia.TimerCaps">
            <summary>
            Represents information about the timer's capabilities.
            </summary>
        </member>
        <member name="F:Multimedia.TimerCaps.periodMin">
            <summary>
            Minimum supported period.
            </summary>
        </member>
        <member name="F:Multimedia.TimerCaps.periodMax">
            <summary>
            Maximum supported period.
            </summary>
        </member>
        <member name="T:Multimedia.Timer">
            <summary>
            Represents a multimedia timer.
            </summary>
            <remarks>
            <para>The multimedia timer allows applications to schedule timer events 
            with the greatest resolution (or accuracy) possible for the hardware 
            platform. The multimedia timer allows you to schedule timer events at a 
            higher resolution than other timer services.</para>
            
            <para>The multimedia timer is useful for applications that demand 
            high-resolution timing. For example, a Midi sequencer requires a 
            high-resolution timer because it must maintain the pace of Midi events 
            within a resolution of 1 millisecond.</para>
            </remarks>
        </member>
        <member name="M:Multimedia.Timer.#cctor">
            <summary>
            Initialize class.
            </summary>
        </member>
        <member name="M:Multimedia.Timer.#ctor(Multimedia.TimerCallback,System.Object,System.Int32,System.Int32)">
            <summary>
            Initializes a new instance of the Timer class with the user 
            supplied callback and state information, timer period, and 
            resolution.
            </summary>
            <param name="callback">
            A TimerCallback delegate representing a method to be executed when 
            a timer event occurs. 
            </param>
            <param name="state">
            An object containing information to be used by the callback method, 
            or a null reference.
            </param>
            <param name="period">
            The time between timer events in milliseconds.
            </param>
            <param name="resolution">
            The timer resolution in milliseconds.
            </param>
        </member>
        <member name="M:Multimedia.Timer.#ctor(Multimedia.TimerCallback,System.Object,System.Int32,System.Int32,Multimedia.TimerMode)">
            <summary>
            Initializes a new instance of the Timer class with the user 
            supplied callback and state information, timer period, resolution,
            and timer mode.
            </summary>
            <param name="callback">
            A TimerCallback delegate representing a method to be executed when 
            a timer event occurs. 
            </param>
            <param name="state">
            An object containing information to be used by the callback method, 
            or a null reference.
            </param>
            <param name="period">
            The time between timer events in milliseconds.
            </param>
            <param name="resolution">
            The timer resolution in milliseconds.
            </param>
            <param name="mode">
            The timer mode.
            </param>
        </member>
        <member name="M:Multimedia.Timer.Finalize">
            <summary>
            Destructor.
            </summary>
        </member>
        <member name="M:Multimedia.Timer.Start">
            <summary>
            Starts the timer.
            </summary>
            <exception cref="T:Multimedia.TimerStartException">
            Thrown if unable to start timer.
            </exception>
        </member>
        <member name="M:Multimedia.Timer.Stop">
            <summary>
            Stops timer.
            </summary>
        </member>
        <member name="M:Multimedia.Timer.IsRunning">
            <summary>
            Indicates whether or not the timer is running.
            </summary>
            <returns>
            Returns true if the timer is running; otherwise, false.
            </returns>
        </member>
        <member name="M:Multimedia.Timer.OnTimerPeriodicEvent(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
            <summary>
            Callback method called by the Win32 multimedia timer when a timer
            periodic event occurs.
            </summary>
        </member>
        <member name="M:Multimedia.Timer.OnTimerOneShotEvent(System.Int32,System.Int32,System.Int32,System.Int32,System.Int32)">
            <summary>
            Callback method called by the Win32 multimedia timer when a timer
            one shot event occurs.
            </summary>
        </member>
        <member name="M:Multimedia.Timer.Dispose">
            <summary>
            Frees timer resources.
            </summary>
        </member>
        <member name="P:Multimedia.Timer.Mode">
            <summary>
            Gets or sets the timer mode.
            </summary>
            <remarks>
            If the timer is running when the mode is changed, the timer is 
            stopped and restarted with the new mode value.
            </remarks>
        </member>
        <member name="P:Multimedia.Timer.Period">
            <summary>
            Gets or sets the timer period.
            </summary>
            <exception cref="T:System.ArgumentOutOfRangeException">
            Thrown if the period is set to a value out of range for the 
            multimedia timer.
            </exception>
            <remarks>
            <para>The multimedia timer period is the time between timer events 
            in milliseconds.</para>
            
            <para>If the timer is running when the period is changed, the timer 
            is stopped and restarted with the new period value.</para>   
            </remarks>     
        </member>
        <member name="P:Multimedia.Timer.Resolution">
            <summary>
            Gets or sets the timer resolution.
            </summary>
            <exception cref="T:System.ArgumentOutOfRangeException">
            Thrown if the resolution is set to a value less than zero.
            </exception>
            <remarks>
            <para>The resolution is in milliseconds. The resolution increases 
            with smaller values; a resolution of 0 indicates periodic events 
            should occur with the greatest possible accuracy. To reduce system 
            overhead, however, you should use the maximum value appropriate 
            for your application.</para>
            
            <para>If the timer is running when the resolution is changed, the 
            timer is stopped and restarted with the new resolution value.
            </para>        
            </remarks>
        </member>
        <member name="P:Multimedia.Timer.Capabilities">
            <summary>
            Gets the timer capabilities.
            </summary>
        </member>
        <member name="T:Multimedia.TimerStartException">
            <summary>
            The exception that is thrown when a timer fails to start.
            </summary>
        </member>
        <member name="M:Multimedia.TimerStartException.#ctor">
            <summary>
            Initializes a new instance of the TimerStartException class.
            </summary>
        </member>
        <member name="M:Multimedia.TimerStartException.#ctor(System.String)">
            <summary>
            Initializes a new instance of the TimerStartException class.
            </summary>
            <param name="message">
            The error message that explains the reason for the exception. 
            </param>
        </member>
    </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
United States United States
Aside from dabbling in BASIC on his old Atari 1040ST years ago, Leslie's programming experience didn't really begin until he discovered the Internet in the late 90s. There he found a treasure trove of information about two of his favorite interests: MIDI and sound synthesis.

After spending a good deal of time calculating formulas he found on the Internet for creating new sounds by hand, he decided that an easier way would be to program the computer to do the work for him. This led him to learn C. He discovered that beyond using programming as a tool for synthesizing sound, he loved programming in and of itself.

Eventually he taught himself C++ and C#, and along the way he immersed himself in the ideas of object oriented programming. Like many of us, he gotten bitten by the design patterns bug and a copy of GOF is never far from his hands.

Now his primary interest is in creating a complete MIDI toolkit using the C# language. He hopes to create something that will become an indispensable tool for those wanting to write MIDI applications for the .NET framework.

Besides programming, his other interests are photography and playing his Les Paul guitars.

Comments and Discussions