<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="generator" content="Osso Notes">
    <title></title></head>
<body>
<p>Super cool!! Congrats Xavi & David.
<br><font color="#999999">-- </font>
<br><font color="#999999">Sent from a smartphone</font>
<br>
<br>----- Mensaje original -----
<br>> <a href="http://vokicodder.blogspot.com/2011/09/clam-binders-ipyclam-and-pyqt.html">http://vokicodder.blogspot.com/2011/09/clam-binders-ipyclam-and-pyqt.html</a>
<br>> 
<br>> Some notes on today achievements with Xavi Serra (the student, no the
<br>> MTG director) for the demo of his Final Career Project, featuring
<br>> combining ipyclam, pyqt,   clam qt widgets and the new QtBinder interface
<br>> which extends to any CLAM   application Prototyper's facility to bind
<br>> unknown interfaces and networks.
<br>> 
<br>> The presentation of his PFC is on Friday wish him the best luck.
<br>> 
<br>> I recommend compile and install ipyclam and give the example below a try.
<br>> 
<br>> David.
<br>> 
<br>> ------------------
<br>> $ ipython
<br>> 
<br>> import ipyclam
<br>> n=ipyclam.Network(ipyclam.Clam_NetworkProxy())
<br>> n.file = n.types.MonoAudioFileReader
<br>> n.out = n.types.AudioSink
<br>> n.file.Loop = 1
<br>> n.file.SourceFile = "../NetworkEditor/example-data/jaume-voice.mp3" # or
<br>> any file n.file > n.out
<br>> 
<br>> n # see, the connection is between ports although we conected processings
<br>> 
<br>> n.backend="PortAudio" # bug: 'backend' does not work with completition
<br>> n.play()
<br>> n.pause()
<br>> n.stop()
<br>> 
<br>> from PyQt4 import QtCore, QtGui
<br>> a=QtGui.QApplication([])
<br>> 
<br>> w=n.createWidget("Oscilloscope")
<br>> w.show()
<br>> 
<br>> # you can obtain the file output port name by typing n.file.[tab],
<br>> deleting 'n.' and adding the quotes w.setProperty("clamOutPort",
<br>> "file.Samples Read") n.bindUi(w)
<br>> 
<br>> n # you can see that bindUi has added an extra processing
<br>> 
<br>> n.play()
<br>> 
<br>> n.stop()
<br>> 
<br>> n.tonal=n.types.TonalAnalysis
<br>> n.file > n.tonal
<br>> 
<br>> w2 = n.createWidget("CLAM::VM::KeySpace")
<br>> w2.show()
<br>> 
<br>> w2.setProperty("clamOutPort", "tonal.Chord Correlation")
<br>> n.bindUi(w2)
<br>> 
<br>> n.play()
<br>> 
<br>> m=QtGui.QDialog()
<br>> m.show()
<br>> m.setLayout(QtGui.QVBoxLayout())
<br>> m.layout().addWidget(w)
<br>> m.layout().addWidget(w2)
<br>> 
<br>> 
<br>> David.
<br>> _______________________________________________
<br>> clam-devel mailing list
<br>> <a href="mailto:clam-devel@lists.clam-project.org">clam-devel@lists.clam-project.org</a>
<br>> <a href="http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org">http://lists.clam-project.org/listinfo.cgi/clam-devel-clam-project.org</a>
<br><br></p>
</body>
</html>