Re: [Pd] Serial port out
hello svante, Am Freitag, 17. November 2006 18:57 schrieb Svante Hermansson: Christian Klippel wrote: Am Freitag, 17. November 2006 17:26 schrieb Steffen: I read about it in Delton T. Horns Music Synthesizers: A Manual of Design and Construction, if i recall correct, where the author suggested to use a S/H in connection with such a converter to save CPU power (when one wanted to keep a given CV for a period of time (faster then the port)). this is only usefull if you want to digitize a changing signal. you use the sh circuit (usually just a capacitor and a switch) to freeze the current value, so it stays stable while you digitze it. to digitize a signal, you basically need a dac, sh and comparator. you load the sh, set a value at the dac, and compare the two voltages with the comparator. you change the dac value so long until you have a match between the two voltages. then you discharge the sh, and go ahead with the next sample. Not only useful for digitizing an analog sample into the digital world, but also useful as a multiplexer. If you build a converter using one single ADC, you could share it to say 8 channels by sending them one at a time. Often (but not always) cheaper and easier than using 8 normal ADC's. Multiplexing with SH works even on a low pass filtered PWM-signal if thats what someone (?) was planning on using... you are right. but that also implies that the outputs are updated periodically, even if the value doesnt change. also, you need a buffering op-amp with high input impedance, to keep the voltage stable between the updates (a too high load will discharge the cap in the sh). that continous update may also cause some ripple on the output, a thing that needs to be considered if you go for high resolution, like 16 bits nowdays you can get 8 channel, 12 bit dac's (like the tlv5610) for a low price, so i doubt that it is worth going the sh way nowdays. greets, chris mvh//Svante - with a homebuilt midi to 8-channel CV somewhere in some drawer... ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
Christian Klippel wrote: oh, and: Am Freitag, 17. November 2006 18:57 schrieb Svante Hermansson: single ADC, you could share it to say 8 channels by sending them one at [...] ADC's. Multiplexing with SH works even on a low pass filtered i assume you meant dac's instead ;) Ahhh, of course. DAC's it is! Thanks! :) mvh//Svante ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
Those are old and defunct. [comport] is the only maintained one, and it works well. There have been a number of important changes in the last few months, so use a current version. .hc On Nov 16, 2006, at 10:20 AM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello List, Chuck, While browsing the pd-extended distro I found 2 other patches (than the comport.dll external) which allow us to take control of a serial port serial Which seems to be windows only (it doen't seem there is a doc for this one) serialctl Which seems to be UNIX only BTW Chuck, did you manage to do something with the comport.dll I sent to you? Renaud DISCLAIMER http://www.belgacom.be/maildisclaimer ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/ listinfo/pd-list ¡El pueblo unido jamás será vencido! ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
Interesting. I did get the comport.dll to work, thanks. My plan was to send PWM from my serial port, then use a low pass filter to obtain DC to control a Moog synthesizer's pitch. Christian Klippel, however, has kindly offered to create a USB-CV adaptor for me, something others have suggested but which has proven too confusing for me. I suspected that MSVC was not free. I wonder how hard it would be to adapt the makefile to MinGW? Thanks very much for sharing the .dll! -Chuckk On 11/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello List, Chuck, While browsing the pd-extended distro I found 2 other patches (than the comport.dll external) which allow us to take control of a serial port serial Which seems to be windows only (it doen't seem there is a doc for this one) serialctl Which seems to be UNIX only BTW Chuck, did you manage to do something with the comport.dll I sent to you? Renaud DISCLAIMER http://www.belgacom.be/maildisclaimer -- Far and away the best prize that life has to offer is the chance to work hard at work worth doing. -Theodore Roosevelt ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
Chuckk Hubbard wrote: Interesting. I did get the comport.dll to work, thanks. My plan was to send PWM from my serial port, then use a low pass filter to obtain DC to control a Moog synthesizer's pitch. Christian Klippel, however, has kindly offered to create a USB-CV adaptor for me, something others have suggested but which has proven too confusing for me. I suspected that MSVC was not free. This version is free as in beer: http://msdn.microsoft.com/vstudio/express/visualc/download/default.aspx I found it easier than MinGW but I probably have a piece of wood somewhere in my brain... Martin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
On Nov 6, 2006, at 6:42 PM, Martin Peach wrote: Chuckk Hubbard wrote: I'm going forward with this Moog-controlling plan. I have Pd on my laptop, and have compiled [comport]. I'm not sure how to use it, though. As with so many things, most of the info I can find online tells me way more than what I want. What I want: Is it possible to send constant values OR individual bits to the serial port, as opposed to bytes separated by on/off bits? How can I set up the timing on this to send controllable PWM? Will it be possible to send PWM from comport with -noaudio? You can toggle the handshaking lines at high speed but you will run into the jitter caused by pd's audio block size. Or you could send data through the serial port with different ratios of on and off bits, but you will only get 8 different levels. I think you need to put a serial dac there. It's possible to clock serial data into a dac using just the handshaking lines -- one serves as a clock and the other data. That's an idea for an object written in pd [serial-pwm]. It would PWM signals by flipping bits on the serial port. Frequency would be determined by a combo of baud rate and bits used for one cycle. Hmm, I wonder if it would be useful at all... .hc The arc of history bends towards justice. - Dr. Martin Luther King, Jr. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
On 11/9/06, Cesare Marilungo [EMAIL PROTECTED] wrote: I'm not an expert in electronics. But I believe that this should need a microcontroller. You send the notes you want to play via serial port to the microcontroller, which sends a pwm signal that can be flattened with a simple rc circuit (a condenser and a resistor). I've done this some years ago to control my Korg MS20. I've used an IC (Max232, IIRC) and the PIC 16f84a. It costed less than 5 EURO in parts. There are plenty of ready made projects and schematics for this task (just google for it). I have, repeatedly, and it would take me more than the time I have left in school to read everything. I don't understand why the serial port itself couldn't send the PWM... Of course I don't understand a lot of things, but is that what you're saying? I do happen to have a Max232 lying around, but I have no idea what to do with it. I've asked about this numerous times here, and probably annoyed people. If it's going to be that complicated, I can't do it. I really just want to know how the [comport] object works. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
If this would be the only way to do it, then yes, it would be very useful. Alternatively, actually, I did some searching and found that Iain Duncan a few years ago was looking for a way to do this with Csound. I wrote to ask if he had any success, still waiting to hear back. It wouldn't be unimaginable to create a file from the output of my sequencer and use it to control Csound output, through whatever medium. At any rate, my laptop is slow enough that I will probably not run my actual sequencer while sending the PWM. Maybe qlist or something. -Chuckk On 11/9/06, Hans-Christoph Steiner [EMAIL PROTECTED] wrote: That's an idea for an object written in pd [serial-pwm]. It would PWM signals by flipping bits on the serial port. Frequency would be determined by a combo of baud rate and bits used for one cycle. Hmm, I wonder if it would be useful at all... .hc The arc of history bends towards justice. - Dr. Martin Luther King, Jr. -- Far and away the best prize that life has to offer is the chance to work hard at work worth doing. -Theodore Roosevelt ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
hi, Am Freitag, 10. November 2006 02:14 schrieb Chuckk Hubbard: On 11/9/06, Cesare Marilungo [EMAIL PROTECTED] wrote: I'm not an expert in electronics. But I believe that this should need a microcontroller. You send the notes you want to play via serial port to the microcontroller, which sends a pwm signal that can be flattened with a simple rc circuit (a condenser and a resistor). I've done this some years ago to control my Korg MS20. I've used an IC (Max232, IIRC) and the PIC 16f84a. It costed less than 5 EURO in parts. There are plenty of ready made projects and schematics for this task (just google for it). I have, repeatedly, and it would take me more than the time I have left in school to read everything. I don't understand why the serial port itself couldn't send the PWM... Of course I don't understand a lot of things, but is that what you're saying? it can not do that correctly because it is not meant to do that. if you toggle the data lines to create a pwm signal on the serial (or parallel) port, you have to depend on the timing of your machine. since you are running in a multitasking environment, you can not assure that each pwm cycle has the same length. this will cause jitter, making the output values unsteady. you could prevent that by using a rather high-valued r/c filter, but at the same time you make the pwm output slow (since the r/c needs some time to settle to the new value). unless you run that with a tight timing, preferably by using a interrupt, you will never get a really clean output. I do happen to have a Max232 lying around, but I have no idea what to do with it. the max232 is nothing more than a circuit that translates between the voltage levels of the serial port and the ttl levels used in most electronics ... it doesnt help you for timing stuff or the like ... if you want to use pwm, you really should use a small microcontroller to get a steady and stable output. but even more i recommend to use some serial, multi channel dac's like the tlv5610 or tlv5630 (or any other dac like that). you just poke in the values in a serial fashion, once, and it holds that value, precisely, until you feed it a new value ... and it will do so on an instant. by using a simple op-amp for each output you can bring the control voltage into any range you like/need. greets, chris I've asked about this numerous times here, and probably annoyed people. If it's going to be that complicated, I can't do it. I really just want to know how the [comport] object works. ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list
Re: [Pd] Serial port out
Chuckk Hubbard wrote: I'm going forward with this Moog-controlling plan. I have Pd on my laptop, and have compiled [comport]. I'm not sure how to use it, though. As with so many things, most of the info I can find online tells me way more than what I want. What I want: Is it possible to send constant values OR individual bits to the serial port, as opposed to bytes separated by on/off bits? How can I set up the timing on this to send controllable PWM? Will it be possible to send PWM from comport with -noaudio? You can toggle the handshaking lines at high speed but you will run into the jitter caused by pd's audio block size. Or you could send data through the serial port with different ratios of on and off bits, but you will only get 8 different levels. I think you need to put a serial dac there. It's possible to clock serial data into a dac using just the handshaking lines -- one serves as a clock and the other data. Martin ___ PD-list@iem.at mailing list UNSUBSCRIBE and account-management - http://lists.puredata.info/listinfo/pd-list