I have found this in a file, pmpd library, -example file - iSphere3D-help.pd
there is a "diagram" sub-patch with an image made of 1x1 canvas boxes. How would you create this type of thing? maybe its imported from another program. Works in vanilla without and other library.
Thanks
Will
-
canvas / pixel image technique - how can I accomplish
-
thanks ! cnv is maybe what Im missing Ive got the command list from "programming electronic music in pd" http://www.pd-tutorial.com/english/ch05.html#id436992 it doesnt have everything.
-
oh ... i didn't see the discussion here ... just built a little (and certainly dirty) patch for this after the discussion on facebook:
patch_n_bitmaps.zipit obviously becomes very slow with lots of canvases (and i'm already omitting the white pixels):
2024-09-21 22-46-18.mp4... plugdata on the other hand can deal with these quite easily - i creates rounded cnv rectangles though.
2024-09-21 22-58-59.mp4(i scale them in that video - so this is not a glitch, but many wide rectangles)
EDIT: this patch only works with a specific 3x8bit bmp format. so it would certainly look a bit funny with other formats.
-
@willblackhurst You can get the commands from opening any pd patch file which has the obj in question, referencing the pd patch file format documentation or right from within pd with my abstraction.
-
@oid ok ive got it sorted out , I dont think I know what the last 3 numbers do really though. I ended up using the first of the three an then you make the last two numbers zero. because they dont seem to do anything. so the first slot will end up being the rgb hex symbol.
-
@willblackhurst Last three numbers are bg color, fg color, and label color, I just set them all to black since it didn't really matter in this case, same reason for my lazy math. fg color does nothing in the case of cnv objects but all objects have the same three color values. The file format link will have that info or just set the colors and all options as needed save the patch and open it in a text editor or use my abstraction.
-
@oid I found in the canvas color help - it says fg is ignored pd_canvas_ploper.pd
Ill have a look at the links you gave me thanks very much I should have the machine done tomorrow hopefully and ill start putting graphics in my files.
-
@willblackhurst Doing graphics this way will greatly slowdown editing of the patches and can slow down the UI in general but it is less noticeable when not editing and just performing. If you go about things this way it can be useful to have the drawing triggered by a [loadbang] that way you can start pd with the -no-loadbang option when you want to edit and be freed of the UI lag when editing. pd has to manage the bounding box for each and every object on screen and it does so through serial communication between the tcl/tk UI and pd, it is quite the bottle neck. Using a [loadbang] to draw the graphics when the patch/abstraction is loaded does have the cost of slower creation time which can be an issue but much of the time it is tolerable.
Graphics are the one area I would never go vanilla for unless I had no choice or wanted blatant pixel art and was happy with big pixels . There are few abstractions for putting images in patches and [pdlua] just got a fairly nice bit of drawing stuff added in that really makes life easier.
-
@oid Ive got a working thing now it needs a liitle bang order fix this is the first try.
https://patchstorage.com/canvas_drawings-pix_dump-pd-vanilla-gem/plopper.zip -
heres the final version this is accurate looking and cleaned up with some image files.https://patchstorage.com/pixel-canvas-plotter-pd-vanilla-gem-4-pix-dump/