[PD] my first extension, FINISHED
Frank Barknecht
fbar at footils.org
Wed Sep 5 12:36:34 CEST 2007
Hallo,
Atte André Jensen hat gesagt: // Atte André Jensen wrote:
> I managed to finish my first extension (even while I haven't got a clue
> what pd is up to:-)).
We call these things "externals" around here. ;)
> It simply transforms output from notein to legato after these simple
> rules: left output: the last note that was pressed.
It doesn't seem to do this all the time. With some wild clicking on
attached patch I can make it send a "0" to the first inlet as well,
although no note 0 was ever sent. If it's in that state, also no
velocity output is generate anymore.
> right output: 0 if no notes are pressed other wise the velocity of
> the first played note. If you played a monophonic hardware synth,
> you'll understand my poor explanation...
One thing that IMO should accompany every Pd external is a help patch.
Just make a file NAMEOFEXTERNAL-help.pd (legato-help.pd) that shows
and explains what your object does, what the inlets accept and what
the outlets will produce. Ideally you'd make a little example of the
object in use as well. help-patches are a good way to test objects as
well.
> Now, I have a couple of questions, just to round this off:
>
> 1) The makefile is the one IOhannes pointed me towards([1]), but with
> PDROOT hardcoded to "/home/atte/software/pd/current/". Isn't there a
> more elegant way so that someone trying to build it will have to edit
> the makefile?
I didn't need to edit the Makefile at all on Linux, however I did
change #include "m_pd.h" to #include <m_pd.h> (see another thread
here). If m_pd.h is in a system include path, all the PDROOT stuff is
unnecessary to build the class.
> 2) It doesn't like to receive a bang (basically anything but float). It
> doesn't really make much sense to send it a float, but would it be nicer
> to handle this in some way? Right now it just prints "no method for
> 'bang'" in the pd window...
That's okay: If an object is not supposed to deal with "bang" than
that's how that object is supposed to be and printing the
error/warning to the console is fine.
> 4) Should I put it up somewhere, for instance on my servers svn-repo?
puredata.info would be a good place as well. Or I would volunteer to
add it to the Sourceforge-CVS.
Ciao
--
Frank Barknecht _ ______footils.org_ __goto10.org__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: legato-help.pd
Type: application/puredata
Size: 1219 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20070905/8aa10e6f/attachment.bin>
More information about the Pd-list
mailing list