Application.DoEvents();
            /* Create a new SheetMusic Control from the midifile */
            byte[] MyA440 = { 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x01, 0x01, 0x80, 0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x31, 0x00, 0xff, 0x58, 0x04, 0x04, 0x02, 0x18, 0x08, 0x00, 0xff, 0x51, 0x03, 0x0b, 0x71, 0xb0, 0x00, 0xff, 0x03, 0x0e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x20, 0x50, 0x69, 0x61, 0x6e, 0x6f, 0x00, 0xc0, 0x00, 0x00, 0x90, 0x45, 0x32, 0x8c, 0x00, 0x80, 0x45, 0x00, 0x00, 0xff, 0x2f, 0x00 };
            byte[] MyAPowerChord = { 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x01, 0x01, 0x80, 0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x39, 0x00, 0xff, 0x58, 0x04, 0x04, 0x02, 0x18, 0x08, 0x00, 0xff, 0x51, 0x03, 0x0b, 0x71, 0xb0, 0x00, 0xff, 0x03, 0x0e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x20, 0x50, 0x69, 0x61, 0x6e, 0x6f, 0x00, 0xc0, 0x00, 0x00, 0x90, 0x45, 0x32, 0x00, 0x90, 0x48, 0x32, 0x8c, 0x00, 0x80, 0x45, 0x00, 0x00, 0x80, 0x48, 0x00, 0x00, 0xff, 0x2f, 0x00 };
            byte[] MyAChord = { 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x01, 0x01, 0x80, 0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x41, 0x00, 0xff, 0x58, 0x04, 0x04, 0x02, 0x18, 0x08, 0x00, 0xff, 0x51, 0x03, 0x0b, 0x71, 0xb0, 0x00, 0xff, 0x03, 0x0e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x20, 0x50, 0x69, 0x61, 0x6e, 0x6f, 0x00, 0xc0, 0x00, 0x00, 0x90, 0x45, 0x32, 0x00, 0x90, 0x48, 0x32, 0x00, 0x90, 0x4c, 0x32, 0x8c, 0x00, 0x80, 0x45, 0x00, 0x00, 0x80, 0x48, 0x00, 0x00, 0x80, 0x4c, 0x00, 0x00, 0xff, 0x2f, 0x00 };
            byte[] MyA7Chord = { 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x01, 0x01, 0x80, 0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x49, 0x00, 0xff, 0x58, 0x04, 0x04, 0x02, 0x18, 0x08, 0x00, 0xff, 0x51, 0x03, 0x0b, 0x71, 0xb0, 0x00, 0xff, 0x03, 0x0e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x20, 0x50, 0x69, 0x61, 0x6e, 0x6f, 0x00, 0xc0, 0x00, 0x00, 0x90, 0x45, 0x32, 0x00, 0x90, 0x48, 0x32, 0x00, 0x90, 0x4c, 0x32, 0x00, 0x90, 0x4f, 0x32, 0x8c, 0x00, 0x80, 0x45, 0x00, 0x00, 0x80, 0x48, 0x00, 0x00, 0x80, 0x4c, 0x00, 0x00, 0x80, 0x4f, 0x00, 0x00, 0xff, 0x2f, 0x00 };
            midifile = new MidiFile(MyA7Chord, "My A440");
            DisableMenus();
            EnableMenus();

            instrumentDialog = new InstrumentDialog(midifile);
            playMeasuresDialog = new PlayMeasuresDialog(midifile);

            SaveMidiOptions();
            RedrawSheetMusic();

            sheetmusic = new SheetMusic(midifile, null);
            sheetmusic.SetZoom(zoom);
            sheetmusic.Parent = scrollView;

https://onlinesequencer.net/import2/fedd9ea7da1d866ec760f44f2b155104?title=1.mid http://phpmidiparser.com/reports/2310/ http://phpmidiparser.com/reports/2313/ https://sourceforge.net/projects/midisheetmusic/ https://web.archive.org/web/20141227205754/http://www.sonicspot.com:80/guide/midifiles.html http://subsynth.sourceforge.net/midinote2freq.html

 MIDI                   MIDI                   MIDI
 Note     Frequency      Note   Frequency       Note   Frequency
 C1  0    8.1757989156    12    16.3515978313    24    32.7031956626
 Db  1    8.6619572180    13    17.3239144361    25    34.6478288721
 D   2    9.1770239974    14    18.3540479948    26    36.7080959897
 Eb  3    9.7227182413    15    19.4454364826    27    38.8908729653
 E   4   10.3008611535    16    20.6017223071    28    41.2034446141
 F   5   10.9133822323    17    21.8267644646    29    43.6535289291
 Gb  6   11.5623257097    18    23.1246514195    30    46.2493028390
 G   7   12.2498573744    19    24.4997147489    31    48.9994294977
 Ab  8   12.9782717994    20    25.9565435987    32    51.9130871975
 A   9   13.7500000000    21    27.5000000000    33    55.0000000000
 Bb  10  14.5676175474    22    29.1352350949    34    58.2704701898
 B   11  15.4338531643    23    30.8677063285    35    61.7354126570

 C4  36  65.4063913251    48   130.8127826503    60   261.6255653006
 Db  37  69.2956577442    49   138.5913154884    61   277.1826309769
 D   38  73.4161919794    50   146.8323839587    62   293.6647679174
 Eb  39  77.7817459305    51   155.5634918610    63   311.1269837221
 E   40  82.4068892282    52   164.8137784564    64   329.6275569129
 F   41  87.3070578583    53   174.6141157165    65   349.2282314330
 Gb  42  92.4986056779    54   184.9972113558    66   369.9944227116
 G   43  97.9988589954    55   195.9977179909    67   391.9954359817
 Ab  44  103.8261743950   56   207.6523487900    68   415.3046975799
 A   45  110.0000000000   57   220.0000000000    69   440.0000000000
 Bb  46  116.5409403795   58   233.0818807590    70   466.1637615181
 B   47  123.4708253140   59   246.9416506281    71   493.8833012561

 C7  72  523.2511306012   84  1046.5022612024    96  2093.0045224048
 Db  73  554.3652619537   85  1108.7305239075    97  2217.4610478150
 D   74  587.3295358348   86  1174.6590716696    98  2349.3181433393
 Eb  75  622.2539674442   87  1244.5079348883    99  2489.0158697766
 E   76  659.2551138257   88  1318.5102276515   100  2637.0204553030
 F   77  698.4564628660   89  1396.9129257320   101  2793.8258514640
 Gb  78  739.9888454233   90  1479.9776908465   102  2959.9553816931
 G   79  783.9908719635   91  1567.9817439270   103  3135.9634878540
 Ab  80  830.6093951599   92  1661.2187903198   104  3322.4375806396
 A   81  880.0000000000   93  1760.0000000000   105  3520.0000000000
 Bb  82  932.3275230362   94  1864.6550460724   106  3729.3100921447
 B   83  987.7666025122   95  1975.5332050245   107  3951.0664100490

 C10 108 4186.0090448096  120  8372.0180896192
 Db  109 4434.9220956300  121  8869.8441912599
 D   110 4698.6362866785  122  9397.2725733570
 Eb  111 4978.0317395533  123  9956.0634791066
 E   112 5274.0409106059  124 10548.0818212118
 F   113 5587.6517029281  125 11175.3034058561
 Gb  114 5919.9107633862  126 11839.8215267723
 G   115 6271.9269757080  127 12543.8539514160
 Ab  116 6644.8751612791
 A   117 7040.0000000000
 Bb  118 7458.6201842894
 B   119 7902.1328200980



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MidiFunction
{
    class Program
    {
        static void Main(string[] args)
        {
            byte[] MyA440 =        { 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x01, 0x01, 0x80, 0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x31, 0x00, 0xff, 0x58, 0x04, 0x04, 0x02, 0x18, 0x08, 0x00, 0xff, 0x51, 0x03, 0x0b, 0x71, 0xb0, 0x00, 0xff, 0x03, 0x0e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x20, 0x50, 0x69, 0x61, 0x6e, 0x6f, 0x00, 0xc0, 0x00, 0x00, 0x90, 0x45, 0x32, 0x8c, 0x00, 0x80, 0x45, 0x00, 0x00, 0xff, 0x2f, 0x00 };
            byte[] MyAPowerChord = { 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x01, 0x01, 0x80, 0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x39, 0x00, 0xff, 0x58, 0x04, 0x04, 0x02, 0x18, 0x08, 0x00, 0xff, 0x51, 0x03, 0x0b, 0x71, 0xb0, 0x00, 0xff, 0x03, 0x0e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x20, 0x50, 0x69, 0x61, 0x6e, 0x6f, 0x00, 0xc0, 0x00, 0x00, 0x90, 0x45, 0x32, 0x00, 0x90, 0x48, 0x32, 0x8c, 0x00, 0x80, 0x45, 0x00, 0x00, 0x80, 0x48, 0x00, 0x00, 0xff, 0x2f, 0x00 };
            byte[] MyAChord =      { 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x01, 0x01, 0x80, 0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x41, 0x00, 0xff, 0x58, 0x04, 0x04, 0x02, 0x18, 0x08, 0x00, 0xff, 0x51, 0x03, 0x0b, 0x71, 0xb0, 0x00, 0xff, 0x03, 0x0e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x20, 0x50, 0x69, 0x61, 0x6e, 0x6f, 0x00, 0xc0, 0x00, 0x00, 0x90, 0x45, 0x32, 0x00, 0x90, 0x48, 0x32, 0x00, 0x90, 0x4c, 0x32, 0x8c, 0x00, 0x80, 0x45, 0x00, 0x00, 0x80, 0x48, 0x00, 0x00, 0x80, 0x4c, 0x00, 0x00, 0xff, 0x2f, 0x00 };
            byte[] MyA7Chord =     { 0x4d, 0x54, 0x68, 0x64, 0x00, 0x00, 0x00, 0x06, 0x00, 0x01, 0x00, 0x01, 0x01, 0x80, 0x4d, 0x54, 0x72, 0x6b, 0x00, 0x00, 0x00, 0x49, 0x00, 0xff, 0x58, 0x04, 0x04, 0x02, 0x18, 0x08, 0x00, 0xff, 0x51, 0x03, 0x0b, 0x71, 0xb0, 0x00, 0xff, 0x03, 0x0e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x69, 0x63, 0x20, 0x50, 0x69, 0x61, 0x6e, 0x6f, 0x00, 0xc0, 0x00, 0x00, 0x90, 0x45, 0x32, 0x00, 0x90, 0x48, 0x32, 0x00, 0x90, 0x4c, 0x32, 0x00, 0x90, 0x4f, 0x32, 0x8c, 0x00, 0x80, 0x45, 0x00, 0x00, 0x80, 0x48, 0x00, 0x00, 0x80, 0x4c, 0x00, 0x00, 0x80, 0x4f, 0x00, 0x00, 0xff, 0x2f, 0x00 };

            int Note1 = 60;
            int Note1off = 65;

            int MyAPowerChord1 = 60;
            int MyAPowerChord2 = 64;
            int MyAPowerChord1off = 69;
            int MyAPowerChord2off = 73;

            int MyAChord1 = 60;
            int MyAChord2 = 64;
            int MyAChord3 = 68;
            int MyAChordoff1 = 73;
            int MyAChordoff2 = 77;
            int MyAChordoff3 = 81;

            int MyA7Chord1 = 60;
            int MyA7Chord2 = 64;
            int MyA7Chord3 = 68;
            int MyA7Chord4 = 72;
            int MyA7Chordoff1 = 77;
            int MyA7Chordoff2 = 81;
            int MyA7Chordoff3 = 85;
            int MyA7Chordoff4 = 89;

            System.Diagnostics.Debug.WriteLine(MyA440[Note1]);
            System.Diagnostics.Debug.WriteLine(MyA440[Note1off]);

            System.Diagnostics.Debug.WriteLine(MyAPowerChord[MyAPowerChord1]);
            System.Diagnostics.Debug.WriteLine(MyAPowerChord[MyAPowerChord2]);
            System.Diagnostics.Debug.WriteLine(MyAPowerChord[MyAPowerChord1off]);
            System.Diagnostics.Debug.WriteLine(MyAPowerChord[MyAPowerChord2off]);

            System.Diagnostics.Debug.WriteLine(MyAChord[MyAChord1]);
            System.Diagnostics.Debug.WriteLine(MyAChord[MyAChord2]);
            System.Diagnostics.Debug.WriteLine(MyAChord[MyAChord3]);
            System.Diagnostics.Debug.WriteLine(MyAChord[MyAChordoff1]);
            System.Diagnostics.Debug.WriteLine(MyAChord[MyAChordoff2]);
            System.Diagnostics.Debug.WriteLine(MyAChord[MyAChordoff3]);

            System.Diagnostics.Debug.WriteLine(MyA7Chord[MyA7Chord1]);
            System.Diagnostics.Debug.WriteLine(MyA7Chord[MyA7Chord2]);
            System.Diagnostics.Debug.WriteLine(MyA7Chord[MyA7Chord3]);
            System.Diagnostics.Debug.WriteLine(MyA7Chord[MyA7Chord4]);
            System.Diagnostics.Debug.WriteLine(MyA7Chord[MyA7Chordoff1]);
            System.Diagnostics.Debug.WriteLine(MyA7Chord[MyA7Chordoff2]);
            System.Diagnostics.Debug.WriteLine(MyA7Chord[MyA7Chordoff3]);
            System.Diagnostics.Debug.WriteLine(MyA7Chord[MyA7Chordoff4]);
        }
    }
}

A440.Note APowerChord AMajor AMajor7

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax