Closed polluxsynth closed 9 years ago
Seems great, I will merge it right away!
4) I think it's better to display the deadband adjusted value, to give the user visual feedback of what really happens, otherwise it could come up as broken/buggy. 5) That makes complete sense, division is really slow, 32bit ints are slow, freeform shifts are slow (not a multiple of 8) and there's not that much CPU time left!
2) You need to do the DAC offset adjustment procedure, it will fix it.
4) Ok, I'll see if I can have a look at this too. 5) There are several more places that division are used which could be changed too.
2) Ok, I'll try this and see how it goes. Do the pots on your machine register up to 99 (instead of 96 or 97) then?
One thing I thought of is to add rounding to the deadband calculation, as it stands the first step up from the middle value is smaller than down which I think is due to the calculations being rounded down. Not a big issue, but I'll see if I can check it quickly tonight.
I'll be out of town next week so it'll be a while before I get back to any major P600 work however.
I changed 4) on my branch already. For 5) I changed one in ui value display but didn't try to find them all.
Yes my pots go from 0 to 99, DAC adjustment was the first thing I did on my P600.
You mean a 16bit step? Don't bother, the DAC is only 14bit :)
Ok, I'm going to work on transposing the internal keyboard / arp then build a new alpha this afternoon I think.
Regarding the DAC adjustment, I assume you mean "DAC gain" (section 1-9 in the service manual)? If I remember the problem correctly it was not just upwards, it was also downwards that it didn't bend the correct interval. The display reads -50, but the actual value is apparently not really 0 when the pot is at the bottom. The difference wasn't great, but adding the 'guard band' feature fixed it, so that it now bends down exactly an octave when so requested.
You are right that there are only 14 bits used on the DAC of course (hadn't though of it), however, that would really just mean that the resulting value should be rounded up to the next 14 bit rather than next 16 bit step.
Regarding the 32-bit divisions, there are a couple of /=12 in computeBenderCV's which should be easy to fix, as well as a /=UINT16_MAX which maybe could be replaced by a =>>16, unless it really is necessary to divide by 65535 rather than 65536?
It occurred to me that if any rounding is to be done it needs to be done after scaling the bender value according to the current bend range (bender semitones), i.e. in computerBenderCVs() rather than in the deadband calculation.
I opened up the machine to check the DAC gain adjustment. First of all, strangely enough, the service manual says that machines with a Burr-Brown DAC71 fitted to not have the DAC gain trimpot R4333 mounted. Yet this machine does, despite having a DAC71.
Checking the adjustment procedure, it says to turn the mixer A knob (which I know is now osc A level only) fully up and check for a 4.9V reading a U426 pin 7,which is exactly what I get on my machine. So it would seem that this adjustment at least is ok. I still only get a max pot reading of 96 or 97 in the display. Odd.
Fiddling a bit with computeBenderCV's reveals that, as you suspected, adding rounding does not really make a difference, and furthermore, the most accurate octave bend at least on the machine I have is achieved with /=65535. So I won't be trying to change anything in this region for now anyway.
Sorry for the spam. Turns out (as should be expected) there's no practical difference between /=65535 and /=65536, the difference I thought I heard between then two was simply due to different calibration between the difference voices. So I will replace the /=65535 and /12 with shift preceded by (in the latter case) a multiplication operation.
These commits add a dead band for the bend wheel and zero-center parameters. This attempts to fix issue #24.
I've left the individual commits in place, feel free to squash them to one if you want to.
A couple of comments: