I’m going to build out my Perlin Noise example as a user story (ok, I’m a nerd, but this is a safe place to be a nerd). @wizard :
I know that there’s a pattern called Perlin Noise; I’ve used it in the past, but don’t know if the version I have stored locally is correct. (Note: I’m using “I” because it’s a user story, but don’t take this too literally; it’s a royal “I”, except where I ask for help mid-way through the story)
I go to https://electromage.com/patterns to look for it.
There’s no native search option; I try a Google Search for “perlin noise pixelblaze - Google Search” but because there’s no good metadata or permalinks in the Pattern Library, no such luck; I see some forum posts, but not how to find the pattern. (Note: This dramatically hurts SEO and discoverability of PixelBlaze as a community – the pattern libraries, with well-documented code and keywords, should be a SEO dream resource).
I start clicking through pages of patterns, discover the “popular” sort button, and guess it’s the "
Perlin/Simplex Noise 2D" I want, and it’s just named differently in my local copy.
I find out, luckily, that it has licensing written directly into it as a comment, “That code was placed in the public domain by its original author, Stefan Gustavson. You may use it as you see fit, but attribution is appreciated.” and love that, but wish there was a sort or filter to JUST find patterns that are free to use in commercial applications. (Note: I was going to tag Stefan Gustavson here, but there’s 3 other Gustavson as usernames in this community, but not him).
I see that the pattern uses a FastLED style / old-school hard coding of the 2D pixel map –
// Setup constants
var width = 16 // Width (in pixels) of your matrix
var height = pixelCount / width
var pixels = array(width) // This will store the height vales of the Perlin noise field
for (i = 0; i < width; i++) pixels[i] = array(height) // Allocate 2D array
I get really confused, because I thought the whole advantage of PixelBlaze is that you both don’t need to hard-code values like this, and because my project is a wearable piece that doesn’t have even rows and columns. I either want to ask for help updating this pattern, because the way these values are incorporated are a bit messy and hard to parse out, or I want to submit a fix to this back to the community (think, “pull request”), but there’s not a clear way to do either. NOTE: This is a real problem I have right now; If someone reading this (@jeff or @wizard ) wants to help re-write this to more natively use the pixel mapping function, I’d really appreciate the assist – consider it my big “ask” in the midst of this wall of text); it also makes it so the pattern doesn’t work in 1D space.
I then want to change the way the sliders work in this pattern to incorporate the new Palette functionality. This seems straightforward, and I know I’ve seen a great forum post (it’s How to modify existing patterns to use Palette functions in v3.30 with @zranger1 having solved it btw; again, this is largely hypothetical except the part in bold above) about how to do this, but, in a circular problem, I don’t know how to find a relevant pattern with well documented Palette functionality, and I get stuck again. (Note: the fix would be keyword tagging in the Pattern library – for things like “Audio” “Licensing” “Accelerometer” “Palettes” etc, as well as “1D, 2D, 3D”, author, etc.
I go to check for documentation and sample code about the Palette functionality, and I search palettes pixelblaze - Google Search and there’s no documentation to be found, at all, and instead the first search result is Color palette support? which is a three year old post that indicates that it’s NOT possible to do, and has no follow up about the new release (NOTE: I just added a reply to get the documentation into that thread). There’s also no documentation that’s easy to find about the release. Again, as a new user, I get frustrated.
I could go on, but this is already a 650 word user story, and I should probably get on with my afternoon. I hope it was helpful, and I am very aware that I am just one user amongst many and you probably have competing priorities on your time.