Jump to content

Note-off on midio128 on Pause


Recommended Posts

Have just finished an integrated core and 64 note d-out board for my midi pipe organ. All works fine on my PalmVx, midi keyboard, Casio FDD player, cakewalk etc. However, I tried it on the SD Card midi player. If the pause is pressed, it stops playing but does not turn off the notes that are playing. I have tested all the equipment on MidiOx. This shows that all the players send an individual note off when paused, and then a block of control codes. With the SD player, it just sends the block of control codes. This works fine on a commercial J.Wale midi out card. Can the midio 128 be coded to accomodate this?

Link to comment
Share on other sites

like TK said, you can parse the midi input and look for the all-notes off CC7B.

Using an IF statement you can then turn off all of the outputs individually within the IF statement.

for example:

in the ain64_din128_dout128_v2_0 application you would put the IF statement in the MPROC_NotifyReceivedEvnt function.

This IF statement is contained in the main.c file.

Link to comment
Share on other sites

Thank you for your reply David. However, I have no knowledge of the programming necessary and can only approach the problem from a "common sense" Point of view. I am using MIDIO128_v2_1d. Could you please show the necessary code and indicate where it should be included in the MIDIO128 main.asm. I can then create the new hex file in MPlab.

Link to comment
Share on other sites

I moved it to the assembler section.

If there isn't another volunteer, I will do the changes in MIDIO128. It shouldn't be so difficult, just need some time for testing (e.g., the inversion flags have to be taken into account)

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 2 weeks later...

Hello TK

Thank you very much for spending time.

I'd just tried. I uploaded the new setup midio 128 with Mios Studio, turned the "all note off " command on channel 1 in the Midio 128.ini, transformed it in sysex  file with Perl, and uploaded to the core with Midiox. I made a little midi sequence in Cubase with long notes on channel 1 and inserted a CC123 before the end of notes. All is working but the CC123 seems to be ignored, the test leds turn off only at the end of the notes. Perhaps I did something wrong ?

Bonne soirée à tout le monde !

Christian

Link to comment
Share on other sites

Hi Christan,

it would be interesting, which CC value is sent. CC#123 0 should be ignored, values > 0 should turn off the LEDs. Can you confirm this?

In order to doublecheck, if the configuration of the channel setting was successful: use the debug window if MIOS studio to read out address "0x8c" - it should contain 0x01

You can also write to this address. 0x00 will disable the feature, 0x01 will set it to channel 1, 0x02 to channel 2, etc...

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Thorsten !

Many thanks for fast reply !

Yes I'd already tried with different values of CC123.

I've change values in the PIC, as you indicated, with debug interface of Mios Studio, it's now working fine !

But, after turning off / turning on  the board, CC123 is ignored,  the adress 0x8C has come back at 0x00 !

How can I get it allways in memory ?

Sorry for so naîve questions, I'm beginner in electrinics and programming, but I learn, I learn ! ! !

Have a good day

Chris

Link to comment
Share on other sites

HI again Thorsten !

After looking everywhere, I found my error. Just forgot to change the midio128.pl file in the Perl directory, so the CC123 change was not stored in the sysex files. I can say now all is working fine !  :D Even after a reset,  a CC123  turns off all the notes on.

Thank you very much for help. Now, for security, I'm going to put a CC123 at the end of all my midi sequences.  Just a little problem (or perhaps not), one of my 3 Midio 128 boards is runing under 2 MIDI channels. Is it possible to get the all note off for 2 different midi channels ?

Regards

Chris

Link to comment
Share on other sites

I must thank you for your time and effort T.K.

I have managed (eventually !!) to master the minefield of compiling the new hex file, with all the necessary utilities, I then applied the new sysex patch, created from the MK_Midio128.ini file, and the core will now respond to #CC123 to turn the notes off.

But...... It will only turn off the notes for the one channel it is set for, and it seems that the #CC123 must be given a value of > 0.  Is this the case ?

Regards

Busker99

Link to comment
Share on other sites

Hello Chris,

Yes I had noted T.K's reply.

According to most of the geeks and pundits on the web, it seems that the midi standard is not rigid and many manufacturers interpret the control codes to suit their own convenience. However, the SD player sends it's control codes with a zero value, according to the cakewalk "logging" I received from John Smith. I will get him to confirm this. It would seem that the answer is for the SD player software to send individual "note-off" commands for all the notes playing, before it pauses, just like all the other equipment I have tried. The other (Commercial) midi card, by Omega Electronics, does respond to these commands.

So, we still have the problem it seems.

Regards

Ian - Busker99

Link to comment
Share on other sites

Hello Ian

You'r right, I've Just reed on my big MIDI book that recommandation for sequencer (harware or software) is, before to stop, sending 127 note-off messages on each channel and then, one all note-off message (CC123). If so, the midio 128 must stop the note-on, does it?

Regards

Chris

Link to comment
Share on other sites

Yes

If you prefer an "Omni" mode (this is also the answer to Chris' request), the source code has to be (slightly) modified - are you able to recompile the source code? Then I could simply tell you the changes. Otherwise I've to create a new release

And yes, value 0 has no effect. The MIDI spec doesn't make clear, if this is desired or not. Here again: a simple code change (removing the condition) will help

Does your sequencer send CC#123 with value 0? Then I will disable the check in the next release.

Best Regards, Thorsten.

Link to comment
Share on other sites

Hello T.K.

Yes, If you can modify and produce a new asm file, I can recompile the hex.

Ideally, It needs to turn off all notes on all channels on receipt of a #cc123, with a value of 0. Would be great if it could also responded to a #cc120, of value 0.

Thank you, once again, for sharing your time and expertise with us all.

Regards 

Busker99 - Ian

Link to comment
Share on other sites

Ok :)

Open midio_midi.inc, search for following section:


;; if All Notes Off CC active: check it here
SET_BSR MIDIO_BASE
movf MIDIO_ALL_NOTES_OFF_CHANNEL, W, BANKED
bz MIDIO_MIDI_NotifyReceivedEventNC ; ignore if channel value == 0
addlw -1 ; MIDI channel = channel value - 1
andlw 0x0f
iorlw 0xb0 ; check for CC | <channel>
xorwf MIDIO_LAST_RECEIVED_EVNT0, W, BANKED
bnz MIDIO_MIDI_NotifyReceivedEventNC
movf MIDIO_LAST_RECEIVED_EVNT1, W, BANKED ; check for CC#123
xorlw 123
bnz MIDIO_MIDI_NotifyReceivedEventNC
movf MIDIO_LAST_RECEIVED_EVNT2, W, BANKED ; check for value > 0
bz MIDIO_MIDI_NotifyReceivedEventNC
MIDIO_MIDI_NotifyReceivedEventNO
goto MIDIO_DOUT_ClearAll ; set all DOUTs to passive state
MIDIO_MIDI_NotifyReceivedEventNC
[/code] and replace it by:
[code]
;; if All Notes Off CC active: check it here
SET_BSR MIDIO_BASE
movf MIDIO_ALL_NOTES_OFF_CHANNEL, W, BANKED
bz MIDIO_MIDI_NotifyReceivedEventNC ; ignore if channel value == 0

        ;; react on any channel (omni mode)
        movf MIDIO_LAST_RECEIVED_EVNT0, W, BANKED    ; check for CC
        andlw 0xf0
        xorlw 0xb0
bnz MIDIO_MIDI_NotifyReceivedEventNC
movf MIDIO_LAST_RECEIVED_EVNT1, W, BANKED ; check for CC#123
xorlw 123
bnz MIDIO_MIDI_NotifyReceivedEventNC
MIDIO_MIDI_NotifyReceivedEventNO
goto MIDIO_DOUT_ClearAll ; set all DOUTs to passive state
MIDIO_MIDI_NotifyReceivedEventNC

I think, that it isn't required to parse for CC#120 in addition - one CC is enough to deactivate all DOUTs

Best Regards, Thorsten.

Link to comment
Share on other sites

Hello Thorsten !

Many thanks for work, all is fine now. :D

For test I've set my midio on 8 different channels; I can say now that a CC123 of any value stops all notes on all channels. Not tested on 16 channels though but it must work as well :)

I'm now considering I must learn programming Pic. Everywhere it's told it's very easy, only 35 instructions to learn.... But, when reading Midio128 programm, doesn't seem so easy    ???  If at least I could be abble to change litle things by myself...

Thank you once more

Best regards

Chris

Chris

Link to comment
Share on other sites

Hello T.K.

Thank you for all the help you have given with the note off problem. It now works fine, turning everything off on receipt of #CC123. My first thoughts on using the new GPUtils was utter confusion, but after some rational thought, it now seems to be doing what I want.

It seems, from looking at some of the other Perle scripts, that it might be  possible to convert syx files back to asm. This would be useful for checking the scale and options when there are problems. Could anybody offer some guidance on how to achieve this ? I tried to follow the same proceedure as for making the syx file, with 'Make' but all I got was.......................

Regards - Busker99

Ian

Link to comment
Share on other sites

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...