pcc
Well-known Member
- Joined
- Jan 21, 2003
- Messages
- 1,389
- Office Version
- 2021
- Platform
- Windows
I have the code below that plays midi files. The files were created by me using a midi sequencer, and recorded using the 'Grand Piano' midi voice. I have a workbook designed to teach piano scales et al. As such, when I play them back (through the PC speakers) using this code, it sounds like a grand piano.
I also want to use these files in another Excel workbook that I have set up to teach guitar scales. Is there a setting or routine that I can use so that when they are played in the guitar environment, it sounds like a guitar instead of a piano?
I also want to use these files in another Excel workbook that I have set up to teach guitar scales. Is there a setting or routine that I can use so that when they are played in the guitar environment, it sounds like a guitar instead of a piano?
VBA Code:
Private Declare Function mciExecute Lib "winmm.dll" _
(ByVal IpstrCommand As String) As Long
Sub midi(action As String, midifilename)
mciExecute action & " " & midifilename
End Sub
Sub playMIDI()
mf = "C:\users\peter\data\midi_files\C_major.mid"
midi "play", mf
End Sub