Jidis Posted June 5, 2006 Report Share Posted June 5, 2006 Hi,I hate to be lazy about this, but it's 6AM here. :-XIs there a simple means of flipping the direction of pot travel in one of the MB64/MIOS files (pots.inc maybe)?. To meet my usual quota for the minimum of one careless mistake per PCB, I've got a small switch/light/pot board now, with the 5v and ground lines reversed to the pots, so they all go counter-clockwise to get from 0-127. Sounds easy enough to fix, but they (the grounds) are also tied into three switches and three resistors for some LED's on that same board, so there's no really clean place to flip the main lines, without getting all that crap involved.I'll look at the traces tomorrow when I can think again, but if it's something that can be knocked out in software, it would be a relief. This box doesn't even need a display, and the app will be more or less permanent and simple (7 pots, 3 LED's, 3 buttons).Much Thanks,George I've been fighting with other parts of this current box all night and Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 5, 2006 Report Share Posted June 5, 2006 XOR it? Quote Link to comment Share on other sites More sharing options...
Jidis Posted June 5, 2006 Author Report Share Posted June 5, 2006 stryd_one,Thanks! I figured I could resort to that sort of stuff, but didn't know if maybe Thorsten had a "range" pref in one of the files or something you could just reverse, to get the values turned around.If you've got a minute, where would be the obvious "safe" place to do that, where it wouldn't risk screwing up any other reg. contents or flags?Thanks Again,George Quote Link to comment Share on other sites More sharing options...
Jidis Posted June 5, 2006 Author Report Share Posted June 5, 2006 stryd_one (or anyone else),I tried tossing an XOR in the pots file, within that section on scaling. Seems to work fine at the top of the section:;; --------------------------------------------------------------------------;; This function scales a 7bit value depending on a min and max value;; If the min value is <respectfully truncated>;; o scaled value in WREG and MIOS_PARAMETER1;; USES: MIOS_PARAMETER1 and MIOS_PARAMETER2;; --------------------------------------------------------------------------MB64_POT_ScaleValue ;; save pot value in MIOS_PARAMETER1 xorlw 0x7f movwf MIOS_PARAMETER1However, I remember from trying to add a button mode to the source a while back, getting everything working with some weird source tweaks, and later finding one area/page or something where the new item didn't make it into the program flow.With the XOR placed there, am I safe at *all* points where the pot values might be used, or should I move it somewhere else?Much more thanks,George Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 6, 2006 Report Share Posted June 6, 2006 Seeing as the wiring error is global to all of your AIN's I'd recommend doing it at the USER_AIN_NotifyChange ... But it's higher resolution there so the math will be heavier. I'd leave it where it is while it works :) Quote Link to comment Share on other sites More sharing options...
Jidis Posted June 6, 2006 Author Report Share Posted June 6, 2006 Thanks again,I'll probably tinker with that one now too, just to see what it does. :-*It was good to see the other one get changed so easily and work. The time I spent playing with the button mode and weird LCD layouts on another box was a PITA >:(. Felt like there was always some area of the app where the change wouldn't end up working right, or wouldn't get called at all.That XOR in the pots file will probably suffice. This thing's an EQ, and nothing more :). I may try to get in and look at the actual scaling/range stuff again to fix an issue with the crossover points on some stepped controls. I don't know if it's an unavoidable part of the VST spec. or something, or if the plug developers can control it, but the highest range of the stepped controls actually gets triggered at the value of 127(!). I guess that means if there's even the slightest bit of jitter on the pot line while it's at 127, or if you should bump the controller with your knee or stare at it for too long, it's going to jump down a notch into the previous value. Probably be nice to have it quantize anything over 120 (there's 4 to 6 steps in my case) up to a full 127.Take Care,GeorgePS- I also wish I could have gotten by without using three 16 pin IC's for the i/o. I haven't done the main board yet, so I'll probably at least dump the 4051 and go direct to the core for the 7 pots, but there's only 3 buttons and 3 lights, so I've got a full 595 and 165 in there. I've got some boards from a JLCooper controller here, where it seems they had a 4051 and maybe a 74**164(?) for each of the 8 channel sections, and they had mixed up the pot/switch/light arrangement somehow, so that the same shift/mux chip was handling two different tasks. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 7, 2006 Report Share Posted June 7, 2006 If you want to quantise it you can AND out the last bits... 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.