Last change
on this file since 34373 was 34372, checked in by davidb, 4 years ago |
NodeJS code to generate a JSON heatmap to be used with WaveSurferJS
|
-
Property svn:executable
set to
*
|
File size:
315 bytes
|
Line | |
---|
1 | #!/usr/bin/env node
|
---|
2 |
|
---|
3 | const colormap = require('colormap');
|
---|
4 |
|
---|
5 | const colors = colormap({
|
---|
6 | colormap: 'hot',
|
---|
7 | nshades: 256,
|
---|
8 | format: 'float'
|
---|
9 | });
|
---|
10 |
|
---|
11 | const fs = require('fs');
|
---|
12 |
|
---|
13 | fs.writeFile('hot-colormap.json',
|
---|
14 | JSON.stringify(colors),
|
---|
15 | function(err, result) {
|
---|
16 | if(err) console.log('error', err);
|
---|
17 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.