forked from LGoodacre/context-sequencer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontent-help.pd
236 lines (236 loc) · 12.5 KB
/
content-help.pd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
#N canvas 202 135 497 630 10;
#X obj 72 48 cnv 15 164 57 empty empty empty 21 18 2 32 -99865 -204800
0;
#X obj 66 42 cnv 15 164 57 empty empty empty 21 18 2 32 -1 -204800
0;
#X obj 67 43 cnv 15 162 55 empty empty empty 21 18 2 32 -204786 -204800
0;
#X obj 68 44 cnv 15 160 53 empty empty content 12 22 2 43 -83573 -204800
0;
#X obj 65 159 cnv 15 358 392 empty empty empty 20 12 0 14 -33289 -66577
0;
#X obj 66 160 cnv 15 356 390 empty empty empty 20 12 0 14 -162280 -66577
0;
#X obj 70 164 cnv 15 347 381 empty empty empty 20 12 0 14 -33289 -66577
0;
#X obj 71 165 cnv 15 345 379 empty empty empty 20 12 0 14 -262144 -66577
0;
#X obj 306 390 dac~;
#X obj 124 298 context :H 16 :X 17 :Y 6 :io o :d 1 :Z 4 :ID 1 :ol 1
5 obj 1 92 ../ctx outlet~ 20 obj 26 14 ../content :lo helpfiles/wavs/ting.wav
:x1 0.135417 :x2 0.46 :y1 0.233333 :y2 0.76 :s1 0.3 :s2 -0.3 :li 1
13 floatatom 468 -85 5 0 0 0 - - - ¿ f 5 5 obj 468 -66 / 100 13 floatatom
522 -85 5 0 0 0 - - - ¿ f 5 5 obj 522 -66 / 100 21 text 1 -41 This
is the overlay patch. It is used for embedding objects and hacking
Context. (See Manual Section 13). 38 text 217 7 Content has a control
inlet and a signal outlet~. You can send messages like the ones above
to Content using the inlet. Playback is sent through the outlet~ which
is synched to the cursor position. 18 text 217 76 Right click on Content
and select 'properties' to see what options it has to offer. 5 msg
468 -44 :x1 \$1 5 msg 522 -44 :x2 \$1 5 connect 4 0 3 0 5 connect 5
0 6 0 5 connect 6 0 12 0 5 connect 7 0 8 0 5 connect 8 0 13 0 5 connect
12 0 4 0 5 connect 13 0 4 0;
#X text 65 114 Content is used to store arrays and play them back during
the Context cycle. It is embedded in the Overlay., f 56;
#X text 84 385 This help patch continues inside the Overlay. Right
click on Context and select 'open' to view., f 26;
#X obj 244 45 ctxfiles/license;
#N canvas 520 217 450 361 content 0;
#X text 14 26 There are three ways of loading data into Content. \;
\; The first is simply by drawing into the array. This is useful if
you are using Content for modulation instead of sample playback. \;
\; The second is to load a .wav file into Content. To do this \, you
can use the :lo command \, or go to the properties menu and hit "file"
to select a file through the open-panel. \; \; The third is to use
the :lo commend to point to another array open in the PD patch. This
is useful if you want to have several Contents reading the same file
without having to duplicate the array and waste memory each time. To
do this \, simply use the :lo command. Ie. " :lo array1 " would load
array1. (Content knows to look for an array rather than a file because
there is no ".wav"). \; \; File paths can be specified globally or
relatively. A loaded file or array reference will save automatically
save and be reloaded next time the patch is opened \, but a drawn array
will not save unless it is told to (see "saving content").;
#X restore 84 475 loading content;
#N canvas 68 260 450 155 content 0;
#X text 17 38 Content can be moved and resized from the parent patch.
To do this \, you need to have the [mover] object inside the overlay.
;
#X obj 16 90 else/openfile mover-help.pd -h See the [mover] help patch
for how to use [mover].;
#X restore 84 497 moving content;
#N canvas 67 156 1211 495 commands 0;
#X text 41 22 Content can receive commands \, just like Context. Here
are the possible Content commands:;
#X text 68 371 To send commands to Content \, there are four options:
;
#X floatatom 593 367 5 0 0 0 - - -, f 5;
#X floatatom 593 425 5 0 0 0 - - -, f 5;
#X msg 593 386 \; ting :c \$1;
#X msg 593 444 \; c1 content ting ' :c \$1 ';
#X text 794 444 <-- note that the quotation marks are necessary here
\, else the :c command would send to Context.;
#X text 37 64 :lo (symbol) -- select a .wav file or PD array (bang
for open-panel \, "clear" to clear Content. \; :la (bang) -- define
a new label for Content \, overwriting the default ~number. This can
be reset with ":la bang". \; :nm (float) -- perform the standard PD
normalization function \; :br (float) -- reset the bitrate for non-standard
files \; :as (1/0) -- saves the contents of the array to the creation
argument each time the overlay patch is saved. This should only be
on for small \, custom-drawn arrays. \; save (bang) -- saves the array
to the creation argument whether or not auto-save is on. \; clear (bang)
-- clear the contents and name of an array. \; :ed (1/0) -- decide
whether or not the array can be re-drawn from the parent patch. Turning
this off is useful if you want to protect an array from accidental
redrawing. \; :li (0/1/2) -- click on this box to choose between point
\, polygon and bezier array display \; :s2 (float) -- choose the lower
limit of the array \; :s1 (float) -- choose the upper limit of the
array \; :c (float) -- set the background colour. \; :x1 (float) --
set the left position of Content within the overlay (in seconds) \;
:x2 (float) -- set the right position of Content within the overlay
(in seconds) \; :y1 (float) -- set the top position of Content within
the overlay (in seconds) \; :y2 (float) -- set the bottom position
of Content within the overlay (in seconds) \; :x1 % (float) -- set
the top left position of Content as a percentage of the overlay size.
(Works the same for :x2 :y1 and :y2). \; set (y1 x1 \, y2 x2...)--
set a specific point on the array. \; fit -- resize Content so that
it fits exactly within the Overlay \; print (bang) -- print the current
Content state \; :sz (float) -- set the size of the array (in samples).
This setting is overwritten if you load a .wav file (:lo). \; :ti --
set the host Context cycle time (:d) so that the sample plays back
at normal speed. \; :r -- record audio to Content array (see the "recording
audio" subpatch in this help file)., f 186;
#X text 142 396 1: enter them as creation arguments \; 2: send messages
via the inlet (top-left) \; 3: send messages to the Content title visible
in the top-left (ie. "~1" or "ting") \; 4: send messages to it via
Context \, using the "content" command and same title as a prefix.
;
#X connect 2 0 4 0;
#X connect 3 0 5 0;
#X restore 288 517 content commands;
#N canvas 67 97 450 413 content 0;
#X text 12 46 There are two ways of saving the contents of Content.
\; \; The first is to save the array to disk using the :sa command
(ie. ":sa path/to/file.wav"). This is suitable for audio samples and
larger arrays \, and works well in conjunction with the :lo command
\, which tells Content to read a file. (The :lo command is loaded automatically
if you load a file from the open-file dialogue box.) \; \; The second
is to save the array values into the patch itself. This can be done
using the "save" command or through the properties menu. Alternatively
\, you can turn auto-save on. This means that the contents of the array
will be saved every time the overlay patch is saved. \; \; All changes
to Content must be saved in the Overlay patch \, then in the parent
patch. If the Overlay patch is not saved before the parent patch \,
all changes to Content will be lost. To save the Overlay patch \, open
the Overlay by right-clicking on Context and selecting "open" and then
do a regular menu-save (Ctrl+S). Then save the parent patch as usual.
\; \; Saving the contents of a drawn array into the patch is only recommended
for smaller arrays (ie. of a few hundred points). Saving larger arrays
may crash your computer.;
#X restore 300 475 saving content;
#N canvas 207 109 466 300 content 0;
#X text 18 28 There are two ways of reading Content. The first is using
the outlet~ hidden over the bottom left corner. You can send the audio
signal to the parent patch using [send~] or [throw~] \, or create an
outlet~ on Context using;
#X text 20 100 The second way to access Content's data is by using
the ~ message variable. If Context sends a message while its cursor
is over a Content array \, the ~ character will be replaced by a snapshot
of the array at that time. This is useful for setting parameters and
modulations. For an example see;
#X obj 358 81 else/openfile ctx-help.pd -h [ctx outlet~];
#X obj 300 196 else/openfile helpfiles/10_message_variable_examples_2.pd
-h message variable examples;
#X restore 294 453 reading content;
#X text 85 174 [content] is the blue box embedded inside the green
[context]. [content] only works if it is embedded like this. For embedding
\, see Manual Section 14: Overlay., f 44;
#X text 85 233 Double click on the green area of Context to start.
The array is played back in time with the cursor., f 44;
#N canvas 65 101 450 300 content 0;
#X text 19 30 Content needs to be embedded inside context in order
for it to be useful. To embed a Content array:;
#X text 39 89 1: Open the overlay on any Context by right clicking
on it and selecting "open" \; \; 2: create an object [content] and
place it inside the GOP rectangle., f 48;
#X text 27 201 Note: if you just want to use Content to hold a sample
\, there is a shortcut. In the parent patch \, create [context :: sample].
, f 54;
#X restore 84 453 embeding content;
#N canvas 65 85 1214 440 menu 0;
#X text 16 17 To open the Content menu \, right click on Content and
select "properties". Note that this only works if you are in th overlay
patch--selecting "properties" from within the parent patch will give
you the Context menu. To exit back to the regular view \, hit the ^
button on the right hand side. The menu items are:;
#X text 36 114 FILE: select a .wav file \; SIZE: set the size of the
array \; NORMALIZE: perform the standard PD normalization function
\; BIT-RATE: reset the bitrate for non-standard files \; AUTO-SAVE:
saves the contents of the array to the creation argument each time
the overlay patch is saved. This should only be on for small \, custom-drawn
arrays. \; SAVE NOW: saves the array to the creation argument whether
or not auto-save is on. \; CLEAR: clear the contents and name of an
array. \; EDIT: decide whether or not the array can be re-drawn from
the parent patch. Turning this off is useful if you want to protect
an array from accidental redrawing. \; POINTS: click on this box to
choose between point \, polygon and bezier array display \; Y-BOTTOM:
choose the lower limit of the array \; Y-TOP: choose the upper limit
of the array \; COLOUR: set the background colour., f 166;
#X restore 84 519 content menu;
#X obj 10 6 helpfiles/docfiles/help-display \$0;
#X obj 83 576 else/openfile helpfiles/links/content.html -h see Context
Manual entry on [content];
#N canvas 67 161 955 537 audio 0;
#X obj 457 325 adc~;
#X obj 461 475 dac~;
#X obj 318 355 context :H 14 :X 13 :Y 8 :io io :d 3 :ID 2 :ol 1 5 obj
253 -28 ctx inlet~ 5 obj 246 103 ctx outlet~ 18 obj 0 28 content :x2
3 :y1 1 :y2 3 :li 1 :as 0 :sz 44100 :la tape 4 obj 0 -20 mover 5 connect
3 0 5 1 5 connect 5 0 4 0;
#X text 66 21 Use the ':r' or 'crecord' command to record audio to
Content.;
#X text 21 82 press here to record from the system microphone, f 25
;
#X text 494 326 <--[ctx] is used to get the in/outlet~s here, f 24
;
#X text 397 115 -trigger 0 means that the recording won't start immediately
\, but when Context is next started, f 51;
#X text 443 186 -start lets you add messages to the Context 'start'
command \, so that you can record over specific sections of the array.
;
#X text 409 151 -output 1 means that normal Context messages and conections
will be send during the recording (see the :me -o command).;
#X obj 442 212 else/openfile helpfiles/starting_and_stopping.pd -h
see starting_and_stopping.pd;
#X text 450 236 -clear 1 clears the array before the recording. This
doesn't always seem desireable \, but there might be undefined behaviour
if it is off (0) due to a bug., f 81;
#X text 463 271 -mute 0 means that the array will playback simultaneously
as it is recorded. Do not use -mute 0 here \, as it will cause a feedback
loop., f 74;
#X text 495 395 <-- right click and select 'open' to see how [content]
is set up for recording, f 42;
#X msg 179 89 content tape crecord;
#X msg 197 121 content tape crecord -trigger 0;
#X msg 217 157 content tape crecord -output 1;
#X msg 237 193 content tape crecord -start p 3 6;
#X msg 264 242 content tape crecord -clear 0;
#X msg 284 277 content tape crecord -mute 1;
#X text 505 15 You can send messages to an embedded Content by using
a 'content (content-name)' message. (This [content] is named 'tape').
Note that Content will also accept the 'record' command \, but the
alias 'crecord' is preferred here to disambiguate with the Context
'record' command., f 64;
#X connect 0 0 2 13;
#X connect 0 1 2 13;
#X connect 2 13 1 0;
#X connect 2 13 1 1;
#X connect 13 0 2 0;
#X connect 14 0 2 0;
#X connect 15 0 2 0;
#X connect 16 0 2 0;
#X connect 17 0 2 0;
#X connect 18 0 2 0;
#X restore 294 496 recording audio;
#X connect 9 17 8 0;
#X connect 9 17 8 1;