<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hey There<div style="text-indent: 0px !important; "><br style="text-indent: 0px !important; "></div><div style="text-indent: 0px !important; ">You might want to have a look at Jamie Bullock's abstraction based solution(which also went out on this list). Which was quite eloquent, if a little limiting at first. It's a little way back from the dream of dropping lines of OO code into pd but it's the kind of thing, when I find a syntax I like for this, could be useful to streamline some of my patching. </div><div style="text-indent: 0px !important; "><br></div><div style="text-indent: 0px !important; ">I suppose what I'd really like is embedded ruby in pd, but that's either going to be a case of some serious modification (a bit beyond me now) or possibly shell scripts, something like</div><div style="text-indent: 0px !important; "><br></div><div style="text-indent: 0px !important; ">[loadbang]</div><div style="text-indent: 0px !important; ">|</div><div style="text-indent: 0px !important; ">[irb, pitch = 440, *other variables*(</div><div style="text-indent: 0px !important; ">|</div><div style="text-indent: 0px !important; ">[shell]</div><div style="text-indent: 0px !important; "><br></div><div style="text-indent: 0px !important; ">*number*</div><div style="text-indent: 0px !important; ">|</div><div style="text-indent: 0px !important; ">[pitch = $1{</div><div style="text-indent: 0px !important; ">| </div><div style="text-indent: 0px !important; ">[shell]</div><div style="text-indent: 0px !important; "><br></div><div style="text-indent: 0px !important; ">[pitch * 2{</div><div style="text-indent: 0px !important; ">|</div><div style="text-indent: 0px !important; ">[shell]</div><div style="text-indent: 0px !important; ">|</div><div style="text-indent: 0px !important; ">[osc~]</div><div style="text-indent: 0px !important; "><br></div><div style="text-indent: 0px !important; ">Although I suspect this may convolute issues more than solving them. Although in theory it might simplify some logic blocks...</div><div style="text-indent: 0px !important; "><br></div><div style="text-indent: 0px !important; ">[if pitch > 10000,</div><div style="text-indent: 0px !important; ">volume = .05,</div><div style="text-indent: 0px !important; ">elsif pitch > 5000,</div><div style="text-indent: 0px !important; ">volume = .1,</div><div style="text-indent: 0px !important; ">else,</div><div style="text-indent: 0px !important; ">volume = .15,</div><div style="text-indent: 0px !important; ">end(</div><div>|</div><div>[shell]</div><div><br></div><div>I'm really not sure if this is worth pursuing or not. It might lead to some impressive results, especially if I could define some methods in a ruby file and call them via shell, meaning I could write a parallel ruby library for a pd project. </div><div><br></div><div>The main problem I can see would be requesting live feedback from ruby. Would probably have to poll a whole lot of variables quite regularly for irb to deal with it. </div><div><br></div><div>All casting about ideas here, guys, but any ideas or guidance might be helpful. </div><div><br></div><div>Cheers</div><div><br></div><div>Andrew</div><div><br></div><div><br></div><br>> Date: Tue, 14 Dec 2010 15:08:14 -0500<br>> From: matju@artengine.ca<br>> To: jancsika@yahoo.com<br>> CC: pd-list@iem.at; jbturgid@hotmail.com<br>> Subject: Re: [PD] PD OOP?<br>> <br>> On Mon, 13 Dec 2010, Jonathan Wilkes wrote:<br>> <br>> > Jmax Phoenix does this. If I recall correctly it breaks the nested list <br>> > feature in Gridflow.<br>> <br>> Well, it's a bit more complicated. Back then, GridFlow's nested lists were <br>> written using braces {}, but they weren't GridFlow's nested lists, they <br>> were supported directly by jMax. I had to add the parentheses hack to <br>> GridFlow so that I could port it to Pd.<br>> <br>> the (pitch * 2) feature of jMax does it with variables only (such as [v]) <br>> (or constant-declarations, a jMax-only feature) and I think that this is <br>> at creation time only, but I don't recall using it, anyway.<br>> <br>> for some reason that I don't remember, the * that is supposed to be a <br>> multiplication only within parentheses, was also considered a <br>> multiplication sign outside of parentheses, where it was considered to be <br>> a syntax error instead of a symbol. This is why I decided to ditch jMax <br>> completely and go for Pd as much as possible. (But ditching jMax was going <br>> to happen not long after that anyway, as IRCAM cancelled the project, <br>> deleted the mailing-list archives, etc.)<br>> <br>> > But considering your [osc~ (pitch * 2)] example-- what would happen if <br>> > you change the value of pitch? The value of the [osc~] object's <br>> > argument is assigned to be the initial frequency only when the object is <br>> > created, so it doesn't seem like it would have an effect unless you <br>> > recreate the object.<br>> <br>> It's not currently possible to know how to update it dynamically : the <br>> creation arguments are only passed to creators (constructors), not <br>> assigned in any explicit way to inlets or inlet/message combinations. The <br>> first argument is not even consistently assigned to the second inlet.<br>> <br>> As an example, if I implemented such a feature in GridFlow,<br>> <br>> [# + (pitch * 2)]<br>> <br>> Pd would read it as :<br>> <br>> $1 = +<br>> $2 = (pitch<br>> $3 = *<br>> $4 = 2)<br>> <br>> GridFlow would reparse it as :<br>> <br>> $1 = +<br>> $2 = (pitch * 2)<br>> <br>> But at that point, something is lacking, to say that the second argument <br>> is assigned to the second inlet, and that the first argument corresponds <br>> to a method named "op" instead.<br>> <br>> _______________________________________________________________________<br>> | Mathieu Bouchard ---- tél: +1.514.383.3801 ---- Villeray, Montréal, QC<br>                                            </body>
</html>