Jump to content

MetaEvent help


lukas412
 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...