Hey Brian,

Welcome, glad to see more libraries being produced. One thing that should make your life a lot easier is using the library template. It handles building on GNU/Linux, all Debian flavors (kFreeBSD, etc), Mac OS X Universal, Windows/MinGW and Windows/Cygwin. iOS and Android are also supported, though much less tested. Provided you write your objects to be one class per .c file, its really easy to use. Here are the docs:

http://puredata.info/docs/developer/LibraryTemplate

It also provides an easy path for packaging your library for Debian.

.hc

On May 29, 2011, at 3:20 PM, Brian Neltner wrote:

Dear Puredata folks,

I have a new external that does HSI (hue, saturation, intensity) to RGB conversion. There is already an existing HSV2RGB function, but HSI is a
more sensible color space for LED lighting (which is what I use my
external for).

I don't want to get involved in the PureData development community
really, given the numerous current demands on my time. However, I think
that others may want this external so I was wondering if there is a
simple way to upload it. As is, you just run the makefile using gcc on
either a mac or linux to produce the external.

I don't know how to use windows, but I imagine someone could figure out
how to modify the makefile to target the platform if they wanted.

I also included a usage patch showing how I use it to control LED
lighting over OSC through a MIDI controller. Sorry if it's a bit messy, I grew up on Max/MSP where we just wire everything and then hide them. I didn't realize that hiding in PD is done with some kind of window and so
I didn't do things like send and receive. Should work though.

I'd also be curious if anyone knows of a datarate limiting object for
messages. Right now, I'm using buddy along with a metronome to
accomplish the task (pretty straightforward), but it seems like a task
that other people might be interested in -- for instance in cases where events are overwhelming the CPU and there is a desire to limit the rate of messages when the CPU is being overutilized. In my patch, I use it to limit the maximum datarate physically being sent out over UDP to my wifi
lights because too high of datarates result in lags at the 802.11b
level.

The other object that I found was strangely missing was the ability to
do powers or logarithms inside of an expr. Probably been brought up
before, but I wanted to do logarithmic scaling of a dial output to
control the speed of hue rotation of lighting. I ended up doing it with an any mode sync, pow, and an expr on the exponent but it was messy and perhaps tricky for someone with less experience to figure out how to do.

Best,
Brian Neltner
< hsi2rgb .zip > < hsi2rgb .pd_darwin > < hsi2rgb .pd_linux ><directosc.pd>_______________________________________________
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev



----------------------------------------------------------------------------

Looking at things from a more basic level, you can come up with a more direct solution... It may sound small in theory, but it in practice, it can change entire economies. - Amy Smith



_______________________________________________
Pd-dev mailing list
Pd-dev@iem.at
http://lists.puredata.info/listinfo/pd-dev

Reply via email to