T
Tim
I am having problems using interop to call midiOutLongMsg.
in my MIDIHDR struct, i allocate MsgData as a string
I have been using a StringBuilder object to build MsgData
per byte. I am not getting the proper results, although
sometimes I do hear some notes being played, just not the
right ones...
What I think is happening is that when I do something like:
byte b=153;
Stringbuilder sb = new StringBuilder();
sb.Append(b);
i am appending the "string representation" of the byte.
ie "153" instead of just the one byte with a value of 153.
I am going to dive into the System.Text namespace, but
wanted to see if I could learn something here.
Really I have 2 questions:
1) How to append the actual byte to a stringbuilder
(byte2string function of somesort?)
2) How to properly determine the byte length of the
string. (sb.Length, sb.Capacity, sb.ToString
().SizeOf...???)
Thanks,
Tim.
in my MIDIHDR struct, i allocate MsgData as a string
I have been using a StringBuilder object to build MsgData
per byte. I am not getting the proper results, although
sometimes I do hear some notes being played, just not the
right ones...
What I think is happening is that when I do something like:
byte b=153;
Stringbuilder sb = new StringBuilder();
sb.Append(b);
i am appending the "string representation" of the byte.
ie "153" instead of just the one byte with a value of 153.
I am going to dive into the System.Text namespace, but
wanted to see if I could learn something here.
Really I have 2 questions:
1) How to append the actual byte to a stringbuilder
(byte2string function of somesort?)
2) How to properly determine the byte length of the
string. (sb.Length, sb.Capacity, sb.ToString
().SizeOf...???)
Thanks,
Tim.