vb6.0版本钢琴简谱播放程序代码QZQ-2024-8-30

Option Explicit

Const INVALID_NOTE = -1 ’ Code for keyboard keys that we don’t handle

Dim numDevices As Long ’ number of midi output devices
Dim curDevice As Long ’ current midi device
Dim hmidi As Long ’ midi output handle
Dim rc As Long ’ return code
Dim midimsg As Long ’ midi output message buffer
Dim channel As Integer ’ midi output channel
Dim volume As Integer ’ midi volume
Dim baseNote As Integer ’ the first note on our “piano”

Private Declare Sub Sleep Lib “kernel32” (ByVal dwMilliseconds As Long)

'This is a complete piano application u can contact me at [email protected]

Private Const MAXPNAMELEN = 32 ’ Maximum product name length

’ Error values for functions used in this sample. See the function for more information
Private Const MMSYSERR_BASE = 0
Private Const MMSYSERR_BADDEVICEID = (MMSYSERR_BASE + 2) ’ device ID out of range
Private Const MMSYSERR_INVALPARAM = (MMSYSERR_BASE + 11) ’ invalid parameter passed
Private Const MMSYSERR_NODRIVER = (MMSYSERR_BASE + 6) ’ no device driver present
Private Const MMSYSERR_NOMEM = (MMSYSERR_BASE + 7) ’ memory allocation error

Private Const MMSYSERR_INVALHANDLE = (MMSYSERR_BASE + 5) ’ device handle is invalid
Private Const MIDIERR_BASE = 64
Private Const MIDIERR_STILLPLAYING = (MIDIERR_BASE + 1) ’ still something playing
Private Const MIDIERR_NOTREADY = (MIDIERR_BASE + 3) ’ hardware is still busy
Private Const MIDIERR_BADOPENMODE = (MIDIERR_BASE + 6) ’ operation unsupported w/ open mode

'User-defined variable the stores information about the MIDI output device.
Private Type MIDIOUTCAPS
wMid As Integer ’ Manufacturer identifier of the device driver for the MIDI output device
’ For a list of identifiers, see the Manufacturer Indentifier topic in the
’ Multimedia Reference of the Platform SDK.

wPid As Integer ’ Product Identifier Product of the MIDI output device. For a list of
’ product identifiers, see the Product Identifiers topic in the Multimedia
’ Reference of the Platform SDK.

vDriverVersion As Long ’ Version number of the device driver for the MIDI output device.
’ The high-order byte is the major version number, and the low-order byte is
’ the minor version number.

szPname As String * MAXPNAMELEN ’ Product name in a null-terminated string.

wTechnology As Integer ’ One of the following that describes the MIDI output device:
’ MOD_FMSYNTH-The device is an FM synthesizer.
’ MOD_MAPPER-The device is the Microsoft MIDI mapper.
’ MOD_MIDIPORT-The device is a MIDI hardware port.
’ MOD_SQSYNTH-The device is a square wave synthesizer.
’ MOD_SYNTH-The device is a synthesizer.

wVoices As Integer ’ Number of voices supported by an internal synthesizer device. If the
’ device is a port, this member is not meaningful and is set to 0.

wNotes As Integer ’ Maximum number of simultaneous notes that can be played by an internal
’ synthesizer device. If the device is a port, this member is not meaningful
’ and is set to 0.

wChannelMask As Integer ’ Channels that an internal synthesizer device responds to, where the least
’ significant bit refers to channel 0 and the most significant bit to channel
’ 15. Port devices that transmit on all channels set this member to 0xFFFF.

dwSupport As Long ’ One of the following describes the optional functionality supported by
’ the device:
’ MIDICAPS_CACHE-Supports patch caching.
’ MIDICAPS_LRVOLUME-Supports separate left and right volume control.
’ MIDICAPS_STREAM-Provides direct support for the midiStreamOut function.
’ MIDICAPS_VOLUME-Supports volume control.

’ If a device supports volume changes, the MIDICAPS_VOLUME flag will be set
’ for the dwSupport member. If a device supports separate volume changes on
’ the left and right channels, both the MIDICAPS_VOLUME and the
’ MIDICAPS_LRVOLUME flags will be set for this member.
End Type

Private Declare Function midiOutGetNumDevs Lib “winmm” () As Integer
’ This function retrieves the number of MIDI output devices present in the system.
’ The function returns the number of MIDI output devices. A zero return value means
’ there are no MIDI devices in the system.

Private Declare Function midiOutGetDevCaps Lib “winmm.dll” Alias “midiOutGetDevCapsA” (ByVal uDeviceID As Long, lpCaps As MIDIOUTCAPS, ByVal uSize As Long) As Long
’ This function queries a specified MIDI output device to determine its capabilities.
’ The function requires the following parameters;
’ uDeviceID- unsigned integer variable identifying of the MIDI output device. The
’ device identifier specified by this parameter varies from zero to one
’ less than the number of devices present. This parameter can also be a
’ properly cast device handle.
’ lpMidiOutCaps- address of a MIDIOUTCAPS structure. This structure is filled with
’ information about the capabilities of the device.
’ cbMidiOutCaps- the size, in bytes, of the MIDIOUTCAPS structure. Use the Len
’ function with the MIDIOUTCAPS variable as the argument to get
’ this value.

’ The function returns MMSYSERR_NOERROR if successful or one of the following error values:
’ MMSYSERR_BADDEVICEID The specified device identifier is out of range.
’ MMSYSERR_INVALPARAM The specified pointer or structure is invalid.
’ MMSYSERR_NODRIVER The driver is not installed.
’ MMSYSERR_NOMEM The system is unable to load mapper string description.

Private Declare Function midiOutClose Lib “winmm.dll” (ByVal hMidiOut As Long) As Long
’ The function closes the specified MIDI output device. The function requires a
’ handle to the MIDI output device. If the function is successful, the handle is no
’ longer valid after the call to this function. A successful function call returns
’ MMSYSERR_NOERROR.

’ A failure returns one of the following:
’ MIDIERR_STILLPLAYING Buffers are still in the queue.
’ MMSYSERR_INVALHANDLE The specified device handle is invalid.
’ MMSYSERR_NOMEM The system is unable to load mapper string description.

Private Declare Function midiOutOpen Lib “winmm.dll” (lphMidiOut As Long, ByVal uDeviceID As Long, ByVal dwCallback As Long, ByVal dwInstance As Long, ByVal dwFlags As Long) As Long
’ The function opens a MIDI output device for playback. The function requires the
’ following parameters
’ lphmo- Address of an HMIDIOUT handle. This location is filled with a
’ handle identifying the opened MIDI output device. The handle
’ is used to identify the device in calls to other MIDI output
’ functions.
’ uDeviceID- Identifier of the MIDI output device that is to be opened.
’ dwCallback- Address of a callback function, an event handle, a thread
’ identifier, or a handle of a window or thread called during
’ MIDI playback to process messages related to the progress of
’ the playback. If no callback is desired, set this value to 0.
’ dwCallbackInstance- User instance data passed to the callback. Set this value to 0.
’ dwFlags-Callback flag for opening the device. Set this value to 0.

’ The function returns MMSYSERR_NOERROR if successful or one of the following error values:
’ MIDIERR_NODEVICE- No MIDI port was found. This error occurs only when the mapper is opened.
’ MMSYSERR_ALLOCATED- The specified resource is already allocated.
’ MMSYSERR_BADDEVICEID- The specified device identifier is out of range.
’ MMSYSERR_INVALPARAM- The specified pointer or structure is invalid.
’ MMSYSERR_NOMEM- The system is unable to allocate or lock memory.

Private Declare Function midiOutShortMsg Lib “winmm.dll” (ByVal hMidiOut As Long, ByVal dwMsg As Long) As Long
’ This function sends a short MIDI message to the specified MIDI output device. The function
’ requires the handle to the MIDI output device and a message is packed into a doubleword
’ value with the first byte of the message in the low-order byte. See the code sample for
’ how to create this value.

’ The function returns MMSYSERR_NOERROR if successful or one of the following error values:
’ MIDIERR_BADOPENMODE- The application sent a message without a status byte to a stream handle.
’ MIDIERR_NOTREADY- The hardware is busy with other data.
’ MMSYSERR_INVALHANDLE- The specified device handle is invalid.

Private mvarsType As Integer

Private Property Let sType(ByVal New_Data As Integer)
If Not IsNumeric(New_Data) Then New_Data = 0
If New_Data < 0 Then New_Data = 0
If New_Data > 127 Then New_Data = 127
mvarsType = New_Data
midiOutShortMsg hmidi, mvarsType * &H100 + &HC0
End Property

Private Property Get sType() As Integer
sType = mvarsType
End Property
’ Set the value for the starting note of the piano

Private Sub base_Click()
Dim s As String
Dim i As Integer
s = 60
If IsNumeric(s) Then
i = CInt(s)
If (i >= 0 And i < 112) Then
baseNote = i
End If
End If
End Sub

’ Select the midi output channel
Private Sub chan_Click(Index As Integer)
chan(channel).Checked = False
channel = Index
chan(channel).Checked = True
End Sub

Private Sub Command1_Click()
Dim s1 As String
Dim s2 As String
Dim i As Integer
Dim midiNote1 As Integer
Dim midiNote2 As Integer

Dim soundIndex1 As Integer
Dim soundIndex2 As Integer
soundIndex1 = Combo1.ListIndex
soundIndex2 = Combo2.ListIndex

s1 = Text1.Text
s2 = Text2.Text

For i = 1 To Len(s1) Or Len(s2) '取两个字符串长度中的较大值作为循环次数
Dim note1 As String
Dim note2 As String

  If i <= Len(s1) Then
     note1 = Mid(s1, i, 1)
  Else
     note1 = "" '如果第一个字符串结束了,设置为空字符串
  End If
  
  If i <= Len(s2) Then
     note2 = Mid(s2, i, 1)
  Else
     note2 = "" '如果第二个字符串结束了,设置为空字符串
  End If
  
   
    Select Case note1
          Case "-"
        midiNote1 = -1
 
     Case "1...."
        midiNote1 = 1
     Case "2...."
        midiNote1 = 2
     Case "3...."
        midiNote1 = 3
     Case "4...."
        midiNote1 = 4
     Case "5...."
        midiNote1 = 5
     Case "6...."
        midiNote1 = 6
     Case "7...."
        midiNote1 = 7
     Case "1..."
        midiNote1 = 8
     Case "2..."
        midiNote1 = 9
     Case "3..."
        midiNote1 = 10
     Case "4..."
        midiNote1 = 11

     Case "5..."
        midiNote1 = 12


     Case "6..."
        midiNote1 = 13

     Case "7..."
        midiNote1 = 14

    Case "1.."
        midiNote1 = 15


     Case "2.."
        midiNote1 = 16

     Case "3.."
        midiNote1 = 17

    Case "4.."
        midiNote1 = 18


     Case "5.."
        midiNote1 = 19

     Case "6.."
        midiNote1 = 20

 Case "7.."
        midiNote1 = 21


    Case "1."
        midiNote1 = 22


     Case "2."
        midiNote1 = 23

     Case "3."
        midiNote1 = 24

    Case "4."
        midiNote1 = 25


     Case "5."
        midiNote1 = 26

     Case "6."
        midiNote1 = 27

 Case "7."
        midiNote1 = 28




    Case "1"
        midiNote1 = 29


     Case "2"
        midiNote1 = 30

     Case "3"
        midiNote1 = 31

    Case "4"
        midiNote1 = 32


     Case "5"
        midiNote1 = 33

     Case "6"
        midiNote1 = 34

 Case "7"
        midiNote1 = 35




    Case "1'"
        midiNote1 = 36


     Case "2'"
        midiNote1 = 37

     Case "3'"
        midiNote1 = 38

    Case "4'"
        midiNote1 = 39


     Case "5'"
        midiNote1 = 40

     Case "6'"
        midiNote1 = 41

 Case "7'"
        midiNote1 = 42




    Case "1''"
        midiNote1 = 43


     Case "2''"
        midiNote1 = 44

     Case "3''"
        midiNote1 = 45

    Case "4''"
        midiNote1 = 46


     Case "5''"
        midiNote1 = 47

     Case "6''"
        midiNote1 = 48

 Case "7''"
        midiNote1 = 49


    Case "1'''"
        midiNote1 = 50


     Case "2'''"
        midiNote1 = 51

     Case "3'''"
        midiNote1 = 52

    Case "4'''"
        midiNote1 = 53


     Case "5'''"
        midiNote1 = 54

     Case "6'''"
        midiNote1 = 55

 Case "7'''"
        midiNote1 = 56


    Case "1''''"
        midiNote1 = 57


     Case "2''''"
        midiNote1 = 58

     Case "3''''"
        midiNote1 = 59

    Case "4''''"
        midiNote1 = 60


     Case "5''''"
        midiNote1 = 61

     Case "6''''"
        midiNote1 = 62

 Case "7''''"
        midiNote1 = 63
        
       End Select
       
       Select Case note2
            Case "-"
        midiNote2 = -1
     Case "1...."
        midiNote2 = 1
     Case "2...."
        midiNote2 = 2
     Case "3...."
        midiNote2 = 3
     Case "4...."
        midiNote2 = 4
     Case "5...."
        midiNote2 = 5
     Case "6...."
        midiNote2 = 6
     Case "7...."
        midiNote2 = 7
     Case "1..."
        midiNote2 = 8
     Case "2..."
        midiNote2 = 9
     Case "3..."
        midiNote2 = 10
     Case "4..."
        midiNote2 = 11

     Case "5..."
        midiNote2 = 12


     Case "6..."
        midiNote2 = 13

     Case "7..."
        midiNote2 = 14

    Case "1.."
        midiNote2 = 15


     Case "2.."
        midiNote2 = 16

     Case "3.."
        midiNote2 = 17

    Case "4.."
        midiNote2 = 18


     Case "5.."
        midiNote2 = 19

     Case "6.."
        midiNote2 = 20

 Case "7.."
        midiNote2 = 21


    Case "1."
        midiNote2 = 22


     Case "2."
        midiNote2 = 23

     Case "3."
        midiNote2 = 24

    Case "4."
        midiNote2 = 25


     Case "5."
        midiNote2 = 26

     Case "6."
        midiNote2 = 27

 Case "7."
        midiNote2 = 28




    Case "1"
        midiNote2 = 29


     Case "2"
        midiNote2 = 30

     Case "3"
        midiNote2 = 31

    Case "4"
        midiNote2 = 32


     Case "5"
        midiNote2 = 33

     Case "6"
        midiNote2 = 34

 Case "7"
        midiNote2 = 35




    Case "1'"
        midiNote2 = 36


     Case "2'"
        midiNote2 = 37

     Case "3'"
        midiNote2 = 38

    Case "4'"
        midiNote2 = 39


     Case "5'"
        midiNote2 = 40

     Case "6'"
        midiNote2 = 41

 Case "7'"
        midiNote2 = 42




    Case "1''"
        midiNote2 = 43


     Case "2''"
        midiNote2 = 44

     Case "3''"
        midiNote2 = 45

    Case "4''"
        midiNote2 = 46


     Case "5''"
        midiNote2 = 47

     Case "6''"
        midiNote2 = 48

 Case "7''"
        midiNote2 = 49


    Case "1'''"
        midiNote2 = 50


     Case "2'''"
        midiNote2 = 51

     Case "3'''"
        midiNote2 = 52

    Case "4'''"
        midiNote2 = 53


     Case "5'''"
        midiNote2 = 54

     Case "6'''"
        midiNote2 = 55

 Case "7'''"
        midiNote2 = 56


    Case "1''''"
        midiNote2 = 57


     Case "2''''"
        midiNote2 = 58

     Case "3''''"
        midiNote2 = 59

    Case "4''''"
        midiNote2 = 60


     Case "5''''"
        midiNote2 = 61

     Case "6''''"
        midiNote2 = 62

 Case "7''''"
        midiNote2 = 63



       End Select
       
       
       
       
       
       
       If midiNote1 <> INVALID_NOTE Then
     Call StartNote(midiNote1)
  Sleep 1
      '设置第一个音符的音色
           sType = Combo1.ListIndex
     Call StopNote(midiNote1) ' 修改这里,确保只传入一个参数
  End If
  
  
  
  
  If midiNote2 <> INVALID_NOTE Then
     Call StartNote(midiNote2)
   Sleep 1
      '设置第一个音符的音色
           sType = Combo2.ListIndex
     Call StopNote(midiNote2) ' 修改这里,确保只传入一个参数
  End If
    
    
    
    
    
    
    
    
    
  
  Sleep 100

Next
End Sub

’ Open the midi device selected in the menu. The menu index equals the
’ midi device number + 1.
Private Sub device_Click(Index As Integer)
device(curDevice + 1).Checked = False
device(Index).Checked = True
curDevice = Index - 1
rc = midiOutClose(hmidi)
rc = midiOutOpen(hmidi, curDevice, 0, 0, 0)

End Sub

’ If user presses a keyboard key, start the corresponding midi note
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
StartNote NoteFromKey(KeyCode)
End Sub

’ If user lifts a keyboard key, stop the corresponding midi note
Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
StopNote NoteFromKey(KeyCode)
End Sub

Private Sub Form_Load()
Dim i As Long
Dim caps As MIDIOUTCAPS

’ Set the first device as midi mapper
device(0).Caption = “MIDI Mapper”
device(0).Visible = True
device(0).Enabled = True

’ Get the rest of the midi devices
numDevices = midiOutGetNumDevs()
For i = 0 To (numDevices - 1)
midiOutGetDevCaps i, caps, Len(caps)
device(i + 1).Caption = caps.szPname
device(i + 1).Visible = True
device(i + 1).Enabled = True
Next

’ Select the MIDI Mapper as the default device
device_Click (0)

’ Set the default channel
channel = 0
chan(channel).Checked = True

’ Set the base note
baseNote = 60

Call fill_sound_list1

Call fill_sound_list2

’ Set volume range
volume = 127
vol.Min = 0
vol.Max = 127
vol.Value = volume

End Sub

Private Sub Form_Unload(Cancel As Integer)
’ Close current midi device
rc = midiOutClose(hmidi)
End Sub

’ Start a note when user click on it
Private Sub key_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
StartNote (Index)
End Sub

’ Stop the note when user lifts the mouse button
Private Sub key_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
StopNote (Index)
End Sub

’ Press the button and send midi start event
Private Sub StartNote(Index As Integer)
If (Index = INVALID_NOTE) Then
Exit Sub
End If

midimsg = &H90 + ((baseNote + Index) * &H100) + (volume * &H10000) + channel
midiOutShortMsg hmidi, midimsg
End Sub

’ Raise the button and send midi stop event
Private Sub StopNote(Index As Integer)
If (Index = INVALID_NOTE) Then
Exit Sub
End If

midimsg = &H80 + ((baseNote + Index) * &H100) + channel
midiOutShortMsg hmidi, midimsg
End Sub

’ Get the note corresponding to a keyboard key
Private Function NoteFromKey(key As Integer)
NoteFromKey = INVALID_NOTE
Select Case key
Case 0
NoteFromKey = 0
Case 1
NoteFromKey = 1
Case 2
NoteFromKey = 2
Case 3
NoteFromKey = 3
Case 4
NoteFromKey = 4
Case 5
NoteFromKey = 5
Case 6
NoteFromKey = 6
Case 7
NoteFromKey = 7
Case 8
NoteFromKey = 8
Case 9
NoteFromKey = 9
Case 10
NoteFromKey = 10
Case 11
NoteFromKey = 11
Case 12 ’ comma
NoteFromKey = 12
Case 13
NoteFromKey = 13
Case 14 ’ period
NoteFromKey = 14
Case 15 ’ semicolon
NoteFromKey = 15
Case 16 ’ forward slash
NoteFromKey = 16

  Case 17
  NoteFromKey = 17
    
    Case 18
  NoteFromKey = 18
    
    Case 19
  NoteFromKey = 19
    
    Case 20
  NoteFromKey = 20
    
    Case 21
  NoteFromKey = 21
    
    Case 22
  NoteFromKey = 22
    
   
         Case 23
  NoteFromKey = 23
    
    Case 24
  NoteFromKey = 24
    
    Case 25
  NoteFromKey = 25
    
    Case 26
  NoteFromKey = 26
    
   
           Case 27
  NoteFromKey = 27
    
    Case 28
  NoteFromKey = 28
    
    Case 29
  NoteFromKey = 29
    
    Case 30
  NoteFromKey = 30
    
   
             Case 31
  NoteFromKey = 31
    
    Case 32
  NoteFromKey = 32
    
    Case 33
  NoteFromKey = 33
    
    Case 34
  NoteFromKey = 34
    
   
           Case 35
  NoteFromKey = 35
    
    Case 36
  NoteFromKey = 36
    
    Case 37
  NoteFromKey = 37
    
    Case 38
  NoteFromKey = 38
    
   
           Case 39
  NoteFromKey = 39
    
    Case 40
  NoteFromKey = 40
    
    Case 41
  NoteFromKey = 41
    
    Case 42
  NoteFromKey = 42
    
   
           Case 43
  NoteFromKey = 43
    
    Case 44
  NoteFromKey = 44
    
    Case 45
  NoteFromKey = 45
    
    Case 46
  NoteFromKey = 46
    
   
           Case 47
  NoteFromKey = 47
    
    Case 48
  NoteFromKey = 48
    
    Case 49
  NoteFromKey = 49
    
    Case 50
  NoteFromKey = 50
    
   
           Case 51
  NoteFromKey = 51
    
    Case 52
  NoteFromKey = 52
    
    Case 53
  NoteFromKey = 53
    
    Case 54
  NoteFromKey = 54
    
   
           Case 55
  NoteFromKey = 55
    
    Case 56
  NoteFromKey = 56
    
    Case 57
  NoteFromKey = 57
    
    Case 58
  NoteFromKey = 58
    
   
           Case 59
  NoteFromKey = 59
    
    Case 60
  NoteFromKey = 60
    
    Case 61
  NoteFromKey = 61
    
    Case 62
  NoteFromKey = 62
    
    Case 63
  NoteFromKey = 63

End Select

End Function

’ Set the volume
Private Sub vol_Change()
volume = vol.Value
End Sub

Private Sub fill_sound_list1()

    Combo1.AddItem "大钢琴(声学钢琴)0"
    Combo1.AddItem "明亮的钢琴1"
    Combo1.AddItem "电钢琴2"
    Combo1.AddItem "酒吧钢琴3"
    Combo1.AddItem "柔和的电钢琴4"
    Combo1.AddItem "加合唱效果的电钢琴5"
    Combo1.AddItem "羽管键琴(拨弦古钢琴)6"
    Combo1.AddItem "科拉维科特琴(击弦古钢琴)7"
    Combo1.AddItem "钢片琴8"
    Combo1.AddItem "钟琴9"
    Combo1.AddItem "八音盒10"
    Combo1.AddItem "颤音琴11"
    Combo1.AddItem "马林巴12"
    Combo1.AddItem "木琴13"
    Combo1.AddItem "管钟14"
    Combo1.AddItem "大扬琴15"
    Combo1.AddItem "击杆风琴16"
    Combo1.AddItem "打击式风琴17"
    Combo1.AddItem "摇滚风琴18"
    Combo1.AddItem "教堂风琴19"
    Combo1.AddItem "簧管风琴20"
    Combo1.AddItem "手风琴21"
    Combo1.AddItem "口琴22"
    Combo1.AddItem "探戈手风琴23"
    Combo1.AddItem "尼龙弦吉他24"
    Combo1.AddItem "钢弦吉他25"
    Combo1.AddItem "爵士电吉他26"
    Combo1.AddItem "清音电吉他27"
    Combo1.AddItem "闷音电吉他28"
    Combo1.AddItem "加驱动效果的电吉他29"
    Combo1.AddItem "加失真效果的电吉他30"
    Combo1.AddItem "吉他和音31"
    Combo1.AddItem "大贝司(声学贝司)32"
    Combo1.AddItem "电贝司(指弹)33"
    Combo1.AddItem "电贝司(拨片)34"
    Combo1.AddItem "无品贝司35"
    Combo1.AddItem "掌击贝司136"
    Combo1.AddItem "掌击贝司237"
    Combo1.AddItem "电子合成贝司138"
    Combo1.AddItem "电子合成贝司239"
    Combo1.AddItem "小提琴40"
    Combo1.AddItem "中提琴41"
    Combo1.AddItem "大提琴42"
    Combo1.AddItem "低音大提琴43"
    Combo1.AddItem "弦乐群颤音音色44"
    Combo1.AddItem "弦乐群拨弦音色45"
    Combo1.AddItem "竖琴46"
    Combo1.AddItem "定音鼓47"
    Combo1.AddItem "弦乐合奏音色148"
    Combo1.AddItem "弦乐合奏音色249"
    Combo1.AddItem "合成弦乐合奏音色150"
    Combo1.AddItem "合成弦乐合奏音色251"
    Combo1.AddItem "人声合唱啊52"
    Combo1.AddItem "人声嘟53"
    Combo1.AddItem "合成人声54"
    Combo1.AddItem "管弦乐敲击齐奏55"
    Combo1.AddItem "小号56"
    Combo1.AddItem "长号57"
    Combo1.AddItem "大号58"
    Combo1.AddItem "加弱音器小号59"
    Combo1.AddItem "法国号(圆号)60"
    Combo1.AddItem "铜管组(铜管乐器合奏音色)61"
    Combo1.AddItem "合成铜管音色162"
    Combo1.AddItem "合成铜管音色263"
    Combo1.AddItem "高音萨克斯风64"
    Combo1.AddItem "次中音萨克斯风65"
    Combo1.AddItem "中音萨克斯风66"
    Combo1.AddItem "低音萨克斯风67"
    Combo1.AddItem "双簧管68"
    Combo1.AddItem "英国管69"
    Combo1.AddItem "巴松(大管)70"
    Combo1.AddItem "单簧管(黑管)71"
    Combo1.AddItem "短笛72"
    Combo1.AddItem "长笛73"
    Combo1.AddItem "竖笛74"
    Combo1.AddItem "排箫75"
    Combo1.AddItem "吹瓶声76"
    Combo1.AddItem "日本尺八77"
    Combo1.AddItem "口哨声78"
    Combo1.AddItem "奥卡雷那79"
    Combo1.AddItem "合成主音1(方波)80"
    Combo1.AddItem "合成主音2(锯齿波)81"
    Combo1.AddItem "合成主音382"
    Combo1.AddItem "合成主音483"
    Combo1.AddItem "合成主音584"
    Combo1.AddItem "合成主音6(人声)85"
    Combo1.AddItem "合成主音7(平行五度)86"
    Combo1.AddItem "合成主音8(贝司加主音)87"
    Combo1.AddItem "合成音色1(新世纪)88"
    Combo1.AddItem "合成音色2(温暖)89"
    Combo1.AddItem "合成音色390"
    Combo1.AddItem "合成音色4(合唱)91"
    Combo1.AddItem "合成音色592"
    Combo1.AddItem "合成音色6(金属声)93"
    Combo1.AddItem "合成音色7(光环)94"
    Combo1.AddItem "合成音色895"
    Combo1.AddItem "合成效果1雨声96"
    Combo1.AddItem "合成效果2音轨97"
    Combo1.AddItem "合成效果3水晶98"
    Combo1.AddItem "合成效果4大气99"
    Combo1.AddItem "合成效果5明亮100"
    Combo1.AddItem "合成效果6鬼怪101"
    Combo1.AddItem "合成效果7回声102"
    Combo1.AddItem "合成效果8科幻103"
    Combo1.AddItem "西塔尔(印度)104"
    Combo1.AddItem "班卓琴(美洲)105"
    Combo1.AddItem "三昧线(日本)106"
    Combo1.AddItem "十三弦筝(日本)107"
    Combo1.AddItem "卡林巴108"
    Combo1.AddItem "风笛109"
    Combo1.AddItem "民族提琴110"
    Combo1.AddItem "唢呐111"
    Combo1.AddItem "叮当铃112"
    Combo1.AddItem "阿哥哥鼓113"
    Combo1.AddItem "钢鼓114"
    Combo1.AddItem "木鱼115"
    Combo1.AddItem "太鼓116"
    Combo1.AddItem "古高音鼓117"
    Combo1.AddItem "合成鼓118"
    Combo1.AddItem "铜钹119"
    Combo1.AddItem "磨弦120"
    Combo1.AddItem "呼吸声121"
    Combo1.AddItem "海浪声122"
    Combo1.AddItem "鸟鸣123"
    Combo1.AddItem "电话铃124"
    Combo1.AddItem "直升机125"
    Combo1.AddItem "鼓掌声126"
    Combo1.AddItem "枪声127"

Combo1.ListIndex = 0

End Sub

Private Sub fill_sound_list2()
Combo2.AddItem “大钢琴(声学钢琴)0”
Combo2.AddItem “明亮的钢琴1”
Combo2.AddItem “电钢琴2”
Combo2.AddItem “酒吧钢琴3”
Combo2.AddItem “柔和的电钢琴4”
Combo2.AddItem “加合唱效果的电钢琴5”
Combo2.AddItem “羽管键琴(拨弦古钢琴)6”
Combo2.AddItem “科拉维科特琴(击弦古钢琴)7”
Combo2.AddItem “钢片琴8”
Combo2.AddItem “钟琴9”
Combo2.AddItem “八音盒10”
Combo2.AddItem “颤音琴11”
Combo2.AddItem “马林巴12”
Combo2.AddItem “木琴13”
Combo2.AddItem “管钟14”
Combo2.AddItem “大扬琴15”
Combo2.AddItem “击杆风琴16”
Combo2.AddItem “打击式风琴17”
Combo2.AddItem “摇滚风琴18”
Combo2.AddItem “教堂风琴19”
Combo2.AddItem “簧管风琴20”
Combo2.AddItem “手风琴21”
Combo2.AddItem “口琴22”
Combo2.AddItem “探戈手风琴23”
Combo2.AddItem “尼龙弦吉他24”
Combo2.AddItem “钢弦吉他25”
Combo2.AddItem “爵士电吉他26”
Combo2.AddItem “清音电吉他27”
Combo2.AddItem “闷音电吉他28”
Combo2.AddItem “加驱动效果的电吉他29”
Combo2.AddItem “加失真效果的电吉他30”
Combo2.AddItem “吉他和音31”
Combo2.AddItem “大贝司(声学贝司)32”
Combo2.AddItem “电贝司(指弹)33”
Combo2.AddItem “电贝司(拨片)34”
Combo2.AddItem “无品贝司35”
Combo2.AddItem “掌击贝司136”
Combo2.AddItem “掌击贝司237”
Combo2.AddItem “电子合成贝司138”
Combo2.AddItem “电子合成贝司239”
Combo2.AddItem “小提琴40”
Combo2.AddItem “中提琴41”
Combo2.AddItem “大提琴42”
Combo2.AddItem “低音大提琴43”
Combo2.AddItem “弦乐群颤音音色44”
Combo2.AddItem “弦乐群拨弦音色45”
Combo2.AddItem “竖琴46”
Combo2.AddItem “定音鼓47”
Combo2.AddItem “弦乐合奏音色148”
Combo2.AddItem “弦乐合奏音色249”
Combo2.AddItem “合成弦乐合奏音色150”
Combo2.AddItem “合成弦乐合奏音色251”
Combo2.AddItem “人声合唱啊52”
Combo2.AddItem “人声嘟53”
Combo2.AddItem “合成人声54”
Combo2.AddItem “管弦乐敲击齐奏55”
Combo2.AddItem “小号56”
Combo2.AddItem “长号57”
Combo2.AddItem “大号58”
Combo2.AddItem “加弱音器小号59”
Combo2.AddItem “法国号(圆号)60”
Combo2.AddItem “铜管组(铜管乐器合奏音色)61”
Combo2.AddItem “合成铜管音色162”
Combo2.AddItem “合成铜管音色263”
Combo2.AddItem “高音萨克斯风64”
Combo2.AddItem “次中音萨克斯风65”
Combo2.AddItem “中音萨克斯风66”
Combo2.AddItem “低音萨克斯风67”
Combo2.AddItem “双簧管68”
Combo2.AddItem “英国管69”
Combo2.AddItem “巴松(大管)70”
Combo2.AddItem “单簧管(黑管)71”
Combo2.AddItem “短笛72”
Combo2.AddItem “长笛73”
Combo2.AddItem “竖笛74”
Combo2.AddItem “排箫75”
Combo2.AddItem “吹瓶声76”
Combo2.AddItem “日本尺八77”
Combo2.AddItem “口哨声78”
Combo2.AddItem “奥卡雷那79”
Combo2.AddItem “合成主音1(方波)80”
Combo2.AddItem “合成主音2(锯齿波)81”
Combo2.AddItem “合成主音382”
Combo2.AddItem “合成主音483”
Combo2.AddItem “合成主音584”
Combo2.AddItem “合成主音6(人声)85”
Combo2.AddItem “合成主音7(平行五度)86”
Combo2.AddItem “合成主音8(贝司加主音)87”
Combo2.AddItem “合成音色1(新世纪)88”
Combo2.AddItem “合成音色2(温暖)89”
Combo2.AddItem “合成音色390”
Combo2.AddItem “合成音色4(合唱)91”
Combo2.AddItem “合成音色592”
Combo2.AddItem “合成音色6(金属声)93”
Combo2.AddItem “合成音色7(光环)94”
Combo2.AddItem “合成音色895”
Combo2.AddItem “合成效果1雨声96”
Combo2.AddItem “合成效果2音轨97”
Combo2.AddItem “合成效果3水晶98”
Combo2.AddItem “合成效果4大气99”
Combo2.AddItem “合成效果5明亮100”
Combo2.AddItem “合成效果6鬼怪101”
Combo2.AddItem “合成效果7回声102”
Combo2.AddItem “合成效果8科幻103”
Combo2.AddItem “西塔尔(印度)104”
Combo2.AddItem “班卓琴(美洲)105”
Combo2.AddItem “三昧线(日本)106”
Combo2.AddItem “十三弦筝(日本)107”
Combo2.AddItem “卡林巴108”
Combo2.AddItem “风笛109”
Combo2.AddItem “民族提琴110”
Combo2.AddItem “唢呐111”
Combo2.AddItem “叮当铃112”
Combo2.AddItem “阿哥哥鼓113”
Combo2.AddItem “钢鼓114”
Combo2.AddItem “木鱼115”
Combo2.AddItem “太鼓116”
Combo2.AddItem “古高音鼓117”
Combo2.AddItem “合成鼓118”
Combo2.AddItem “铜钹119”
Combo2.AddItem “磨弦120”
Combo2.AddItem “呼吸声121”
Combo2.AddItem “海浪声122”
Combo2.AddItem “鸟鸣123”
Combo2.AddItem “电话铃124”
Combo2.AddItem “直升机125”
Combo2.AddItem “鼓掌声126”
Combo2.AddItem “枪声127”

Combo2.ListIndex = 10

End Sub

你可能感兴趣的:(ui,windows,前端,vb6.0,开发语言)