Skip to content

Instantly share code, notes, and snippets.

@mohayonao
Created July 7, 2016 19:07
Show Gist options
  • Select an option

  • Save mohayonao/644420544f20785051831f49282062f5 to your computer and use it in GitHub Desktop.

Select an option

Save mohayonao/644420544f20785051831f49282062f5 to your computer and use it in GitHub Desktop.
"use strict";
const fs = require("fs");
const decoder = require("synthdef-decoder");
const toPairs = require("lodash.topairs");
const files = fs.readdirSync(__dirname).filter(x => /\.scsyndef$/.test(x));
const ugen = {}
files.forEach((fileName) => {
const file = fs.readFileSync(fileName);
const buffer = new Uint8Array(file);
const data = decoder.decode(buffer.buffer);
data.forEach((synthdef) => {
synthdef.specs.forEach((spec) => {
if (!ugen[spec[0]]) {
ugen[spec[0]] = 0;
}
ugen[spec[0]]++;
});
});
});
toPairs(ugen).sort((a, b) => b[1] - a[1]).forEach((items) => {
console.log(`- [ ] ${ items[0] } ${ items[1] }`);
});
@mohayonao

mohayonao commented Jul 7, 2016

Copy link
Copy Markdown
Author
  • BinaryOpUGen 2491
  • UnaryOpUGen 903
  • HPZ1 748
  • EnvGen 417
  • Impulse 377
  • MulAdd 76
  • Control 71
  • Out 68
  • Select 60
  • Pan2 55
  • XFade2 52
  • SinOsc 40
  • IRand 40
  • Normalizer 34
  • In 34
  • RLPF 33
  • LPF 26
  • BPF 25
  • PinkNoise 23
  • LFSaw 19
  • LFTri 17
  • LFPulse 14
  • Pulse 12
  • Clip 10
  • PitchShift 9
  • Saw 8
  • HPF 6
  • Limiter 6
  • Balance2 6
  • BPeakEQ 6
  • RHPF 6
  • LinExp 5
  • BufRd 5
  • Resonz 4
  • ToggleFF 4
  • LagUD 4
  • LeakDC 4
  • PulseCount 3
  • GrayNoise 3
  • WhiteNoise 3
  • Ringz 3
  • Lag 3
  • ClipNoise 3
  • LFPar 3
  • BrownNoise 3
  • CombC 3
  • CombN 2
  • Line 2
  • BufDur 2
  • BufRateScale 2
  • AllpassC 2
  • BufFrames 2
  • Compander 2
  • PlayBuf 2
  • DetectSilence 2
  • Decimator 2
  • MdaPiano 1
  • FreeVerb2 1
  • LocalOut 1
  • LocalIn 1
  • LFCub 1
  • ReplaceOut 1
  • LFNoise2 1
  • DiskOut 1
  • NumOutputBuses 1
  • GVerb 1
  • SyncSaw 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment