noise-rs icon indicating copy to clipboard operation
noise-rs copied to clipboard

1-Dimensional `NoiseModule` implementations?

Open mitchmindtree opened this issue 8 years ago • 3 comments

Hey folks, just came across noise-rs, looking really nice!

I often use 1D noise functions when working with audio or for any kind of pattern generation over time. I'd love to be able to use the abstractions provided by this crate for this purpose, however I noticed it looks like most noise types only support 2, 3 and 4 dimensions?

I was wondering if you'd be open to adding 1D implementations?

mitchmindtree avatar Oct 15 '17 10:10 mitchmindtree

Hi @mitchmindtree and welcome!

In lieu of a dedicated 1D implementation, you could use the 2D implementations, but keep the second dimension constant, i.e. [x,0] for 2D and evaluate for varying x.

1D noise itself would not be out of the scope of this crate, and could be useful to have. It would need somebody to implement it, though.

Razaekel avatar Oct 15 '17 12:10 Razaekel

Thanks for the response! I'm happy to have a go at implementing this sometime in the coming weeks/months if noone beats me to it :+1:

mitchmindtree avatar Oct 15 '17 13:10 mitchmindtree

Like wise with ND, there should be an API for 1D that just uses the 2D with a fixed y. If the use of this feature becomes popular ppl will work to make it more efficient and the benefit will trickle down... If the solution is to use 2D directly then if a 1D implementation is written it'll have far fewer users than it should.

cheako avatar Mar 28 '19 03:03 cheako