Thanks Austin, PM incoming!
Kev, that's a friggin cool avatar pic.. and TNG will always be my favourite Star Trek, I watched it every week when it aired, loved it.
This week I got a code push from Frank and was able to finish my bitcrusher patch.. I'm gonna put up a skeleton version of it here with 4 different bit depths, just in case anybody reading this thread is into the programming like Austin and I.
This program goes through 4 different bitmask settings and you should experiment with them, there's more than one way to crush the bits, I like this way though, especially at the lowest settings, I love the weird sweep it gives when you palm mute and hold it. (sorry the formatting went funny, it's nice and straight in the assembler!)
Code: Select all
;Bitcrusher with variable bit depth: POT1 = Bit Depth
;equate registers
equ positive reg0
equ negative reg1
equ crushedpos reg2
equ crushedneg reg3
;bitmask values
equ crush1 %1111_1111_1111_1111_1111_11 ;define the bit mask = 22bit, DEPTH1
equ crush2 %1111_1111_1111_1111_1111 ;define the bit mask = 20bit, DEPTH2
equ crush3 %1111_1111_1111_1111_11 ;define the bit mask = 18bit, DEPTH3
equ crush4 %1111_1111_1111_1111 ;define the bit mask = 16bit, DEPTH4
;read adc, save positive and negative samples to separate registers
clr ;clear the acc
rdax adcl,1 ;read in left adc
skp neg,1 ;skip next instruction if negative
wrax positive,0 ;write positive samples to 'positive' register for crushing
wrax negative,0 ;write negative samples to 'negative' register for crushing
;prepare POT1 for Bit Depth control
clr ;clear the acc
rdax POT1,1 ;read in POT1
skp zro,DEPTH1 ;if zero skip to DEPTH1
sof 1,-0.333 ;subtract a value, adjust for even spacing through rotation
skp neg,DEPTH2 ;if neg skip to DEPTH2
sof 1,-0.333 ;subtract a value
skp neg,DEPTH3 ;if neg skip to DEPTH3
sof 0,0 ;force to zero
skp zro,DEPTH4 ;if zero skip to DEPTH4
;crush and save the positive samples, invert and crush and invert and save the negative samples
DEPTH1: ;first bit depth = 22bit
clr ;clear the acc
rdax positive,1 ;read in 'positive' register
and crush1 ;and with crush1
wrax crushedpos,0 ;write to 'crushedpos' register and zero the acc
rdax negative,1 ;read in 'negative' register
sof -1,0 ;invert the sample
and crush1 ;and with crush1
sof -1,0 ;invert it back
wrax crushedneg,0 ;write to 'crushedneg' register and zero the acc
skp zro,OUTPUT ;skip to OUTPUT
DEPTH2: ;second bit depth = 20bit
clr
rdax positive,1
and crush2
wrax crushedpos,0
rdax negative,1
sof -1,0
and crush2
sof -1,0
wrax crushedneg,0
skp zro,OUTPUT
DEPTH3: ;third bit depth = 18bit
clr
rdax positive,1
and crush3
wrax crushedpos,0
rdax negative,1
sof -1,0
and crush3
sof -1,0
wrax crushedneg,0
skp zro,OUTPUT
DEPTH4: ;fourth bit depth = 16bit
clr
rdax positive,1
and crush4
wrax crushedpos,0
rdax negative,1
sof -1,0
and crush4
sof -1,0
wrax crushedneg,0
skp zro,OUTPUT
;prepare crushed signal for output to dac
OUTPUT:
rdax crushedpos,1 ;read in 'crushedpos' register
rdax crushedneg,1 ;read in 'crushedneg' register
wrax dacl,0 ;write output to left dac
I set up my bitcrusher patch with 1 pot for gain, 1 pot for bitcrushing through 6 masks, and the third pot controls Frank's aliaser... sounds awesome.
I'm thinking the patches will go like this, each with 3 digital controls used in combination with the analog mix, volume, treble:
1 - Digital Tube Screamer - low to medium gain, filters set at the TS hump of 720Hz, controls for gain, midrange, maybe gate. still working on it
2 - High gain - medium to high gain, controls for gain, filter, gate
3 - Very high gain - high to higher gain, controls for gain, filter, gate
4 - Bitcrusher with sample rate reduction - controls for gain, bitcrush depth, sample rate
5 - Distortion with delay - highish gain with simple delay, controls for gain, delay rate, feedback or delay level, still working on it
6 - Distortion with reverb - highish gain with long reverb, controls for gain, reverb decay, reverb level
7 - PItchshifter with gain - one octave up/down pitch shift, controls for gain, pitch, gate
8 - still pondering
I was thinking a couple other things.. one thing.. all the patches that have an effect combined with them will be able to be used with 0 gain. When you turn the gain knob all the way down it goes to your dry signal level, no gain at all, and you can use the mid boost, mid filter, sample rate reduction, delay, reverb, and pitch shift all clean. Cool hey!
Other thing.. I'm thinking I'm just going to do the memory chip as an 8DIP rather than a smd chip like most guys are doing. I'm thinking that over time, I'm going to make new patches and tweak and perfect the old patches and if the memory chip was in a socket I could just send people new ones. Say in a year I make a new patch for this pedal, if a person was interested in it (and losing one old patch) I could pop a new memory chip in the mail to them and they could update their pedal.
Now I just need a cool name... I keep thinking stuff like the D'n'D (Digitals and Distortions) or the Distortion Adventurer or the Binary Brute... I don't know yet.