Jump to content

Problem with DIN128 function


Billmac
 Share

Recommended Posts

I have a strange problem with my MIDIO128 DIN function.  I'm using it with my SEEBURG piano/pipe organ conversion to MIDI.  When my machine plays a music roll (Style"A), there is a group of four consecutive notes that are not properly encoded in the data coming out of my core module for recording purposes.  All the other notes work just fine, and the MIDI decoding by the DOUT modules is all correct and functional.  Manually inputting data to these four inputs on the DIN module always gives the same result (it's not a noise problem).  I have switched chips and input connectors to the DIN module and also looked at the logic signal voltage levels going into the data pins of the register chips - they all check OK - no shorts or opens.  I also tried a freshly loaded new PIC18F452 chip.  Below are two listings - the first a list of the OUTPUT from MIDI-OX for several notes, starting with C5 and going to C#6.  The data for the notes  D#5,E5, F5, and F#5 is not encoded correctly, leaving notes turned on for long periods, depending on the music.  This happens with more and more notes as some pieces of music progress.  I think this problem did not exist when I used an earlier version of MIOS and MIDIO128.  I have a set of 10 selections that I recorded early 2007 from a music roll, without any errors.  I made sure the ...128.ini file has not been corrupted. Could there have been a new problem introduced with one of the upgrades?  This problem has the "flavor" of a stack overflow problem, pointer problem, register size problem.  It's interesting that it is "nibble" sized - 4 bits!

Please, anyone - have you seen this problem and know the solution or have some advice.

Note that the below files also show the versions of MIOS and MIDIO128 that I am using.

===> MIDI-OX Version: 7.0.0.365

===> Log Opened: Fri 18-Jan-2008 14:00:01 ===>

TIMESTAMP IN PORT STATUS DATA1 DATA2 CHAN NOTE EVENT             

000BE682  1  1    90    48    7F    1  C  5 Note On             

000BE6EE  1  1    90    48    00    1  C  5 Note Off             

000BE7B2  1  1    90    49    7F    1  C# 5 Note On             

000BE819  1  1    90    49    00    1  C# 5 Note Off             

000BE8D1  1  1    90    4A    7F    1  D  5 Note On             

000BE930  1  1    90    4A    00    1  D  5 Note Off             

000BE9F0  1  1    80    10    00    1  E  0 Note Off             

000BEA2E  1  1    90    4E    7F    1  F# 5 Note On             

000BEB0E  1  1    90    72    00    1  F# 8 Note Off             

000BEB76  1  1    80    00    00    1  C -1 Note Off             

000BEC3D  1  1    80    00    00    1  C -1 Note Off             

000BEC82  1  1    80    00    00    1  C -1 Note Off             

000BED6B  1  1    80    00    00    1  C -1 Note Off             

000BED9A  1  1    80    4E    00    1  F# 5 Note Off             

000BEE7F  1  1    90    4F    7F    1  G  5 Note On             

000BEEC8  1  1    90    4F    00    1  G  5 Note Off             

000BEF9C  1  1    90    50    7F    1  G# 5 Note On             

000BEFE0  1  1    90    50    00    1  G# 5 Note Off             

000BF0BA  1  1    90    51    7F    1  A  5 Note On             

000BF103  1  1    90    51    00    1  A  5 Note Off             

000BF23F  1  1    90    52    7F    1  Bb 5 Note On             

000BF279  1  1    90    52    00    1  Bb 5 Note Off             

000BF380  1  1    90    53    7F    1  B  5 Note On             

000BF3DA  1  1    90    53    00    1  B  5 Note Off             

000BF495  1  1    90    54    7F    1  C  6 Note On             

000BF4EF  1  1    90    54    00    1  C  6 Note Off             

000BF5D9  1  1    90    55    7F    1  C# 6 Note On             

000BF61B  1  1    90    55    00    1  C# 6 Note Off             

<=== MIDI-OX Log Closed: Fri 18-Jan-2008 14:00:15 <===

===> MIDI-OX Version: 7.0.0.365

===> Raw Log Opened: Fri 18-Jan-2008 13:54:46 ===>

90487F 904800 90497F 904900 904A7F 904A00 801000 904E7F 907200 800000 800000

800000 800000 804E00 904F7F 904F00 90507F 905000 90517F 905100 90527F 905200

90537F 905300 90547F 905400 90557F 905500 90567F 905600

<=== MIDI-OX Log Closed: Fri 18-Jan-2008 13:55:12 <===

Below is version of MIOS

MIOSStudio_beta7_2.jar

Below is version of midio128.

Version 2.1d

Bill McKeown

P.S.

I am now enjoying my music machine immensely, playing it from many downloadable MIDI files, including many "A" roll arranged music - thanks to this great forum and the creation of the hardware and software by TK.

Link to comment
Share on other sites

The data for the notes  D#5,E5, F5, and F#5 is not encoded correctly, leaving notes turned on for long periods, depending on the music.  This happens with more and more notes as some pieces of music progress. 

This sounds like it might even be a problem with your midi connections. Could be lots of things. How do you go with ain64_din128_dout128_v2_0.zip?

Edit:I would upgrade to the latest MIOS Studio also, you mentioned it's 7b2... What MIOS version is on the PIC?

Link to comment
Share on other sites

  • 3 weeks later...

Thanks for the quick reply, stryd.  The MIOS version I have loaded into the PIC is 1.9.  This was loaded from a download that also upgraded the boot loader that came with the PIC.  Since my last post I have tried combinations of versions of MIOS and Midio128 software.  One of them gave me perfect encoding of all the notes from the switch contacts (operated from the music roll or the keyboard) to MIDI data out of the PIC, but the decoding from a MIDI music source to the DOUT was garbage - trying to play all notes at once.  The fact the encoding was good confirms that there is a software problem and not hardware.  There seems to be a compatability issue with versions of MIOS and Midio128 software.  I am not into the C or assembly level aspects of the software, so I'm relying on "packaged" loads that work.  What I have almost works.  I downloaded the AIN....... software, but can't figure out the steps to make a loadable file from it.  There's no Midio.... .ini file to go with it.  I guess I'm over my head when it comes to the mechanics of compiling and creating new loadablle .hex or sysex files.  Any suggestions from you or others will be appreciated.

Billmac

Link to comment
Share on other sites

OK first off you might want to upgrade to MIOS 1.9f. Make sure you use mios studio in smart mode with wait for upload request, and get no errors.

One of them gave me perfect encoding of all the notes ... The fact the encoding was good confirms that there is a software problem and not hardware.

Fraid not. You could have an intermittent fault, or be using different configs, who knows. It's a good sign though :)

That's why the ain/din/dout app is handy, cause it'll just handle the buttons in a very basic manner, so it removes some room for errors. Open up main.h, and fill in the "Global definitions" section as per your hardware, save, and run make.bat. Upload that (as above) and see how it goes.

Link to comment
Share on other sites

  • 5 months later...

Thanks again for reply.  It's been awhile, but I've been getting everything else working on my Seeburg piano/pipe organ, and it plays beautifully either from music rolls or MIDI input.  However, my ability to record, i.e. output MIDI data to the PC from a music roll is still messed up.  I haven't been able to get a load into my PIC18 that works for both the DIN and DOUT functions.  I have tried upgrading to the latest MIOS 1.9f, MIOS STUDIO, MIDI-OX and the newest ain_midio128.  I can't figure out how to configure and compile with the AIN version.  There is a mention of an "example_ain_midio128" file, but I can't find it.  Could you (or anyone) please point me to it.

Thanks,

Billmac

Link to comment
Share on other sites

How many DIN and DOUT boards are you using? Are they in two chains or linked together as one long chain? Starting with the board closest to the Core as #1, what board are the problem inputs on? What pin numbers (0-31) on that board?

Something that looks odd to me is the appearance of true Note Off MIDI Command bytes. As I recall, MIDIIO128 does not generate such bytes.

Could you post the relevant portion of your INI file please?

Just for fun, could you try using other values in the affected portion of the INI file. Copying the relevant portion for the notes an octave lower might be a good test.

Are the wrong values as shown by MIDI-OX always the same? Are they the same in MIOS Studio?

(Stryd, this probably belongs in Midification.)

Link to comment
Share on other sites

Something that looks odd to me is the appearance of true Note Off MIDI Command bytes. As I recall, MIDIIO128 does not generate such bytes.

The MIDIO128 generates what's in the INI file. Here's an output from my MIDIO128.

TIMESTAMP IN PORT STATUS DATA1 DATA2 CHAN NOTE EVENT   
 0000E72D   9  --     90    3C    7F    1  C  4 Note On    
 0000E7FD   9  --     80    3C    00    1  C  4 Note Off   
 0000E892   9  --     90    3D    7F    1  C# 4 Note On    
 0000E8F8   9  --     80    3D    00    1  C# 4 Note Off   
 0000E9D9   9  --     90    3E    7F    1  D  4 Note On    
 0000EA7E   9  --     80    3E    00    1  D  4 Note Off   
 0000EB12   9  --     90    3F    7F    1  Eb 4 Note On    
 0000EB90   9  --     80    3F    00    1  Eb 4 Note Off   
 
Here's the corresponding INI file
##########################################
# Pin   # On Evnt # Off Evnt # Behaviour #
##########################################
   33 =  90 3F 7F   80 3F 00   @OnOff # D#4 Great
   34 =  90 3E 7F   80 3E 00   @OnOff # D4  Great
   35 =  90 3D 7F   80 3D 00   @OnOff # C#4 Great
   36 =  90 3C 7F   80 3C 00   @OnOff # C4  Great

I'm using MIDIO128 2.2B and MIOS 1.9. I have not updated the MIOS to the latest level. Have not seen any problems at all.

Link to comment
Share on other sites

I'm using MIDIO128 2.2B and MIOS 1.9. I have not updated the MIOS to the latest level. Have not seen any problems at all.

I should elaborate - the reason I suggested upgrading is also that there is a possibility the upload did not work properly last time. That's why it's important to use mios studio in smart mode and all that, just to confirm it.

The ain64_din128_dout128 app is fairly simple, just need to tell the app how many ain and dins you have, and recompile. Once you've replied to jim's post (which has good advice in it which you should follow) if you are not able to compile it as such, I'll know your setup and can do it for you.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Bill,

As mentioned by Per S,  The midi dump that you got from Midiox should match your .ini file.  I agree, you should re-check your .ini file.  Seems strange to me that you would get such a mixed up list. 

A couple of suggestions:

If your keyboard contacts are dirty and are not making good contact,  you can get repeat messages,  clean your contacts with a good solvent.  Also,  if the contact is not making at all, or your wiring is open, you will not get a message on the midiox dump. 

If midio128 is sending some of the messages accurately, then I would rule out mios and midio128. If the program was corrupt, you would not get anything.  I would concentrate on the .ini file,  keyboard contacts and wiring.

Lastly,  use the most recent apps software accross the board.  mios,  midio128, the current .ini file and start over.

Good Luck!

Johnc

Link to comment
Share on other sites

Thanks, everyone for your help!  At last I have a perfect operation.  I have narrowed the problem to loading errors using MIDI-OX to load the midio128 application program.  For MIOS I am loading the .HEX program with feedback, using MIOS.  Sometimes there are errors, but most of the time I get an OK on all checksums.  However, I do not have the ability with my software to create a .HEX file for the midio128.  I have been using the Perl script method to create a .syx file that I then upload, using MIDI-OX.  The SysEx load is open loop (no feedback) so I can't tell if I have a good load.

    Upon speculating that I was not getting good SysEx loads, I arbitrarily changed the buffer size from 256 to 512 in the MIDI-OX SysEx configure function for setting up the load parameters.  I got a perfectly operating load!  I then tried shorter delay times and reloading.  All I can say here is that these changes did no harm, because I could not successfully load a second PIC with a working program.

    Now that loading seems to be the problem, maybe it's because I'm using a USB-to-MIDI adapter?  Any ideas out there,  or maybe I should try to get what I need to create a .HEX file for the midio128_2_2b (that's the version I'm using, on PER S' suggestion).  Is there some way that MIOS_STUDIO can be used to load a SysEx file?  I am using version Beta7_5.  I assume that my file must be good because it has worked once.

    I am happy that I can now record the music roll music as it is being played.  I am nervous about not having a spare, programmed, PIC (my system uses only one).

    Thanks again all, for your support.

Billmac

Link to comment
Share on other sites

I have narrowed the problem to loading errors using MIDI-OX

Grr!

Make sure you use mios studio in smart mode with wait for upload request, and get no errors.

Sometimes there are errors, but most of the time I get an OK on all checksums. 

Fix those before you post about any other bugs...

However, I do not have the ability with my software to create a .HEX file for the midio128

The toolchain creates a hex file. Perhaps you're referring to the config? That should be in hex

Upon speculating that I was not getting good SysEx loads, I arbitrarily changed the buffer size from 256 to 512 in the MIDI-OX SysEx configure function for setting up the load parameters.

This is a known issue, search the forum for more info.

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