Original files for the PE Guitar to Midi circuit

Started by Mick Bailey, January 11, 2022, 04:12:17 PM

Previous topic - Next topic

Mick Bailey

Does anyone have the original unmodified files (.ASM and .HEX) for the Practical Electronics guitar to MIDI circuit? I know there are better and newer designs but I have the parts and Pickit-2 to hand and want to try it out as a feed to a MIDI to CV project. The original discussion is here; https://www.diystompboxes.com/smfforum/index.php?topic=80030.0

Thanks,
Mick


potul

I must have the files somewhere, as I took them as the starting point for my own version.
Give a couple of days and I will let you know

potul

Hey, I didn't find the files in my drive, but I found the source in the EPE website. You can get the code from here:

https://www.epemag3.com/proj/1009.html

Mick Bailey

Thanks, that's really helpful. For some reason I'd assumed that the code on the EPE site was just for the electronic ignition. I'm intending to use your code with the glide/hammer-on function, but I wanted to see how it differed from the original so that I can better understand how the coding works. The function that I'd also like to fathom out is how to get a note to sustain indefinitely until a new note is plucked. That way I can use envelopes that have a much longer duration than the guitar's natural string vibration. 

potul

Quote from: Mick Bailey on January 12, 2022, 12:50:14 PM
Thanks, that's really helpful. For some reason I'd assumed that the code on the EPE site was just for the electronic ignition. I'm intending to use your code with the glide/hammer-on function, but I wanted to see how it differed from the original so that I can better understand how the coding works. The function that I'd also like to fathom out is how to get a note to sustain indefinitely until a new note is plucked. That way I can use envelopes that have a much longer duration than the guitar's natural string vibration.
The infinite sustain should be easily achievable. There is a note-off routine that gets triggered when the amplitude of the signal falls below certain threshold, or when another note is plucked. You can modify the criteria and add your own code here. You would probably need some kind of switch or pedal to control the infinite sustain, otherwise you will not have a way to stop the note.

Mick Bailey

A means to turn the feature on/off with a pedal would be useful, though the MIDI output will be converted to a CV/trigger and run a mono synth so in that respect an infinite sustain would not be a great problem - the note length is controlled by the envelope generator and the CV will be patched through to the oscillators which are running continually anyhow.

Artmac

Hi, is there a better version available for the PIC16F88 processor? The latest one I have is "Version V2.00 modified by JWB 03 Sep 2010." I built one circuit using it, but now I want to make six of them for a hexaphonic pickup and connect the outputs to another processor. Alternatively, I'm considering doing all of this with a more powerful processor. Have there been any new developments or ideas since 2010? Perhaps a better processor option has come up? Thank you and best regards.


potul

I did some testing on trying to fit this into a PIC with 6 inputs and try to create a hexaphonic version. But soon I struggled with the programming part (trying to run multiple processes in parallel in PIC ASM was not easy), and the computation capacity of the PIC. so I abandoned the idea.
I also did try to port the same algorithm to C and use it in a DSPIC. Then I jumped into trying to improve the algorithm using FFT, autocorrelation and a mix of other fundamental detection methods, but I was never able to get a working prototype. I learned a lot, though.

I did some modifications to the original algorithm by adding hammer-on/pullofs detection and a bass friendly version. I would need to dig into my archives. I think I used a 16F88, but I don't fully recall it. I stopped working with PICs some years ago.

Artmac

Thank you very much for your response. My dream is to have a guitar-to-MIDI converter. I have been trying to make such a device for a long time with little success, but I think I will eventually manage somehow. I have also looked at various plugins and programs. MiGiC is good, although it is monophonic, and there's Jam Origin MIDI Guitar 2 (now there's a beta version of MIDI Guitar 3, which in my opinion is very good). However, the polyphony is still not quite there, although it's getting better.

After many sleepless nights, I decided that I don't want to bother with a computer; I prefer a standalone device. I found the GM-70 Roland schematic online and wanted to build the conversion circuit myself, but there are no EPROM files available anywhere. Then I found a nice analog synthesizer by Ethan Winer on the AudioXpress website and wanted to build and adapt it for MIDI conversion, but it would require quite a bit of work for six strings.

After many years (ten), I returned to a design with the PIC16f88 from EPEMAG magazine, improved by someone with the initials JWB. I think it's not too bad. I'm not too concerned about pull-offs, bends, and other articulations; I'm not that ambitious. I installed MPLAB 2.0, an older version, because the newer ones don't work well with assembly code for this program. I want to make six such circuits and a hex pickup.

For now, I'll try to adjust the read times for each string to reduce latency and narrow the MIDI codes for each string. I'm having huge problems finding a schematic with software for any processor that can merge the MIDI outputs from these six circuits (a MIDI merger for six inputs). I probably won't be able to write the program myself; I can only make simple corrections. But I'm trying.

I wish you much success in your work, and best regards,
Artmac.  :)

potul

MIDI merging will require most probably some coding in a microcontroller. You can't simply merge midi using logic gates.

Now, if I were you, I would maybe explore 2 options:

1-Try to do all 6 conversions in a single device.  This would require 6 ADC and some sort of multitasking in the microcontroller... it might be tricky but maybe with a more powerful modern microcontroller could be done. The asm algorithm in this EPE project is quite simple and can be easily ported to C, in order to run it into something like an atmega.

2-If you want to stick to the option of one PIC per string, you will need an additional microcontroller capable of receiving 6 serial streams (MIDI) and merge them. Another option would be to let the individual PICs do the fundamental note detection algorithm and instead of convert them to midi, use some kind of serial communication to provide the result to the main uC that does the midi conversion. (or maybe  using CV/gate voltages instead?)