Creating images using LUA

Home Forums General Programming Creating images using LUA

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #120264
    Puppeteer
    Participant
    • Topics: 16
    • Replies: 185
    • Total: 201
    • ★★

    I’m wondering if anyone has experience with building a bitmapped image using LUA.

    To explain the application, Kurzweil K series synths have a graphics dump command.
    It returns a pixel value from the graphics layer for every pixel on the screen. They are returned as each pixel being the last 6 pixels of each byte. It’s essentially a 1 bit (black/white) bitmap.

    64 rows of 240 columns of pixels.

    I want to display the screen in Ctrlr with the parameters over the top. A lot of screens on the K2600 rely on the graphics to make sense of them, and the rest, just coz they look good.

    I can write all the values as hex or a big binary string, and it seems like there are a few graphics options though the rending demo no longer works on windows (Paint throws an error).

    Essentially I’m looking at building a front panel replica as a short term solution rather than building a full blown editor (which requires reverse engineering massive sysex dumps).

    Basically I want to know how to take the pixel states and create an image in Ctrlr that I can update on demand.

    Thanks in advance everyone.

    • This topic was modified 3 months, 1 week ago by Puppeteer.

    The Puppeteer
    http://godlike.com.au

    #120273
    dnaldoog
    Participant
    • Topics: 4
    • Replies: 480
    • Total: 484
    • ★★

    Hi Puppeteer

    Can you explain this in more detail? Give an example of the sysex?

    They are returned as each pixel being the last 6 pixels of each byte. It’s essentially a 1 bit (black/white) bitmap.

    I think the idea is to take a 64 x 240 multidimensional array and map each 1 to a black pixel and each 0 to a white pixel? Is that about right.

    You would use a uiComponent and place a 1 x 1 black png or g:fillRect() ?? in each ‘on’ state – See attached panel for the basic idea.

    pixmap.png

    • This reply was modified 3 months, 1 week ago by dnaldoog.
    • This reply was modified 2 months, 3 weeks ago by dnaldoog. Reason: added download
    • This reply was modified 2 months, 3 weeks ago by dnaldoog.
    Attachments:
    You must be logged in to view attached files.
    #120282
    Tedjuh
    Participant
    • Topics: 9
    • Replies: 97
    • Total: 106
    • ★★

    Is fillRectList supported by Ctrlr? Because Juce says:

    FillRectList()
    If you have a lot of rectangles to draw, it may be more efficient to create a RectangleList and use this method than to call fillRect() multiple times.

    In my opinion, it’s easier to translate to a multidimensional array too.

    Just wondering, because I think that Ctrlr doesn’t get happy when you throw 15.360 png’s at it. |I know it can handle that many rectangles though (cough, arpeggiator, cough).

    #120295
    dnaldoog
    Participant
    • Topics: 4
    • Replies: 480
    • Total: 484
    • ★★

    Hi Tedjuh,

    I don’t think RectangleList is supported.

    This attached panel would probably give the OP a starting point.

    Attachments:
    You must be logged in to view attached files.
    #120299
    Tedjuh
    Participant
    • Topics: 9
    • Replies: 97
    • Total: 106
    • ★★

    Could you post two dumps? One for the “GETGRAPHICS” or 18h command and one for the “SCREENREPLY” or 19h command? And a picture of the screen at the time the command is done?

    The text and parameter names and values won’t be a big problem because those are just ascii representation. I think the graphics are for the “faders” and other things that need to be drawn.

    It would help to find a solution to your problem.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Programming’ is closed to new topics and replies.
There is currently 0 users and 34 guests online
No users are currently active
Forum Statistics
Threads: 2,460, Posts: 17,299, Members: 52,821
Most users ever online was 12 on January 22, 2019 3:47 pm
Do NOT follow this link or you will be banned from the site!