On 07/07/2014 04:22 AM, IOhannes m zmoelnig via Pd-dev wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2014-07-07 09:43, Greg Schroeder via Pd-dev wrote:
Could someone give an example of a single object name that creates more than one Pd class?
[list], [array], [scalar], [text].
How would one go about reducing those 194 object names?
could you give more context about what you want to achieve?
btw, i had a quick glance at the sourcecode of Pd and found that it contains about 238 distinct class-names.
Here's a quick Pd-l2ork patch to automate the process:
[bang( | | [r break] | | [until] | [f]x[+ 1] | [classinfo objectmaker] | [route bang] | | [s break] | [add2 $1( | [ (
Which fills the message box with this:
pd page group table group declare bng hradio hdl rdb radiobut radiobutton hsl hslider cnv my_canvas nbx my_numbox tgl toggle vradio vdl vsl vslider vu inlet inlet~ outlet outlet~ struct template drawpolygon drawcurve filledpolygon filledcurve drawrectangle filledrectangle drawellipse filledellipse draw plot old_plot drawnumber drawsymbol pointer get set element getsize setsize append sublist mtof ftom powtodb rmstodb dbtopow dbtorms print canvasinfo pdinfo classinfo objectinfo int i f b send s receive r select sel route pack unpack trigger t spigot moses until makefilename swap fswap change value v delay del metro line timer pipe + - * / pow max min == != > < >= <= & && | || << >> % mod div sin cos tan atan atan2 sqrt log exp abs wrap clip midiin sysexin midirealtimein notein ctlin pgmin bendin touchin polytouchin midiclkin midiout noteout ctlout pgmout bendout touchout polytouchout makenote stripnote poly bag random loadbang initbang closebang namecanvas serial cputime realtime netsend netreceive qlist textfile openpanel savepanel key keyup keyname list append list cat list prepend list split list trim list length preset_node preset_hub +~ -~ *~ /~ max~ min~ tabwrite~ tabplay~ tabread~ tabread4~ tabosc4~ tabsend~ tabreceive~ tabread tabread4 tabwrite sig~ line~ vline~ snapshot~ vsnapshot~ env~ threshold~ dac~ adc~ delwrite~ delread~ vd~ fft~ ifft~ rfft~ rifft~ framp~ hip~ lop~ bp~ biquad~ samphold~ rpole~ rzero~ rzero_rev~ cpole~ czero~ czero_rev~ send~ s~ receive~ r~ catch~ throw~ clip~ rsqrt~ q8_rsqrt~ sqrt~ q8_sqrt~ wrap~ mtof~ ftom~ dbtorms~ rmstodb~ dbtopow~ powtodb~ pow~ exp~ log~ abs~ print~ bang~ phasor~ cos~ osc~ vcf~ noise~ soundfiler readsf~ writesf~ block~ switch~ samplerate~ import
***
Some of these-- like "preset_node" and "draw"-- are in Pd-l2ork but not Pd Vanilla.
Others are just aliases, or "creator" names. To filter them I drip that list through another [classinfo]. So these aren't actually class names:
switch~ q8_sqrt~ q8_rsqrt~ r~ s~ del v fswap t sel r s b f i filledellipse drawellipse filledrectangle drawrectangle filledcurve filledpolygon drawcurve outlet~ inlet~ vslider toggle my_numbox my_canvas hslider radiobutton radiobut rdb group table group page
***
That leaves 216, but that's probably not accurate because the "objectmaker" class doesn't have methods for every loaded Pd class. Ones like "message" and others which can't be created in an object box don't appear with my patch. For a comprehensive list of loaded classes I'd need to step through Pd-l2ork's class table. That might be nice to add to [pdinfo] (which again is only available in Pd-l2ork).
But again, this won't tell you about classes that are _potentially_ loadable by Pd-l2ork/Pd-extended which haven't been loaded yet. For that you'd probably need to search all the paths Pd searches and look for binaries with the extension for your particular OS (on GNU/Linux I believe it's .pd_linux). Then try loading all of those libraries, then step through the class table (which again only exists in Pd-l2ork) and get the tally.
When I code up a method to query the class table, I'll make a patch to load every binary in every search path of Pd. That should give a definitive answer on the total "loadable" classes in Pd-l2ork (which is probably close to Pd-extended).
-Jonathan