synthing

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

WaveMaster.js (416B)


      1 export default {
      2     update: (arr, idx, opts) => {
      3         const newArr = arr.slice();
      4         Object.assign({}, arr[idx], opts)
      5         return newArr;
      6     }
      7     add: (arr, idx, opts) => {
      8         const newArr = arr.slice();
      9         newArr.splice(idx, 0, opts);
     10         return newArr;
     11     }
     12     remove: (arr, idx) => {
     13         const newArr = arr.slice();
     14         newArr.splice(idx, 1);
     15         return newArr;
     16    }
     17 }