From algo-comp-owner@heinous.isca.uiowa.edu Fri Apr 22 02:07:38 1994
X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil]
	["4121" "Thu" "21" "April" "1994" "17:54:19" "-0400" "FNELSON@ocvaxa.cc.oberlin.edu" "FNELSON@ocvaxa.cc.oberlin.edu" nil "129" "Shepard's tone as Max patch" "^From:" nil nil "4" nil nil nil nil]
	nil)
Received: from heinous.isca.uiowa.edu.isca.uiowa.edu (heinous.isca.uiowa.edu) by relay.cs.ruu.nl with SMTP id AA12284
  (5.67a/IDA-1.5 for <piet@cs.ruu.nl>); Fri, 22 Apr 1994 02:07:34 +0200
Received:  from localhost by isca.uiowa.edu (8.5-A/1.1) id SAA16660.198A7 on Thu, 21 Apr 1994 18:52:10 -0500.
Organization: Heinous Owners Club And Persons With Nine Letter Names
Received:  from ocvaxa.cc.oberlin.edu by isca.uiowa.edu (8.5-A/1.1) id SAA16654.198A7 on Thu, 21 Apr 1994 18:51:59 -0500.
Received: from ocvaxa.cc.oberlin.edu by ocvaxa.cc.oberlin.edu (PMDF V4.2-11
 #3269) id <01HBG1LTPT92001OW4@ocvaxa.cc.oberlin.edu>; Thu,
 21 Apr 1994 17:54:19 EDT
Message-Id: <01HBG1LTPT94001OW4@ocvaxa.cc.oberlin.edu>
X-Vms-To: IN%"algo-comp@heinous.isca.uiowa.edu"
Reply-To: algo-comp@heinous.isca.uiowa.edu
From: <FNELSON@ocvaxa.cc.oberlin.edu>
Sender: algo-comp-owner@heinous.isca.uiowa.edu
To: algo-comp@heinous.isca.uiowa.edu
Subject: Shepard's tone as Max patch
Date: Thu, 21 Apr 1994 17:54:19 -0400 (EDT)
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-Transfer-Encoding: 7BIT

Here is the text form of a Max patch that implements stepping
Shepard's tones.  You may want to fiddle with the function in the table
to improve your results.

The patch requires a synth with 8 independent MIDI channels and works
best with voices that are very senstive to velocity changes.

Let me know how it works for you.

And now, laze and gelm...the code.

max v2;
#N vpatcher 35 58 590 508;
#P comment 0 53 121 196617 Author: Gary Lee Nelson;
#P comment 1 24 182 1376280 Shepard's Tones;
#P newex 139 101 75 196617 counter 0 0 95;
#P newex 139 77 39 196617 metro;
#P toggle 139 55 15 0;
#P toggle 110 78 15 0;
#P newex 280 80 46 196617 loadbang;
#P newex 280 104 43 196617 omsinfo;
#P user umenu 280 127 100 196647 1 64;
#X add A1;
#X add D110;
#X add DX7;
#X add JamBox;
#X add MidiVerbII;
#X add MT-32;
#X add TOMS/S5 pgm chgU;
#X add ProteusA;
#X add ProteusB;
#X add ProteusC;
#X add SRV2000A;
#X add SRV2000B;
#X add TX7;
#X add TX7B;
#X add TX816;
#X add TX816B;
#X add TMIDI Mgr Output 1U;
#X add TMIDI Mgr Output 2U;
#X add TMIDI Mgr Output 3U;
#X add TMIDI Mgr Output 4U;
#X add TMIDI Mgr Output 5U;
#X add TMIDI Mgr Output 6U;
#P button 335 80 15 0;
#P comment 51 74 55 196617 Change direction;
#P newex 119 320 35 196617 + 12;
#P newex 119 298 32 196617 % 96;
#P newex 119 277 30 196617 +;
#P newex 61 229 27 196617 + 1;
#P newex 61 252 36 196617 * 12;
#P newex 119 375 55 196617 pack 0 0 0;
#P newex 61 195 66 196617 counter 1 8;
#P message 78 153 14 196617 8;
#P newex 61 173 27 196617 Uzi;
#P button 61 132 15 0;
#P newex 183 375 62 196617 pipe 0 0 0 0;
#N vtable 128 10 82 473 249 990016 128;
#T set 0 2 4 5 7 8 10 11 13 14 16 17 19 20 22 23 25 27 28 30 31 33 34 36 37 39
40 42 43 45 46 48 49 51 53 54 56 57 59 60 62 63 65 66 68 69 71 72 74 76 77 79 80
82 83 85 86 88 89 91 92 94 95 97 98 100 98 97 95 94 92 91 89 88 86 84 83 81 80
78 77 75 74 72 70 69 67 66 64 63 61 60 58 56 55 53 52 50 49 47 46 44 42 41 39 38
36 35 33 32 30 28 27 25 24 22 21 19 18 16 14 13 11 10 8 7 5 4 2;
#P newobj 244 344 36 196617 table;
#P newex 304 374 46 196617 ctlout 7;
#P number 234 45 35 9 0 0 0 3;
#P comment 275 46 46 196617 Tempo;
#P user hslider 234 22 18 128 128 10 50 0;
#P comment 266 155 83 196617 Table controls master volume of each channel as
well as velocity for each note;
#P comment 151 156 84 196617 Table contains amplitude contour as a function of
MIDI note number;
#P newex 119 413 41 196617 noteout;
#P comment 11 377 105 196617 makenote that -> remembers channel #;
#P comment 359 49 172 196620 Select a multivoice patch that has the same
velocity sensitive sound on each of 8 MIDI channels;
#N vpreset 1;
#X append 1 2 6 22 234 hslider int 67 \; 8 45 234 number int 720 \; 24 127 280
umenu int 7 \; 27 78 110 toggle int 0 \; 28 55 139 toggle int 0 \;;
#P preset 267 254 47 27;
#P fasten 30 0 12 0 144 125 66 125;
#P connect 30 0 19 1;
#P connect 29 0 30 0;
#P connect 28 0 29 0;
#P fasten 8 0 29 1 239 68 173 68;
#P connect 8 0 11 3;
#P connect 16 0 3 0;
#P fasten 27 0 30 1 115 97 160 97;
#P connect 6 0 8 0;
#P connect 21 0 16 0;
#P fasten 21 0 11 0 124 356 188 356;
#P fasten 21 0 10 0 124 341 249 341;
#P fasten 10 0 16 1 249 369 146 369;
#P fasten 10 0 9 0 249 369 309 369;
#P connect 20 0 21 0;
#P connect 19 0 20 0;
#P connect 18 0 17 0;
#P fasten 17 0 19 0 66 272 124 272;
#P connect 15 0 18 0;
#P fasten 15 0 16 2 66 217 168 217;
#P fasten 15 0 11 2 66 221 222 221;
#P fasten 15 0 9 2 66 225 345 225;
#P connect 12 0 13 0;
#P connect 12 0 14 0;
#P connect 12 0 15 2;
#P connect 13 0 15 0;
#P connect 14 0 13 1;
#P fasten 11 0 3 0 188 400 124 400;
#P fasten 11 1 3 1 214 402 139 402;
#P fasten 11 2 3 2 240 405 154 405;
#P connect 26 0 25 0;
#P connect 25 0 24 0;
#P connect 23 0 25 0;
#P fasten 24 1 3 0 375 409 124 409;
#P fasten 24 1 9 0 375 324 309 324;
#P pop;


You may have trouble with some of the longer lines.  Each line should begin
with a # and end with a ;  There should be no line feeds or carriage returns
between.

Gary Lee Nelson, Professor
Electronic and Computer Music
TIMARA Program
Conservatory of Music
Oberlin, OH 44074
(216) 775-8223
fnelson@ocvaxa.cc.oberlin.edu

