Click here to Skip to main content
15,905,607 members
Home / Discussions / Visual Basic
   

Visual Basic

 
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 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 8:33
User 989707411-Dec-17 8:33 
GeneralRe: MIDI and USB Keyboard! Pin
Sascha Lefèvre13-Dec-17 8:08
professionalSascha Lefèvre13-Dec-17 8:08 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707413-Dec-17 8:42
User 989707413-Dec-17 8:42 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707411-Dec-17 9:41
User 989707411-Dec-17 9:41 
GeneralRe: MIDI and USB Keyboard! Pin
User 989707412-Nov-17 8:30
User 989707412-Nov-17 8:30 
AnswerRe: MIDI and USB Keyboard! Pin
Jaroslav Mitrovic28-Dec-17 16:39
Jaroslav Mitrovic28-Dec-17 16:39 
Hi.

(Uppsssie just missed the there where more Replies, is just saw only that about the First Error Message Roll eyes | :rolleyes: )

I did alot of VB.NET and VB6 MIDI Stuff. That´s why I started to learn Programing.

To be honest, I used like You a Library, Mostly MidiOx. (Oldie, but goldie...)

It is always the same things that are nessesary for Midi Handling.
First check if the Midi Device(s) are Present. Then Open them and Store it in a Instance (Variable). Then use the Subparts (Properties) like Channel number (MIDI-Channel) etc.
Then handle (Midi is mostly about Timings) the Midi Events.

But if You have a USB Midi Controller, You have to make Sure it has a Tone Generator.

Like the Korg NanoPads, they can only be used as Input Devices.

Maybe thats the cause for the Error-Messages.

If that´s the Case, use Your Computer and find a Software Synthesizer (Or some Tone Generator, Sampler etc.) and connect them inside the Computer. Of course Virtual Plugs (And there is no WLAN-Cable Laugh | :laugh: ) to connect the MIDI Input (Controller) with the Generator
(You can make your own Sampler in VB A Soundboard for example).
Or use a DAW ( 'Digital Audio Workstation' Application like: Cubase, Reason, Logik Fruity-Loops to name some of them, and all are Commercial I can´t remeber some Freeware atm.)


Please consider to use a MIDI analyzer Software like MIDIOX to see how MIDI DATA is transported and Connected Interchanged etc.)

For the VB Programming, it is very easy to Programm basic Midi Handling.

Lik I sad:
First get the Inputs and Outputs of the Midi-Devices in a List.

Like Jazz.GetDevices()

Then find the Proper Device, maybe with a Index or by a Name, whats the most convinitent way to do it.

Then Get the Input of Your USB-Controller.

Test it with MidiOX it has all Information allready awailable to see what is named what etc.
Then Connect the Midi-Messages of the Inputs and send them to the Tone generator Input.
So You have to Reroute the Midi Flow from the Controller to the Tonegenerator.

Wow very Complicated explained.

Let me break it Down. Your VB-App will have to have Inputs and Outputs.

The USB-Controller will be a Input in Your App. You have to use then the Output of your App to create some Noise (A Symphony for Example).

But if the Output should be a Soundboard that will be Playing MP3/or Wav Files on a Keyboardpress (Pianokeyboard) You can ommit the Output and just play the Files with the Windows Soundsystem, when the NoteOn Message is recieved.

When Jazz Library is saying Down and Up, it is ment the MidiMessages NoteOn and NoteOff.
Then you look inside the NoteOn-Message for the Channel Bit the ToneHight Bit and here we are.

And if You want to use the MidiMessages to behave like a real Instroment You have to handle also the NotOff-Message, to cancle the NoteOn.

A Piano Key makes a Noise as long You holding down the Key (Or it gets Quiet). But from a Programmers View it is a "Gate".
The Begin of the Gate is Called NoteOn and the End of the Gate is Called NoteOff.

I think You get the Idea.

Besides these 'easiest' Midi-Messages, there are alot of another Messages like SysEx (System Exclusive), but only in some cases there will be a need to do SysEx handling at all. Usally You will use them to send Data (like Backups) to/from the Mididevice(s).


So if you gonna use Jazz it is the right choise (I think i never used it).
It is the best way to use a Library for that Task.
Midi is very old and Robust and there is no need to recreate all the Midi-Bit Handling. Just focus on the Normal Tasks like Playing Music.

If You need some more advices please Ask, because Millions of People are doing Midi, but not in VB. Sniff me is very Sad about VB...

Happy new Year from Hamburg, Gemany
Smile | :)

modified 28-Dec-17 22:49pm.

QuestionLinq GroupBy Name using some sort of logic of names in common Pin
jkirkerx9-Nov-17 9:08
professionaljkirkerx9-Nov-17 9:08 
AnswerRe: Linq GroupBy Name using some sort of logic of names in common Pin
Mycroft Holmes9-Nov-17 13:16
professionalMycroft Holmes9-Nov-17 13:16 
GeneralRe: Linq GroupBy Name using some sort of logic of names in common Pin
jkirkerx10-Nov-17 6:22
professionaljkirkerx10-Nov-17 6:22 
GeneralRe: Linq GroupBy Name using some sort of logic of names in common Pin
Mycroft Holmes10-Nov-17 13:14
professionalMycroft Holmes10-Nov-17 13:14 
Questionerror 9 Pin
Member 135117618-Nov-17 22:04
Member 135117618-Nov-17 22:04 
AnswerRe: error 9 Pin
Member 135117618-Nov-17 22:05
Member 135117618-Nov-17 22:05 
GeneralRe: error 9 Pin
Member 135117618-Nov-17 22:05
Member 135117618-Nov-17 22:05 
SuggestionRe: error 9 Pin
Jochen Arndt8-Nov-17 23:41
professionalJochen Arndt8-Nov-17 23:41 
QuestionToo many arguments Pin
carlosdas17-Nov-17 14:09
carlosdas17-Nov-17 14:09 
AnswerRe: Too many arguments Pin
Kenneth Haugland7-Nov-17 14:15
mvaKenneth Haugland7-Nov-17 14:15 
QuestionVS2015 data source connection wizard error Pin
Member 1314374431-Oct-17 11:29
Member 1314374431-Oct-17 11:29 
AnswerRe: VS2015 data source connection wizard error Pin
Dave Kreskowiak3-Nov-17 12:36
mveDave Kreskowiak3-Nov-17 12:36 
QuestionEMAIL ARCHIVE Pin
Member 1277093031-Oct-17 4:58
Member 1277093031-Oct-17 4:58 
AnswerRe: EMAIL ARCHIVE Pin
OriginalGriff31-Oct-17 4:58
mveOriginalGriff31-Oct-17 4:58 
AnswerRe: EMAIL ARCHIVE Pin
Maciej Los31-Oct-17 10:24
mveMaciej Los31-Oct-17 10:24 
QuestionVb.net Pin
Member 1312553228-Oct-17 2:18
Member 1312553228-Oct-17 2:18 
AnswerRe: Vb.net Pin
Eddy Vluggen28-Oct-17 4:29
professionalEddy Vluggen28-Oct-17 4:29 

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.