WMD Geiger Counter - [gut shots]
- andrej
- Solder Soldier
Information
- Posts: 159
- Joined: 28 Dec 2008, 00:23
- my favorite amplifier: Vox AC30
- Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff - Location: montenegro
- Has thanked: 6 times
- Been thanked: 51 times
- Contact:
GREAT!
i just have to finish what i promised - a redo of my midi switcher project, and we'll be on this next weekend! shouldn't take long!
i just have to finish what i promised - a redo of my midi switcher project, and we'll be on this next weekend! shouldn't take long!
- andrej
- Solder Soldier
Information
- Posts: 159
- Joined: 28 Dec 2008, 00:23
- my favorite amplifier: Vox AC30
- Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff - Location: montenegro
- Has thanked: 6 times
- Been thanked: 51 times
- Contact:
figured out on paper how to do everything the original device does with just a small (smd) xmega chip, an opamp and a chip. also, the max samplerate is higher.
now, i just need to finish my other project (gonich) and this will be done quickly. i need to find a way to incorporate presets, but with an intuitive interface.
i was thinking: i could use digital pots for those analog controls, and then do all of the editing with an encoder, a couple of buttons and an LCD display... and have 3 footswitches on a 1590bb - bypass, preset up, preset down. does that make any sense? i'd implement a CV/exp pedal port you could assign to any setting, analog or digital.
as for square hole drilling (for the display), i was thinking about drilling 4 corner holes (small ones, 1mm) and then inserting diamond wire through and then hand-sawing the cuts with the wire.
when i'm done with this project, i'll make a similar (but WAY better and more featured) commercial device (it will be a waveshaper and that's where the similarity ends).
now, i just need to finish my other project (gonich) and this will be done quickly. i need to find a way to incorporate presets, but with an intuitive interface.
i was thinking: i could use digital pots for those analog controls, and then do all of the editing with an encoder, a couple of buttons and an LCD display... and have 3 footswitches on a 1590bb - bypass, preset up, preset down. does that make any sense? i'd implement a CV/exp pedal port you could assign to any setting, analog or digital.
as for square hole drilling (for the display), i was thinking about drilling 4 corner holes (small ones, 1mm) and then inserting diamond wire through and then hand-sawing the cuts with the wire.
when i'm done with this project, i'll make a similar (but WAY better and more featured) commercial device (it will be a waveshaper and that's where the similarity ends).
- devastator
- Cap Cooler
any progress on this project ?
I myself played around with digital VCO and bitcrushing, sampling rate and internal modulation things with an AVR 8bit. Way too slow for serious work (unless one want somes nasty distortion/aliasing added to it) but can be really dirty and nice for noise thing.
I myself played around with digital VCO and bitcrushing, sampling rate and internal modulation things with an AVR 8bit. Way too slow for serious work (unless one want somes nasty distortion/aliasing added to it) but can be really dirty and nice for noise thing.
- devastator
- Cap Cooler
all the interest for this is dead ?
can someone explain the relation between the wavetable and the incoming signal ?
can someone explain the relation between the wavetable and the incoming signal ?
- Space Jm
- Breadboard Brother
The incoming signal is digitalized with a AD converter : ADS7816.
Then it feeds the µC and it is combinated with the wawetables such as :
Y (out) = Wavetable (x : input).
We do not really how x is mixed with the wave tables...
The code must be reverse for that, not very easy to do
Then it feeds the µC and it is combinated with the wawetables such as :
Y (out) = Wavetable (x : input).
We do not really how x is mixed with the wave tables...
The code must be reverse for that, not very easy to do
Together we stand, divided we fall
- FiveseveN
- Cap Cooler
Information
Looks like the wave table simply defines the transfer function, though I don't know how it's actually implemented (lookup tables?).
Ignorance more frequently begets confidence than does knowledge. (Charles Darwin)
- devastator
- Cap Cooler
certainly look up table I think.Looks like the wave table simply defines the transfer function, though I don't know how it's actually implemented (lookup tables?).
There's no mixing of the DAC signal with the original signal ?Then it feeds the µC and it is combinated with the wawetables such as :
I've played around yesterday with bitcrusher/sampling_rate reducer with an atmega clocked at 16mhz for my modular system. Although the resolution was very crusty-crusty, it could do the job for digital crapiness guitar purposes. But I think the most interesting part is in the interaction with the wavetables.
I'll try to mess around with wavetables and bitwise operators.
But I wonder if the Uc in it isn't something like the atxmega or a processor clocked way above 16mhz (which is rater poor samplingrate wise)
- Space Jm
- Breadboard Brother
No mixing of the dry signal, the architecture is this one :
Incoming signal => buffer => OAmplifier => Tone => ADS7816 => µC => DA (TLC 5615) => out
The ovedriver sound is done by the gain of the OA.
The µC is an ATMEGA 644 QFN package, the SW is loaded trought ICSP connector
The crystal is a resonator in fact 16Mhz
PCB : dble side, smd components up to 0603 package.
It is really a very complex pedal, I have spend hours to do something like the Geiger, I have never succeed.
Incoming signal => buffer => OAmplifier => Tone => ADS7816 => µC => DA (TLC 5615) => out
The ovedriver sound is done by the gain of the OA.
The µC is an ATMEGA 644 QFN package, the SW is loaded trought ICSP connector
The crystal is a resonator in fact 16Mhz
PCB : dble side, smd components up to 0603 package.
It is really a very complex pedal, I have spend hours to do something like the Geiger, I have never succeed.
Together we stand, divided we fall
- Pruttelherrie
- Solder Soldier
For quick experiments the Reaper/Jesusonic combo can be handy!
I had a short try at it yesterday evening, but I had no hardware lying around so it was a software-only exercise.
Some thoughts and remarks:
* a compressor or overdrive might be needed to get rid of high dynamic range signals
* the code below assumes a symmetrical wavetable
* in my experiments most waves sounded the same, like digital distortion
* this is my first venture into jesusonic
I had a short try at it yesterday evening, but I had no hardware lying around so it was a software-only exercise.
Some thoughts and remarks:
* a compressor or overdrive might be needed to get rid of high dynamic range signals
* the code below assumes a symmetrical wavetable
* in my experiments most waves sounded the same, like digital distortion
* this is my first venture into jesusonic
Code: Select all
// This effect Copyright (C) 2015 Pruttelherrie
// License: GPL - http://www.gnu.org/licenses/gpl.html
desc: look up table based processing
slider1:0<-12,6,1>pre-gain (dB)
slider2:0<-12,6,1>post-gain (dB)
@init
gfx_clear = 256*256*256-1;
gfx_x = 0;
gfx_y = 255;
depth = 2 ^ 8;
i = 0;
// build lut arrray of size 'depth'
loop(depth,
// please note: index i goes from 0-255
// but the (float) values go from 0-1!
lut[i] = i/(depth*3)*(sin(i*$pi*12/depth)/1+0.5)+(i/depth)/2;
i += 1;
);
@gfx 256 256
i=0;
loop(depth,
gfx_lineto(i, depth - lut[i] * depth);
i += 1;
);
@slider
pregain = 2 ^ (slider1 / 6);
postgain = 2 ^ (slider2 / 6);
@sample
// lut is symmetrical, so use abs() and sign()
spl0 = sign(spl0) * postgain * lut[ pregain * abs(spl0) * depth ];
spl1 = sign(spl1) * postgain * lut[ pregain * abs(spl1) * depth ];
- andrej
- Solder Soldier
Information
- Posts: 159
- Joined: 28 Dec 2008, 00:23
- my favorite amplifier: Vox AC30
- Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff - Location: montenegro
- Has thanked: 6 times
- Been thanked: 51 times
- Contact:
I've looked into this. You can clone the pedal easily in a week or so if you'd like. I have no time ATM, and I don't want to just clone it, but to add a digital filter, envelope, presets and midi control.
Waveshaping IS linear and nothing to do with the time domain.
I believe that Geiger counter does it with lookup tables, and I sure as hell would do it like that, since it's the simplest way.
At a certain sampling frequency, the signal is passed into the microcontroller from the ADC as a stream of 8bit numbers (0-255 or -128-127, doesn't matter) we'll call samples. Waveshaping is just exchanging each sample with a different value. There are 256 different values a signal can take and each one of them is substituted for a value in a lookup table representing the waveform, which we see in the PDF. That means that each lookup table is just an array of 256 bytes, and to replace the value of 'x', you just read the array member with the index 'x'.
Pseudocode:
That's the core of it. No matter where in the wave (the phase), a '54' signal is (for example), it will always be replaced with a wavetable[54] (= 63, for example), which is always the same number for a single preset wave.
Now, you'd have to implement the timing and control with interrupts, and that's not a problem if you have experience with microcontrollers. You'd have to add multiple arrays for multiple waveshapes. Each one of them takes 256B of flash - 4 waveforms in a kilobyte. That means you MUST keep them in flash (PROGMEM is your friend). 644p has 64KB of flash, and they use 63KB of it for the waveforms (1K is for your code). You could then point a (PROGMEM, also) pointer to them, and access them via that pointer, reassigning it each time you change your wave. I'm not sure if they copy the wavetable into ram on preset load.
You could add more waveforms into EEPROM, but you'd definitely have to copy the whole wavetable of the preset each time you switch to it, because EEPROM's too slow for sample lookup.
Oh, and that means that you can rip the waveforms straight from the Geiger Counter. You just set the gain at unity, turn the filter off, set the sampling rate at the highest and turn downsampling / bitmasking off.
You output a slow, steppy rising sawtooth to the Geiger Counter from a microcontroller and record the output. Voila, you've got yourself a waveform.
If you don't want to risk analog imperfections, see how ADS7816 and TLC 5615 work and emulate them with a microcontroller, outputting a perfect 8bit sawtooth and recording the output.
If someone would draw the schematic, I'd write the code on weekends, and then you guys make your own waveforms.
Waveshaping IS linear and nothing to do with the time domain.
I believe that Geiger counter does it with lookup tables, and I sure as hell would do it like that, since it's the simplest way.
At a certain sampling frequency, the signal is passed into the microcontroller from the ADC as a stream of 8bit numbers (0-255 or -128-127, doesn't matter) we'll call samples. Waveshaping is just exchanging each sample with a different value. There are 256 different values a signal can take and each one of them is substituted for a value in a lookup table representing the waveform, which we see in the PDF. That means that each lookup table is just an array of 256 bytes, and to replace the value of 'x', you just read the array member with the index 'x'.
Pseudocode:
Code: Select all
int wavetable[256] = {2, 4, 3, ..., 207} //just some random numbers representing a waveform - 256 of them
while (true) { //repeat indefinitely
int inValue = adcRead();
int outValue = wavetable[inValue];
dacWrite(outValue);
delay(samplingPeriod);
}
Now, you'd have to implement the timing and control with interrupts, and that's not a problem if you have experience with microcontrollers. You'd have to add multiple arrays for multiple waveshapes. Each one of them takes 256B of flash - 4 waveforms in a kilobyte. That means you MUST keep them in flash (PROGMEM is your friend). 644p has 64KB of flash, and they use 63KB of it for the waveforms (1K is for your code). You could then point a (PROGMEM, also) pointer to them, and access them via that pointer, reassigning it each time you change your wave. I'm not sure if they copy the wavetable into ram on preset load.
You could add more waveforms into EEPROM, but you'd definitely have to copy the whole wavetable of the preset each time you switch to it, because EEPROM's too slow for sample lookup.
Oh, and that means that you can rip the waveforms straight from the Geiger Counter. You just set the gain at unity, turn the filter off, set the sampling rate at the highest and turn downsampling / bitmasking off.
You output a slow, steppy rising sawtooth to the Geiger Counter from a microcontroller and record the output. Voila, you've got yourself a waveform.
If you don't want to risk analog imperfections, see how ADS7816 and TLC 5615 work and emulate them with a microcontroller, outputting a perfect 8bit sawtooth and recording the output.
If someone would draw the schematic, I'd write the code on weekends, and then you guys make your own waveforms.
- devastator
- Cap Cooler
that must be it. I had a go few days ago, I inputed the guitar signal and the output via SPI DAC was very nasty (in a bad way). You've to love lo-fi stuff . I'll try your idea in the week (I've the atmega on breadboard).while (true) { //repeat indefinitely
int inValue = adcRead();
int outValue = wavetable[inValue];
dacWrite(outValue);
delay(samplingPeriod);
Nonetheless the sampling rate is quite low to let the µC do others things.
- andrej
- Solder Soldier
Information
- Posts: 159
- Joined: 28 Dec 2008, 00:23
- my favorite amplifier: Vox AC30
- Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff - Location: montenegro
- Has thanked: 6 times
- Been thanked: 51 times
- Contact:
I'll make a git project for this in the next few days, let's do something together.
I'm making a waveform drawing applet in JS at the moment.
I'm making a waveform drawing applet in JS at the moment.
- andrej
- Solder Soldier
Information
- Posts: 159
- Joined: 28 Dec 2008, 00:23
- my favorite amplifier: Vox AC30
- Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff - Location: montenegro
- Has thanked: 6 times
- Been thanked: 51 times
- Contact:
As promised, the first step:
a page for drawing and mathematically generating waves for inclusion in C code:
http://dl.dropboxusercontent.com/u/23975614/waves/waves.html
It's written in JS and it's not pretty, but it works perfectly.
You can import, draw, export, mathematically generate waves. Bear in mind that you have to scale your argument for functions to get them in your 256x256 window. For example, to fit a sine function in your window, you'd use f(x) = sin(3.14 * x). You'll see.
try this wave:
sqrt(pow(x,2))*sin(x*3.14*4)*cos(x*3.14*4)*2.2
I'll add mirror and flip capabilities when I have time.
Next week, we'll start a git repo and I lay the interrupt basics for sampling.
a page for drawing and mathematically generating waves for inclusion in C code:
http://dl.dropboxusercontent.com/u/23975614/waves/waves.html
It's written in JS and it's not pretty, but it works perfectly.
You can import, draw, export, mathematically generate waves. Bear in mind that you have to scale your argument for functions to get them in your 256x256 window. For example, to fit a sine function in your window, you'd use f(x) = sin(3.14 * x). You'll see.
try this wave:
sqrt(pow(x,2))*sin(x*3.14*4)*cos(x*3.14*4)*2.2
I'll add mirror and flip capabilities when I have time.
Next week, we'll start a git repo and I lay the interrupt basics for sampling.
- devastator
- Cap Cooler
very nice software !
maybe you could add fonction to "linearze" the waveforms and avoid distortion bit. But nonetheless very nice.
would you share the code ? I don't know what JS is.
Here's what I had in mind for the actual embedded solution : https://github.com/ThebigDickhead/AVR_P ... rush_disto
It's a bit rought a the moment, it's a tweaked code from a VCO idea that I took for trying things out. There's also some things for an internal LFO to do the bit reduction or the sample rate reducer (and actually work) in the box. I put a sinus into it (I didn't breadboard the input guitar part yet) and it worked as well.
Although I think the interupt should be kept very short and all the transformation should be done in the interval.
My main concern is about sampling the signal while still sampling the pot. as well. Certainly in sampling pots less often (100ms ?).
maybe you could add fonction to "linearze" the waveforms and avoid distortion bit. But nonetheless very nice.
would you share the code ? I don't know what JS is.
Here's what I had in mind for the actual embedded solution : https://github.com/ThebigDickhead/AVR_P ... rush_disto
It's a bit rought a the moment, it's a tweaked code from a VCO idea that I took for trying things out. There's also some things for an internal LFO to do the bit reduction or the sample rate reducer (and actually work) in the box. I put a sinus into it (I didn't breadboard the input guitar part yet) and it worked as well.
Although I think the interupt should be kept very short and all the transformation should be done in the interval.
My main concern is about sampling the signal while still sampling the pot. as well. Certainly in sampling pots less often (100ms ?).
- andrej
- Solder Soldier
Information
- Posts: 159
- Joined: 28 Dec 2008, 00:23
- my favorite amplifier: Vox AC30
- Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff - Location: montenegro
- Has thanked: 6 times
- Been thanked: 51 times
- Contact:
JS is JavaScript, a language commonly associated with web pages.
It's completely useless for microcontrollers, but I used it to write this utility for waveform generation. As such, you can see the code by pressing F12 on your keyboard (in firefox) and looking for wave.js among scripts. It's all there.
What you consider 'linearization' is in fact low-pass filtering ('reducing fast changes'). I can do it, no problem. That and waveform mirroring and such. I'll even add mathematical transformation, which will allow you to transform the existing array with a mathematical function.
As for sampling and code and stuff, I'm most comfortable writing it all from scratch.
I'll schedule a 60KHz timer interrupt which will do 3 things simultaneously:
we'll use some free open source spi/i2c library for ad and da converters (find some through-hole ones), because I'm not comfortable sharing mine for free and this is all 100% open-source, non-profit. that's about it. i'll write a python script that generates progmem arrays for waveforms from a json file and that's about it. we just add bitrate and masking controls and it's pretty much done. simple piece of kit.
in the end, i'll write a quick piece of avr/arduino code that emulates those ad/da chips the original uses and we can rip the waveforms over serial to the computer.
oh, and we should replace the 2-digit display with a 3-digit.
It's completely useless for microcontrollers, but I used it to write this utility for waveform generation. As such, you can see the code by pressing F12 on your keyboard (in firefox) and looking for wave.js among scripts. It's all there.
What you consider 'linearization' is in fact low-pass filtering ('reducing fast changes'). I can do it, no problem. That and waveform mirroring and such. I'll even add mathematical transformation, which will allow you to transform the existing array with a mathematical function.
As for sampling and code and stuff, I'm most comfortable writing it all from scratch.
I'll schedule a 60KHz timer interrupt which will do 3 things simultaneously:
- refresh the display
- count backwards from 2500 and poll pots (khmer rouge ), then reset counter
- count backwards from <period> to 0 and sample-process-output audio when it reaches 0, then returns <period> to its maximum value, which is controlled by the frequency pot. that means you have a range of frequency control between 60kHz and 234Hz.
we'll use some free open source spi/i2c library for ad and da converters (find some through-hole ones), because I'm not comfortable sharing mine for free and this is all 100% open-source, non-profit. that's about it. i'll write a python script that generates progmem arrays for waveforms from a json file and that's about it. we just add bitrate and masking controls and it's pretty much done. simple piece of kit.
in the end, i'll write a quick piece of avr/arduino code that emulates those ad/da chips the original uses and we can rip the waveforms over serial to the computer.
oh, and we should replace the 2-digit display with a 3-digit.
- Space Jm
- Breadboard Brother
Just a remark regarding your current work.
It looks very very good, but you know I worked many days and months on this project and the most difficult thing for me was more the hardware then the software.
I never succeed to do a good : AOP => ADS7816 => µC => DA (TLC 5615) => out
It always sounded nasty, fuzzy, thick..
May be I am not enough clever
I have tried to copy the Geiger schematic on that but it was very tricky because it is a double sides pcb and smd populated.
So we have to take care of the hardware part which is very tricky to get.
It looks very very good, but you know I worked many days and months on this project and the most difficult thing for me was more the hardware then the software.
I never succeed to do a good : AOP => ADS7816 => µC => DA (TLC 5615) => out
It always sounded nasty, fuzzy, thick..
May be I am not enough clever
I have tried to copy the Geiger schematic on that but it was very tricky because it is a double sides pcb and smd populated.
So we have to take care of the hardware part which is very tricky to get.
Together we stand, divided we fall
- andrej
- Solder Soldier
Information
- Posts: 159
- Joined: 28 Dec 2008, 00:23
- my favorite amplifier: Vox AC30
- Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff - Location: montenegro
- Has thanked: 6 times
- Been thanked: 51 times
- Contact:
that's because we need an anti-aliasing and a reconstruction filter.
http://en.wikipedia.org/wiki/Anti-aliasing_filter
http://en.wikipedia.org/wiki/Reconstruction_filter
here's an illustration why you need those:
AA filter:
if you allow a signal that's above 1/2 of the sampling frequency, what you see in the picture may happen: those higher frequency signals may be erroneously detected as lower frequency ones, and that's called aliasing.
reconstruction filter:
DAC output is stepped and needs to be filtered to remove that high-freq noise. That's about it.
Jim, are there enough opamps on the PCB for 2nd or 3rd order filters on input and output?
http://en.wikipedia.org/wiki/Anti-aliasing_filter
http://en.wikipedia.org/wiki/Reconstruction_filter
here's an illustration why you need those:
AA filter:
if you allow a signal that's above 1/2 of the sampling frequency, what you see in the picture may happen: those higher frequency signals may be erroneously detected as lower frequency ones, and that's called aliasing.
reconstruction filter:
DAC output is stepped and needs to be filtered to remove that high-freq noise. That's about it.
Jim, are there enough opamps on the PCB for 2nd or 3rd order filters on input and output?
- andrej
- Solder Soldier
Information
- Posts: 159
- Joined: 28 Dec 2008, 00:23
- my favorite amplifier: Vox AC30
- Completed builds: Zvex Woolly Mammoth
Boss DS-2 mod
Vox AC4
Crowther Hotcake (and own variations)
TS-808
Big Muff Russian
Big Muff IC
Superfuzz
Superfuzz
Big Muff
Mixer/Blend
various other stuff - Location: montenegro
- Has thanked: 6 times
- Been thanked: 51 times
- Contact:
I'll sim something in proteus without any external adc/dac's, using just the internal adc and a transistor ladder + opamp for output. the chip is 1284p (available in DIP package). i believe we won't even need external AD/DA in the final version.
I believe it should be good enough, as it certainly is cheap.
this kind of deal:
I believe it should be good enough, as it certainly is cheap.
this kind of deal:
- Space Jm
- Breadboard Brother
Question : Jim, are there enough opamps on the PCB for 2nd or 3rd order filters on input and output?
Answer : Well on the original Geiger, there are no AOP like that for filtering...
For instance, the output is just : µC => TLC 5615 => Volume pot => output
It is very basic
Answer : Well on the original Geiger, there are no AOP like that for filtering...
For instance, the output is just : µC => TLC 5615 => Volume pot => output
It is very basic
Together we stand, divided we fall
- devastator
- Cap Cooler
There's some cheap (trough hole) SPI double DAC from microchip, really easy to use. Otherwise, if nasty 8bit is desired one can use a R2R (I had some bourns integrated one, very handy little thing no need to match resistors). But it requires a complete port, however a shift register can be used with it.
Yep, I read that right after I posted. I usually write C++ program to create waves into files and stuff. Java, python could be even quicker for that kind of work. I should give it a look.
I becoming very interested in this project.
Code: Select all
JS is JavaScript, a language commonly associated with web pages.
no need for that, there's a complete hardware solution in the AVR.we'll use some free open source spi/i2c library for ad and da converters
why three digit ? to avoid the hexadecimal notation ?oh, and we should replace the 2-digit display with a 3-digit.
maybe they didn't bother with the anti-aliasing filter and output the signal as it.For instance, the output is just : µC => TLC 5615 => Volume pot => output
I becoming very interested in this project.