I was looking for the source code of the freeverb external.
And I've found this:
http://www.akustische-kunst.org/puredata/freeverb/
I'm really interested in some explanations, if somebody here has one.
Thanks in advance,
www.cesaremarilungo.com
http://www.akustische-kunst.org/puredata/freeverb/
I'm really interested in some explanations, if somebody here has one.
You might get some inside by searching for the subject "pdogg hacks" in the archives
greetings, Thomas
You might get some inside by searching for the subject "pdogg hacks" in the archives
urgh, insight, that might be. Thomas
Thomas Grill wrote:
You might get some inside by searching for the subject "pdogg hacks" in the archives
urgh, insight, that might be. Thomas
I see.
So, where can I found another implementation of it? I mean, the source code?
Wasn't the freeverb source released as public domain?
Thanks in advance,
www.cesaremarilungo.com
So, where can I found another implementation of it? I mean, the source code?
it's in the PD cvs on sourceforge. (externals/freeverb~)
greetings, Thomas
Thomas Grill wrote:
So, where can I found another implementation of it? I mean, the source code?
it's in the PD cvs on sourceforge. (externals/freeverb~)
greetings, Thomas
Wow! There's also the dfx suite, which is amazing. It's the only suite of VST plugins I really missed.
I should check the repositories more often.
Thanks again to all the people working on this stuff.
www.cesaremarilungo.com
On May 30, 2006, at 8:55 PM, Cesare Marilungo wrote:
Thomas Grill wrote:
So, where can I found another implementation of it? I mean, the
source code?it's in the PD cvs on sourceforge. (externals/freeverb~)
greetings, Thomas
Wow! There's also the dfx suite, which is amazing. It's the only
suite of VST plugins I really missed.I should check the repositories more often.
Thanks again to all the people working on this stuff.
[freeverb~] and [plugin~] are included in Pd-extended as well.
.hc
There is no way to peace, peace is the way.
-A.J. Muste
Hi Thomas, I quite don't understand why one of the attached programs is working while the other doesn't. My stupidity or something strange with pyext? Hope you are well, thanks, Michael
try: import pyext except: print "ERROR: This script must be loaded by the PD/Max pyext external" from testclass import *
orchestra = [['x1',['a',1]],['x2',['c',11]]]
for i in orchestra: j = (i[0], i[1][0], i[1][1]) exec str(i[0])+' = Instrument'+str(j)
class Test(pyext._class): _inlets=1 _outlets=1
def float_1(self,f):
global orchestra
if f > 10:
exec str(orchestra[0][0])+'.setVal('+str(f)+')'
else:
exec str(orchestra[1][0])+'.setVal('+str(f)+')'
try: import pyext except: print "ERROR: This script must be loaded by the PD/Max pyext external" from testclass import *
orchestra1 = [['x1',['a',1]],['x2',['c',11]]] orchestra2 = [['y1',['e',2]],['y2',['g',22]]] orchestra = []
class Test(pyext._class): _inlets=1 _outlets=1
def __init__(self, *args):
global orchestra
print str(args[0])
orchestra = eval(str(args[0]))
for i in orchestra:
j = (i[0], i[1][0], i[1][1])
exec str(i[0])+' = Instrument'+str(j)
def float_1(self,f):
global orchestra
if f > 10:
exec str(orchestra[0][0])+'.setVal('+str(f)+')'
else:
exec str(orchestra[1][0])+'.setVal('+str(f)+')'
class Instrument: def __init__(self, name, q1, q2): self.name = name self.quality1 = q1 self.quality2 = q2 self.val = 999 def setVal(self, val): self.val = val print self.name, self.val return self.val
#N canvas 98 517 848 412 10; #X msg 380 35 reload orchestra1; #X msg 410 58 reload orchestra2; #X msg 579 44 9; #X msg 610 70 11; #X obj 389 117 pyext doesnt Test orchestra1; #X msg 204 61 9; #X msg 235 87 11; #X msg 107 77 reload; #X obj 107 115 pyext works Test; #X connect 0 0 4 0; #X connect 1 0 4 0; #X connect 2 0 4 1; #X connect 3 0 4 1; #X connect 5 0 8 1; #X connect 6 0 8 1; #X connect 7 0 8 0;
Hi Michael, this seems to be a Python question and i'm really not an expert, but i'm guessing the following: in the working example you have the "for i in orchestra" loop which assigns values (by exec) to x1 and x2, which means they are defined in the module (you can check this with "print dir()" after the loop). This is not the case in the doesnt example. In the Test class then you are again trying to use x1 and x2 (exec "x1.setVal(...)"), which are not defined in the doesnt example. I'm wondering though why you don't need a "global x1,x2" in the working example, but i guess that's some secret Python magic.....
greetings, Thomas
PS. Thanks, yes i'm well and busy as ever - all the best for you too!
Michael Iber schrieb:
Hi Thomas, I quite don't understand why one of the attached programs is working while the other doesn't. My stupidity or something strange with pyext? Hope you are well, thanks, Michael
Hallo, Thomas Grill hat gesagt: // Thomas Grill wrote:
Hi Michael, this seems to be a Python question and i'm really not an expert, but i'm guessing the following: in the working example you have the "for i in orchestra" loop which assigns values (by exec) to x1 and x2, which means they are defined in the module (you can check this with "print dir()" after the loop). This is not the case in the doesnt example. In the Test class then you are again trying to use x1 and x2 (exec "x1.setVal(...)"), which are not defined in the doesnt example. I'm wondering though why you don't need a "global x1,x2" in the working example, but i guess that's some secret Python magic.....
Because x*, y* and orchestra are defined at global scope anyway, so you can even omit the "global orchestra" from the works.py, see attached standalone example.
The naming and scoping rules for Python are written here: http://docs.python.org/ref/naming.html
I also attached a "scopes.py" which tests several of the scoping rules.
I think, for Michael's code it would be better to make "orchestra" a real list of "Instrument"s like:
orchestra1 = [ ['x1','a',1], ['x2','c',11] ] # changed! orchestra = []
for i in orchestra1: tmp = Instrument(i[0], i[1], i[2]) orchestra.append(tmp)
Then in the pyext class use in float_1 something like:
orchestra[index].setVal(f)
Frank Barknecht _ ______footils.org_ __goto10.org__
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
I think, for Michael's code it would be better to make "orchestra" a real list of "Instrument"s like:
orchestra1 = [ ['x1','a',1], ['x2','c',11] ] # changed! orchestra = []
for i in orchestra1: tmp = Instrument(i[0], i[1], i[2]) orchestra.append(tmp)
Then in the pyext class use in float_1 something like:
orchestra[index].setVal(f)
I forgot to say: In this case, orchestra should be a class member like:
class whatever(pyext._class):
def __init__(self, archestra):
self.orchestra = []
for i in archestra:
tmp = Instrument(i[0], i[1], i[2])
self.orchestra.append(tmp)
def float_1(self,f):
if f > 10:
self.orchestra[0].setVal = f
else:
self.orchestra[1].setVal = f
Frank Barknecht _ ______footils.org_ __goto10.org__
Thank you Thomas and Frank. Your solution, Frank, would have too much impact on too many other aspects of my project .... I found another solution .... Best, Michael
Frank Barknecht wrote:
Hallo, Frank Barknecht hat gesagt: // Frank Barknecht wrote:
I think, for Michael's code it would be better to make "orchestra" a real list of "Instrument"s like:
orchestra1 = [ ['x1','a',1], ['x2','c',11] ] # changed! orchestra = []
for i in orchestra1: tmp = Instrument(i[0], i[1], i[2]) orchestra.append(tmp)
Then in the pyext class use in float_1 something like:
orchestra[index].setVal(f)
I forgot to say: In this case, orchestra should be a class member like:
class whatever(pyext._class):
def __init__(self, archestra): self.orchestra = [] for i in archestra: tmp = Instrument(i[0], i[1], i[2]) self.orchestra.append(tmp)
def float_1(self,f): if f > 10: self.orchestra[0].setVal = f else: self.orchestra[1].setVal = f
Ciao
try: import pyext except: print "ERROR: This script must be loaded by the PD/Max pyext external" from testclass import *
orchestra1 = [['x1',['a',1]],['x2',['c',11]]] orchestra2 = [['y1',['e',2]],['y2',['g',22]]] orchestra = [] namespace = {}
class Test(pyext._class): _inlets=1 _outlets=1
def __init__(self, *args):
global namespace, orchestra
print str(args[0])
orchestra = eval(str(args[0]))
for i in orchestra:
j = (i[0], i[1][0], i[1][1])
exec str(i[0])+' = Instrument'+str(j)
exec str(i[0])+'.getInfo()'
namespace = locals()
def float_1(self,f):
global namespace, orchestra
if f > 10:
exec str(orchestra[0][0])+'.setVal('+str(f)+')' in namespace
else:
exec str(orchestra[1][0])+'.setVal('+str(f)+')'in namespace