LED Matrix Studio v0.8.
13
August 5th 2018
www.freshney.org // [email protected]
www.maximumoctopus.com/electronics/builder.htm
Application: www.maximumoctopus.com/electronics/downloads/LEDMatrixStudio.zip
Source code: www.maximumoctopus.com/electronics/downloads/LEDMatrixStudioSource.zip
In this document the word matrix and frame mean the same thing. It’s an arrangement of pixels with a specific set of
dimensions.
Animation refers to all the frames in the current project.
Basic usage
Left mouse button draws on the matrix in the ON colour
Right mouse button draws on the matrix in the OFF colour.
When using drawing modes (rectangle, circle etc.), the button that is first clicked determines the final draw colour.
In bicolour or RGB mode, the colour selection for each button is shown on the left of the draw tools toolbar.
In gradient mode (RGB and bicolour only) the middle mouse button is used to draw with the gradient.
Menus Page 2
Toolbars Page 10
New dialog Page 18
Export Page 20
Automation Page 23
Code Templates Page 24
About Page 29
Menus
File
New
Create a new project. See page 18 for more details.
Open
Load a previously saved animation or single frame.
Import from bitmap
Use a bitmap image as the basis of a new animation of single frame.
Import in to current frame
Load a previously saved single frame in to the currently visible frame.
Merge in to animation
Appends frames from a file to the end of the current animation.
Combine with the animation
Combines the frames from a file in to the animation, starting at frame 1.
Save
Save the current animation or single frame to a file.
Save as
Save the current animation or single frame to a file to a new file name.
Save single frame as
Save the currently selected frame to a file.
Save as LED Matrix Studio Font
Save the current frames in a format that can be used as a font within the application. Select a font by
pressing the right mouse button on the Font button within the drawing tools draw menu.
Preferences
Open application settings.
Exit
Close the application. If an animation is running the application will not close, the animation will stop
playing.
Edit
Undo
Undo the last editing action.
Redo
Redo the last undo.
Copy
Copy the current frame to the clipboard.
Copy from previous
Copy the frame before the selected frame to the clipboard (if the current frame > 1).
Paste
Pastes the frame on the clipboard in to the selected frame.
Paste special
Paste and shift left
Paste and shift right
Paste and shift up
Paste and shift down
Pastes the frame on the clipboard in to the selected frame. The contents of the clipboard are then
modified depending on which special action is selected.
Shift left
Shift the entire frame one pixel to the left.
Shift right
Shift the entire frame one pixel to the right.
Shift up
Shift the entire frame one pixel upwards.
Shift down
Shift the entire frame one pixel downwards.
Rotate anti-clockwise
Rotate the entire frame 90 degrees anti-clockwise.
Rotate clockwise
Rotate the entire frame 90 degrees clockwise.
Flip
Flips the current frame in the X-axis.
Mirror
Flips the current frame in the Y-axis.
Invert
“on” pixels become “off”, and “off” pixels become “on”.
Edit comment
Edit the comment that will be saved with the current animation/single frame.
Set dead pixels
If you have a device with dead pixels, are a device with missing LEDs then you can set them here and they
will be ignored when drawing.
View
Column/row data toolbar
Show or hide the simple export toolbar.
Show animation toolbar
Show or hide the animation toolbar.
Column / row toolbar appearance
Hex output
Enable/disable hex output of values
Hex output prefix
Select either $ or 0x for hex values.
Pad output
Ensure all values are a minimum length. Value is padded with zeroes.
Brackets
Select which brackets to use for the output.
Use format embedded in save files
Change the selections above based on the settings of the current file.
Font mode
Toggle font mode.
Change start ASCII code (default is 32)
By default font mode starts at ASCII code 32 (the space character); change it here.
Previous frame
Move to the previous frame in the animation. If this action is performed on the first frame, then it will
navigate the last frame.
Next frame
Move to the next frame in the animation. If this action is performed on the last frame, then it will navigate to
the first frame.
Grid
Enabled/disable a grid in the matrix display.
Preview
Show/hide the preview display.
Shows the matrix in a smaller size, it makes designing graphics and fonts much easier.
Preview size
Select the size of the preview display.
Preview view
Select from two different display modes:
Square
Exactly how it looks in the main display, except smaller.
Radial
Maps the pixels around a circle. This ideal if your design is composed of LEDs in a circular pattern.
Preview void (radial)
The distance from the centre of the circle to the first pixel. Use this to tweak the display for a better idea of
how your project might look.
Larger voids will generally mean larger pixels in the preview, smaller voids will give you smaller pixels.
Font viewer
View all of the fonts available to the application. See every character in normal and RGB mode.
Project
Clear all frames
Clear all frames in the current animation. Does not remove any frames.
Clear all frames with gradient
Flip all frames
Flip all animation frames in the Y-axis.
Mirror all frames
Flip all animation frames in the X-axis.
Invert all frames
Perform the invert action on all frames in the animation. “on” pixels become “off”, “off” pixels become “on”.
Apply gradient to all frames
Applies the current gradient to all “on” pixels.
Fade First -> Last (RGB mode only)
Fades each pixel individually. The colour in the first frame is faded to the colour of the pixel in the last frame.
Export
See page 20.
Code templates
Export the animation/frame to a code template. See page 23 for more information on code templates.
Export to bitmap
Exports the current animation to a single bitmap image.
Memories
LED Matrix Studio has 10 scratchpad memories that can be used to store frames. One frame per memory.
They are erased whenever a new project is started; they are not erased when clearing a single frame, or clearing the
entire animation.
Copy current to
Copy the currently displayed frame to one of the 10 memories.
Restore current from
Copy the selected memory to the currently selected frame.
Export user memories
Save the contents of the 10 user memories.
Clear all user memories
Erase the contents of the 10 user memories. This cannot be undone.
Tools
Auto-save
Enable auto-save mode.
Auto-save interval
Change the interval between auto-saves.
Open auto-save folder
Show the folder where auto-saves are located. Opens in Explorer.
Automate
Simple animation system. See page 23 for more details.
Help
Help
Opens this help file!
Example code
Opens the \example code\ folder.
Check for updates
Checks maximumoctopus.com for a new version.
Website
Opens maximumoctopus.com/electronics/builder.htm
About 😊
Important information
Toolbars
Top Toolbar (left to right)
New
Create a new matrix.
Open
Load a previously saved matrix, font, or animation.
Save
Save the current frame or animation.
Export
Export one or more frames from the current animation to a format suitable for development. See page 20
for more information.
Pixel size (Tiny, Small, Medium, Large, Massive, Ultra)
Choose how big each "pixel" should be within the software.
Pixel shape (Square or Circular)
The shape of each "pixel" on screen.
Preset
Press the right mouse button on this button for the following options:
Load an already saved preset.
Save the current preset.
Presets contain the matrix size and row data orientations.
Using X bytes.
Displays the amount of memory required for the current animation.
Middle toolbar (left to right)
Clear
Clears the current frame.
Clear all frames from menu: Project -> Clear all frames.
Flip
Flips the current matrix horizontally.
A separate menu item exists for flipping every frame in the current animation.
Mirror
Flips the matrix vertically.
A separate menu item exists for mirroring every frame in the current animation.
Invert
Inverts the pixels so "on" becomes "off" and "off" becomes "on".
A separate menu item exists for inverting every frame in the current animation.
Left / Right / Up / Down
Scrolls the matrix one pixel in the specified direction.
Rotate L / Rotate R
Rotates the matrix 90' in the selection direction.
Rotate
Creates a selected number of frames where each frame is rotated a set number of degrees further than the
preceding frame, starting from the current frame.
This feature works much better with higher sized displays, but will still require some user tweaking.
5' to 90'
Select the amount of degrees to rotate for each frame.
1 to 72
Select the number of frames to create.
Drawing tools (left to right)
Press ESCAPE or click the left-most button to cancel the current drawing.
Standard Draw (mouse cursor)
Right mouse button on the button to select brush size (1 pixel, 2x2 pixels and 3x3 pixels).
Left mouse button (on the matrix) to toggle the pixel on/off.
Right mouse button (on the matrix) to draw freehand. The first pixel that is selected sets the mode.
Select an "on" pixel to turn "off" pixels "on", select an "off" pixel to turn "on" pixels "off".
Copy section of the matrix
Select the first corner (doesn't matter which) using the left mouse button, then select the second corner,
again, use the left mouse button. Press the left mouse button to paste the selection. Hold down the LEFT
SHIFT key to paste transparently.
Draw a filled rectangle
Select the first corner (doesn't matter which) using the left mouse button, then select the second corner,
again, use the left mouse button.
Draw an empty rectangle
Select the first corner (doesn't matter which) using the left mouse button, then select the second corner,
again, use the left mouse button.
Draw an empty circle
Using the left mouse button, select the centre, then select any point on its radius.
Draw a line between two points
Select the start point (doesn't matter which) using the left mouse button, then select the end point again,
use the left mouse button.
Draw a line between two points – on every frame
Select the start point (doesn't matter which) using the left mouse button, then select the end point again,
use the left mouse button.
Add text to your matrix
Press the right mouse button on the button to select one of the installed fonts.
Press the left mouse button to set the start position for the text then start typing!!
Draw in gradient mode
Pixels will be draw based on the colour of the current gradient.
Draw random colours (RGB and bi-colour only)
Will paint in random colours.
ON 3
Only visible in bi-colour mode. Colour 3, bit pattern 11.
ON 2
Only visible in bi-colour mode. Colour 2, bit pattern 10.
ON 1
Visible for all matrix types. Represents an "on" pixel.
OFF
Visible for all matrix types. Represents an "off" pixel.
SELECTOR
The colour used for all drawing tools. Shows initial corner for rectangle and empty rectangle modes; start
location for drawing tool; centre for empty circle tool.
LIGHTBOX
The colour to use when showing the contents of the previous frame, when lightbox mode is on.
Animation toolbar (left to right) [View -> Show animation toolbar]
Play
Press the right mouse button on this button to select playback speed.
Stop
Stops the animation
First
Move to the first frame in the sequence.
Previous
Move back one frame.
x of y
Shows the currently selected frame (x) and the maximum number of frames available (y).
Next
Move forward one frame.
Last
Move to the last frame in the sequence.
Add
Insert a new blank frame after the current frame.
Add Copy
Insert a copy of the current frame after the current frame.
Add Multiple
Add a number of extra (blank) frames to the animation.
Delete
Delete the current frame from the sequence.
Lightbulb
Turn on lightbox/onion skin effect. See the contents of the previous frame (in grey) within the current frame.
Slider
Select a frame from the sequence.
Simple export / import toolbar (left to right) [View -> Column/Row data toolbar]
Located at the bottom of the screen, usually below the animation toolbar. This allows for simplified export and
import of data from/to the current matrix (not animation).
Copy the contents of the box to the right for export. Paste in data, press return, for import. Data should be comma
delimited and will processed according to the drop down lists selection.
Source
Select either rows or column.
Bit orientation
For each row of data select whether the LSB (least significant bit) or MSB (most significant bit) is at the left of
the grid.
Direction
Collate the data from the top of the grid down, or the bottom of the grid up.
Copy
Click the clipboard button to copy the comma-separated data in the adjacent box to the
clipboard.
New dialog
Click the New button on the top toolbar or select New from the File menu to start a new single matrix or animation.
Matrix options
Single colour
Pixels are either on or off. Suitable for the majority of LED displays on sale today.
Bi-colour (sequential)
For displays where there are two LEDs per “pixel”. Pixels can be one of three colours. This option is
designed for displays that need the data in sequence.
Example, a display that uses red/blue LEDs. Three in a row: blue, purple, red: 01 11 10 -> 011101
Bi-colour (bitplanes)
For displays where there are two LEDs per “pixel”. Pixels can be one of three colours. This option is
designed for displays where the data is separated per LED.
Example, a display that uses red/blue LEDs. Three in a row: blue, purple, red: 01 11 10 -> 011 110
The data for the red LED comes first, then the data for the blue LED.
RGB
For displays that contain RGB LEDs. Allows for full colour graphics and animations.
Size
Choose from 1x1 to 256x256 pixels.
By default, the common sizes are shown. Select All to show all values between 1 and 256.
Pixel Shape
Select either square or circle. This option only affects the on-screen display, but can be very useful when
designing graphics.
Animation
Select the number of blank frames to start with (frames can be added and deleted at any time after starting
a new project).
Clear all animation/matrix data
If you made a mistake and chose dimensions that were too small or too large than you can decide to keep
the previous data. No scaling or modification are applied if this option is unchecked.
From Preset
Select from a range of preset projects.
New presets can be created from the Preset button on the application’s top toolbar.
Create
Start the new project using the above settings.
Cancel
Return back to the application without changing any settings.
Export
The LED Matrix Studio has a very powerful export system. It allows for export in to format suitable for almost every
development environment.
If the Auto preview check box is checked then all changes can be seen in real-time.
Rows | Columns
Selects either the column or row as the source data.
Selecting Rows will give the following options:
Top to bottom | Bottom to top
Chooses the start row and direction. Start at the top and go down, or vice versa.
Left to right | Right to left | Alternate left/right | Alternate right/left
Starting point and direction within the row.
The alternate modes change direction every row. Left/right starts left at row 0, right at row 1, etc.
Right/left starts right at row 0, left at row 1, etc.
Selecting Columns will give the following options:
Left to right | Right to left | Sure 24x16
Chooses the starting column and direction.
The Sure 24x16 mode is a special option designed for the Sure 24x16 LED board (a great btw).
Top to bottom | bottom to top | Alternate down/up | Alternate up/down
Start point and direction within the column.
The alternate modes change direction every row. Up/down starts up at column 0, down at column 1,
etc. Down/up starts down at column0, up at column 1, etc.
Frames x to y
Select which frames to export.
Optimise output (if possible).
Least significant bit (LSB)
Left | right for row, top | bottom for column
Select the location of the least significant bit in the data.
Take the binary value: 00010011
If the LSB is at the right, then in decimal this is 19.
If the LSB is at the left, then in decimal this becomes 200.
https://en.wikipedia.org/wiki/Bit_numbering#Least_significant_bit
Export format
Select the format of the exported data. Select from the six possible options:
Comma separated
The simplest output, no language styling, just each value separated by a comma.
PICAXE EEPROM
Designed for the PICAXE development platform.
C-style (1 dimensional)
Suitable for the Arduino IDE, Spark Core, Espruino, and many other platforms.
C-style (2 dimensional)
Suitable for the Arduino IDE, Spark Core, Espruino, and many other platforms.
Python (1 dimensional)
Suitable for the Raspberry Pi, and any other python platform.
Python (2 dimensional)
Suitable for the Raspberry Pi, and any other python platform.
Number Format
Decimal | Binary | Hex
Select the numeric format.
Hex always looks the coolest :)
Number Grouping
8 bit | 16 bit | 32 bit
Select how to group the output values.
8 bit (swap nibbles)
Swap the nibbles when outputting 8 bit values.
The number 176 (10110000) becomes 11 (00001011).
16 bit (swap bytes)
Swap the bytes around when outputting 16 bit values.
The number 43760 (1010101011110000) becomes 61610 (1111000010101010).
The process is easier to see if the values are in hex: 50293 (hex C475) becomes 75C4 = 30148.
Each Line of Output
Organise the exported data, decide how much ore how little to place on a line.
Row | Column
A single row or column (depending on the orientation setting at the top of the export page).
Frame
An entire frame.
Bytes
A number of bytes.
RGB Colour Format (RGB mode only)
RGB | BGR | GRB
Select the output colour format for your device.
Number Grouping (RGB mode only)
8 bits (one byte per colour)
This option will output three bytes per pixel.
Eg red (FF0000): 0xFF, 0x00, 0x00
32 bits
This option will concatenate the bytes (in the order from RGB Colour Format above) in a 32 bit value.
The first byte will be zero.
Eg red (FF0000): 0x00FF0000
Automation
Automate one or more actions across a set number of frames. This feature is designed for those using devices with
large amounts of memory or very slow microcontrollers that can’t manipulate data quick enough to do things in real-
time.
Click on an action to add it to the list. Click Remove or double click an action to remove it from the action list.
Actions
Mirror | Flip | Invert
Left | Right | Up | Down (scroll)
Rotate L | Rotate R
These nine actions are identical to those found in the application.
Wipe (Vertical) | Wipe (Horiz)
Similar to scroll, but wipes from the centre outwards.
Wipe (Vertical) C | Wipe (Horiz) C
Similar to the above, but clears the data as it gets wiped off-screen.
Code Templates
These can be found in the \code templates\ folder and contain fully working projects that are just missing matrix or
animation data.
Export your data to a template using the Project -> Code Templates menu option.
Instead of just exporting the data, it's now possible to export the data in to a preconfigured template - instant code!
Instant demo!
Within this folder are two kinds of file:
Code <filename>.<extension>
Template <filename>.<extension>.template
The code file contains the source code (specific to the platform folder), complete with special "tokens" that identify
areas that should be filled-in by the software.
The template file contains instructions on how the data should be configured so that it's in a format that source code
expects.
If you've created some templates (or would like new tokens), or wish to create them, then please get in touch!!
Usage
To populate the template with code and data, use the following tokens:
{$LMS_MATRIX_DATA$}
Inserts the matrix data, based on the .template rules.
{$LMS_FRAMES$}
The number of frames of animation.
{$LMS_BYTES$}
The number of bytes of data (in total).
{$LMS_COUNT$}
The number of entries in the data array.
Each source code file needs a template to go with it, just append .template to the source code file name. This tells
the software how to export the data so it's in the correct format.
.template construction
{RGB or {
a:
b:
c:
d:
e:
f:
g:
h:
i:
r:
v:
w:
y:
z:
{ defines a non-RGB output
{RGB will enable RGB output
a: Export how
a:0 = Columns
a:1 = Rows
b: Output order (Rows OR Columns, depending on selection above)
b:0 = Top to bottom OR Left to right
b:1 = Bottom to top OR Right to left
b:2 = Sure 24x16 special output mode
c: LSB (least significant bit)
c:0 = Left
c:1 = Right
d: Programming language format
d:0 = Comma separated
d:1 = PICAXE EEPROM
d:2 = C-style (1 dimensional)
d:3 = C-style (2 dimensional)
d:4 = Python (1 dimensional)
d:5 = Python (2 dimensional)
d:6 = Microchip
e: Number format
e:0 = Decimal (base 10)
e:1 = Binary (base 2)
e:2 = Hex (base 16)
f: Number grouping
f:0 = 8 bits
f:1 = 16 bits
f:2 = 32 bits
f:3 = 8 bits, swap nibbles
f:4 = 16 bits, swap nibbles
f:5 = 64 bits
f:6 = RGB: 8 bits, one byte per colour
f:7 = RGB: 32 bits
g: Output order II (in conjunctions with a: and b:)
g:0 = Left to right OR Top to bottom
g:1 = Right to left OR Bottom to top
g:2 = Alternative Top/Bottom OR Alternative Left/Right
g:3 = Alternative Bottom/Top OR Alternative Right/Left
h: Output line structure
h:0 = Row/column
h:1 = Frame
h:2 = Bytes
i: Used for h:2 above
i:x = where is x is the amount of bytes to output per line
r: RGB Mode (only use for RGB output)
r:0 = RGB
r:1 = BGR
r:2 = GRB
Dimension constraints
For some code templates it's highly likely that code expects a matrix of a certain size. These next four parameters
allow the code template designer to specify minimum and maximum matrix size.
For instance, code that outputs a matrix to an 8x8 LED display wouldn't want anything else:
v:8
w:8
y:8
z:8
but scrolly message code, across an 8x8 matrix, wouldn't mind how wide the matrix is:
v:8
w:0
y:8
z:8
Use 0 for no limit.
v: Minimum Width
v:a = Where a is the minimum matrix width allowed by the code template.
w: Maximum width
w:a = Where a is the maximum matrix width allowed by the code template.
y: Minimum Height
y:a = Where a is the minimum matrix height allowed by the code template.
z: Maximum Height
z:a = Where a is the maximum matrix height allowed by the code template.
Take a look at the supplied templates for more information and to see them in action.
About
Coding Paul A Freshney
Development Cats Ruftherford and Freeman
www.MaximumOctopus.com/developmentcats.htm
Thanks Lorenz, Greg, Andrew, Apostolos, David, Peter, Zoltan, Gary and Steve Turner