Anderaj Posted December 30, 2022 Report Share Posted December 30, 2022 I've been a long time user of MIDIBox64, on the PIC platforms. I realize this is old legacy hardware, but I recently repurposed some of the modules to use as a controller for the Arturia CS80 and Cherry Audio GX-80 soft synths. I've been ignoring this problem for a while,but I finally decided to look at it in more detail. My problem is that program changes don't work. No matter how I adjust the config file the MIDIBox64 will only send program change 0. Channel info is always correct. I will see C1 0, or C3 0, etc. but the 0 never changes, regardless of what program number is in the config file. I know this worked at one time - here's what I found: MIDIBox 64 V2.4f, MIOS V1.9H, running on a PIC 18F - program change doesn't work correctly. I went back and looked at the code for the 2.4 version that I had previously installed many years ago. I noticed I had created corrected hex file and then remembered I had edited the Midi_evnt.inc file and recompiled the application. I loaded my older recompiled 2.4 version and now program change works. In the excerpt below, you can see my correction note for version 2.4 Below that is the code for 2.4f, which won't send program change correctly. I thought in some earlier rev of the application Thorsten had a bug fix in the same inc module for program change. Has anyone else encountered this, or is this too old to even discuss? MBOX64 2.4 Midi_evnt.inc (corrected) MIDI_EVNT_Send_Cx ; Program Change MIDI_EVNT_Send_Dx ; Channel Pressure movff MIDI_EVNT0, WREG call MIOS_MIDI_TxBufferPut movff MIDI_EVNT1, WREG ;Changed to fix program change bug Dec 2015, Event1 andlw 0x7f call MIOS_MIDI_TxBufferPut rgoto MIDI_EVNT_Send_End --------------------------------------------- MBOX64 2.4f MIDI_evnt.inc MIDI_EVNT_Send_Cx ; Program Change MIDI_EVNT_Send_Dx ; Channel Pressure movff MIDI_EVNT0, WREG call MIOS_MIDI_TxBufferPut movff MIDI_EVNT_VALUE, WREG andlw 0x7f call MIOS_MIDI_TxBufferPut rgoto MIDI_EVNT_Send_End Quote Link to comment Share on other sites More sharing options...
TK. Posted December 30, 2022 Report Share Posted December 30, 2022 Last time I worked on this was 2012, so 10 years ago... ;-) MIDI_EVNT1 is a predefined value from the configuration, while MIDI_EVNT_VALUE is a variable coming from a controller (pot, encoder, button, ...) What kind of controller are you using to send the program change event? Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Anderaj Posted December 31, 2022 Author Report Share Posted December 31, 2022 Thanks for the quick response Thorsten. In past versions of the MIDIBox64, I used a momentary push button switch for program changes. I'd have a bank of 10 discrete momentary switches to choose my favorite 10 programs. In this version, I'm using a rotary switch for program changes, which may be part of the problem, but I did run an experiment with the latest configuration, eliminating the rotary switches. In my MIDIBox64 photo below, the rotary switches are on the right - Presets I & II. For the experiment I reassigned the momentary push button switch (sub wheel) on the left (in red) to be a program change. The push button program changes worked on my previous MIDIBoxes. Side note: the front panel says MIDIBox NG, but it's actually a 64. I have the hardware to make the NG, and will eventually replace the electronics behind this. In the config file I assigned that Sub Wheel button to select program 1F. I commented out the original button assignment When running MIDIBox64 2.4f, this is what I see when I push the button - each button push sends a program 0 change. When I load my modified code for version 2.4, with the altered MIDI_evnt.inc file, and using the same config file,this is what I get for each button push, which is what I would expect. It's been years since I looked at this problem, so I was trying to remember what I did. Playing with the new GX-80 synth got me thinking about it again. I was just curious if I'm doing something wrong here. The rest of the box works flawlessly. That said, it's a legacy system, and this is not a major problem for me - not worth spending a lot of time on. regards, AJ Quote Link to comment Share on other sites More sharing options...
TK. Posted December 31, 2022 Report Share Posted December 31, 2022 I think that the right fix would be in the mk_syx.pl script to copy $event_2 into $event_3 (which was always 0 for program changes), because this is the value which is picked up by MIDIbox64 2.4f Here the appr. change: https://github.com/midibox/mios8/commit/d32c65cf38aa874d04f6880a769ac174dbe46d72 Best Regards, Thorsten. P.S.: great frontpanel! :) Quote Link to comment Share on other sites More sharing options...
Anderaj Posted December 31, 2022 Author Report Share Posted December 31, 2022 Thank you Thorsten, I decided to use Front Panel Designer/Express for this latest MIDIBox. I reloaded the 2.4f version of MIDIbox64 and used your updated mk_syx.pl script. That solved the issue, program changes now work with the rotary switch selector. I see what you did, a much more elegant solution. Many thanks and a Happy New Year to you! regards, AJ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.