Problem compiling external on Windows
Great tutorial, very detailed!
Thanks for this addition..
Sorry for coming later on this subject but I'll try to add few lines about
compiling externals in Win without going through MSVC Express
edition (by the way: what are the limitations of the express edition
w.r.t. the full package?).
Even if MSVC offers an integrated environment for developing there
can be some good reasons for giving a try to the old-man "unix" way of
compiling, which in windows is best represented by MINGW32 and
cygwin. Both offers linux-like environments (i.e. command line tools)
for compiling and other shell tasks which, sometimes, in windows are
a pain in the ass.
There are at least three good reasons for giving a look at mingw:
- gives strong linux compatibility on external compilation
(almost same command lines arguments etc.) - there is the possibility to use makefiles in an almost straightforward way
(with minor modifications to linux makefiles). - no dependency on expensive MS programs (except for the
small, bug-free Operating System
I did this exercise by porting the E. Lyon "LyonPoutpourry" externals for win
(http://www.sarc.qub.ac.uk/~elyon/LyonSoftware/Pd/). Give a look at
the win source package: inside there is a makefile for darwin (MAC)
linux and win. I added the latter, and as you can see the modifications
are minor.
----------- 1. Prelude: compilation environment ------------------
First of all we have to set once for all the compilation environment.
Let's forget for the moment cygwin and concentrate on mingw32 (http://www.mingw.org/). The following is taken from (H.C. Steiner's wiki http://www.puredata.org/docs/developer/mingw)
Download the MinGW package installer and run it:
(http://prdownloads.sourceforge.net/mingw/MinGW-5.1.1.exe)
Choose the Candidate distribution. Install the defaults and add the g++ compiler, g77 compiler, and MinGW make or you can just download my MinGW install, MinGW-Pd.tar.bz2, and uncompress it so that its installed into C:\MinGW.
Then we need MSYS which is a shell (an interpreter of the commands, like a
colorful dos prompt
http://prdownloads.sourceforge.net/mingw/MSYS-1.0.10.exe
Now you will be using the MSYS shell that was installed from the MSYS installer. You can launch it from the Desktop shortcut or Start -> Programs -> MinGW -> MSYS -> msys
----------- 2. Allegro: compilation trial ------------------
a. open MSYS
b. at the prompt type:
cd c:
(or the drive you whish to go for the pd external compilation)
c. go to the external directory (note the backslashes instead of slashes !),
mine is external-compiling. Inside I have helloworld.c
cd alberto/backup/PureData_Archive/patches/AlbertoZ/external-compiling/
d. copy m_pd.h (from the PD distribution directory) into external-compiling
(or whatever is its name)
e. type:
gcc -c helloworld.c -o helloworld.o
f. type:
ld -export_dynamic -shared -o helloworld.dll helloworld.o c:/Programmi/pd039e
xt4/bin/pd.dll
(this is the linker step. note that I linked to a particular version of pd.dll - 0.39 extended test 4, so probably (I'm not sure about this) the external will
run on 0.39 only. Can someone confrm this?)
g. If everything was ok then you should have a helloworld.dll in your
directory. Move it on the extra folder of your pd distribution
(I assume that extra folder is in the pd predefined path) and make a
new patch with the helloworld object. Again, if everything is correct,
you should have a "Hello world!!" printed on the console.
----------- 3. Adagio: makefile ------------------
A makefile can be used for compilation. Even if a simple helloworld
application does not need it, complex programs may do.
The makefile.win is attached with this post. Modify it according to your
path in
Make sure you have
helloworld.c
m_pd.h
makefile.win
in your directory. Now type at MSYS prompt:
make -f makefile.win
This will automatically produce:
the object, the linker step (the dll) and will copy the helloworld.dll
in the extra folder of you pd distribution (overwriting the existing one .
----------- 4. Allegro con brio: conclusions ------------------
Why not give a try to the old-man compilation on Win?
----------- 5. Minuetto: greetings ------------------
I apologize if I said some crap somewhere, just let me know if it
doesn't work. Have fun!
Best regards,
Alberto
Using messages to set properties of other things
ayeee
I've got a metronome triggering slices of a breakbeat and I've set up a way to shift every second metronome bang using a delay object and spigot objects. By altering the delay you can create more or less of a swing to the metronome bangs. However obviously you can only delay the bang so much before it appears in sync with the next bang and this is based the tempo that your working at.
so...
I'd like to use the tempo to calculate a range for the delay.
i.e
If the tempo was 120BPM then the metronome will be 'BANG'ing every 500 ms
so the rage for the delay would be from 0 ms to something less than 500 ms (lets say 450)
If the tempo was 240BPM the metronome will be 'BANG'ing every 250ms
so the range of the delay would be from 0 ms to say 250 ms ( so.... like ..... 225)
so yeah
I'd like to generate the minium and maximum for a vertical slider based on the tempo at run time
hmmmmmm.....
I hope that's kiind of clearer but looking back it's quite long winded
I'm sorry.
let me know if it still doesn't make any sense.
Thank youuuuu
Iain
Pd and max/msp/jitter
Puredata is free open source software, Max costs money.
Puredata is more flexible and extensive than Max because it is maintained and
supported by a community who use it.
There are more freely available examples, patches, tutorials and documentation for Puredata than Max.
Max data can be imported into Puredata with Cyclone, but afaik the converse is not possible.
In many cases Max MSP has prettier GUI components, but depending on your point of view these can also be seen as fluff and cruft.
I consider Pd the "grown ups version of Max"
Since I don't use Max because I can't afford it (Cycling74 refused to offer me a complementary version in return for writing them tutorials) there may be advantages to Max I have no idea about.
The downside is what is typical of most free software, installation and configuration is more difficult.
So basically if you are prepared to do a little thinking and don't need a shrink wrapped spoon feed, it does more than Max, better, for free.
Pd newbie general question - MAX vs. Pd, OS X vs. Linux
I did some work with MAX at CNMAT and on my own a very long time ago, but since then I've led a MAX-free existence - don't know how that happened. Anyway, I finally have the opportunity to get back into it, so I just started to catch up and see how things have developed since I left. Holy cats - they certainly have changed. The fact that I'm on this forum shows you a bit about where my click trail has taken me.
Ok, so I have the opportunity to retool and almost start from scratch, and I'm faced with general questions about the ideal OS / software to commit to. I'm aware that questions like these can be inflammatory, so I'll give a bit more info and justification for being so general.
I'm primarily a Mac OS X dude, although in my main profession as web developer, I use all OpenBSD servers. For one particular project, I may be moving to Linux because of its clustering possibilities. But at home, I do all my work on my G5.
My training, such as it is, is in composition - with pen & paper even. But I'm eager to expand my toolset with various computer-assisted techniques, and I intend to develop my own, not just use what's out there, so programming is going to be a big part of my plans.
My immediate inclination was just to lay down the $495 for MAX/MSP (my copy is so old I don't think I can even upgrade). Maybe add jitter too - looks insanely cool. But then I clicked on a link to a company that does cycling74-based work, and followed a link to Pure Data. And things really opened up from there.
So it looks to me as if there's a bit of a conflict here...
-
If go with what's semi-familiar and go with MAX on my Mac, I immediately also get an IRCAM Forum Pass. Quite a bit of $, but a lot of bang. Good support. Established community.
-
But then there's Pd, which is open-source - that's a HUGE plus in my book, not just because it's free, and it'll run on my Mac...
-
...but from what I can tell, a lot of the most interesting development in this field would appear to be taking place on the Linux platform, AGNULA, dyne:bolic, etc.
So that's my question. MAX vs. Pd, OS X vs. Linux, and the natural combinations. Will Pd be a practical alternative to MAX/MSP, with its established user base and support, or even an improvement? Am I shortchanging myself with Pd on OS X? Might it be worth taking the plunge into Linux? I'll be interested to hear all advice and experiences.
Thanks...
Alex
Porting from Max to Pd
Thank you, CM, that sounds perfect, and I see the advice is from Krzysztof himself. But, I'm sorry I have to ask, what is a "[cyclone] object"?
I found another quote from Krzysztof on the subject of importing Max patches into Pd:
first of all, neither Pd itself, nor cyclone, opens max patches
ready for use. There is always lots of hard manual work involved,
unless the patch has been designed to be portable. Second, the
`open' command in Pd does not handle newer max patches. You need
cyclone's import feature, hidden under a mouse-click over
a [cyclone] object.
So apparently one creates a [cyclone] object in Pd and clicks on it in order to import Max files. Now if I can just figure out how to create a [cyclone] object...
Porting from Max to Pd
_I see there is a pop-up menu in the file open dialog that lets you select Max files instead of Pd files. I try this and loading the patch produces no errors, but neither does it open a window (it displays nothing at all). _
I've never used cyclone, but...
Quoting from the Pd list:
_*File->Open is obsolete* for loading max patches. Instead, create
a [cyclone] object and click on it. It should load max-text,
max-binary, and even the max-old format (which max itself does not
load anymore...) _
Another message suggest that you can switch cyclone between normal mode and max compatability mode using messages, although I didn't find out how.
Gridflow on agnula demudi ?
arrrrrgggg:
This is the GridFlow 0.8.0 configurator within Ruby version 1.8.2
[fast] Compile for speed (and not debuggability): enabled
[gcc3] GNU C++ Compiler 3: missing (undefined method `<' for nil:NilClass)
[stl] C++ Standard Template Library: missing (gcc compilation error)
[gcc64] GNU C++ in 64-bit mode: missing (gcc compilation error)
[libruby] Ruby as a dynamic library: missing (gcc compilation error)
[librubystatic] Ruby as a static library: missing (gcc compilation error)
[pentium] Pentium-compatible CPU: missing (gcc compilation error)
[mmx] MMX-compatible CPU (using NASM): disabled (would need pentium)
[simd] SIMD (MMX/SSE/Altivec) (using GCC): disabled (would need pentium)
[profiler] profiler (speed measurements): disabled (would need pentium)
[usb] USB Library: missing (where is usb.h ?)
[ieee1394] IEEE1394 Libraries for Linux (raw1394/dc1394): disabled (by author)
[x11] X11 Display Protocol: missing (where is X11/Xlib.h ?)
[x11_shm] X11 acceleration through shared memory: disabled (would need x11)
[sdl] Simple Directmedia Layer (experimental support): missing (where is SDL/SDL.h ?)
[objcpp] GNU/Apple ObjectiveC++ Compiler: missing (where is objc/Object.h ?)
[quartz] Apple Quartz/Cocoa Display: disabled (would need objcpp)
[aalib] Ascii Art Library: missing (where is aalib.h ?)
[jpeg] JPEG Library: missing (where is jpeglib.h ?)
[png] PNG Library <libpng12/png.h>: missing (where is libpng12/png.h ?)
[png] PNG Library <png.h>: missing (where is png.h ?)
[videodev] Video4linux Digitizer Driver Interface: missing (gcc compilation error)
[mpeg3] HeroineWarrior LibMPEG3 <libmpeg3/libmpeg3.h>: missing (where is libmpeg3/libmpeg3.h ?)
[mpeg3] HeroineWarrior LibMPEG3 <libmpeg3.h>: missing (where is libmpeg3.h ?)
[quicktimeapple] Apple's QuickTime: missing (gcc compilation error)
[quicktimehw] HeroineWarrior QuickTime4Linux (or LibQuickTime) (try #1): missing (gcc compilation error)
[quicktimehw] HeroineWarrior QuickTime4Linux (or LibQuickTime) (try #2): missing (gcc compilation error)
[xine] Xine movie decoder: disabled (by author)
[puredata] Miller Puckette's Pure Data: disabled (would need libruby or librubystatic)
generating ./config.make
generating config.h
creating Makefile
humm.... it will probably compile but seem will could do not much without jpeg png video4linux X11 etc....
will wait a .deb package...
Pd workshop in Madrid
> Instituto Nacional de las Artes Escénicas y la Música
> MINISTERIO DE EDUCACIÓN, CULTURA Y DEPORTE
> Centro para la Difusión de la Música Contemporánea
>
> Curso:Introducción a la Creación de Aplicaciones Musicales con PD/MAX por
> Juan Andrés Beato y Gregorio García Karman
>
>
> 7 - 11 Marzo 2005
> teoría: 16.00 a 19.00 horas
> prácticas: del 8 al 11 de Marzo, de 11.00 a15.00 horas en grupos de 2
> alumnos (solo alumnos activos)
>
> lugar:
> LIEM-CDMC
> Museo Nacional Centro de Arte Reina Sofía, 5ª planta
> c) Santa Isabel 52, 28012 Madrid
>
>
> Pure Data (PD) es un entorno de programación gráfica para aplicaciones
> musicales que funciona bajo Windows, OSX, Linux e Irix. Desarrollado por
> Miller Puckette y de distribución libre y código abierto, constituye junto
> con MAX/MSP uno de los modelos de software musical de más impacto y
> difusión en la actualidad. La programación se realiza interconectando
> objetos gráficos, que representan instrucciones, en un entorno
> fuertemente desestructurado y optimizado para el procesado de audio y
> vídeo en tiempo real. Su objetivo es ofrecer al músico una herramienta
> intuitiva y versátil: se utiliza para crear instrumentos virtuales o
> emular el funcionamiento de equipos hardware, realizar composiciones de
> música electrónica en vivo, en instalaciones, conciertos en red y jams
> on-line. Su flexibilidad para tratar MIDI, audio, vídeo y 3D en un paquete
> integrado y con múltiples posibilidades de control, hace que encuentre
> también un número creciente de aplicaciones en el ámbito de los
> multimedia, la performance, VJing..., así como en la enseñanza, en la
> ingeniería de sonido y la musicología (arqueología electroacústica). El
> objetivo del curso es dar a conocer la filosofía y los fundamentos de
> programación de los entornos basados en el "paradigma MAX", ilustrados a
> través de ejemplos realizados en Pure Data así como de aplicaciones reales
> ya desarrolladas.
> Se tratarán los conocimientos necesarios para poder dar primeros pasos en
> este entorno, así como para que el alumno pueda desenvolverse
> posteriormente utilizándolo para la creación de aplicaciones musicales
> propias. A lo largo del curso, se realizará un repaso de los diferentes
> elementos de PD demostrando su funcionamiento junto con conceptos
> básicos del programa (orden, encapsulamiento...). Se presentarán las
> principales familas de objetos estudiando ejemplos implementados en PD de
> técnicas 'en vivo' de síntesis, control algorítmico, manipulación de
> muestras y procesado, afines a la música electroacústica. De manera
> destacada, se tratarán aspectos particulares de PD como las data
> structures, una herramienta específica de este entorno para el
> almacenamiento y visualización de datos que permite el control de PD desde
> partituras gráficas diseñadas por el usuario. También se realizará un
> repaso de los externals y librerías más relevantes utilizadas en la
> programación de aplicaciones musicales (objetos de análisis,
> comunicación, espacialización, streaming...), señalando algunos aspectos
> comunes y divergentes entre PD y su contrapartida comercial MAX. Desde una
> perspectiva más general, se tratarán cuestiones propias de los sistemas
> musicales en tiempo real como el acondicionamiento de datos de control o
> el mapping y se presentarán diferentes estrategias de control sonoro
> empleadas en la creación de aplicaciones musicales, analizando ejemplos de
> piezas realizadas con PD y MAX.
>
> Dirigido a:
> Compositores, intérpretes musicales, musicólogos, artistas sonoros,
> músicos en general tanto profesionales como estudiantes.
>
> Inscripción
> Número de plazas: 8 alumnos activos (serán seleccionados por currículum)
>
> 22 alumnos oyentes
>
> Precio de matrícula: 45 euros. Descuento del 50% a estudiantes que lo
> acrediten
> Para inscribirse envíen una carta de solicitud con su nombre, dirección,
> teléfono, correo electrónico y/o fax indicando su intención de optar a
> "alumno activo" o no, y su currículum especificando experiencia en los
> campos que cubre el curso
> Envíen por correo ordinario, electrónico o fax a:
> "Curso Introducción a la Creación de Aplicaciones Musicales con PD/MAX "
>
> LIEM-CDMC
> (Museo Nacional Centro de Arte Reina Sofía)
> c) Santa Isabel 52 , 28012 Madrid, ESPAÑA
> tel: (+34) 91 774 1072, (+34) 91 774 1073; fax: (+34) 91 774 1075
> cdmc@inaem.mcu.es [url=http://cdmc.mcu.es
]http://cdmc.mcu.es
>
> El plazo de inscripción se cerrará el primer día de clase. No obstante el
> 24 de febrero se comunicará a los asistentes su admisión como alumno
> activo u oyente.
> El pago de matrícula deberán realizarlo después de que les hayamos
> confirmado la admisión, y el primer día de clase deberán entregarnos el
> justificante del pago.
> Ingresar el importe en cualquier oficina del BBVA, a nombre del
> Instituto Nacional de las Artes Escénicas y de la Música, en la cuenta
> siguiente:
> Entidad: 0182 Sucursal: 2370 Dígito de control: 40 c/c:
> 0200201218
> Al término del curso, los alumnos recibirán un diploma acreditativo de
> asistencia.
> Cualquier información que se precise sobre estos cursos o las diversas
> actividades del CDMC, puede solicitarse en la dirección indicada
> anteriormente.
>
Library for extended input-device support? (Win)
you could use GEM for mouse position stuff or the , but for things like mouse wheel i have no idea (maybe there is mouse wheel support coming with gem i don't remember).
One other solution could be an interface with flash, i think the last version support mouse wheel stuff.( you also need the flashserver object)
(damn i could not find the link for the flashserver object if someone have it )
if you think this is the good way for your project, and you don't succeed to found it, i could post the .dll i have.
Also one other possibility is the Framestein stuff http://framestein.org/ there is some possibilities to interact with the mouse too (but i found this less useable than GEM (i don't mean this is useless but i don't find the english word for 'pratique'àà
Trigon
Doesn't work:
../onoff/switch bo
... couldn't create
../onoff/switch po
... couldn't create
../onoff/switch jo
... couldn't create
../onoff/switch so
... couldn't create
../onoff/switch mo
... couldn't create
mix 19 0 12 0 (text->hip~) connection failed
mix 19 1 13 0 (text->hip~) connection failed
mix 20 0 12 0 (text->hip~) connection failed
mix 20 1 13 0 (text->hip~) connection failed
mix 21 0 12 0 (text->hip~) connection failed
mix 21 1 13 0 (text->hip~) connection failed
mix 22 0 12 0 (text->hip~) connection failed
mix 22 1 13 0 (text->hip~) connection failed
mix 23 0 33 1 (*~->text) connection failed
mix 24 0 33 0 (*~->text) connection failed
mix 25 0 19 0 (*~->text) connection failed
mix 26 0 19 1 (*~->text) connection failed
mix 27 0 20 0 (*~->text) connection failed
mix 28 0 20 1 (*~->text) connection failed
mix 29 0 21 0 (*~->text) connection failed
mix 30 0 21 1 (*~->text) connection failed
mix 31 0 22 0 (*~->text) connection failed
mix 32 0 22 1 (*~->text) connection failed
mix 33 0 12 0 (text->hip~) connection failed
mix 33 1 13 0 (text->hip~) connection failed