Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

wrapped all audiolet units, now lots of new bugs

  • Loading branch information...
commit c21ae6b5ac0eab5dd65591b634534f60110f4503 1 parent b277123
Brendan Adamson authored April 22, 2012
4  README.md
Source Rendered
@@ -98,7 +98,9 @@ No real document support. After the app loads, the patch `documents/testDoc.json
98 98
 
99 99
 * bugs
100 100
 * more audio units (wrap rest of audiolet classes)
101  
-* sample-accurate audiolet-based timing objects
  101
+* more timing objects
  102
+* infinite canvas scrolling
  103
+* more gui objects (sliders, etc)
102 104
 * docs
103 105
 * better MIDI
104 106
 * static site with bootstrapped document
2  assets/js/unitBase.coffee
@@ -36,6 +36,8 @@ class patchosaur.Units
36 36
   constructor: -> @units = {}
37 37
 
38 38
   add: (UnitClass) ->
  39
+    if not UnitClass.names or _.isEmpty UnitClass.names
  40
+      console.error "no names on UnitClass:", UnitClass
39 41
     for name in UnitClass.names
40 42
       if @units[name]?
41 43
         console.error "unit class already defined:", name, UnitClass
60  assets/js/units/audio/audioletClasses.coffee
... ...
@@ -1,22 +1,70 @@
1  
-# FIXME: wrap ERRYTHING
2 1
 # see http://oampo.github.com/Audiolet/api.html
3 2
 
4  
-wrappedClasses = []
5  
-wrappedClasses.push _.extend MulAdd, names: ['muladd~']
6  
-wrappedClasses.push _.extend Sine, names: ['cycle~']
7  
-wrappedClasses.push _.extend Lag, names: ['lag~']
8  
-wrappedClasses.push _.extend Tanh, names: ['tanh~']
  3
+wrappedClasses = [
  4
+  # save name Sine for actual sin() one, not table based
  5
+  _.extend Sine, names: ['cycle~']
  6
+  _.extend Triangle, names: ['triangle~']
  7
+  _.extend Saw, names: ['saw~']
  8
+  _.extend Square, names: ['square~']
  9
+  _.extend Pulse, names: ['pulse~']
  10
+  _.extend WhiteNoise, names: ['noise~']
  11
+  _.extend Envelope, names: ['envelope~']
  12
+  _.extend ADSREnvelope, names: ['adsr~']
  13
+  _.extend PercussiveEnvelope, names: ['perc~']
  14
+  # FIXME: this isn't going to work, look into args:
  15
+  # http://oampo.github.com/Audiolet/api.html
  16
+  _.extend BufferPlayer, names: ['bufferplayer~']
  17
+  _.extend Gain, names: ['gain~']
  18
+  _.extend Pan, names: ['pan~']
  19
+  _.extend UpMixer, names: ['upmixer~']
  20
+  _.extend CrossFade, names: ['xfade~']
  21
+  _.extend LinearCrossFade, names: ['linerxfade~']
  22
+  _.extend Limiter, names: ['limiter~']
  23
+  _.extend BiquadFilter, names: ['biquad~']
  24
+  _.extend LowPassFilter, names: ['lpf~']
  25
+  _.extend HighPassFilter, names: ['hpf~']
  26
+  # FIXME: no bandiwdth?
  27
+  _.extend BandPassFilter, names: ['bpf~']
  28
+  _.extend BandRejectFilter, names: ['brf~']
  29
+  _.extend AllPassFilter, names: ['apf~']
  30
+  _.extend DCFilter, names: ['dcblock~']
  31
+  _.extend Lag, names: ['lag~']
  32
+  _.extend Delay, names: ['delay~']
  33
+  _.extend FeedbackDelay, names: ['fbdelay~']
  34
+  _.extend CombFilter, names: ['comb~']
  35
+  _.extend DampedCombFilter, names: ['dampcomb~']
  36
+  _.extend Reverb, names: ['reverb~']
  37
+  _.extend ReverbB, names: ['reverbb~']
  38
+  _.extend SoftClip, names: ['softclip~']
  39
+  _.extend BitCrusher, names: ['bitcrusher~']
  40
+  _.extend Amplitude, names: ['amp~']
  41
+  # FIXME: these work with callbacks, won't work
  42
+  _.extend DiscontinuityDetector, names: ['discontinuity~']
  43
+  _.extend BadValueDetector, names: ['badvalue~']
  44
+  _.extend TriggerControl, names: ['triggercontrol~']
  45
+  _.extend Add, names: ['add~', '+~']
  46
+  _.extend Subtract, names: ['subtract~', '-~']
  47
+  _.extend Multiply, names: ['multiply~', '*~']
  48
+  _.extend Divide, names: ['divide~', '/~']
  49
+  _.extend Modulo, names: ['modulo~', '%~']
  50
+  _.extend Reciprocal, names: ['reciprocal~']
  51
+  _.extend MulAdd, names: ['muladd~', '*+~']
  52
+  _.extend Tanh, names: ['tanh~']
  53
+]
9 54
 
10 55
 # wrap each audiolet "class" in a Unit
11 56
 for AudioletClass in wrappedClasses then do (AudioletClass) ->
12 57
   class WrappedClass extends patchosaur.Unit
13 58
     @names: AudioletClass.names
  59
+    @help: "wrapped from audiolet: see http://oampo.github.com/Audiolet/api.html"
14 60
     setup: (@objectModel) ->
15 61
       args = @objectModel.get 'unitArgs'
16 62
       a = patchosaur.audiolet
17 63
       @mainNode = new AudioletClass a, args...
18 64
       numInlets = @mainNode.numberOfInputs
19 65
       numOutlets = @mainNode.numberOfOutputs
  66
+      # FIXME: you want something more like this, see pan~
  67
+      #numOutlets = @mainNode.outputs[0].numberOfChannels
20 68
       @objectModel.set {numInlets}
21 69
       @objectModel.set {numOutlets}
22 70
       # create pass through nodes that connect

0 notes on commit c21ae6b

Please sign in to comment.
Something went wrong with that request. Please try again.