home *** CD-ROM | disk | FTP | other *** search
/ Multimédia la Compil' 2 / Sybex_Multimedia_La_Compil_2.iso / cooltool / midithru / midithru.frm next >
Text File  |  1995-04-20  |  41KB  |  1,240 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "MIDI CoolTools - MIDI Thru Example"
  6.    Height          =   3000
  7.    Icon            =   MIDITHRU.FRX:0000
  8.    Left            =   285
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    ScaleHeight     =   2595
  12.    ScaleWidth      =   8730
  13.    Top             =   1260
  14.    Width           =   8850
  15.    Begin Frame Frame6 
  16.       BackColor       =   &H00C0C0C0&
  17.       Caption         =   "Transpose"
  18.       Height          =   1635
  19.       Left            =   7560
  20.       TabIndex        =   28
  21.       Top             =   60
  22.       Width           =   1095
  23.       Begin VSlider VSliderTranspose 
  24.          BackColor       =   &H00C0C0C0&
  25.          BevelInner      =   0  'None
  26.          BevelOuter      =   0  'None
  27.          BevelWidth      =   2
  28.          BorderWidth     =   2
  29.          Gap             =   3
  30.          Height          =   975
  31.          LargeChange     =   12
  32.          Left            =   240
  33.          LinkControl     =   ""
  34.          LinkProperty    =   ""
  35.          Max             =   36
  36.          Min             =   -36
  37.          ThumbHeight     =   200
  38.          ThumbStyle      =   2  'Pointed Right
  39.          ThumbWidth      =   335
  40.          TickColor       =   &H00000000&
  41.          TickCount       =   7
  42.          TickLength      =   4
  43.          TickMarks       =   2  'Right
  44.          TickWidth       =   1
  45.          Top             =   600
  46.          TrackBevel      =   3  'Lowered
  47.          TrackWidth      =   5
  48.          Value           =   0
  49.          Width           =   615
  50.       End
  51.       Begin Label LabelTranspose 
  52.          Alignment       =   2  'Center
  53.          BackColor       =   &H00000000&
  54.          BorderStyle     =   1  'Fixed Single
  55.          Caption         =   "0"
  56.          FontBold        =   0   'False
  57.          FontItalic      =   0   'False
  58.          FontName        =   "MS Sans Serif"
  59.          FontSize        =   9.75
  60.          FontStrikethru  =   0   'False
  61.          FontUnderline   =   0   'False
  62.          ForeColor       =   &H0000FF00&
  63.          Height          =   255
  64.          Left            =   120
  65.          TabIndex        =   29
  66.          Top             =   280
  67.          Width           =   855
  68.       End
  69.    End
  70.    Begin Frame Frame5 
  71.       BackColor       =   &H00C0C0C0&
  72.       Caption         =   "MIDI Filtering"
  73.       Height          =   1605
  74.       Left            =   5550
  75.       TabIndex        =   0
  76.       Top             =   60
  77.       Width           =   1785
  78.       Begin CheckBox CheckMIDIFilter 
  79.          BackColor       =   &H00C0C0C0&
  80.          Caption         =   "Pitch Bend"
  81.          FontBold        =   0   'False
  82.          FontItalic      =   0   'False
  83.          FontName        =   "MS Sans Serif"
  84.          FontSize        =   8.25
  85.          FontStrikethru  =   0   'False
  86.          FontUnderline   =   0   'False
  87.          Height          =   225
  88.          Index           =   3
  89.          Left            =   120
  90.          TabIndex        =   1
  91.          Top             =   1080
  92.          Width           =   1605
  93.       End
  94.       Begin CheckBox CheckMIDIFilter 
  95.          BackColor       =   &H00C0C0C0&
  96.          Caption         =   "Active Sensing"
  97.          FontBold        =   0   'False
  98.          FontItalic      =   0   'False
  99.          FontName        =   "MS Sans Serif"
  100.          FontSize        =   8.25
  101.          FontStrikethru  =   0   'False
  102.          FontUnderline   =   0   'False
  103.          Height          =   225
  104.          Index           =   2
  105.          Left            =   120
  106.          TabIndex        =   2
  107.          Top             =   600
  108.          Width           =   1605
  109.       End
  110.       Begin CheckBox CheckMIDIFilter 
  111.          BackColor       =   &H00C0C0C0&
  112.          Caption         =   "Undefined F9"
  113.          FontBold        =   0   'False
  114.          FontItalic      =   0   'False
  115.          FontName        =   "MS Sans Serif"
  116.          FontSize        =   8.25
  117.          FontStrikethru  =   0   'False
  118.          FontUnderline   =   0   'False
  119.          Height          =   225
  120.          Index           =   1
  121.          Left            =   120
  122.          TabIndex        =   3
  123.          Top             =   840
  124.          Width           =   1365
  125.       End
  126.       Begin CheckBox CheckMIDIFilter 
  127.          BackColor       =   &H00C0C0C0&
  128.          Caption         =   "MIDI Time Clock"
  129.          FontBold        =   0   'False
  130.          FontItalic      =   0   'False
  131.          FontName        =   "MS Sans Serif"
  132.          FontSize        =   8.25
  133.          FontStrikethru  =   0   'False
  134.          FontUnderline   =   0   'False
  135.          Height          =   225
  136.          Index           =   0
  137.          Left            =   120
  138.          TabIndex        =   4
  139.          Top             =   360
  140.          Width           =   1515
  141.       End
  142.    End
  143.    Begin Frame Frame4 
  144.       BackColor       =   &H00C0C0C0&
  145.       Caption         =   "L/R Volume"
  146.       Height          =   1605
  147.       Left            =   4290
  148.       TabIndex        =   5
  149.       Top             =   60
  150.       Width           =   1215
  151.       Begin VSlider VSlider1 
  152.          BackColor       =   &H00C0C0C0&
  153.          BevelInner      =   0  'None
  154.          BevelOuter      =   2  'Inset
  155.          BevelWidth      =   1
  156.          BorderWidth     =   1
  157.          Enabled         =   0   'False
  158.          Gap             =   3
  159.          Height          =   1215
  160.          LargeChange     =   1000
  161.          Left            =   120
  162.          LinkControl     =   ""
  163.          LinkProperty    =   ""
  164.          Max             =   32767
  165.          Min             =   0
  166.          ThumbHeight     =   300
  167.          ThumbStyle      =   3  'Lined
  168.          ThumbWidth      =   280
  169.          TickColor       =   &H00008000&
  170.          TickCount       =   4
  171.          TickLength      =   4
  172.          TickMarks       =   3  'Both
  173.          TickWidth       =   1
  174.          Top             =   270
  175.          TrackBevel      =   0  'None
  176.          TrackWidth      =   1
  177.          Value           =   0
  178.          Width           =   465
  179.       End
  180.       Begin VSlider VSlider2 
  181.          BackColor       =   &H00C0C0C0&
  182.          BevelInner      =   0  'None
  183.          BevelOuter      =   2  'Inset
  184.          BevelWidth      =   1
  185.          BorderWidth     =   1
  186.          Enabled         =   0   'False
  187.          Gap             =   3
  188.          Height          =   1215
  189.          LargeChange     =   1000
  190.          Left            =   630
  191.          LinkControl     =   ""
  192.          LinkProperty    =   ""
  193.          Max             =   32767
  194.          Min             =   0
  195.          ThumbHeight     =   300
  196.          ThumbStyle      =   3  'Lined
  197.          ThumbWidth      =   280
  198.          TickColor       =   &H00008000&
  199.          TickCount       =   4
  200.          TickLength      =   4
  201.          TickMarks       =   3  'Both
  202.          TickWidth       =   1
  203.          Top             =   270
  204.          TrackBevel      =   0  'None
  205.          TrackWidth      =   1
  206.          Value           =   0
  207.          Width           =   465
  208.       End
  209.    End
  210.    Begin Frame Frame3 
  211.       BackColor       =   &H00C0C0C0&
  212.       Caption         =   "MIDI Out"
  213.       Height          =   855
  214.       Left            =   4320
  215.       TabIndex        =   6
  216.       Top             =   1710
  217.       Width           =   4335
  218.       Begin ComboBox Combo1 
  219.          Height          =   300
  220.          Left            =   90
  221.          Style           =   2  'Dropdown List
  222.          TabIndex        =   7
  223.          Top             =   330
  224.          Width           =   3495
  225.       End
  226.       Begin MIDIOutput MIDIOutput1 
  227.          DeviceID        =   0
  228.          Left            =   3690
  229.          Top             =   270
  230.          VolumeLeft      =   0
  231.          VolumeRight     =   0
  232.       End
  233.    End
  234.    Begin Frame Frame2 
  235.       BackColor       =   &H00C0C0C0&
  236.       Caption         =   "MIDI In"
  237.       Height          =   855
  238.       Left            =   30
  239.       TabIndex        =   8
  240.       Top             =   1710
  241.       Width           =   4185
  242.       Begin ComboBox Combo2 
  243.          Height          =   300
  244.          Left            =   60
  245.          Style           =   2  'Dropdown List
  246.          TabIndex        =   9
  247.          Top             =   330
  248.          Width           =   3525
  249.       End
  250.       Begin MIDIInput MIDIInput1 
  251.          DeviceID        =   0
  252.          Left            =   3660
  253.          MaxSysexSize    =   0
  254.          MessageEventEnable=   0   'False
  255.          Top             =   300
  256.       End
  257.    End
  258.    Begin Frame Frame1 
  259.       BackColor       =   &H00C0C0C0&
  260.       Caption         =   "Input Level"
  261.       ClipControls    =   0   'False
  262.       Height          =   1605
  263.       Left            =   30
  264.       TabIndex        =   18
  265.       Top             =   60
  266.       Width           =   4215
  267.       Begin CheckBox CheckMeter 
  268.          BackColor       =   &H00C0C0C0&
  269.          Caption         =   "Meters On"
  270.          FontBold        =   0   'False
  271.          FontItalic      =   0   'False
  272.          FontName        =   "MS Sans Serif"
  273.          FontSize        =   8.25
  274.          FontStrikethru  =   0   'False
  275.          FontUnderline   =   0   'False
  276.          Height          =   255
  277.          Left            =   150
  278.          TabIndex        =   10
  279.          Top             =   1260
  280.          Value           =   1  'Checked
  281.          Width           =   1095
  282.       End
  283.       Begin VIndicator VIndicator1 
  284.          BackColor       =   &H00404040&
  285.          BevelInner      =   0  'None
  286.          BevelOuter      =   0  'None
  287.          BevelWidth      =   1
  288.          Border          =   1  'Single Width
  289.          BorderWidth     =   0
  290.          Height          =   765
  291.          Index           =   0
  292.          ItemBackColor   =   &H00000000&
  293.          ItemCount1      =   4
  294.          ItemCount2      =   1
  295.          ItemCount3      =   2
  296.          ItemForeColor1  =   &H0000FF00&
  297.          ItemForeColor2  =   &H0000FFFF&
  298.          ItemForeColor3  =   &H000000FF&
  299.          Left            =   150
  300.          LinkControl     =   ""
  301.          LinkProperty    =   ""
  302.          Max             =   127
  303.          Min             =   0
  304.          ThreeD          =   0   'False
  305.          Top             =   260
  306.          Value           =   0
  307.          Width           =   195
  308.       End
  309.       Begin VIndicator VIndicator1 
  310.          BackColor       =   &H00404040&
  311.          BevelInner      =   0  'None
  312.          BevelOuter      =   0  'None
  313.          BevelWidth      =   1
  314.          Border          =   1  'Single Width
  315.          BorderWidth     =   0
  316.          Height          =   765
  317.          Index           =   1
  318.          ItemBackColor   =   &H00000000&
  319.          ItemCount1      =   4
  320.          ItemCount2      =   1
  321.          ItemCount3      =   2
  322.          ItemForeColor1  =   &H0000FF00&
  323.          ItemForeColor2  =   &H0000FFFF&
  324.          ItemForeColor3  =   &H000000FF&
  325.          Left            =   390
  326.          LinkControl     =   ""
  327.          LinkProperty    =   ""
  328.          Max             =   127
  329.          Min             =   0
  330.          ThreeD          =   0   'False
  331.          Top             =   260
  332.          Value           =   0
  333.          Width           =   195
  334.       End
  335.       Begin VIndicator VIndicator1 
  336.          BackColor       =   &H00404040&
  337.          BevelInner      =   0  'None
  338.          BevelOuter      =   0  'None
  339.          BevelWidth      =   1
  340.          Border          =   1  'Single Width
  341.          BorderWidth     =   0
  342.          Height          =   765
  343.          Index           =   2
  344.          ItemBackColor   =   &H00000000&
  345.          ItemCount1      =   4
  346.          ItemCount2      =   1
  347.          ItemCount3      =   2
  348.          ItemForeColor1  =   &H0000FF00&
  349.          ItemForeColor2  =   &H0000FFFF&
  350.          ItemForeColor3  =   &H000000FF&
  351.          Left            =   630
  352.          LinkControl     =   ""
  353.          LinkProperty    =   ""
  354.          Max             =   127
  355.          Min             =   0
  356.          ThreeD          =   0   'False
  357.          Top             =   260
  358.          Value           =   0
  359.          Width           =   195
  360.       End
  361.       Begin VIndicator VIndicator1 
  362.          BackColor       =   &H00404040&
  363.          BevelInner      =   0  'None
  364.          BevelOuter      =   0  'None
  365.          BevelWidth      =   1
  366.          Border          =   1  'Single Width
  367.          BorderWidth     =   0
  368.          Height          =   765
  369.          Index           =   3
  370.          ItemBackColor   =   &H00000000&
  371.          ItemCount1      =   4
  372.          ItemCount2      =   1
  373.          ItemCount3      =   2
  374.          ItemForeColor1  =   &H0000FF00&
  375.          ItemForeColor2  =   &H0000FFFF&
  376.          ItemForeColor3  =   &H000000FF&
  377.          Left            =   870
  378.          LinkControl     =   ""
  379.          LinkProperty    =   ""
  380.          Max             =   127
  381.          Min             =   0
  382.          ThreeD          =   0   'False
  383.          Top             =   260
  384.          Value           =   0
  385.          Width           =   195
  386.       End
  387.       Begin VIndicator VIndicator1 
  388.          BackColor       =   &H00404040&
  389.          BevelInner      =   0  'None
  390.          BevelOuter      =   0  'None
  391.          BevelWidth      =   1
  392.          Border          =   1  'Single Width
  393.          BorderWidth     =   0
  394.          Height          =   765
  395.          Index           =   4
  396.          ItemBackColor   =   &H00000000&
  397.          ItemCount1      =   4
  398.          ItemCount2      =   1
  399.          ItemCount3      =   2
  400.          ItemForeColor1  =   &H0000FF00&
  401.          ItemForeColor2  =   &H0000FFFF&
  402.          ItemForeColor3  =   &H000000FF&
  403.          Left            =   1110
  404.          LinkControl     =   ""
  405.          LinkProperty    =   ""
  406.          Max             =   127
  407.          Min             =   0
  408.          ThreeD          =   0   'False
  409.          Top             =   260
  410.          Value           =   0
  411.          Width           =   195
  412.       End
  413.       Begin VIndicator VIndicator1 
  414.          BackColor       =   &H00404040&
  415.          BevelInner      =   0  'None
  416.          BevelOuter      =   0  'None
  417.          BevelWidth      =   1
  418.          Border          =   1  'Single Width
  419.          BorderWidth     =   0
  420.          Height          =   765
  421.          Index           =   5
  422.          ItemBackColor   =   &H00000000&
  423.          ItemCount1      =   4
  424.          ItemCount2      =   1
  425.          ItemCount3      =   2
  426.          ItemForeColor1  =   &H0000FF00&
  427.          ItemForeColor2  =   &H0000FFFF&
  428.          ItemForeColor3  =   &H000000FF&
  429.          Left            =   1350
  430.          LinkControl     =   ""
  431.          LinkProperty    =   ""
  432.          Max             =   127
  433.          Min             =   0
  434.          ThreeD          =   0   'False
  435.          Top             =   260
  436.          Value           =   0
  437.          Width           =   195
  438.       End
  439.       Begin VIndicator VIndicator1 
  440.          BackColor       =   &H00404040&
  441.          BevelInner      =   0  'None
  442.          BevelOuter      =   0  'None
  443.          BevelWidth      =   1
  444.          Border          =   1  'Single Width
  445.          BorderWidth     =   0
  446.          Height          =   765
  447.          Index           =   6
  448.          ItemBackColor   =   &H00000000&
  449.          ItemCount1      =   4
  450.          ItemCount2      =   1
  451.          ItemCount3      =   2
  452.          ItemForeColor1  =   &H0000FF00&
  453.          ItemForeColor2  =   &H0000FFFF&
  454.          ItemForeColor3  =   &H000000FF&
  455.          Left            =   1590
  456.          LinkControl     =   ""
  457.          LinkProperty    =   ""
  458.          Max             =   127
  459.          Min             =   0
  460.          ThreeD          =   0   'False
  461.          Top             =   260
  462.          Value           =   0
  463.          Width           =   195
  464.       End
  465.       Begin VIndicator VIndicator1 
  466.          BackColor       =   &H00404040&
  467.          BevelInner      =   0  'None
  468.          BevelOuter      =   0  'None
  469.          BevelWidth      =   1
  470.          Border          =   1  'Single Width
  471.          BorderWidth     =   0
  472.          Height          =   765
  473.          Index           =   7
  474.          ItemBackColor   =   &H00000000&
  475.          ItemCount1      =   4
  476.          ItemCount2      =   1
  477.          ItemCount3      =   2
  478.          ItemForeColor1  =   &H0000FF00&
  479.          ItemForeColor2  =   &H0000FFFF&
  480.          ItemForeColor3  =   &H000000FF&
  481.          Left            =   1830
  482.          LinkControl     =   ""
  483.          LinkProperty    =   ""
  484.          Max             =   127
  485.          Min             =   0
  486.          ThreeD          =   0   'False
  487.          Top             =   260
  488.          Value           =   0
  489.          Width           =   195
  490.       End
  491.       Begin VIndicator VIndicator1 
  492.          BackColor       =   &H00404040&
  493.          BevelInner      =   0  'None
  494.          BevelOuter      =   0  'None
  495.          BevelWidth      =   1
  496.          Border          =   1  'Single Width
  497.          BorderWidth     =   0
  498.          Height          =   765
  499.          Index           =   8
  500.          ItemBackColor   =   &H00000000&
  501.          ItemCount1      =   4
  502.          ItemCount2      =   1
  503.          ItemCount3      =   2
  504.          ItemForeColor1  =   &H0000FF00&
  505.          ItemForeColor2  =   &H0000FFFF&
  506.          ItemForeColor3  =   &H000000FF&
  507.          Left            =   2070
  508.          LinkControl     =   ""
  509.          LinkProperty    =   ""
  510.          Max             =   127
  511.          Min             =   0
  512.          ThreeD          =   0   'False
  513.          Top             =   260
  514.          Value           =   0
  515.          Width           =   195
  516.       End
  517.       Begin VIndicator VIndicator1 
  518.          BackColor       =   &H00404040&
  519.          BevelInner      =   0  'None
  520.          BevelOuter      =   0  'None
  521.          BevelWidth      =   1
  522.          Border          =   1  'Single Width
  523.          BorderWidth     =   0
  524.          Height          =   765
  525.          Index           =   9
  526.          ItemBackColor   =   &H00000000&
  527.          ItemCount1      =   4
  528.          ItemCount2      =   1
  529.          ItemCount3      =   2
  530.          ItemForeColor1  =   &H0000FF00&
  531.          ItemForeColor2  =   &H0000FFFF&
  532.          ItemForeColor3  =   &H000000FF&
  533.          Left            =   2310
  534.          LinkControl     =   ""
  535.          LinkProperty    =   ""
  536.          Max             =   127
  537.          Min             =   0
  538.          ThreeD          =   0   'False
  539.          Top             =   260
  540.          Value           =   0
  541.          Width           =   195
  542.       End
  543.       Begin VIndicator VIndicator1 
  544.          BackColor       =   &H00404040&
  545.          BevelInner      =   0  'None
  546.          BevelOuter      =   0  'None
  547.          BevelWidth      =   1
  548.          Border          =   1  'Single Width
  549.          BorderWidth     =   0
  550.          Height          =   765
  551.          Index           =   10
  552.          ItemBackColor   =   &H00000000&
  553.          ItemCount1      =   4
  554.          ItemCount2      =   1
  555.          ItemCount3      =   2
  556.          ItemForeColor1  =   &H0000FF00&
  557.          ItemForeColor2  =   &H0000FFFF&
  558.          ItemForeColor3  =   &H000000FF&
  559.          Left            =   2550
  560.          LinkControl     =   ""
  561.          LinkProperty    =   ""
  562.          Max             =   127
  563.          Min             =   0
  564.          ThreeD          =   0   'False
  565.          Top             =   260
  566.          Value           =   0
  567.          Width           =   195
  568.       End
  569.       Begin VIndicator VIndicator1 
  570.          BackColor       =   &H00404040&
  571.          BevelInner      =   0  'None
  572.          BevelOuter      =   0  'None
  573.          BevelWidth      =   1
  574.          Border          =   1  'Single Width
  575.          BorderWidth     =   0
  576.          Height          =   765
  577.          Index           =   11
  578.          ItemBackColor   =   &H00000000&
  579.          ItemCount1      =   4
  580.          ItemCount2      =   1
  581.          ItemCount3      =   2
  582.          ItemForeColor1  =   &H0000FF00&
  583.          ItemForeColor2  =   &H0000FFFF&
  584.          ItemForeColor3  =   &H000000FF&
  585.          Left            =   2790
  586.          LinkControl     =   ""
  587.          LinkProperty    =   ""
  588.          Max             =   127
  589.          Min             =   0
  590.          ThreeD          =   0   'False
  591.          Top             =   260
  592.          Value           =   0
  593.          Width           =   195
  594.       End
  595.       Begin VIndicator VIndicator1 
  596.          BackColor       =   &H00404040&
  597.          BevelInner      =   0  'None
  598.          BevelOuter      =   0  'None
  599.          BevelWidth      =   1
  600.          Border          =   1  'Single Width
  601.          BorderWidth     =   0
  602.          Height          =   765
  603.          Index           =   12
  604.          ItemBackColor   =   &H00000000&
  605.          ItemCount1      =   4
  606.          ItemCount2      =   1
  607.          ItemCount3      =   2
  608.          ItemForeColor1  =   &H0000FF00&
  609.          ItemForeColor2  =   &H0000FFFF&
  610.          ItemForeColor3  =   &H000000FF&
  611.          Left            =   3030
  612.          LinkControl     =   ""
  613.          LinkProperty    =   ""
  614.          Max             =   127
  615.          Min             =   0
  616.          ThreeD          =   0   'False
  617.          Top             =   260
  618.          Value           =   0
  619.          Width           =   195
  620.       End
  621.       Begin VIndicator VIndicator1 
  622.          BackColor       =   &H00404040&
  623.          BevelInner      =   0  'None
  624.          BevelOuter      =   0  'None
  625.          BevelWidth      =   1
  626.          Border          =   1  'Single Width
  627.          BorderWidth     =   0
  628.          Height          =   765
  629.          Index           =   13
  630.          ItemBackColor   =   &H00000000&
  631.          ItemCount1      =   4
  632.          ItemCount2      =   1
  633.          ItemCount3      =   2
  634.          ItemForeColor1  =   &H0000FF00&
  635.          ItemForeColor2  =   &H0000FFFF&
  636.          ItemForeColor3  =   &H000000FF&
  637.          Left            =   3270
  638.          LinkControl     =   ""
  639.          LinkProperty    =   ""
  640.          Max             =   127
  641.          Min             =   0
  642.          ThreeD          =   0   'False
  643.          Top             =   260
  644.          Value           =   0
  645.          Width           =   195
  646.       End
  647.       Begin VIndicator VIndicator1 
  648.          BackColor       =   &H00404040&
  649.          BevelInner      =   0  'None
  650.          BevelOuter      =   0  'None
  651.          BevelWidth      =   1
  652.          Border          =   1  'Single Width
  653.          BorderWidth     =   0
  654.          Height          =   765
  655.          Index           =   14
  656.          ItemBackColor   =   &H00000000&
  657.          ItemCount1      =   4
  658.          ItemCount2      =   1
  659.          ItemCount3      =   2
  660.          ItemForeColor1  =   &H0000FF00&
  661.          ItemForeColor2  =   &H0000FFFF&
  662.          ItemForeColor3  =   &H000000FF&
  663.          Left            =   3510
  664.          LinkControl     =   ""
  665.          LinkProperty    =   ""
  666.          Max             =   127
  667.          Min             =   0
  668.          ThreeD          =   0   'False
  669.          Top             =   260
  670.          Value           =   0
  671.          Width           =   195
  672.       End
  673.       Begin VIndicator VIndicator1 
  674.          BackColor       =   &H00404040&
  675.          BevelInner      =   0  'None
  676.          BevelOuter      =   0  'None
  677.          BevelWidth      =   1
  678.          Border          =   1  'Single Width
  679.          BorderWidth     =   0
  680.          Height          =   765
  681.          Index           =   15
  682.          ItemBackColor   =   &H00000000&
  683.          ItemCount1      =   4
  684.          ItemCount2      =   1
  685.          ItemCount3      =   2
  686.          ItemForeColor1  =   &H0000FF00&
  687.          ItemForeColor2  =   &H0000FFFF&
  688.          ItemForeColor3  =   &H000000FF&
  689.          Left            =   3750
  690.          LinkControl     =   ""
  691.          LinkProperty    =   ""
  692.          Max             =   127
  693.          Min             =   0
  694.          ThreeD          =   0   'False
  695.          Top             =   260
  696.          Value           =   0
  697.          Width           =   195
  698.       End
  699.       Begin Label Label1 
  700.          Alignment       =   2  'Center
  701.          BackColor       =   &H00C0C0C0&
  702.          Caption         =   "1"
  703.          FontBold        =   0   'False
  704.          FontItalic      =   0   'False
  705.          FontName        =   "Small Fonts"
  706.          FontSize        =   6.75
  707.          FontStrikethru  =   0   'False
  708.          FontUnderline   =   0   'False
  709.          Height          =   270
  710.          Index           =   0
  711.          Left            =   150
  712.          TabIndex        =   11
  713.          Top             =   1110
  714.          Width           =   195
  715.       End
  716.       Begin Label Label1 
  717.          Alignment       =   2  'Center
  718.          BackColor       =   &H00C0C0C0&
  719.          Caption         =   "2"
  720.          FontBold        =   0   'False
  721.          FontItalic      =   0   'False
  722.          FontName        =   "Small Fonts"
  723.          FontSize        =   6.75
  724.          FontStrikethru  =   0   'False
  725.          FontUnderline   =   0   'False
  726.          Height          =   270
  727.          Index           =   1
  728.          Left            =   390
  729.          TabIndex        =   12
  730.          Top             =   1110
  731.          Width           =   195
  732.       End
  733.       Begin Label Label1 
  734.          Alignment       =   2  'Center
  735.          BackColor       =   &H00C0C0C0&
  736.          Caption         =   "3"
  737.          FontBold        =   0   'False
  738.          FontItalic      =   0   'False
  739.          FontName        =   "Small Fonts"
  740.          FontSize        =   6.75
  741.          FontStrikethru  =   0   'False
  742.          FontUnderline   =   0   'False
  743.          Height          =   270
  744.          Index           =   2
  745.          Left            =   630
  746.          TabIndex        =   13
  747.          Top             =   1110
  748.          Width           =   195
  749.       End
  750.       Begin Label Label1 
  751.          Alignment       =   2  'Center
  752.          BackColor       =   &H00C0C0C0&
  753.          Caption         =   "4"
  754.          FontBold        =   0   'False
  755.          FontItalic      =   0   'False
  756.          FontName        =   "Small Fonts"
  757.          FontSize        =   6.75
  758.          FontStrikethru  =   0   'False
  759.          FontUnderline   =   0   'False
  760.          Height          =   270
  761.          Index           =   3
  762.          Left            =   870
  763.          TabIndex        =   14
  764.          Top             =   1110
  765.          Width           =   195
  766.       End
  767.       Begin Label Label1 
  768.          Alignment       =   2  'Center
  769.          BackColor       =   &H00C0C0C0&
  770.          Caption         =   "5"
  771.          FontBold        =   0   'False
  772.          FontItalic      =   0   'False
  773.          FontName        =   "Small Fonts"
  774.          FontSize        =   6.75
  775.          FontStrikethru  =   0   'False
  776.          FontUnderline   =   0   'False
  777.          Height          =   270
  778.          Index           =   4
  779.          Left            =   1110
  780.          TabIndex        =   15
  781.          Top             =   1110
  782.          Width           =   195
  783.       End
  784.       Begin Label Label1 
  785.          Alignment       =   2  'Center
  786.          BackColor       =   &H00C0C0C0&
  787.          Caption         =   "6"
  788.          FontBold        =   0   'False
  789.          FontItalic      =   0   'False
  790.          FontName        =   "Small Fonts"
  791.          FontSize        =   6.75
  792.          FontStrikethru  =   0   'False
  793.          FontUnderline   =   0   'False
  794.          Height          =   270
  795.          Index           =   5
  796.          Left            =   1350
  797.          TabIndex        =   16
  798.          Top             =   1110
  799.          Width           =   195
  800.       End
  801.       Begin Label Label1 
  802.          Alignment       =   2  'Center
  803.          BackColor       =   &H00C0C0C0&
  804.          Caption         =   "7"
  805.          FontBold        =   0   'False
  806.          FontItalic      =   0   'False
  807.          FontName        =   "Small Fonts"
  808.          FontSize        =   6.75
  809.          FontStrikethru  =   0   'False
  810.          FontUnderline   =   0   'False
  811.          Height          =   270
  812.          Index           =   6
  813.          Left            =   1590
  814.          TabIndex        =   17
  815.          Top             =   1110
  816.          Width           =   195
  817.       End
  818.       Begin Label Label1 
  819.          Alignment       =   2  'Center
  820.          BackColor       =   &H00C0C0C0&
  821.          Caption         =   "8"
  822.          FontBold        =   0   'False
  823.          FontItalic      =   0   'False
  824.          FontName        =   "Small Fonts"
  825.          FontSize        =   6.75
  826.          FontStrikethru  =   0   'False
  827.          FontUnderline   =   0   'False
  828.          Height          =   270
  829.          Index           =   7
  830.          Left            =   1830
  831.          TabIndex        =   27
  832.          Top             =   1110
  833.          Width           =   195
  834.       End
  835.       Begin Label Label1 
  836.          Alignment       =   2  'Center
  837.          BackColor       =   &H00C0C0C0&
  838.          Caption         =   "9"
  839.          FontBold        =   0   'False
  840.          FontItalic      =   0   'False
  841.          FontName        =   "Small Fonts"
  842.          FontSize        =   6.75
  843.          FontStrikethru  =   0   'False
  844.          FontUnderline   =   0   'False
  845.          Height          =   270
  846.          Index           =   8
  847.          Left            =   2070
  848.          TabIndex        =   26
  849.          Top             =   1110
  850.          Width           =   195
  851.       End
  852.       Begin Label Label1 
  853.          Alignment       =   2  'Center
  854.          BackColor       =   &H00C0C0C0&
  855.          Caption         =   "10"
  856.          FontBold        =   0   'False
  857.          FontItalic      =   0   'False
  858.          FontName        =   "Small Fonts"
  859.          FontSize        =   6.75
  860.          FontStrikethru  =   0   'False
  861.          FontUnderline   =   0   'False
  862.          Height          =   270
  863.          Index           =   9
  864.          Left            =   2310
  865.          TabIndex        =   25
  866.          Top             =   1110
  867.          Width           =   195
  868.       End
  869.       Begin Label Label1 
  870.          Alignment       =   2  'Center
  871.          BackColor       =   &H00C0C0C0&
  872.          Caption         =   "11"
  873.          FontBold        =   0   'False
  874.          FontItalic      =   0   'False
  875.          FontName        =   "Small Fonts"
  876.          FontSize        =   6.75
  877.          FontStrikethru  =   0   'False
  878.          FontUnderline   =   0   'False
  879.          Height          =   270
  880.          Index           =   10
  881.          Left            =   2550
  882.          TabIndex        =   24
  883.          Top             =   1110
  884.          Width           =   195
  885.       End
  886.       Begin Label Label1 
  887.          Alignment       =   2  'Center
  888.          BackColor       =   &H00C0C0C0&
  889.          Caption         =   "12"
  890.          FontBold        =   0   'False
  891.          FontItalic      =   0   'False
  892.          FontName        =   "Small Fonts"
  893.          FontSize        =   6.75
  894.          FontStrikethru  =   0   'False
  895.          FontUnderline   =   0   'False
  896.          Height          =   270
  897.          Index           =   11
  898.          Left            =   2790
  899.          TabIndex        =   23
  900.          Top             =   1110
  901.          Width           =   195
  902.       End
  903.       Begin Label Label1 
  904.          Alignment       =   2  'Center
  905.          BackColor       =   &H00C0C0C0&
  906.          Caption         =   "13"
  907.          FontBold        =   0   'False
  908.          FontItalic      =   0   'False
  909.          FontName        =   "Small Fonts"
  910.          FontSize        =   6.75
  911.          FontStrikethru  =   0   'False
  912.          FontUnderline   =   0   'False
  913.          Height          =   270
  914.          Index           =   12
  915.          Left            =   3030
  916.          TabIndex        =   22
  917.          Top             =   1110
  918.          Width           =   195
  919.       End
  920.       Begin Label Label1 
  921.          Alignment       =   2  'Center
  922.          BackColor       =   &H00C0C0C0&
  923.          Caption         =   "14"
  924.          FontBold        =   0   'False
  925.          FontItalic      =   0   'False
  926.          FontName        =   "Small Fonts"
  927.          FontSize        =   6.75
  928.          FontStrikethru  =   0   'False
  929.          FontUnderline   =   0   'False
  930.          Height          =   270
  931.          Index           =   13
  932.          Left            =   3270
  933.          TabIndex        =   21
  934.          Top             =   1110
  935.          Width           =   195
  936.       End
  937.       Begin Label Label1 
  938.          Alignment       =   2  'Center
  939.          BackColor       =   &H00C0C0C0&
  940.          Caption         =   "15"
  941.          FontBold        =   0   'False
  942.          FontItalic      =   0   'False
  943.          FontName        =   "Small Fonts"
  944.          FontSize        =   6.75
  945.          FontStrikethru  =   0   'False
  946.          FontUnderline   =   0   'False
  947.          Height          =   270
  948.          Index           =   14
  949.          Left            =   3510
  950.          TabIndex        =   20
  951.          Top             =   1110
  952.          Width           =   195
  953.       End
  954.       Begin Label Label1 
  955.          Alignment       =   2  'Center
  956.          BackColor       =   &H00C0C0C0&
  957.          Caption         =   "16"
  958.          FontBold        =   0   'False
  959.          FontItalic      =   0   'False
  960.          FontName        =   "Small Fonts"
  961.          FontSize        =   6.75
  962.          FontStrikethru  =   0   'False
  963.          FontUnderline   =   0   'False
  964.          Height          =   270
  965.          Index           =   15
  966.          Left            =   3750
  967.          TabIndex        =   19
  968.          Top             =   1110
  969.          Width           =   195
  970.       End
  971.    End
  972. End
  973.  
  974. Option Explicit
  975.  
  976. Dim lVolume As Integer
  977. Dim rVolume As Integer
  978.  
  979. Sub CheckMIDIFilter_Click (index As Integer)
  980.     Select Case index
  981.     Case Is = 0
  982.         If CheckMIDIFilter(index).Value = 0 Then
  983.         MIDIInput1.Filter(FILTER_F9) = False
  984.         Else
  985.         MIDIInput1.Filter(FILTER_F9) = True
  986.         End If
  987.     Case Is = 1
  988.         If CheckMIDIFilter(index) = 0 Then
  989.         MIDIInput1.Filter(FILTER_ACTIVE_SENSE) = False
  990.         Else
  991.         MIDIInput1.Filter(FILTER_ACTIVE_SENSE) = True
  992.         End If
  993.     Case Is = 2
  994.         If CheckMIDIFilter(index) = 0 Then
  995.         MIDIInput1.Filter(FILTER_CLOCK) = False
  996.         Else
  997.         MIDIInput1.Filter(FILTER_CLOCK) = True
  998.         End If
  999.     Case Is = 3
  1000.         If CheckMIDIFilter(index) = 0 Then
  1001.         MIDIInput1.Filter(PITCH_BEND) = False
  1002.         Else
  1003.         MIDIInput1.Filter(PITCH_BEND) = True
  1004.         End If
  1005.     
  1006.     End Select
  1007. End Sub
  1008.  
  1009. Sub Combo1_Click ()
  1010.     Dim wRtn As Integer
  1011.  
  1012.     If MIDIOutput1.State >= MIDISTATE_OPEN Or MIDIOutput1.DeviceID = -1 Then
  1013.     ' Restore volume before closing
  1014.     If (MIDIOutput1.HasLRVolume) Then
  1015.         MIDIOutput1.VolumeLeft = lVolume
  1016.         MIDIOutput1.VolumeRight = rVolume
  1017.     ElseIf (MIDIOutput1.HasVolume) Then
  1018.         MIDIOutput1.VolumeLeft = lVolume
  1019.     End If
  1020.     
  1021.     ' Close
  1022.     MIDIOutput1.Action = MIDIOUT_CLOSE
  1023.     
  1024.     ' Restore defaults
  1025.     VSlider1.Enabled = False
  1026.     VSlider2.Enabled = False
  1027.     VSlider1.Value = 0
  1028.     VSlider2.Value = 0
  1029.     End If
  1030.     
  1031.  
  1032.     ' Open selected device
  1033.     MIDIOutput1.DeviceID = Combo1.ListIndex - 1
  1034.     MIDIOutput1.Action = MIDIOUT_OPEN
  1035.     
  1036.     ' Display device handle
  1037.     If (MIDIOutput1.HMidiDevice <> 0) Then
  1038.     
  1039.     ' If device supports volume, save starting volume
  1040.     If (MIDIOutput1.HasLRVolume) Then
  1041.         VSlider1.Enabled = True
  1042.         VSlider2.Enabled = True
  1043.         VSlider1.Value = MIDIOutput1.VolumeLeft
  1044.         VSlider2.Value = MIDIOutput1.VolumeRight
  1045.         lVolume = VSlider1.Value
  1046.         rVolume = VSlider2.Value
  1047.     ElseIf (MIDIOutput1.HasVolume) Then
  1048.         VSlider1.Enabled = True
  1049.         VSlider1.Value = MIDIOutput1.VolumeLeft
  1050.         lVolume = VSlider1.Value
  1051.     End If
  1052.     End If
  1053. End Sub
  1054.  
  1055. Sub Combo2_Click ()
  1056.     Dim wRtn As Integer
  1057.     
  1058.     If MIDIInput1.State >= MIDISTATE_OPEN Then
  1059.     ' Close midiin port
  1060.     MIDIInput1.Action = MIDIIN_CLOSE
  1061.     End If
  1062.  
  1063.     
  1064.     ' Get selected device id
  1065.     MIDIInput1.DeviceID = Combo2.ListIndex
  1066.     
  1067.     ' Open and display handle
  1068.     MIDIInput1.Action = MIDIIN_OPEN
  1069.  
  1070.     ' Start midi input
  1071.     MIDIInput1.Action = MIDIIN_START
  1072. End Sub
  1073.  
  1074. Sub Form_Load ()
  1075.     Dim i As Integer
  1076.  
  1077.     ' Center the form on the screen
  1078.     'Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
  1079.  
  1080.     Form1.Show
  1081.     '
  1082.     ' Fill output device combo box
  1083.     '
  1084.     For i = -1 To MIDIOutput1.DeviceCount - 1
  1085.     MIDIOutput1.DeviceID = i
  1086.     Combo1.AddItem MIDIOutput1.ProductName
  1087.     Next
  1088.     '
  1089.     ' Select first in list
  1090.     '
  1091.     Combo1.ListIndex = 0
  1092.     MIDIOutput1.DeviceID = -1
  1093.     Combo1_Click
  1094.  
  1095.     '
  1096.     ' Fill input device combo box
  1097.     '
  1098.     For i = 0 To MIDIInput1.DeviceCount - 1
  1099.     MIDIInput1.DeviceID = i
  1100.     Combo2.AddItem MIDIInput1.ProductName
  1101.     Next
  1102.     '
  1103.     ' Select first in list
  1104.     '
  1105.     Combo2.ListIndex = 0
  1106.     MIDIInput1.DeviceID = 0
  1107.     Combo2_Click
  1108. End Sub
  1109.  
  1110. Sub Form_Unload (Cancel As Integer)
  1111.     MIDIInput1.Action = MIDIIN_STOP
  1112.     
  1113.     ' Close midiin port
  1114.     MIDIInput1.Action = MIDIIN_CLOSE
  1115.  
  1116.     ' Restore volume before closing
  1117.     If (MIDIOutput1.HasLRVolume) Then
  1118.     MIDIOutput1.VolumeLeft = lVolume
  1119.     MIDIOutput1.VolumeRight = rVolume
  1120.     ElseIf (MIDIOutput1.HasVolume) Then
  1121.     MIDIOutput1.VolumeLeft = lVolume
  1122.     End If
  1123.     
  1124.     ' Close
  1125.     MIDIOutput1.Action = MIDIOUT_CLOSE
  1126. End Sub
  1127.  
  1128. Sub MIDIInput1_Error (ErrorCode As Integer, ErrorMessage As String)
  1129.     MsgBox ErrorMessage
  1130. End Sub
  1131.  
  1132. Sub MIDIInput1_Message ()
  1133.     Dim InMessage As Integer
  1134.     Dim InData1 As Integer
  1135.     Dim InData2 As Integer
  1136.  
  1137.  
  1138.     '
  1139.     'This do while loop allows you to take all the messages that are
  1140.     'waiting in the message queue.
  1141.     '
  1142.     Do While MIDIInput1.MessageCount > 0
  1143.     '
  1144.     'This is the incoming MIDI data
  1145.     '
  1146.  
  1147.     InMessage = MIDIInput1.Message
  1148.     InData1 = MIDIInput1.Data1
  1149.     InData2 = MIDIInput1.Data2
  1150.  
  1151.     ' Labels in VB 3.0 are very slow in updating/repainting,
  1152.     ' at least in terms of real-time.  If you use a label REFRESH
  1153.     ' method you will experience some time delay.
  1154.     '
  1155.     ' Generally, painting of a label control is handled automatically
  1156.     ' by VB while no events are occurring.  So if you try to force
  1157.     ' VB to repaint a label control immediately you will be taking
  1158.     ' away from the real-time processing of MIDI data.  The following
  1159.     ' is an example of a label refresh.
  1160.     ' LblInQueueCount.Caption = MIDIInput1.MessageCount
  1161.     ' LblInQueueCount.Refresh
  1162.     '
  1163.  
  1164.     ' If this is a note on or note off event, transpose it according to the
  1165.     ' value of VSliderTranspose control.
  1166.     If InMessage >= 128 And InMessage <= 159 Then
  1167.         InData1 = InData1 + VSliderTranspose
  1168.     End If
  1169.     
  1170.     '
  1171.     ' Now we are going to send the MIDI data that just came in the
  1172.     ' MIDI IN, right back out the MIDI OUT
  1173.     '
  1174.     MIDIOutput1.Message = InMessage
  1175.     MIDIOutput1.Data1 = InData1
  1176.     MIDIOutput1.Data2 = InData2
  1177.     
  1178.     '
  1179.     'Tell MIDIOutput1 to send the MIDI data
  1180.     '
  1181.     MIDIOutput1.Action = MIDIOUT_SEND
  1182.  
  1183.     '
  1184.     'Remove the MIDI data from the MIDI IN queue
  1185.     '
  1186.     MIDIInput1.Action = MIDIIN_REMOVE
  1187.     Loop
  1188.  
  1189.     '
  1190.     ' Make MIDI Note On volume from one of 16 MIDI channels light correct
  1191.     ' VU meter.  If MIDI Note Off then 0 VU Meter.  CheckMeter must be on.
  1192.     '
  1193.     ' The VIndicator routine is placed outside the MessageCount loop
  1194.     ' because we don't want screen updating to slow us down if a lot
  1195.     ' a MIDI messages are coming in.
  1196.     '
  1197.     If InMessage >= 144 And InMessage <= 159 And CheckMeter.Value = 1 Then
  1198.     VIndicator1(InMessage Mod 16).Value = InData2
  1199.     ElseIf InMessage >= 128 And InMessage <= 143 And CheckMeter.Value = 1 Then
  1200.     VIndicator1(InMessage Mod 16).Value = 0
  1201.     End If
  1202. End Sub
  1203.  
  1204. Sub MIDIOutput1_Error (ErrorCode As Integer, ErrorMessage As String)
  1205.     MsgBox ErrorMessage
  1206. End Sub
  1207.  
  1208. Sub VSlider1_Change ()
  1209.     If (MIDIOutput1.HMidiDevice <> 0) Then
  1210.     MIDIOutput1.VolumeLeft = VSlider1.Value
  1211.     End If
  1212. End Sub
  1213.  
  1214. Sub VSlider1_Scroll ()
  1215.     If (MIDIOutput1.HMidiDevice <> 0) Then
  1216.     MIDIOutput1.VolumeLeft = VSlider1.Value
  1217.     End If
  1218. End Sub
  1219.  
  1220. Sub VSlider2_Change ()
  1221.     If (MIDIOutput1.HMidiDevice <> 0) Then
  1222.     MIDIOutput1.VolumeRight = VSlider2.Value
  1223.     End If
  1224. End Sub
  1225.  
  1226. Sub VSlider2_Scroll ()
  1227.     If (MIDIOutput1.HMidiDevice <> 0) Then
  1228.     MIDIOutput1.VolumeRight = VSlider2.Value
  1229.     End If
  1230. End Sub
  1231.  
  1232. Sub VSliderTranspose_Change ()
  1233.     LabelTranspose.Caption = Str(VSliderTranspose.Value)
  1234. End Sub
  1235.  
  1236. Sub VSliderTranspose_Scroll ()
  1237.     LabelTranspose.Caption = Str(VSliderTranspose.Value)
  1238. End Sub
  1239.  
  1240.