--000e0cd761c2a785e804870e5715
Content-Type: text/plain; charset=ISO-8859-1On Thu, May 20, 2010 at 6:18 PM, Niels Mayer wrote:
> I forgot to mention one of my main finds regarding clojure -- a nice Qt
i think you're missing the model/view separation that apps like qtractor (or
ardour) have. added access to the GUI elements is relatively easy because
they are semantically simple objects. providing access to the "model" (e.g.
the MIDI data) is quite complex.
just for reference, torben wrapped libardour in python and ended up with a
500MB library. he was able to load and play an ardour session entirely in
python. this was done using automated tools followed by some hand-tweaking
(it involved parsing all the C++ and generating XML descriptions of every
data structure/object, and then feeding that into a python external
generator).
--000e0cd761c2a785e804870e5715
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Thu, May 20, 2010 at 6:18 PM, Niels M=
ayer <nielsmay=
er@gmail.com> wrote:
I forgot to mention one of my main finds regarding clojure -- a nice Qt int=
erface, and working well w/ multithreaded...http://tealeg.blogspot.com/2008/11/on-clojure-part-3-des=
igner-uis-and.html
http://briancarper.net/blog/clojure-qt4-system-tra=
y-mail-checker
As you'd expect from Clojure, the concurrency part of the app was a no-=
brainer. There are a bunch of threads hammering on a single global hash lis=
t of email messages, and they're all forcing updates of the GUI, but th=
row a bunch of=A0dosync's around certain bits of code and it all works =
without worry. (Qt's=A0invokeLater=A0is also necessary if you're up=
dating a Qt GUI from more than one thread at a time.)
My first version of this app had even more threads, with one thread updatin=
g the GUI every few seconds, and another master thread managing all the mai=
l threads. It also worked fine. It was overkill so I scaled it down, but it=
's really nice how you can coordinate a bunch of threads and don't =
have to worry about deadlocks and race conditions and whether your data str=
uctures are thread-safe.
Question: how easy is it to "add on" to an ex=
isting Qt/QtDesigner-based app like, say, qtractor, =A0the aforementioned c=
lojure language extension? (instead of "angelscript" mentioned in=
Rui's 0.1 whitepaper pdf... and that's=A0assuming the caveat menti=
oned in one of the above links "You must use Qt Designer with the QtJa=
mbi plugins installed.") And how much would java be able to "intr=
ospect" out of the C++/Qt-part of its environment without having to be=
told about it. (e.g to access&manipulate, then schedule rerendering of=
MIDI, timing, & non-destructive editing data.). The "slot" s=
tuff looks pretty introspective inter-call between QtDesigner and clojure (=
from first link):
i think you're missing the model/view separation =
that apps like qtractor (or ardour) have. added access to the GUI elements =
is relatively easy because they are semantically simple objects. providing =
access to the "model" (e.g. the MIDI data) is quite complex.
just for reference, torben wrapped libardour in python and ended up wit=
h a 500MB library. he was able to load and play an ardour session entirely =
in python. this was done using automated tools followed by some hand-tweaki=
ng (it involved parsing all the C++ and generating XML descriptions of ever=
y data structure/object, and then feeding that into a python external gener=
ator).
--000e0cd761c2a785e804870e5715--
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.