Joe Maller: Joe's Debug and Explore Filters: Joe's 3x3 Matrix Values Tester

A simple filter which helps to visualize the contents of a numerical matrix.

Visit the New FXScript Reference and Joe's Filters sites. These pages will be phased out soon and may already be out of date.

Joe's Filters
FXScript Reference

This filter is simply a value reporter for numerical matrix values in a 3x3 matrix. Joe's 3x3 Convolve Matrix Tester and Joe's 3x3 RGB Matrix Tester use different processes to help visualize the relationship between numeric matrix values and their visual results.


How it works

First, the nine slider variables are inserted into a matrix array:

mat = {AA, AB, AC, BA, BB, BC, CA, CB, CA};

The rest of this filter is dedicated to reporting the values selected by the matrix sliders.

Writing Text to the Screen

Text can be customized by setting the text attributes. These attributes only need to be set once per script, unless two different text strings use different formatting. Otherwise the attributes will apply to all strings following their definition.

The following code to sets the text style to Verdana Bold, Center Justified with a height equal to image height divided by 5:


Each slider has a matching text string. Before the slider variables can be drawn as text, their values must be converted from numbers to text. There is a difference, and Final Cut Pro will choke on numbers where text should be. Each slider has the following two lines of text to draw it onscreen:

NumToString(AA, reporter, kinteger);
DrawString(reporter, -0.25 * w, -0.25 * h + h/5/3, 2, dest, fontcolor, aspectof(dest));

Source Code

Unlocked versions of this and all of Joe's Debugging and Exploration Filters are included for free with the trial and paid versions of Joe's Filters. Or use the source code below to build your own.

Buy Joe's Filters Download the Free Trial

(copy and paste the code into FXBuilder)
page last modified: October 23, 2017
Copyright © 1996-2003 Joe Maller