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?
Thanks.
-Chuckk
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
With the ratios of on and off bits, though, wouldn't it be possible to use, say, 512 bytes per value? I don't understand how the start and end bits work, exactly. I happen to have a HIN232: http://www.hobbyengineering.com/H1345.html Although I'm guessing that it will be simpler without the extra volts.
Baud rate is something I don't understand too. Would a super-high baud rate minimalize the effects of the start/end bits?
ANYWAY, I'm still not sure how to use the [comport] object. I tried the help patch, but I don't know how to test it.
-Chuckk
On 11/6/06, Martin Peach martin.peach@sympatico.ca 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.
Martin
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.
Hans-Christoph Steiner wrote:
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
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).
Ciao,
c.
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
On 11/9/06, Cesare Marilungo cesare@poeticstudios.com 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.
hi,
Am Freitag, 10. November 2006 02:14 schrieb Chuckk Hubbard:
On 11/9/06, Cesare Marilungo cesare@poeticstudios.com 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
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 hans@eds.org 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.
By the way, does anyone have a .dll of [comport]? I can't figure out how to compile it under Windows. I use MinGW, and most of the commands and flags in the makefile give errors.
-Chuckk
On 11/6/06, Chuckk Hubbard badmuthahubbard@gmail.com 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?
Thanks.
-Chuckk
-- "Far and away the best prize that life has to offer is the chance to work hard at work worth doing." -Theodore Roosevelt
You can get it from the nightly builds:
http://autobuild.puredata.info/
.hc
On Nov 10, 2006, at 4:20 AM, Chuckk Hubbard wrote:
By the way, does anyone have a .dll of [comport]? I can't figure out how to compile it under Windows. I use MinGW, and most of the commands and flags in the makefile give errors.
-Chuckk
On 11/6/06, Chuckk Hubbard badmuthahubbard@gmail.com 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?
Thanks.
-Chuckk
-- "Far and away the best prize that life has to offer is the chance to work hard at work worth doing." -Theodore Roosevelt
-- "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
News is what people want to keep hidden and everything else is
publicity. - Bill Moyers