26 May '13 - 08:05 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: BASS_MIDI_StreamEvent: What is DWORD HIBYTE LOBYTE  (Read 450 times)
Bellhop
Posts: 30


« on: 27 Feb '12 - 15:29 »
Reply with quoteQuote

For BASS_MIDI_StreamEvent MIDI_EVENT_NOTE, param is given as LOBYTE and HIBYTE. Could you give examples of what this DWORD should look like? I'm working in vb.NET. I can make this DWORD whatever it needs to be, but I have to know what that is. For example, if I have key number = 24 and velocity = 127, what should DWORD look like?

Thanks.

You may have already addressed this question on the forum, and I'm sorry to trouble you if you have, but searching the forum can be a frustrating task and I'm not getting anywhere.
Logged
radio42
Posts: 4012


« Reply #1 on: 27 Feb '12 - 16:43 »
Reply with quoteQuote

Just take a look to the "BASSMIDIEvent" documentation:
MIDI_EVENT_NOTE:
param : LOBYTE = key number (0-127), HIBYTE = velocity (0-127).
Logged
Ian @ un4seen
Administrator
Posts: 15276


« Reply #2 on: 27 Feb '12 - 17:03 »
Reply with quoteQuote

"LOBYTE" is the lowest byte and "HIBYTE" is the next lowest byte, ie. together they make a 16-bit value. The MAKEWORD macro ("MakeWord" in BASS.Net) can be used to build the MIDI_EVENT_NOTE event parameter, like this: MAKEWORD(note, velocity)
Logged
Bellhop
Posts: 30


« Reply #3 on: 27 Feb '12 - 19:19 »
Reply with quoteQuote

 Grin Thanks, Ian! It works now. I was assuming a 32 bit word. By the way, the compiler tells me that "MakeWord" is undeclared.
Logged
radio42
Posts: 4012


« Reply #4 on: 28 Feb '12 - 08:37 »
Reply with quoteQuote

In Bass.Net "MakeWord" is a static method contained in the "Un4seen.Bass.Utils" class.
Logged
Bellhop
Posts: 30


« Reply #5 on: 28 Feb '12 - 13:57 »
Reply with quoteQuote

 Roll Eyes Thank you "radio42" for the clarification!
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines