Is there a way to use noise in just 1D?

Is there a way to use noise in just 1D? I’ve tried to set the matrix parameters to w = 160 and h = 1, but it’s like one of those parameters may not be too large, or the Arduino Due I’m using will ran out of RAM(hang). Is there some parameters I can change to make the noise less complex, so that I can run 160< pixels in just 1D? I have used simplex noise with satisfying results before. I’m not really in to the library yet, but can I implement simplexing in to the noise so it wont eat up all the RAM?

Commenting because I’m also curious about this.

So the answer is yes. 160x1 = 160 cells, which should be totally doable, even on an Uno.

However, I think one (or maybe both) of the noise examples rounds up to a “square” data array, meaning if you say 160x1 (160 cells), it rounds up to 160x160 (25,600 cells), which is way too many.

But that’s just what the sample code does – so that it can use data[i][j] for color and the transposed coordinates data[j][i] for brightness.

Maybe Dan has simple code handy showing how to use noise without the cost of a square array.

What about defining a martix size of lets say 16x10, do not care about the mapping for now and just check, how it looks? Later you can change the serpentine setting in order to make everything flow in the same direction, if you like so. Just an idea for quick results…

You can totally do 160x1. I’ve done this. You just have to change the example code NOT to make a square data array as big as the larger dimension.
If you don’t want to do that, pick sqrt(160) rounded up: 13x13, tell it serpentine, and poof, done.

Sorry all- I have a wicked head cold and it’s making me grumpy. Hoping it all passes quickly, and trying to help a bit in the meantime.

@Mark_Kriegsman Get well soon, ‘Dayquil’ always did wonders for me

Get well soon and there is nothing wrong with a bit grumpiness, at least not for me. :slight_smile:

I’m not sure I understand. I’m already doing 35x5, to get one of the least “repeating” effect I can. Setting the matrix 13x13 will still give me an animation meant for 2D(a mirroring like effect across the strip)? Or how do I change the code not to make a square data array?
May you recover fast @Mark_Kriegsman !

Make sure you grab the most most recent version of the code - I found an error in one of the noise functions that would cause an error (eg code jumping off to nowhere :slight_smile:

Also - if you look in noise.h there are 1 and 2 dimensional versions of the noise functions that you can call directly. (I hope to fully document all the noise functions in the next few days).

Cool, that was what I was looking for! Thanks guys

I’ve been using the 1d versions of the noise function for a while now. . .