MetaEvent help

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

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

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.

it hasn’t been clear to me, that you’re trying to modify the mb64e, because in C there is also the possibilty to add an event-table…

sorry, have to pass then, don’t know asm/mb64e enough :-\

my bad, i should have specified. i appricate your suggestions.

thanks,

luke

It’s very similar to the Double Note Example

Best Regards, Thorsten.

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

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

Best Regards, Thorsten.

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.