Hello guys!
well, recently i decided to try and build a midi controller, but starting from zero..
what i wanted is to have 8 knobs, analog ones, and 3 seven segment delays per knob, to show the value
2 additional displays to show which mode the box is in: if they’re off, it means that actual midi value is sent
if it display “Ch” then u can change the midi channel on the knob u turn, and the 3rd is “Cc”, where u can change the controller number on the knob. the modes are changed when u press 2 buttons, one for channel another one for controller number. and there is a 3rd button available, which is “assign”, when u r pressing “channel” button for example, hold it down , turn a knob to select its channel, and press “assign” , the midi channel will be assigned to the knob. same for cc.
so i designed a board, with the 26 displays, driven by 3 latches (74HC373) and a little main board consisting of a 18F452 , running at 10mhz with 4x PLL option on
i wrote the program on HiTech PIC C18
the display is working great, i put it on the tmr0 interrupt. with the driver i wrote, i only have to fill an array with appropriate data and its displayed.
using the 10bit adc, i connected the 8 pots to the pic directly. i’m using another interrupt to read the knobs, and when knob position has changed then send midi data.
but i am having a BIG problem with jittering
to get a relatively stable value i have to do more than 64 samples averaging, which takes a lot of time, so i’m loosing the speed at which midi is sent.. therefor - resolution.
i am wondering what could anyone suggest me to do to get rid of the jittering. i’ve been messing with this 5 days straight non stop, and still no luck ![]()
what i have is a bidimentional array, one value holding knob index, the other the average index
i tried doing it all the possible ways
first fill in all samples for knob 1, then average and if different than previous averaging, then send data. then go to next knob
also tried filling sample 1 for every knob, then sample 2 for every knob etc, and then average
still no luck
its too slow
i’ve been considering the idea of writing this in assembler, but i have really little experience with it so i am not sure it will be in any way efficienter.
how do people usually go in these situations ?
i can imagine there are different ways of cleaning up an unstable signal, but i’m running out of ideas…
any suggestion is welcome
cheers