Re: Images from snippets
Noeck writes: >> Well, one does not need numbers. One can just use a tag- or tweak- like >> command on elements that should be included in the icon, and then the >> bounding rectangle of all those is taken. Possibly always including the >> staff lines on the given stretch. >> > > I considered that, too. My reasoning might be wrong, but it was as follows: > > 1. there should be a fixed aspect ratio for a proper thumbnail look on > an overview page, this is easier with numbers of pixels instead of > bounding boxes. (desired aspect ratio still to be defined) > > 2. for a first visual impression, the whole object is often not > necessary. In the example I gave, the hairpin does not have to be very > long (not the whole hairpin needs to be shown), just the combination of > hairpin and text must be visible > > 3. one can still invent some automatic default way to generate such an > icon, in case the snippet-author did not supply the information. But a > human decision what is the best part/detail will show a clearer message > in 95% of the cases. With that image, you'd tag the \ and the poco. That _is_ a human decision. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Images from snippets
> Well, one does not need numbers. One can just use a tag- or tweak- like > command on elements that should be included in the icon, and then the > bounding rectangle of all those is taken. Possibly always including the > staff lines on the given stretch. > I considered that, too. My reasoning might be wrong, but it was as follows: 1. there should be a fixed aspect ratio for a proper thumbnail look on an overview page, this is easier with numbers of pixels instead of bounding boxes. (desired aspect ratio still to be defined) 2. for a first visual impression, the whole object is often not necessary. In the example I gave, the hairpin does not have to be very long (not the whole hairpin needs to be shown), just the combination of hairpin and text must be visible 3. one can still invent some automatic default way to generate such an icon, in case the snippet-author did not supply the information. But a human decision what is the best part/detail will show a clearer message in 95% of the cases. Joram <>___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Images from snippets
Janek Warchoł writes: > 2013/12/6 Noeck : snippet-icon = 85x85+95+107 Then these lines could produce the corresponding image: lilypond -fpng example.ly convert -crop 85x85+95+107 example.png example-icon.png >>> >>> This seems somewhat inconvenient to me (too manual). But i think we >>> should rather speak about implementation details when we *have* a HTML >>> frontend >> >> Just to make sure, I am understood correctly: The manual thing is the >> numbers, the script should take them automatically from the file and use >> them in convert. > > Yes, i understand. But i would prefer not to ask snippet authors to > add such numbers to the files if possible. One of my highest > priorities is to keep things simple - so simple that noone would ever > think "i'd add this snippet, but i don't have time to fill all > description fields". :-) Well, one does not need numbers. One can just use a tag- or tweak- like command on elements that should be included in the icon, and then the bounding rectangle of all those is taken. Possibly always including the staff lines on the given stretch. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Images from snippets
2013/12/6 Noeck : >>> snippet-icon = 85x85+95+107 >>> >>> Then these lines could produce the corresponding image: >>> lilypond -fpng example.ly >>> convert -crop 85x85+95+107 example.png example-icon.png >> >> This seems somewhat inconvenient to me (too manual). But i think we >> should rather speak about implementation details when we *have* a HTML >> frontend > > Just to make sure, I am understood correctly: The manual thing is the > numbers, the script should take them automatically from the file and use > them in convert. Yes, i understand. But i would prefer not to ask snippet authors to add such numbers to the files if possible. One of my highest priorities is to keep things simple - so simple that noone would ever think "i'd add this snippet, but i don't have time to fill all description fields". :-) best, Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Images from snippets
>> snippet-icon = 85x85+95+107 >> >> Then these lines could produce the corresponding image: >> lilypond -fpng example.ly >> convert -crop 85x85+95+107 example.png example-icon.png > > This seems somewhat inconvenient to me (too manual). But i think we > should rather speak about implementation details when we *have* a HTML > frontend Just to make sure, I am understood correctly: The manual thing is the numbers, the script should take them automatically from the file and use them in convert. Cheers, Joram ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Images from snippets
2013/12/5 Noeck : > > For later use*, one could introduce a header entry to get a small image > showing the purpose of the snippet. There one could specify the > coordinates of a part of the example. > Naming suggestions: > snippet-image, snippet-crop, snippet-thumbnail, snippet-icon > > Here is an example to show what I mean: > for snippets/notation-snippets/hairpin-with-text > this line could be added to the header: > snippet-icon = 85x85+95+107 > > Then these lines could produce the corresponding image: > lilypond -fpng example.ly > convert -crop 85x85+95+107 example.png example-icon.png This seems somewhat inconvenient to me (too manual). But i think we should rather speak about implementation details when we *have* a HTML frontend Anyway, thanks for suggestions! Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Images from snippets
Am 05.12.2013 22:28, schrieb Noeck: Hi, here is an idea for the snippets library: For later use*, one could introduce a header entry to get a small image showing the purpose of the snippet. There one could specify the coordinates of a part of the example. Naming suggestions: snippet-image, snippet-crop, snippet-thumbnail, snippet-icon Here is an example to show what I mean: for snippets/notation-snippets/hairpin-with-text this line could be added to the header: snippet-icon = 85x85+95+107 Then these lines could produce the corresponding image: lilypond -fpng example.ly convert -crop 85x85+95+107 example.png example-icon.png Of course, this could be automated. If the author provided the coordinates of the interesting part of the examples file, the necessary information would be in the library. Potential pitfall: When the the example is changed, the numbers need adjustment. If commandline cropping is possible with svg (should be the case), it might be an even better solution. What do you think? (Especially Urs and Janek) I think this is well in line with an idea I have had for some time. Probably we'll soon be in the situation to have too many snippets to be conveniently used so we should somehow have documentation. I'm thinking about a script that creates Markdown files from the snippets themselves, respectively their headers. Github will then display them as HTML pages automatically. Adding images to that documentation is surely a good idea. Could you please add an issue to the repository's tracker? This will reduce the risk of the idea being lost. Urs ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Images from snippets
Hi, here is an idea for the snippets library: For later use*, one could introduce a header entry to get a small image showing the purpose of the snippet. There one could specify the coordinates of a part of the example. Naming suggestions: snippet-image, snippet-crop, snippet-thumbnail, snippet-icon Here is an example to show what I mean: for snippets/notation-snippets/hairpin-with-text this line could be added to the header: snippet-icon = 85x85+95+107 Then these lines could produce the corresponding image: lilypond -fpng example.ly convert -crop 85x85+95+107 example.png example-icon.png Of course, this could be automated. If the author provided the coordinates of the interesting part of the examples file, the necessary information would be in the library. Potential pitfall: When the the example is changed, the numbers need adjustment. If commandline cropping is possible with svg (should be the case), it might be an even better solution. What do you think? (Especially Urs and Janek) Cheers, Joram * I am thinking of an html page, showing all snippets. Being someone who likes overview pages, this would make it easier to skim over lots of snippets and estimate if one of them can be useful. ascii-art illustration: [ ] *snippet-title* [image] snippet-description [ ] ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user