by Ossi Hanhinen, @ohanhi
with the support of Futurice 💚.
Licensed under CC BY 4.0.
| #!/usr/bin/env bash | |
| # bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2019-01-02 | |
| # | |
| # _______________| noise : ambient Brown noise generator (cf. white noise). | |
| # | |
| # Usage: noise [minutes=59] [band-pass freq center=1786] [wave] | |
| # ^minutes can be any positive integer. | |
| # Command "noise 1" will display peak-level meter. | |
| # | |
| # Dependencies: play (from sox package) |
As C programmers, most of us think of pointer arithmetic for multi-dimensional arrays in a nested way:
The address for a 1-dimensional array is base + x.
The address for a 2-dimensional array is base + x + y*x_size for row-major layout and base + y + x*y_size for column-major layout.
The address for a 3-dimensional array is base + x + (y + z*y_size)*x_size for row-column-major layout.
And so on.