This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How do i send midi data over ble uart

hi, i am using ble_uart example in which i am sending 3 byte of midi data (90 1e 45 0a .E.) i am getting (.E.) when i converts this ascii value to hex value i get (2e 45 2e) which is not same as the data i am sending.

i have no idea what should i do to get same data.

thanks!!

  • I am not sure, but probably something is wrong. It is really hard to say without seeing code or something.

  • Your question makes little sense. You say you're sending 3 bytes and then put 7 bytes of data in the parentheses in the question. Then you say you are receiving ".E." which according to the question is the last 3 bytes of the data you say you are sending and since 2E 45 2E is ASCII for ".E." then it appears you are getting back exactly what you send out.

    If you want 90 1E 45 then send out 90 1E 45 instead of grabbing the screen printout which converts the control characters to "." for human readability and sending that.

  • yes you are right @RK , thing is that i need to edit the midi data coming into apple midi format with is of 7 byte. for with i need to have access to each byte of data. not in character format. in hex or binary format. for which i need the get the same result i am sending.

  • I'm sorry but I really cannot understand what it is you are asking, if in fact you are asking a question.

    Are you sending 3 bytes or 7 bytes?

    where does this

    90 1E 45 0A .E. 
    

    come from? That is some kind of debugger or hex viewer output, your data is there, it's 90 1E 45 followed by a newline (0A), however you appear to be converting the '.E.' which is just the ASCII view of the last 3 characters of your data. Since 1E and 0A don't have ASCII representations, they are shown as '.' and the 90 isn't there at all.

  • yes, you are saying right. now i need to add 3 more byte of data with the existing 3 byte of data . since 90 in midi format denotes note on status and last 2 byte data represent velocity and pitch. now i need to add timestamp of data in a particular format. for which i need to edit each by of 3 midi data using some bitwise shifting operator or anything to make the apple midi format.

Related