On Pictures and Vector Graphics in OpenMusic

Hi,

I’ve been customising OpenMusic’s icons for a while now. In so doing, I’ve come across a few issues that I’ve been unable to solve:

  1. For most functions, replacing icons is fairly straightforward, OM accepts bitmaps whatever the size you throw at it, but there are a few cases, like “om+”, “om*”, “om-”, “om/”, that display the icon in its actual size. Why does it happen, and is there a way to tweak OM’s code to avoid it?

  2. Would it be possible to change OM’s code in order for it to accept files in vector formats, like SVG, as icons? If so, what would be needed to make it so?

  3. Unlike sound, text or midi files, it seems that it isn’t possible to drag and drop a picture file (I get the message: “can not be imported in the patch” due to it being of an “unknown type”). Is there a way to change OM’s code to add drag and drop also for pictures?

Any hints or insights on these issues would be most welcome.

All the best,
António

Hi António.

I’ve included a short patch below to allow “3)”, to d&d of bitmap files.

About issue “1)”, i’m sure a change of icons is possible. But most likely it will have to wait for om7, as OM6 is left for bug-fixing now.

I beleive recent versions of LW allows vector graphics on the 3 major platforms, so issue “2)” should be possible as well. Again for om7.

If these issues are important now because of e.g. accessibility issues or similar, please let me know, and i’ll give these a try as well.

-anders
drag-and-drop-bitmaps.lisp (816 Bytes)

Hello Anders,

Thank you so much for the lisp functions, they worked perfectly.

Concerning both other issues I raised:

My first question was about troubleshooting in a way. Having already changed a bunch of icons, I still haven’t figured out why I can change the icons of some functions with icons of any size without any issue, and why for some it just isn’t possible. I just can’t fathom why this happens.

My second question wasn’t about troubleshooting, it was more about a medium-term goal, to see what I needed to do to customise the GUI in the way I described. Being able to add vector graphics icons to OM would be great.

All the best,
António

Hi António. I think you can just tweak the function #'def-icon-size (inside “code/kernel/ommodele/ombasicobjects/boxes/ombox.lisp”) to also be able to tune the icons for those generic functions that do not show their names in the patch box ('om+ 'om* 'om- 'om/ 'om^ 'omand 'omor 'om-e 'om-log 'om< 'om> 'om<= 'om>= 'om= 'om/=).

-anders

Hi again Anders

You were right, that totally nailed it. Thank you so much.

All the best,
António