Jump to content

Recommended Posts

Posted

my new midibox is up and running, but i have some ptoblem in customizing meta event to get double notes to control sonar.

i know that there are some preset already done, but i'd lokle to change them to adapt to my setup.

in particular, i want to send a double note event like

G10 (sonar remote trigger) + f#10 (remote command, play, for example)

i opened the meta.inc file, and found this handler:

(i omit the non-interesting parts...)

MB64E_META_Handler_08

	;; META Event: "F0 0x" (enc) or "F0 0x 36 @OnOff" (Button - 36 may vary and is the second MIDI note)
	;; x = 08 to 0F

in the previous, it seems that if i vary the "36" i can send different second control notes ok, let's go ahead...

MB64E_META_Handler_DoubleNoteOn
	;; NOTE ON
	movlw	0x90		; send 0x90 (Note On Header, channel 0)
	call	MIOS_MIDI_TxBufferPut
	movlw	0x7f		; send 0x7f (g10) -- cakewalk needs this as MIDI Remote indicator
	call	MIOS_MIDI_TxBufferPut
	movlw	0x7f		; send 0x7F (velocity)
	call	MIOS_MIDI_TxBufferPut

in the previous i send the first note, the g10 that i need to start the remote control of sonar.
	movf	MIDI_EVNT1, W	; send content of second byte (08-0f)
	call	MIOS_MIDI_TxBufferPut
	movlw	0x7f		; send 0x7F (velocity)
	call	MIOS_MIDI_TxBufferPut

	rgoto	MB64E_META_Handler_DoubleNoteEnd

for what i understand, here it load the second byte of the meta event (the 08-0f) and send it as a midi control note.

BUT.......

in the beginning it seemed that i could change the note with the "36" in the meta event...

remember?

"F0 0x 36 @OnOff" (Button - 36 may vary and is the second MIDI note)

instead, the routine sends the 08 as the midi note!!!! (the byte that labels thi particular meta handler!)

how can i send the "36" as the note number midi event?!?

i tried in a lot of different manners, but without success...

help! :)

Posted

thanks!

now it works and it's good

i use MIDI_EVNT_VALUE  as you said and the first note on event is correctly sent.

this is sufficient for the sonar automatin.

but a minor problem is that the note is not turned off...

the note off routine (when i have also used MIDI_EVNT_VALUE ) sends a note off to C0 (i suppose it send the midi note number 0x00). ... why??

anyway, this is not so important! it'0s just to understand a little more!

Posted

MIDI_EVNT_VALUE is zero when the button is depressed, therefore it's normaly only useful for velocity or CC values

There are 16*128 = 2048 other possible meta events if you wouldn't rely on this variable

Best Regards, Thorsten.

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...
×
×
  • Create New...