synthing

a waveform sequencing synth on the web
Log | Files | Refs | Submodules

consts.js (583B)


      1 const BUF_SIZE = 256;
      2 export default {
      3     BUF_SIZE,
      4     adsrProperties: [
      5         {
      6             name: 'attack',
      7             suffix: 's',
      8             maxVal: 10
      9         },
     10         {
     11             name: 'decay',
     12             suffix: 's',
     13             maxVal: 10
     14         },
     15         {
     16             name: 'sustain',
     17             maxVal: 2
     18         },
     19         {
     20             name: 'release',
     21             suffix: 's',
     22             maxVal: 30,
     23         }
     24     ],
     25     initialWave: new Array(BUF_SIZE)
     26         .fill(0)
     27         .map((val, i) => Math.sin(i / BUF_SIZE * Math.PI * 2)),
     28     MAX_BEATS: 16
     29 }