[L2Ork-dev] Hello, and a rough plan on how to port K12 mode for GSoC
Jonathan Wilkes
jon.w.wilkes at gmail.com
Mon Mar 25 12:43:09 EDT 2019
Hi Shaoqian,
That looks like a great start-- you've definitely covered a lot of the
details here.
A few quick responses:
* tooltips still haven't been implemented for normal mode of Purr
Data. So we'll have to figure out
how we want to implement them as part of the project idea-- CSS, HTML
(e.g., SVG <title>), or JS.
* the point about needing an absolute path seems odd. The ggee/image
external should be able
to handle relative paths. Also, @pd_extra should work there, too.
* if possible, we should probably ensure that "k12" mode can work
correctly on a touchscreen. The
abstractions look like they are large enough to accommodate this. The
one thing most affected would
be making connections between objects.
* one question: does "k12" mode even need the window/application menu?
If we can somehow add
the needed buttons to the k12 menu perhaps it's easier to just hide
the window/application menu
altogether (or have a very simple application menu on OSX).
* since we're able to zoom in Purr Data,it might be nice to use svg
images in place of png images
for the abstractions. I haven't had a look at the images yet, but if
they are mostly simple shapes it
should be possible to quickly convert them in Inkscape or another utility.
Anyway, this is a very impressive start. For the proposal I'd suggest
to start thinking about how
to organize all the tasks you wrote above for the summer. It
definitely appears that these changes
can be done incrementally which will be very helpful-- that is, we can
commit changes over the
course of the summer rather than one big merge at the end of the summer.
Best,
Jonathan
On Mon, Mar 25, 2019 at 12:15 PM Coniine Dieu <coniinedieu at gmail.com> wrote:
>
> Hi list!
>
> I'm Zhang Shaoqian, a student from National University of Singapore, and of
> course very excited about the GSoC 2019 opportunity. Above all, thanks all for
> Purr Data. As a self-proclaimed musician I find it absolutely beautiful and
> empowering, and by reading the source code I come to understand the tremendous
> endeavors put into this. Thank you.
>
> Now a bit more about GSoC. Under the name nerrons and with this email address, I
> have a few very elementary modifications merged into master (!257, !260 and
> !270) since January, the last one about our building system (which "humans
> cannot reason about", according to Jonathan). I've been thinking about how to
> port K12 mode since I have more experience in the frontend. During the past few
> weeks I've read all the nw.js code, a portion of the legacy TCL code and the C
> code, and spent some time with the K12 mode of pd-l2ork on Linux. Here's my
> observations and how I roughly plan to tackle the problem. In case this isn't
> readable, here's a Google Docs link to the same thing:
> https://tinyurl.com/pdk12plan
>
> - Make all k12 abstractions usable again:
> - Good news! (heavily) modifying C code doesn't seem necessary, since all k12
> abstractions are built with existing objects. We don't even need to add the
> gui_ functions in pdgui.js. Actually I got K12 patches working already,
> link at the end.
> - Put the patches in the "extra" folder in the installation directory. Need to
> modify the build system for that.
> - Get the pretty pics working.
> - Update respective pd files in l2ork_addons/K12 with the correct paths of
> the icon and the gop background image.
> - Seems like absolute path is needed for the [image] in abstractions to find
> correct resources, otherwise it will look under the current working
> directory. Need to find a way to generate absolute path just like the old
> @pd_extra.
> - Adjust the layout in the gop area, so that the background image doesn't
> cover up inlets, outlets and the border of the gop area. Currently it
> looks a bit off after simply updating the path; Need to either automate
> this or manually do it.
> - Index help files for k12 abstractions. If we decide to keep popups in purr's
> k12 mode (while l2ork forbids popup), make sure they show up when right
> clicking on the abstraction and clicking help.
> - Maintain a list of k12 abstractions with correct order, to be used in the k12
> frame later. We probably need another json file for this.
> - Change menu bar items:
> - In File, add "show k12 demos"
> - Hide complicated menus, keep only File, Edit and Windows (cuz mac requires
> the "windows" menu, if I'm not wrong)
> - Remove find-related entries in Edit, and similarly anything related to find
> - Display tooltips on the inlets and outlets of k12 abstractions. Should be
> simple using JS hover events.
> - Add a k12 frame: a <div> besides the canvas's <svg>. Can be structured in an
> HTML file and styled with CSS Grid. Things to take care of:
> - Handling geometry:
> - Set a different minimum height and width of patch windows so k12 frame
> doesn't get cropped
> - Make sure geometry-related functions acknowledge the k12 frame,
> e.g. zooming, optical zoom, etc. If we put the k12 frame into the <body>
> of pd_canvas.html I think it won't be frustrating.
> - Layout of the k12 frame:
> - A button that switches on/off edit mode and changes pic when switching
> (icons/edit.png & icons/perform.png).
> - Two tabs of control/sound categories (icons/data.png, data_on.png,
> sound.png, sound_on.png).
> - A bunch of buttons of k12 abstractions from the current category, listed
> in a predefined order.
> - Make sure we have tooltips for everything.
> - Add keyboard shortcuts.
> - (Nice-to-have) Make a toggle that switches the frame on/off. "display:none;"
> might prove useful here.
> - Add a hidden preset_hub to all k12 canvases, using negative coords and
> %hidden%.
> - In frontend, prevent the PH from being seen or selected in any way (just
> don't include it in the DOM instead of using "display:none;", I guess?)
> - Make sure demos have nice presets.
> - Do enough testing and make sure preset_hub works as intended. (This seems
> like stating the obvious, but I think it's quite important, given that kids
> might mess around)
> - (Optional) Hide the console by default. Nw.js should have APIs for this.
>
> Please kindly point out if I missed out anything. I would really appreciate it
> if I can get feedback on this "proposal-of-proposal" and then I'll start writing
> the proper proposal, hopefully getting accepted, of course :-) Also, I managed
> to make one of the K12 demos working with the latest Purr Data. I messed up the
> sequencer so it sounds experimental, the borders of the abstractions aren't
> displaying elegantly, there are two sets of images, but it works. Google Drive
> link: https://tinyurl.com/pdk12demo
>
> Looking forward to hearing from you!
>
> Cheers
> Shaoqian
> _______________________________________________
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
> https://disis.music.vt.edu/listinfo/l2ork-dev
More information about the L2Ork-dev
mailing list