Cairo Graphics

Hello there, I’m very new to the world of Monome and have recently been playing with a Shield version of Norns which is very very interesting and I’ve invested in a Grid. I feel like I’m drinking from a fire hose.

I understand that the Norns graphics code is a very simplified wrapper around the Cairo graphics library. Is it possible to use this code outside of Norns? If I had a Pi with a display like https://www.waveshare.com/1.44inch-lcd-hat.htm could I develop prototype Norn display code without having to take my (rather valuable to me) Norns everywhere

Thanks for any help to a newb

Ian

That’s a really cool idea. (Makes me want to take it one step further and just have a little window floating on my computer screen…)

I haven’t seen anyone do this yet but it is possible. Most of the norns screen functions are abstractions of Cairo functions. So, the intrepid hacker could write a little wrapper of their own that uses the same API and the code would be portable.

3 Likes

@tyleretters it’s been POC’d a couple times; paging @csboling for example. there are also open issues on GH

as you say it is straightforward to have the norns stack draw to a different window or framebuffer.

1 Like

Specifically you can tell matron to use a different framebuffer device as a command line argument. My original experiments with “norns on a (linux) desktop” attempted to point this at a memory mapped file and used unix fifos for the encoder/key GPIO. This is a pretty low level approach that allows the hardware emulation stuff to be in a totally separate program, so that’s kind of nice. I did get this working as an approach to running a “complete” norns stack on a laptop without any norns hardware, but I’ve since rethought the approach. I think it makes more sense to have some abstraction inside matron that lets you draw to different screen backends, which I think is more like what you want.

I’m still interested in this and will jump back into it eventually, but since taking possession of a norns I’ve been rather distracted by scripting and playing with it. For the pathologically curious my branch with this stuff is here under “hwemu”.

2 Likes

Many thanks everybody for the responses. It would appear I have much to learn :slight_smile:

I’m mostly a python programmer but have been picking up Lua (pretty simple), starting to study SC (not so simple) and maybe I should get back into C again by the look of it.

So much to do and so little time! Many thanks again everyone

Ian

1 Like