Guitar To MIDI Using The LogoChip V2

Not rated 14,591

Guitar To MIDI Using The LogoChip V2
Guitar To MIDI Using The LogoChip V2

A guitar to MIDI interface was designed to serve as an interface between guitar playing and MIDI control of external hardware and software. This document describes the details of the design, experimentation, implementation, and final outcome of the project. The original plan was not completed within the expected timeframe, as many important issues that were not apparent before arose along the way. These issues are presented in this document and can serve as a valuable source of information for the design of a similar project or one involving any of the key aspects of this project, namely interfacing a physical musical instrument with software using a PIC. The initial design for this project called for an optical pickup for each string that fed the audio signal from that string alone to the input of an analog switch, which controlled the current string being fed to an Analog-to-Digital input of the LogoChip V1. The LogoChip was to step through each input as needed and sample a duration of the signal, providing a sample window of each string that could be used to gather pitch, volume, and other attributes of the sound. Inside the LogoChip, the sample would be analyzed for the time between zero crossings in the waveform, providing a wavelength of the signal, which could be used to determine pitch. The amplitude of this waveform over time would provide real-time changes in volume. The data gathered from the input sampling was to be sent as MIDI information for note on and off events, with initial note volume (velocity) set by the initial volume of the waveform, real-time volume change sent based on the volume change of the input signal, and pitch bending to follow that of the guitar, all of which being sent on a different channel for each string. The different channels allow the real-time change of volume to occur for each string, as this MIDI command is global to all notes on a channel. As the project progressed, however, nearly all of these expressive and interesting design plans were dropped, leading to the final result of simply being able to somewhat accurately reproduce the MIDI note that corresponds to the note being played on the guitar. The reasons for these changes in design are described in the following sections and mainly have to do with limitations in time and the original design specification. The first part of the original design that was implemented was the optical guitar pickup system. The idea for this design came from information found on the internet about the existence of such a system, not from schematics. The initial results of the following plan appeared so successful that such a system seemed easy to implement and incorporate into the overall design. However, this was implemented using standard break-beam sensors, which involve a transmitter and receiver mounted on a base that separates the two by a small distance. Just as with standard guitar-to-MIDI pickups, which use six individual magnetic pickups, the break-beam sensor was placed as close to the bridge of the guitar as possible to improve pitch tracking. The break-beam was used such that the string was the source that broke the beam, with the vibrations causing the output of the receiver to produce an analog audio signal of the guitar string. The mounting of the pickup was tested with the sensor shining above the string to the receiver below it, and on either side of the string. The results of both methods produced similar outcomes, despite the fact that guitar strings are generally plucked to vibrate side to side. Since the pickup was close to the bridge, the majority of the vibration appeared to happen circularly, moving in all directions.

The guitar to MIDI interface project involves a sophisticated design process aimed at converting analog signals from a guitar into digital MIDI signals for further processing or control of MIDI-compatible devices. The core of the system relies on optical pickups that capture the vibrations of each string. These pickups utilize break-beam technology, where a beam of light is interrupted by the vibrating string, generating an analog signal that represents the sound wave produced by the string.

The system architecture includes an analog switch that sequentially connects each string's optical pickup to an Analog-to-Digital Converter (ADC) integrated within the LogoChip V1 microcontroller. This allows for the sampling of each string's audio signal, enabling the extraction of essential parameters such as pitch and amplitude. The microcontroller analyzes the sampled waveform, detecting zero crossings to calculate pitch and monitoring amplitude variations to determine volume dynamics.

The MIDI output is structured to send note on and off messages corresponding to the detected pitch of the played note. The initial velocity of the note is determined by the amplitude of the waveform at the moment of detection, while real-time changes in volume are transmitted as continuous controller messages. Each string's data is transmitted on separate MIDI channels, allowing for individual control over each string's volume and expression, which is critical for musicians seeking nuanced performance capabilities.

Despite the initial ambitious goals of the project, including the implementation of advanced features such as pitch bending and dynamic expression control, the final design focused on achieving reliable note detection and MIDI output. The challenges encountered during development, including time constraints and unforeseen technical difficulties, informed the adjustments made to the original design, ultimately leading to a more streamlined yet functional interface. This documentation serves as a resource for future projects aiming to explore the integration of traditional instruments with digital music technology.A guitar to MIDI interface was designed that was intended to serve as an interface between guitar playing and MIDI control of external hardware and software. This document describes the details of the design, experimentation, implementation and final outcome of the project.

The original plan was not nearly completed in the time expected, as many important issues that were not apparent before arose along the way. This issues are presented in this document and can serve as a valuable source of information for the design of a similar project, or one involving any of the key aspects of this project, namely interfacing a physical musical instrument with software using a PIC. The initial design for this project called for an optical pickup for each string that fed the audio signal from that string alone to the input of of an analog switch, which controlled the current string being fed to an Analog-to-Digial input of the LogoChip V1 input.

The LogoChip was to step through each input as needed, and sample a duration of the signal, providing a sample window of each string that could be used to gather pitch, volume, and other attributes of the sound. Inside the LogoChip, the sample would be analyzed for the time between zero crossings in the waveform, providing a wavelength of the signal, which could be used to determine pitch.

The amplitude of this waveform over time would provide realtime changes in volume. The data gathered from the input sampling was to be sent as MIDI information for note on and off events, with initial note volume (velocity) as set by the initial volume of the waveform, realtime volume change sent based upon volume change of the input signal, and pitchbending to follow that of the guitar, all of which being sent on a different channel for each string. The different channels allows the realtime change of volume to occur for each string, as this MIDI command is global to all notes on a channel.

As the project progressed, however, nearly all of these expressive and interesting design plans were dropped, leading to the final result of simply being able to somewhat accurately reproduce the MIDI note that corresponds to the note being played on the guitar. The reasons for these changes in design are described in the following sections, and mainly have to do with limitations in time and the original design specification.

The first part of the original design that was implemented was the optical guitar pickup system. The idea for this design came from information I found on the internet about the existence of such a system, not from schematics I found. The initial results of the following plan appeared so successful that such a system seemed very easy to implement and incorporate into my overall design.

As with many things, however, it did not turn out to be as easy as it looked. This was implemented using standard break-beam sensors that are used in various robotic designs, and involve a transmitter and receiver mounted on a base that separates the two by a small distance. Just as with standard guitar-to-MIDI pickups, which use six individual magnetic pickups, the break-beam sensor was placed as close to the bridge of the guitar as possible, which improves pitch tracking.

The break-beam was used in a manner such that the string was the source that broke the beam, the vibrations of which caused the output of the receiver to produce an analog audio signal of the guitar string. The mounting of the pickup was tested as both shining above the string to the receiver below it, and as on either side of the string.

The results of both methods actually produced the same results, despite the fact that guitar strings are generally plucked so that they vibrate side to side. Since the pickup was so close to the bridge, the majority of the vibration appeared to happen circularly, moving in all direc

🔗 External reference