Jump to content

JJC2

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

122 profile views

JJC2's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I know this thread is old, but I'm working with MIDI right now and am successful at reading normal MIDI in messages. But, the SYSEX part is not working. For sysex to work, one has to use use MidiInAddBuffer (with a MidiInPrepareHeader created structure) actual, according to MS you need 2. I did all that, found an example script on the German AutoItScript.de site. But no good. Does anyone have a working example for SYSEX receiving? Any help is appreciated. I have re-written all buffer and prepare functions to be up to snuff with MS latest specs (both 32-bit & 64-bit) and provided ample buffers. When I call MidiInReset(), I get MM_MIM_LONGDATA for every buffer, proofing that they ARE INDEED attached to the MidiInPort. But there is no data in them, even though I know for a fact (MIDIOX shows it) that SYSEX is coming in. I'm at a loss. Something is not adding up and I cannot figure it out. James ps. Code is attached. I must be doing something wrong with MidiInPrepareHeader (although it returns success) Sorry for it being long Marshall_Code.au3
  2. Here is a working midi_in example, BUT it doesn't work for SYSEX. I wish I could figure it out though. You do need to compile for 32 bit for it to work, under 64-bit it crashes. It shows callback and other things. However, I'm looking to receive SYSEX which doesn't work. MIDI.au3 MidiIn Example.au3
  3. OK I fixed it for my situation, not sure it is always going to be correct or not, only progAndy can answer that. On line 42 of the CSV.au3 library there is this line: Local $sPattern = StringReplace(StringReplace('(?m)(?:^|[,])h*(["](?:[^"]|["]{2})*["]|[^,rn]*)(v+)?',',', $srDelimiters, 0, 1),'"', $srQuote, 0, 1) It uses the h (zero-length string). However this doesn't seem to be working on my system (64 bit Win7 professional). There is a fix though: Local $sPattern = StringReplace(StringReplace('(?m)(?:^|[,])>*(["](?:[^"]|["]{2})*["]|[^,rn]*)(v+)?',',', $srDelimiters, 0, 1),'"', $srQuote, 0, 1) Use the > (also zero-length string). This works fine and exactly as I expected the output. Now I have a blank cell in between where it should be. Hope this helps someone. James
  4. This is with regards to the CSV.au3 include, which is totally awesome by the way. However, it does have a bug (which I haven't solved yet). If you delimiter is a @TAB and you have the following structure in your CSV: line1@TABdata@TABdata line2@TAB@TABdata The result that comes back is: line1 data data line2 data instead of the correct: line1 data data line2 data I'm suspecting it is because of the RegExp where @TAB character (0x09) should be translated to \t . (or a repeat + or * somewhere) But still trying to hunt it down exactly. Will post if/when I find. Hope this helps anyone that uses this library. Thanks, James
×
×
  • Create New...