converting standart guitar signal into midi then making a tube synth? - Page 1
Forum section: electronics / projects

author: Deactivated-1
author_rank: Frequent Contributor
timestamp: February 14, 2020, 11:04:29 pm
content: I think I might be crazy here and also wanting the not so possible but.I am wondering if I could convert the guitar signal to some kind of signal that I could then make a simple synth to make synth sounds from.and preferably with vacuum tubes cause I have a lot of them and they look cool

author: jmelson
author_rank: Super Contributor
timestamp: February 14, 2020, 11:12:53 pm
content: Quote from: ELS122 on February 14, 2020, 11:04:29 pmUmm, converting an analog audio signal into MIDI is essentially a synthesizer in reverse. You want to analyze the tone to determine pitch and amplitude, and then send a MIDI commandfor that particular key pressed with that particular amplitude.OH, you want to do this with TUBES? So, you intend to build a digital computer out of Vacuum tubes. OK, that has been done. Look up the Bendix G-15 for a "small" vacuum tube computer.300 tubes and 3000 Germanium diodes, plus a drum memory. But, it was WAY too slow to do this job. You'd need to build one about 100 X more powerful.I had to check, no it is NOT April First!Jon

author: sam[PS]
author_rank: Contributor
timestamp: February 28, 2020, 02:37:25 am
content: Not as crazy as you seams to think, although it would certainly not be an easy project.I see three part in your message you will tell me if i get that right :1-convert a normal electric guitar signal to MIDI2-build a synthesizer3-use tubesLet's try to address nb2 first : building a synthesizerAnalog synth is a really fun project to build you can make it as simple or as complex as you want. For the simple one i suggest you to look at some 555 based synth diy project on internet. For the most complex you probably better go modular. The basic idea is an oscillator that gives you a primary note+some harmonics (VCO), then on that you can add filters to refine those harmonics little more (VCF), and then some envelope processing to make the note sustain short/long the attack to be soft/snappy and so on (VCA).*VCO :In old day they where using analog voltage controlled oscillator but nowadays a digital generator using a small microcontroler/arduino might be just simpler. Moreover if you want a midi input you have got a built in uart to do most of the work for you, you just have to add an optocoupler for the midi curent loop input. You can start with a square wave but selectable assortment of sawtooth/reverse sawtooth/tiangle is not very hard to do and give you more sound to chose from. If you go the MCU way pwm output+low pass filter might be all you need, remember bad precision here is only giving you more harmonics to play with. I don't realy see where to use a tube here however.*VCF :Probably one of the most difficult part in analog, pretty easy in digital but can be computing power hungry. The basic idea is just a low pass filter with a selectable cut frequency for each note. If i had to do it in analog today i would probably use a switch capacitor IC and just build another VCO of higher frequency to control it (or another output from the MCU). The good news is it's optional the synth will work without. There is also the in between solution to use just a standard audio EQ, i might then use a semi parametric or even parametric design, that might be just enough in most situation and you can find schematics for tube based ones. In any way that would probably be a late add on.*VCA :VCA stand for voltage controlled amplificator, but you might as well use a voltage controlled attenuator and a fixed gain. In digital it's just a multiplication per sample so it's as easy as it can be. In analog it can be a challenging problem if you realy want to be able to generate any sound (fast atack and realease+good quality=not easy/costly dedicated components). But if you can get by some speed limitation (ie no drum/percution sound) using a led+ldr as controled atenuator is a realy easy and great sounding solution. What is left is to control this VCA with the envelope parameter (attack, realease, sustain, decay, ...) according to the instrument/sound you want to synthesize. For this i would suggest once again to use a microcontroler (possibly the same as for the VCO) as built in timer make it easy to tune the timings and a PWM output is perfect to control the led+ldr controlled attenuator. If you go this led+LDR attenuator route you will need to enter it with low impedence, if you want to put tube in there a cathode flower can do the tricks although any decent opamp would do better but just less mojo/warmth (warmth in °c). You might also want to have some make up gain at the output of this attenuator so it's also a good place to put tubes at work, maybe consider a simple triode amplification stage + another cathode follower, if you want to be fancy you can use a srpp stage instead of those two but then it will probably sound bit too clean and then once again an opamp would be best suited (but less warm).So i think i pretty much covered the point 2 and 3. Now let's talk about point 1 : converting guitar signal to midiWhat you want is to pick just the fundamental note frequency of the signal. So the very first thing to do is probably to low pass the signal to get rid of most of the harmonics. I'd go for at least 2nd order probably more 4th order using salen-key sells. As of the -3db cut frequency i would suggest 1k if you want to be able to use the whole neck but cutting at 500Hz will make things easier for the next operations and get you good up to around the 12th fret on a 6string standard tuning (ie you only loosing notes over the 12th fret on the higher string and over 17th fret on the next one, not so bad). Those are very crude estimation, feel free to calculate the right frequency point.Then you have to detect the fundamental frequency. The easy way would be to go all digital and to perform real time FFT and then just pick the frequency with the higher amplitude. I said easy, not cheap, that's heavy artillery, probably involve fpga for good precision and true real time processing, but possibly easy as it can be purchased of shelve or built from basic functions (as long as you consider implementing an FFT on an FPGA as basic).You can probably do just that with a PC+sound card but being able to do it real time would be a big challenge (yes even bigger than what you think, forget about windows here, be prepare to use linux and put your hands on the kernel at some point or forget about true real time)If you restrain the possible input notes to few then an analog route can be to use a PLL and a fixed oscillator PER NOTE (that's basically a crude frequency analyzer) Be prepare for lot of tuning. Another way is to build, per note again, a really high Q band pass filter and a peak detector. For a whole neck we are talking about 5+5+5+4+5+24=48 notes so 48 not so easy circuits. Not impossible but certainly laborious. You will need some kind of MCU anyway to generate the midi signal (remember midi is digital).All in all it's a really hard task and i doubt you can DIY it for cheaper than just buying a Roland guitar midi converter kit (approx 300$ i think). If you really want to do it i'd go for the FPGA route. If there is a crazy part it's probably there.But don't despair as there is a workaround. It's been used for decades in form of some boss and EH pedals. It's to skip the midi intermediate, and then some more.Remember how the analog synth works ? First generate a primary note+harmonics then process it with filters and envelope generator/vca. The idea is to just use your guitar signal as this primary signal directly. All you have to do is detect the attack of the note to trigger your envelope generator, this can be done pretty easily either with a peak/envelope detector and a shmitt trigger or with some basic dsp that an small microcontroller might be able to perform just right using it's built in ADC as input. An inbetween solution might be to use once again a steep low pass filter and then a PLL to generate a square-wave that should be around the fundamental frequency, it might as well lock on one of the harmonics but that randomness can be part of the fun sound. Of course the input preamplification/buffer can be done using tube.To sum it up it will surely not be a simple project but it's not impossible. Skipping the midi and using the hybrid MCU+analog approach it can certainly be done.I hope to have give you some hints of reflection there. Tell us if you take up on this.Just my 2cts...