Hello! I have some question that guitarists (I saw some in the Do you play guitar topic) might know!
Especially the electric guitar ones, but it's also technical in nature.
What kind of electrical signal waveform does the oscillating string produce? I mean, when the metallic string oscillates near the pickup, which contains coil and some magnetic core and it causes electromagnetic induction in the wire, that's then transferred into the amplifier, but I'm interested into this unprocessed signal.
Changing the length of the string (well not actual length, but only the length that's loose and can oscillate) changes the frequency of the oscillation, but what's the produced waveform? Theoretically, the frequency adjusts to the length, so the wavelength is equal to a multiply (or half?) of the length of the loose part, so the oscillation is perfectly sine. However, that would probably require you to pluck the string right in the middle and if you do it somewhere else, the amplitude of the waveform won't be in the center and the oscillations would "bounce" from the ends of the string creating a super positioned waveform.
The thing is, normal acoustic guitar has complex waveform, that's superposition of several sine waveforms (well any harmonic signal is composed from them, including the square waveform), but I'm not sure how this is produced - is it by the actual oscillation of the string, that directly produces the waveform, or is the sound produced by the string just a single sine and the sound waves bounce from the inside walls of the guitar, interfering with the new ones and creating a composed wavelength.
The actual oscillation of the string is what's my interest. You see, I'm working on a sound WPU a sound generator chip and I want to use it to create a new programmable musical instrument, so I'll have some strings there, their oscillations converted to an analog electrical signal and fed trough ADC into an input buffer (to compensate for variable number of cycles needed to calculate a single sample), but I need to know the exact shape of the waveform produced, because if it's not a basic sine, I need to transform it into one, but I can't use the band-pass filter because the frequency changes and what if I actually remove/distort some wanted frequencies?
I don't have an electric guitar nor a string with a pickup so I could measure it right now, actually I'm not working even on the WPU sound generator chip, but I'm doing some research, so I guess it doesn't hurt to ask.
Also I wonder what kind of input buffer I'll use and how to handle buffer overflows and underflow, because the machine code and output sound buffer won't be exactly in sync (not to mention that there will be two output buffers and there might be actually several passes before the current half of the buffer is finalized and ready to be played after the other one is finished playing and the program needs to wait until the buffer's can be swapped... hmm... unless I use triple sound buffering, that will help a lot, both for output and input probably... just to keep them in sync. Though I don't really need triple for input, since only one buffer will be filled with data at the time, so I need just two for input, though it must be accessible for reading and writing from two locations at the same time, but I can actually solve that with time multiplex and frequency that's at least double of the sampling frequency... Hmm... yeah... *goes to write some notes*