On Thu, 9 Dec 2004, Martin Peach wrote:
patrick wrote:
is there a way to read control voltage output in pd using a soundcard? what object should i use with adc~? can i simply plug the CV (maximum of 6 volts) to my soundcard or i need to buy an analog to digital converter?
Soundcards usually are capacitively coupled to their inputs, so the response drops off as the frequency drops below a few cycles per second, leaving no response at all for DC, which control voltage mostly is. One way around would be to pass the CV through an analog multiplexer that was rapidly switching between your CV and ground. If you know how to do electronics a bit you could use a 4052 analox mux and a 555 oscillator running about 1kHz to switch it. I would go for a PIC16F88 microcontroller, which has 7 10-bit ADC channels, outputting MIDI.
I second that. I have done that with a NS555 oscillator a few years ago and it works.
Another solution might be to reuse the STROBE pin of the parallel port. That's pin #1. By default it outputs a 9600 Hz square wave used to sync the data sent on pins #2-9. That one can be used to control a (pair of) transistor(s). The second transistor would be used to connect to ground if necessary. That's just an idea. I say that because it's the one idea that requires the least special hardware.
The Pd part required after that is to find the peaks or average. Many ways to do it; I might try [lop~] first.
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju