Jump to content

MIDIO128 problem


Per S
 Share

Recommended Posts

I have just finished building another DIN with 128 inputs. I tested this using a connector to fire four inputs simultaneously. Then I noticed the following firing pins 85, 86, 87, 88.

MIOS_v1_7

MIDIO128_v2_1

00198322   9  --     90    24    40    1  C  2 Note On    Pin 85

00198323   9  --     90    25    40    1  C# 2 Note On    Pin 86

00198323   9  --     90    26    40    1  D  2 Note On    Pin 87

00198324   9  --     90    27    40    1  Eb 2 Note On    Pin 88

 

0019847A   9  --     80    24    40    1  C  2 Note Off  

0019847A   9  --     80    10    5B    1  E  0 Note Off <----Pin 86 NOTE!!  

0019847B   9  --     80    26    40    1  D  2 Note Off  

0019847C   9  --     80    27    40    1  Eb 2 Note Off  

First idea was that the ini file is wrong, but it isn't, looks like this:

86 =  90 25 40   80 25 40   @OnOff

Is there something wrong with the hardware I just built? Tested with another known working DIN which I have used for years. Same problem! On second thought the DIN module only informs whether a pin has changed, there is no MIDI information.

I have been using the old MIDO128 with 16F in my project. Took my old core and hooked up the new DIN module. It works. Similar ini file is used.

  86 =  90 25 40   80 25 40    

(Interestingly the 16F version puts out the MIDI information in a different sequence)

MIDIO128_V1004 (16F)

00249EC3   9  --     90    27    40    1  Eb 2 Note On   Pin 88

00249EC4   9  --     90    26    40    1  D  2 Note On   Pin 87

00249EC5   9  --     90    25    40    1  C# 2 Note On   Pin 86

00249EC6   9  --     90    24    40    1  C  2 Note On   Pin 85

00249FC7   9  --     80    27    40    1  Eb 2 Note Off  

00249FC7   9  --     80    26    40    1  D  2 Note Off  

00249FC8   9  --     80    25    40    1  C# 2 Note Off  Pin 86 No problem  

00249FC9   9  --     80    24    40    1  C  2 Note Off  

It seem the only pin 86 has a problem when using a core with 18F. Could there be a problem in the PIC itself.

Per S

Additional information, another ini file:

0036A4DB   9  --     B4    24    7F    5  ---  Control Change     Pin 85

0036A4DC   9  --     B4    25    7F    5  ---  Control Change     Pin 86

0036A4DD   9  --     B4    26    7F    5  ---  CC: Data Entry LSB Pin 87

0036A4DE   9  --     B4    27    7F    5  ---  Control Change     Pin 88

0036A575   9  --     B4    24    00    5  ---  Control Change    

0036A576   9  --     80    10    5B    1  E  0 Note Off           Pin 86 <---- Note!!!

0036A577   9  --     B4    26    00    5  ---  CC: Data Entry LSB

0036A578   9  --     B4    27    00    5  ---  Control Change    

Core with 18F and MIOS

It seems that the "off" response is always "80 10 5B". In this case the ini file looked

as follows for Pin 86:

86 =  B4 25 7F   B4 25 00   @OnOff

Link to comment
Share on other sites

Hi,

oops! This is caused by a incomplete 16bit addition.

Bugfix: open "midio_midi.inc", search for following lines:

MIDIO_MIDI_PrepareDINEventOff
        ;; off event: add 3 to address
        movlw   0x03
        addwf   MB_ADDRL, F
MIDIO_MIDI_PrepareDINEventOn
and exchange it by:
MIDIO_MIDI_PrepareDINEventOff
        ;; off event: add 3 to address
        movlw   0x03
        addwf   MB_ADDRL, F
        movlw   0x00
        addwfc  MB_ADDRH, F
MIDIO_MIDI_PrepareDINEventOn

I will upload a new MIDIO128 release soon. If you have a special whish for this release (minor feature which could be useful for you), just let me know :)

Best Regards, Thorsten.

Link to comment
Share on other sites

Great! Now it works like a charm. Thanks for the offer but the MIDIO128 does exactly what I need, sending various MIDI messages in response to flipping a switch or pressing a key.

00013076   9  --     B4    24    7F    5  ---  Control Change     Pin 85

00013077   9  --     B4    25    7F    5  ---  Control Change     Pin  86

00013078   9  --     B4    26    7F    5  ---  CC: Data Entry LSB Pin 87

00013079   9  --     B4    27    7F    5  ---  Control Change     Pin 88

000130F0   9  --     B4    24    00    5  ---  Control Change    

000130F1   9  --     B4    25    00    5  ---  Control Change     <---- No more problem!

000130F2   9  --     B4    26    00    5  ---  CC: Data Entry LSB

000130F3   9  --     B4    27    00    5  ---  Control Change    

Thanks for an excellent product and outstanding support.

Per S

Link to comment
Share on other sites

John,

One crucial step was left out. After saving the changed .inc file you need to build a new main.hex file. This is done with MPLAB IDE (from www.microchip.com). After that convert to .syx and reload the MIDIO128 (not the MIOS).

I can send you an updated "main.hex" file if you want, just send me a mail.

Per S

Link to comment
Share on other sites

Per S,

I would appreciate recepit of the main.hex file if it is not too much trouble.

Sure is a strange conicidence that we would come upon the same bug at the same time??

I have been fighting wiring problems with my old console keyboards, and had run out of possible solutions to the sticking note problem. I had even gone back to Sven Meir of jorgan and asked if it possible could be a problem with jorgan. If you haven't taken a good look at jorgan, you should.  It is totally flexible!

Back to the console problems,  I read on one of the forums about corrosion on the silver contacts.  Evidently the original 12 volts and higher switching current kept the contacts clean.  With the midibox gear operating at 5vdc, corrosion will be a problem. What's your take on that?  (anyone reading this reply that has a comment to offer is welcome to jump in).

One last question - I originally planned to convert the existing swell pedal to operate as a volume control using resistors to create a coarse step variable resistor. That with 5vdc would get me a variable dc voltage to input to one of my midio128 cores.  In reviewing the .ini file sample, I don't see anything about analog inputs. I have the analog input card installed and ready to go.

Regards,

Johnc

Link to comment
Share on other sites

Johnc,

File is on its way. I was fortunate to have an extra known working DIN module with 128 inputs which made it easier to exclude the DIN module being at fault. Regarding switching current I don’t have any experience with the 5V switching. My analog organ has 12V and I took it down to 5V after the switch. Having 12V will easier overcome some resistance due to dirty contacts. I don’t think the 12V by itself will keep contacts cleaner. Future will tell.

Up to now I didn’t have any volume control over my MIDI ranks. These were percussion type, and I just pretended I was in a Pizza Parlor where these things are unenclosed anyway.

I made some code addition in the 16F core to read the swell pot with the A/D converter and send appropriate MIDI commands. This is not yet tried in real life but is working on my test bed. It requires some tuning since it has a tendency to send a lot of MIDI commands.

I have no idea how to do that in MIOS. That is too complicated for me.

Maybe Thorsten has a comment on the analog input?

Per S

Link to comment
Share on other sites

Maybe Thorsten has a comment on the analog input?

you only have to enhance the USER_AIN_NotifyChange hook in main.asm - the ain_example1 gives you some useful hints how to do this.

Best Regards, Thorsten.

Link to comment
Share on other sites

I read on one of the forums about corrosion on the silver contacts.  Evidently the original 12 volts and higher switching current kept the contacts clean.  With the midibox gear operating at 5vdc, corrosion will be a problem. What's your take on that?

I've been told that silver oxide is conductive so perhaps that won't be a problem. I've been told by the same person that the arcing that occurs when the contact is broken because of the inductive kickback of the magnet coils keeps the contacts clean. I do know that the 75 year old Wurlitzer console that I help maintain doesn't seem to ever have contact problems. Wish I could say the same for my 40 year old Rodgers with gold contacts. :( I don't think 12 volts rather than 5 is the issue. It is more likely inductive versus non-inductive switching and there's nothing you can do about that. I recall reading a suggestion to add a resistive load so that some meaningful current (100 mA?) was being switched.

I made some code addition in the 16F core to read the swell pot with the A/D converter and send appropriate MIDI commands. This is not yet tried in real life but is working on my test bed. It requires some tuning since it has a tendency to send a lot of MIDI commands.

I have no idea how to do that in MIOS. That is too complicated for me.

Another approach would be to use switch contacts of the type used to control swell shades. That will probably give you about a dozen inputs which will reduce the flood of MIDI commands. I reduce expression input to a dozen steps in the Miditzer to mimic swell shades. Recently I noticed that some sounds don't seem to react well to that. I realized that while swell shades have discrete steps, they also have considerable inertia so they are more continuous in effect than the 12 step switch input would suggest. So perhaps you need that flood of commands. Are you sure it will be a problem?

If you decide it is a problem, you might be able to reduce the range produced by the analog input. For example, instead of 0-127 use 0-12 and then make whatever receives the expression input more sensitive. Of course, you don't really want to go to 0 for expression because no organ can be turned off by expression control.

Link to comment
Share on other sites

Jim Henry,

Thanks for the input.

The 12 steps is not a problem. I understand what you are suggesting on the pedal end. I think that I have 12 steps on the swell pedal. I also understand about using midi notes for steps, however, what I don't understand is how the computer uses the switch contact to change the volume. What note/channel are you using for miditzer?

Regards,

Johnc

Link to comment
Share on other sites

Johnc, Jim,

Thorsten said you only have to enhance the USER_AIN_NotifyChange hook in main.asm.

Well, after looking at what was made in the example and compare that with the MIDIO128 application I decided to have a go at it. And would you believe, it works! Minimal effort actually.

Here is what I did:

1.      Connect a potentiometer between 5V and ground and connected the variable to directly to pin 2 (RA0) on the PIC via connector J5 A0. Somewhere in the documentation it says that no AIN module is required when only one pot is used.

2.      Added some code as suggested by Thorsten from his example, assembled, and made a sysex.

I have not found a way to include this in the .ini file so presently the MIDI events are those hardcoded in the application. Below is a print from MIDI-OX:

00C9F186   9  --     90    30    7F    1  C  3 Note On      

00C9F187   9  --     90    31    7F    1  C# 3 Note On      

00C9F188   9  --     90    32    7F    1  D  3 Note On      

00C9F189   9  --     90    33    7F    1  Eb 3 Note On      

00C9F4E8   9  --     90    30    00    1  C  3 Note Off    

00C9F4E9   9  --     90    31    00    1  C# 3 Note Off    

00C9F4EA   9  --     90    32    00    1  D  3 Note Off    

00C9F4EB   9  --     90    33    00    1  Eb 3 Note Off    

00CA00F6   9  --     B0    07    04    1  ---  CC: Volume  

00CA0119   9  --     B0    07    03    1  ---  CC: Volume  

00CA012F   9  --     B0    07    02    1  ---  CC: Volume  

00CA0141   9  --     B0    07    01    1  ---  CC: Volume  

00CA0150   9  --     B0    07    00    1  ---  CC: Volume  

I think the volume function has to be improved a little to suit our needs. There is a danger that the MIDI volume event will flood the system. One way is to take down the sending rate.

I will be happy to send you a MAIN.Hex file to try out. What I need is what channel you need.

Maybe we should continue this thread in the Midification section.

Per S

Link to comment
Share on other sites

Per S,

I think that you are correct. Someone else may be interested in your info.  

Why are there multiple entries for the volume? Does the PIC convert analog to digital and the digital number set the volume?  the "CO" is program change, "01" is the midi patch for volume, and the "00" thru "04" are volume levels inbetween 0 and 128?

I would very much appreciate the main.hex file. Won't be able to do anything with if very soon as we are going to the beach for the week. Taking 5 grandchildren, ages 1 year to 10. Should be interesting!!

I'll just have to dream about my organ project. Thats about the best I will be able to do. I plan to take by laptop so I may be able to get on line and tough base if I can get on the telephone line.

Regards,

Johnc

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

×
×
  • Create New...