Pattern edit with PC text editor

Hi I’m trying to work on patterns on my PC’s editor (UltraEdit) and it’s not working with the /n newline escape, I try to pull in a pattern from the website and parts are missing so that it will not upload into the PixelBlaze. Is there a filter or script to translate between the native format on the PixelBlaze and a conventional text editor ? I’d love to be able mass upload a set of custom patterns to multiple PB’s from my editor or a script.

Extracting from the .epe format (which is what downloading from the patterns list will get you), we have a script, to convert to text. We don’t have a script to convert text to .epe (yet) that I’m aware of.

@jeff 's repo has the epe extractor script.

1 Like

@MutantGarage, can you describe the problem a bit more? How are you getting the pattern from the website to your text editor? Can you select the pattern from your browser, copy it to the clipboard and paste it successfully into UltraEdit? If not, what happens when you paste the same thing into WordPad or another text editor?

This might be fixable with UltraEdit options. I’m not an UltraEdit user, but most advanced editors have a configuration option somewhere that lets them control how the editor handles line endings. Look for something that lets it recognize Unix/Mac line endings as well as the Windows (CR/LF) combination.

The problem is the line ending is just a ‘/n’ ie ASCII 0x5C 0x6E

So I’d have to parse expressions to make sure something like width/number_pixels does not get a return stuck in it. I also see /r and /t in some code

When I open a pattern in the PB editor, it does not have this header info:
“name”: “twinkle”,
“id”: “8QLTQsxoQgjhgGNzi”,
“sources”: {
“main”: "
So I can’t copy and paste patterns that way.

So if I do a search and replace ‘\n’ with 0x0A and ‘\r’ with 0x0D and then edit and then undo the line ends, it won’t import back with the pattern editor ‘Open File’ option.

Ok… the issue is that the epe files that “Export” and “Open File” deal with are effectively binary files. They aren’t actually meant to be opened with a text editor. They do contain the zipped source and some header information, which is what you’re seeing. But there’s also the preview image, and the compiled byte code in there too too.

It’s that last thing that’s really the limiting factor – until we have a way to push source through the Pixelblaze’s compiler, get the binary result and rebuild the whole EPE package, it’s necessary to use the Pixelblaze Web IDE. (I agree though, it would be handy to be able to do this.)

To edit Pixelblaze code with an external editor, pull the code up in the Pixelblaze’s Web IDE, copy it out to the clipboard and paste it in to your editor. When you want it back on the Pixelblaze, copy it from your editor and paste it back in to the IDE.

Honestly, I mostly only do this when I’m doing something unusual – working on multiple versions of a pattern simultaneously, using the outside editor copy as a backup, or doing exceptionally weird formatting or regex search/replace. For everything, the Web IDE is by miles the quickest and easiest way to write and edit Pixelblaze code. It’s hard to beat having the compiler with error output and watchable variables right there while you’re coding.


Or as recommended, use the epe exploder script. I was guessing using the epe (ie “downloaded program”) was the issue.

The python library has scripts for saving/loading .epe files, cloning patterns between pb’s and backing up/restoring patterns (or complete pb libraries) to a zip file.

If I want to edit an .epe file in an external editor, I just copy and paste it from the pb IDE as @zranger1 says.

I have a separate pb pico that I just use for development, it’s connected to a strip of lights, but it doesn’t have to be. That’s the easiest way to develop. If you want to test 2D patterns @zranger1 has an led emulator that pb can feed so you can emulate a pixel array on your computer.

1 Like