Go Down

Topic: MIDI transpose and channel changer (Read 1 time) previous topic - next topic


In your code when you get a command byte you are setting the byte count to zero. Then when you don't get a command byte you are incrementing it. So when you get your second byte the byte count will be one. So to change the second byte you need to put:-
Code: [Select]

 if(chan == 0x05 && byteCount == 1)

To get at the second byte


Mike, you clearly have not actually read my posts.


Aug 09, 2017, 10:56 pm Last Edit: Aug 10, 2017, 07:27 am by Grumpy_Mike
Mike, you clearly have not actually read my posts.
Yes I have, and you have clearly not done things correctly. I thought you wanted to learn?

I actually wrote most of this thread. You did not do the counting of bytes correctly which is why you have to use the wrong number for you to get it to work. I am telling you how to count the number of bytes correctly so that the line that does the transposition looks like it is targeting the correct byte.

You need to target the third byte in the message using the human convention of calling the first byte byte one. You call the first byte byte zero which shifts all the numbers down by one. This makes it look like you are targeting the wrong number.

Go Up