Jump to content

Recommended Posts

Posted

Hello everyone,

I'm having a hard time figureing out how to make metaevents work how I need them to. I would like to know how to send two cc's at once from an encoder or a button, and also how to send an nrpn stream. I have looked at all the examples I can find, but I just dont understand assembler. If someone could help me out with some code I would really appriciate it.

Thanks,

Luke

Posted

Hi Luke,

how about trying C if you don't understand assembler (I don't understand Assember, too ;D)?

There are examples on the bottom of the C-Page @uCApps.de, which describe what you want to do (send CC's, send NRPN).

Or is there any particular reason, why you want to do this in Assembler?

Regards,

Michael

Posted

Well i dont want to do anything too fancy, and I thought this is why TK has built in the meta events section. I just want all the normal functions of the mb64e with a couple of custom things.

Posted

I always liked teachers that made me figure stuff out on my own. I finally got it. Im sure its not the most elegant technique, but it works for what I need.

Thanks.


;;MidiChannel 9 & 10
MB64E_META_Handler_00
	;;Send first midi CC with fixed value
	movlw	0xB8		; send 0xb0 (Controller Header, channel 9)
	call	MIOS_MIDI_TxBufferPut

	movf	MIDI_EVNT1, W
	call	MIOS_MIDI_TxBufferPut

	movlw	0x7F	; send 127
	call	MIOS_MIDI_TxBufferPut

	;;Send second midi CC with incremental value
	movlw	0xB9		; send 0xb0 (Controller Header, channel 10)
	call	MIOS_MIDI_TxBufferPut

	movf	MIDI_EVNT1, W
	call	MIOS_MIDI_TxBufferPut

	movf	MIDI_EVNT_VALUE, W	; send enc/button value, stored in MIDI_EVNT_VALUE
	call	MIOS_MIDI_TxBufferPut

goto	MIOS_MIDI_BeginStream	; end stream and exit

Posted

it's fine - as you can see, now you should have the possibility to send any MIDI event without asking for code snippets :)

Best Regards, Thorsten.

  • 4 weeks later...
Posted

Would you be so kind and document your NEED and SOLUTION on the wiki?

Somebodey ought'a know where to link such page in WIKI.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...