can you set an example?... i guess the textbox1 is not affecting the MIDI playing!!!
What is making the play its the "m.playMIDINote" function!!!
The textbox1 is just for showing the data that is being sent from the MIDI Keyboard into the PC!
(Uppsssie just missed the there where more Replies, is just saw only that about the First Error Message )
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 ) 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.
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...
I have this XLS Sheet to create, or a report that groups sales by states and by customers.
Some of the customers have multiple locations in states, and have different customer names but it' the same customer.
ABC Company (Ontario)
ABC Company (Anaheim)
ABC Company *
(San Jose) ABC Company
I'm not even sure what to call this so I can search the internet.
Nor where to even start on this.
But this is my final GroupBy Call before I send it to the XLS creator.
The problem is that the database is badly designed, the Customer table needs a grouping field that is common to all the branch records, you need a company table with a foreign key to your customer table so you can group them.
I will be astonished if you can cater for all the garbage in that users can type for a company name. You should never rely on user input for key values (grouping makes it a key value).
Never underestimate the power of human stupidity
Your right. There is so much garbage in the database from all the users with half a brain that entered customers.
I tried the Levenstein and it came close to extracting but it takes too long to test and adjust the integer.
Now I'm just going to try and manually change the names first based on a static list and then run the function.
Surely the static list would be better used as a Company table content and linking ot to the customer table. It will require a change to the UI to support the Company. Not trivial but will make your life a lot simpler down the track.
Never underestimate the power of human stupidity