Update of /cvsroot/pure-data/abstractions/tabs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16005
Added Files: bpe.py dacer~.pd le3dp.pd sigmoid_booster~.pd tbEnvify~-help.pd tbEnvify~.pd Log Message: checking in some more abstractions
--- NEW FILE: tbEnvify~-help.pd --- #N canvas 394 35 818 634 10; #X obj 21 324 tbEnvify~; #X obj 291 185 Scope~ 456 390 256 3 128 -1 1 0 0 0 0 102 255 51 135 135 135 0; #X obj 21 366 dacer~; #X msg 173 40 1000 sine 1 0.1; #X msg 151 9 1000 triangle 1 0.1; #X msg 183 64 1000 hanning 1 0.1; #X msg 193 85 1000 bpe 0 0 1 1 0.2 1 0 1; #X obj 20 272 osc~ 440; #X msg 204 109 1000 bpe-smooth 0 0 1 1 0.2 1 0 1 2000 8000; #X msg 214 133 1000 bpe-slide 0 0 1 1 0.2 1 0 1 4000 8000; #X text 344 36 $Id$; #X text 344 17 a simple envelope generator; #X connect 0 0 1 0; #X connect 0 0 2 0; #X connect 0 0 2 1; #X connect 3 0 0 1; #X connect 4 0 0 1; #X connect 5 0 0 1; #X connect 6 0 0 1; #X connect 7 0 0 0; #X connect 8 0 0 1; #X connect 9 0 0 1;
--- NEW FILE: sigmoid_booster~.pd --- #N canvas 488 227 567 322 10; #X obj 69 40 dbtorms; #X obj 69 21 inlet pregain; #X obj 26 1 inlet~; #X obj 26 78 *~ -5; #X obj 26 135 pow~; #X obj 26 154 +~ 1; #X obj 26 222 -~ 1; #X obj 123 216 dbtorms; #X obj 123 197 inlet postgain; #X obj 26 262 outlet~; #X obj 26 59 volctl~ $1 10; #X obj 26 241 volctl~ $2 10; #X obj 49 97 init 1; #X obj 49 116 exp; #X text 203 21 direct port of TAP Sigmoid Booster by Tom Szilagyi , except that it's using pd's db scaling instead of tap's; #X obj 26 181 sig~ 2; #X obj 26 203 /~; #X text 28 287 $Id: sigmoid_booster~.pd 194 2005-11-20 01:17:05Z tim $; #X connect 0 0 10 1; #X connect 1 0 0 0; #X connect 2 0 10 0; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 16 1; #X connect 6 0 11 0; #X connect 7 0 11 1; #X connect 8 0 7 0; #X connect 10 0 3 0; #X connect 11 0 9 0; #X connect 12 0 13 0; #X connect 13 0 4 1; #X connect 15 0 16 0; #X connect 16 0 6 0;
--- NEW FILE: le3dp.pd --- #N canvas 163 335 546 315 10; #X obj 8 10 init 1; #N canvas 95 25 450 300 axis 0; #X obj -80 4 inlet; #X obj 117 121 zmap_lin 255 0 0 1; #X obj 117 187 s le3dp-throttle; #X obj -80 41 route abs_x abs_y abs_rz abs_throttle abs_hat0x abs_hat0y ; #X obj 182 61 s le3dp-hatx; #X obj 248 81 s le3dp-haty; #X obj 314 61 assert; #N canvas 498 328 450 300 z 0; #X obj 24 15 inlet; #X obj 24 164 s le3dp-z; #X obj 24 45 moses 128; #X obj 82 65 moses 144; #X obj 82 85 b; #X obj 82 104 0; #X obj 24 141 zmap_lin 0 128 -1 0; #X obj 140 85 zmap_lin 144 255 0 1; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 2 1 3 0; #X connect 3 0 4 0; #X connect 3 1 7 0; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X restore 51 109 pd z; #N canvas 496 358 450 300 x 0; #X obj -70 11 inlet; #X obj -70 145 s le3dp-x; #X obj -70 31 moses 508; #X obj -12 50 moses 520; #X obj -12 69 b; #X obj -12 88 0; #X obj -70 126 zmap_lin 0 508 -1 0; #X obj 46 69 zmap_lin 520 1023 0 1; #X connect 0 0 2 0; #X connect 2 0 6 0; #X connect 2 1 3 0; #X connect 3 0 4 0; #X connect 3 1 7 0; #X connect 4 0 5 0; #X connect 5 0 1 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X restore -80 80 pd x; #N canvas 496 358 450 300 y 0; #X obj -70 11 inlet; #X obj -12 69 b; #X obj -12 88 0; #X obj -70 145 s le3dp-y; #X obj -70 31 moses 486; #X obj -12 50 moses 512; #X obj -70 126 zmap_lin 0 486 -1 0; #X obj 46 69 zmap_lin 512 1023 0 1; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 4 0 6 0; #X connect 4 1 5 0; #X connect 5 0 1 0; #X connect 5 1 7 0; #X connect 6 0 3 0; #X connect 7 0 3 0; #X restore -15 82 pd y; #X connect 0 0 3 0; #X connect 1 0 2 0; #X connect 3 0 8 0; #X connect 3 1 9 0; #X connect 3 2 7 0; #X connect 3 3 1 0; #X connect 3 4 4 0; #X connect 3 5 5 0; #X connect 3 6 6 0; #X restore 8 245 pd axis; #X obj 8 221 route abs key; #N canvas 0 0 450 300 buttons 0; #X obj 12 10 inlet; #X obj 12 32 route btn_0 btn_1 btn_2 btn_3 btn_4 btn_5 btn_6 btn_7 btn_8 btn_9 btn_10 btn_11; #X obj 12 68 s le3dp-b1; #X obj 386 186 s le3dp-b12; #X obj 352 166 s le3dp-b11; #X obj 318 146 s le3dp-b10; #X obj 284 126 s le3dp-b9; #X obj 250 106 s le3dp-b8; #X obj 216 86 s le3dp-b7; #X obj 182 190 s le3dp-b6; #X obj 148 165 s le3dp-b5; #X obj 114 138 s le3dp-b4; #X obj 80 116 s le3dp-b3; #X obj 46 92 s le3dp-b2; #X obj 420 70 assert; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 13 0; #X connect 1 2 12 0; #X connect 1 3 11 0; #X connect 1 4 10 0; #X connect 1 5 9 0; #X connect 1 6 8 0; #X connect 1 7 7 0; #X connect 1 8 6 0; #X connect 1 9 5 0; #X connect 1 10 4 0; #X connect 1 11 3 0; #X connect 1 12 14 0; #X restore 51 266 pd buttons; #X msg 38 60 find Logitech Extreme 3D; #X obj 38 172 prepend open; #X obj 38 84 py find_hid; #X obj 8 39 t f b; #X obj 8 199 hid; #X obj 38 106 route -1; #X obj 38 126 0; #X obj 8 148 spigot 1; #X text 12 294 $Id: le3dp.pd 194 2005-11-20 01:17:05Z tim $; #X text 116 220 abstraction to use a Logitech Extreme 3D Joystick with hid under linux; #X connect 0 0 7 0; #X connect 2 0 1 0; #X connect 2 1 3 0; #X connect 4 0 6 1; #X connect 5 0 8 0; #X connect 6 0 9 0; #X connect 7 0 11 0; #X connect 7 1 4 0; #X connect 8 0 2 0; #X connect 9 0 10 0; #X connect 9 1 5 0; #X connect 10 0 11 1; #X connect 11 0 8 0;
--- NEW FILE: dacer~.pd --- #N canvas 222 205 333 242 10; #X obj 4 91 inlet~; #X obj 109 91 inlet~; #X obj 4 129 volctl~ 0 100; #X obj 109 129 volctl~ 0 100; #X obj 34 180 dac~; #X floatatom 17 20 5 0 0 0 - - -; #X obj 4 110 hip~ 5; #X obj 109 110 hip~ 5; #X obj 47 67 dbtorms; #X text 11 217 $Id: dacer~.pd 194 2005-11-20 01:17:05Z tim $; #X connect 0 0 6 0; #X connect 1 0 7 0; #X connect 2 0 4 0; #X connect 3 0 4 1; #X connect 5 0 8 0; #X connect 6 0 2 0; #X connect 7 0 3 0; #X connect 8 0 2 1; #X connect 8 0 3 1; #X coords 0 0 1 1 60 40 1 0 0;
--- NEW FILE: bpe.py --- # $Id: bpe.py,v 1.1 2005/11/20 00:31:44 timblech Exp $ # # Copyright (C) 2005 Tim Blechmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; see the file COPYING. If not, write to # the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA.
import pyext
def parse_arguments(*args): duration = args[0] if duration == 0: return args[1:] length = len(args) durations = [] breakpoints = [] for i in range(1,length): if i % 2 == 0: durations.append(args[i]) else: breakpoints.append(args[i]) duration_factor = duration / reduce(lambda x,y: x + y, durations) durations = map(lambda x: x*duration_factor, durations)
ret = []
for i in range(len(durations)): ret.append(breakpoints[i]) ret.append(durations[i]) ret[-2] = ret[0] return ret class Bpe(pyext._class): _inlets = 1 _outlets = 1
def list_1(self, *args): if args[0] != 0: self._outlet(1,parse_arguments(*args))
class VolBpe(pyext._class): _inlets = 3 _outlets = 1
def __init__(self, dollar1): try: self.duration = 1000 / dollar1 except: self.duration = 1000 self._detach = 1 self._priority(-20)
self.bpe = [] self.running = False def list_1(self, *args): arglist = list(args) arguments = [self.duration] + arglist self.bpe = arglist self._outlet(1,parse_arguments(*arguments)) if not self.running: self._outlet(1, None) self.running = True def float_2(self, freq): self.duration = 1000 / freq; arguments = self.duration + self.bpe self._outlet(1,parse_arguments(*arguments))
def float_3(self, switch): if switch == 0: self._outlet(1, self.bpe[0], 0, self.bpe[0], self.duration) else: self._outlet(1, self.bpe)
--- NEW FILE: tbEnvify~.pd --- #N canvas 599 226 536 134 10; #X obj 28 19 inlet~; #X obj 28 81 outlet~; #N canvas 171 233 452 345 controls 0; #X obj 54 13 inlet; #X obj 54 255 s $0-triangle; #X text 96 13 duration type (arguments); #X text 105 217 type duration (arguments); #X obj 54 139 zl slice 2; #X obj 54 194 zl join; #X obj 54 165 zl rev; #X obj 84 57 zl len; #X obj 54 36 t a a; #X obj 84 79 <= 2; #X obj 54 104 demux; #X obj 147 166 zl rev; #X obj 107 274 s $0-sine; #X obj 160 293 s $0-hanning; #X obj 213 313 s $0-bpe; #X obj 285 264 s $0-bpe_rampsmooth; #X obj 54 236 route triangle sine hanning bpe bpe-smooth bpe-slide ; #X obj 302 313 s $0-bpe_slide; #X connect 0 0 8 0; #X connect 4 0 6 0; #X connect 4 1 5 1; #X connect 5 0 16 0; #X connect 6 0 5 0; #X connect 7 0 9 0; #X connect 8 0 10 0; #X connect 8 1 7 0; #X connect 9 0 10 1; #X connect 10 0 4 0; #X connect 10 1 11 0; #X connect 11 0 16 0; #X connect 16 0 1 0; #X connect 16 1 12 0; #X connect 16 2 13 0; #X connect 16 3 14 0; #X connect 16 4 15 0; #X connect 16 5 17 0; #X restore 142 41 pd controls; #N canvas 515 174 450 300 envelopes 1; #X obj 170 8 r $0-triangle; #X obj 14 27 ./tbEnvify~/triangle $0; #X obj 142 50 r $0-sine; #X obj 14 69 ./tbEnvify~/sine $0; #X obj 163 90 r $0-hanning; #X obj 14 109 ./tbEnvify~/hanning $0; #X obj 14 7 inlet~; #X obj 14 266 outlet~; #X text 223 42 ugly but fast and no latency; #X obj 135 133 r $0-bpe; #X obj 212 173 r $0-bpe_rampsmooth; #X obj 179 213 r $0-bpe_slide; #X obj 14 159 ./tbEnvify~/bpe $0; #X obj 14 193 ./tbEnvify~/bpe_rampsmooth $0; #X obj 14 233 ./tbEnvify~/bpe_slide $0; #X connect 0 0 1 1; #X connect 1 0 7 0; #X connect 2 0 3 1; #X connect 3 0 7 0; #X connect 4 0 5 1; #X connect 5 0 7 0; #X connect 6 0 1 0; #X connect 6 0 3 0; #X connect 6 0 5 0; #X connect 6 0 12 0; #X connect 6 0 13 0; #X connect 6 0 14 0; #X connect 9 0 12 1; #X connect 10 0 13 1; #X connect 11 0 14 1; #X connect 12 0 7 0; #X connect 13 0 7 0; #X connect 14 0 7 0; #X restore 28 45 pd envelopes; #X obj 142 17 inlet duration_type_volume_(arguments); #X text 31 105 $Id$; #X connect 0 0 3 0; #X connect 3 0 1 0; #X connect 4 0 2 0;