Skip to content

Instantly share code, notes, and snippets.

@zeffii
Forked from anonymous/devlish.py
Created November 7, 2013 19:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeffii/7360605 to your computer and use it in GitHub Desktop.
Save zeffii/7360605 to your computer and use it in GitHub Desktop.
import re
pattern = r"class=\".+?\">\[ugen\].*?\"name\">(.*?)<\/"
# http://chuck.cs.princeton.edu/doc/program/ugen_full.html
filename = "UgensReference(All).htm"
with open(filename) as fopen:
gb = ''.join(fopen.readlines())
k = re.findall(pattern, gb)
print(k)
print(len(k))
"""
['dac', 'adc', 'blackhole', 'Gain', 'Noise', 'Impulse', 'Step',
'HalfRect', 'FullRect', 'ZeroX', 'BiQuad', 'Filter', 'OnePole',
'TwoPole', 'OneZero', 'TwoZero', 'PoleZero', 'LPF', 'HPF',
'BPF', 'BRF', 'ResonZ', 'FilterBasic', 'Dyno', 'DelayP',
'SndBuf', 'Phasor', 'SinOsc', 'PulseOsc', 'SqrOsc', 'TriOsc',
'SawOsc', 'GenX', 'LiSa', 'netout', 'netin', 'Pan2', 'Mix2',
'StkInstrument', 'BandedWG', 'BlowBotl', 'BlowHole', 'Bowed',
'Brass', 'Clarinet', 'Flute', 'Mandolin', 'ModalBar', 'Moog',
'Saxofony', 'Shakers', 'Sitar', 'StifKarp', 'VoicForm', 'FM',
'BeeThree', 'FMVoices', 'HevyMetl', 'PercFlut', 'Rhodey',
'TubeBell', 'Wurley', 'Delay', 'DelayA', 'DelayL', 'Echo',
'Envelope', 'ADSR', 'JCRev', 'NRev', 'PRCRev', 'Chorus',
'Modulate', 'PitShift', 'SubNoise', 'WvIn', 'WaveLoop', 'WvOut']
78
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment