Click here to Skip to main content
15,882,278 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: MIDI and USB Keyboard! Pin
User 98970742-Dec-17 6:44
User 98970742-Dec-17 6:44 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre3-Dec-17 0:56
professionalSascha Lefèvre3-Dec-17 0:56 
GeneralRe: MIDI and USB Keyboard! Pin
User 98970743-Dec-17 2:39
User 98970743-Dec-17 2:39 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre3-Dec-17 6:10
professionalSascha Lefèvre3-Dec-17 6:10 
GeneralRe: MIDI and USB Keyboard! Pin
User 98970743-Dec-17 8:11
User 98970743-Dec-17 8:11 
GeneralRe: MIDI and USB Keyboard! Pin
User 98970746-Dec-17 6:45
User 98970746-Dec-17 6:45 
GeneralRe: MIDI and USB Keyboard! Pin
User 98970749-Dec-17 6:01
User 98970749-Dec-17 6:01 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre9-Dec-17 6:49
professionalSascha Lefèvre9-Dec-17 6:49 
On the page you linked in another post (Visual Basic MIDI Piano[^]) there are these two subs which I assume are still somewhere in your code:
VB
Private Sub Down(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown, Button2.MouseDown, Button3.MouseDown, Button4.MouseDown, Button5.MouseDown, Button6.MouseDown, Button7.MouseDown, Button8.MouseDown, Button9.MouseDown, Button10.MouseDown, Button11.MouseDown, Button12.MouseDown, Button13.MouseDown, Button14.MouseDown, Button15.MouseDown, Button16.MouseDown, Button17.MouseDown, Button18.MouseDown, Button19.MouseDown, Button20.MouseDown, Button21.MouseDown, Button22.MouseDown, Button23.MouseDown, Button24.MouseDown
    Jazz.MidiOut(&H90 + chan, Note(sender), 100)
End Sub

Private Sub Up(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseUp, Button2.MouseUp, Button3.MouseUp, Button4.MouseUp, Button5.MouseUp, Button6.MouseUp, Button7.MouseUp, Button8.MouseUp, Button9.MouseUp, Button10.MouseUp, Button11.MouseUp, Button12.MouseUp, Button13.MouseUp, Button14.MouseUp, Button15.MouseUp, Button16.MouseUp, Button17.MouseUp, Button18.MouseUp, Button19.MouseUp, Button20.MouseUp, Button21.MouseUp, Button22.MouseUp, Button23.MouseUp, Button24.MouseUp
    Jazz.MidiOut(&H80 + chan, Note(sender), 0)
End Sub
Looks like it's supposed to start playing a note on KeyDown and stop playing it on KeyUp, without a predetermined duration, which you seem to have added. So I'm guessing all you need to do is to either remove the "Up"-sub and the event-wiring for it or comment out the single line it it. If it doesn't work then I have no idea.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

GeneralRe: MIDI and USB Keyboard! Pin
User 98970749-Dec-17 7:31
User 98970749-Dec-17 7:31 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707410-Dec-17 4:39
User 989707410-Dec-17 4:39 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 0:56
User 989707411-Dec-17 0:56 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre11-Dec-17 4:40
professionalSascha Lefèvre11-Dec-17 4:40 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 4:48
User 989707411-Dec-17 4:48 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre11-Dec-17 4:56
professionalSascha Lefèvre11-Dec-17 4:56 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre11-Dec-17 4:58
professionalSascha Lefèvre11-Dec-17 4:58 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 5:04
User 989707411-Dec-17 5:04 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre11-Dec-17 5:09
professionalSascha Lefèvre11-Dec-17 5:09 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 5:18
User 989707411-Dec-17 5:18 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre11-Dec-17 5:39
professionalSascha Lefèvre11-Dec-17 5:39 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 5:55
User 989707411-Dec-17 5:55 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre11-Dec-17 6:01
professionalSascha Lefèvre11-Dec-17 6:01 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 6:05
User 989707411-Dec-17 6:05 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 6:12
User 989707411-Dec-17 6:12 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre11-Dec-17 6:20
professionalSascha Lefèvre11-Dec-17 6:20 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 6:22
User 989707411-Dec-17 6:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.