Click here to Skip to main content
15,351,089 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# MIDI controller interface. Pin
DaveyM699-Sep-12 0:03
professionalDaveyM699-Sep-12 0:03 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff10-Sep-12 1:49
MemberJumpin' Jeff10-Sep-12 1:49 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6915-Sep-12 7:44
professionalDaveyM6915-Sep-12 7:44 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff15-Sep-12 8:58
MemberJumpin' Jeff15-Sep-12 8:58 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6918-Sep-12 10:31
professionalDaveyM6918-Sep-12 10:31 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff19-Sep-12 5:57
MemberJumpin' Jeff19-Sep-12 5:57 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff28-Sep-12 9:19
MemberJumpin' Jeff28-Sep-12 9:19 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6929-Sep-12 3:12
professionalDaveyM6929-Sep-12 3:12 
I've reworked alot of the code and thoroughly tested it too so I know it works just fine. The handle locking is improved so there should be no deadlocks. I've still not got to the Stream API stuff but that can wait.

For the short message, in the MidiInput class, the Callback method receives the data as an IntPtr in dwParam1. To get the raw data, cast this to an int. The int is packed by Windows like this:

bits 0-7: Status byte - will be 0x80-0xFF
bits 8-15: First data byte (if applicable) - will be 0x00-0x7F
bits 16-23: second data byte (if applicable) - will be 0x00-0x7F
bits 24-31: unused - should be 0x00

The new version handles this better too with interfaces to give more suitable access to the data if required. Implementing a ToByteArray() in the base interface would be no big deal. I'll have a look before uploading Smile | :)

I'm not sure why your app is hanging on SystemExclusiveMessageRecieved, it's probably fixed in the new code anyway so let me know.

I'll upload the revised code later and drop you a message to let you know.
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff29-Sep-12 9:42
MemberJumpin' Jeff29-Sep-12 9:42 
AnswerRe: C# MIDI controller interface. Pin
DaveyM6930-Sep-12 3:53
professionalDaveyM6930-Sep-12 3:53 
GeneralRe: C# MIDI controller interface. Pin
DaveyM697-Oct-12 2:42
professionalDaveyM697-Oct-12 2:42 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff8-Oct-12 1:21
MemberJumpin' Jeff8-Oct-12 1:21 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff10-Oct-12 3:46
MemberJumpin' Jeff10-Oct-12 3:46 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6910-Oct-12 14:13
professionalDaveyM6910-Oct-12 14:13 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff11-Oct-12 1:49
MemberJumpin' Jeff11-Oct-12 1:49 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff11-Oct-12 2:13
MemberJumpin' Jeff11-Oct-12 2:13 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6911-Oct-12 7:18
professionalDaveyM6911-Oct-12 7:18 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff11-Oct-12 8:21
MemberJumpin' Jeff11-Oct-12 8:21 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6911-Oct-12 10:40
professionalDaveyM6911-Oct-12 10:40 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff12-Oct-12 1:42
MemberJumpin' Jeff12-Oct-12 1:42 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6911-Oct-12 10:51
professionalDaveyM6911-Oct-12 10:51 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff11-Oct-12 14:34
MemberJumpin' Jeff11-Oct-12 14:34 
GeneralRe: C# MIDI controller interface. Pin
Jumpin' Jeff11-Oct-12 10:20
MemberJumpin' Jeff11-Oct-12 10:20 
GeneralRe: C# MIDI controller interface. Pin
DaveyM6911-Oct-12 10:52
professionalDaveyM6911-Oct-12 10:52 
GeneralRe: C# MIDI controller interface. Pin
DaveyM692-Nov-12 8:54
professionalDaveyM692-Nov-12 8:54 

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.