aboutsummaryrefslogtreecommitdiff
path: root/pd/doc/5.reference/soundfiler-help.pd
blob: 515f102b692089e3a781c7ce3fd5146c294e6b9f (plain)
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
#N canvas 59 252 1102 576 12;
#N canvas 0 0 450 300 graph1 0;
#X array array1 77971 float 0;
#X coords 0 1 77971 -1 300 100 1;
#X restore 71 353 graph;
#N canvas 0 0 450 300 graph1 0;
#X array array2 77971 float 0;
#X coords 0 1 77971 -1 300 100 1;
#X restore 71 459 graph;
#X obj 11 313 soundfiler;
#X msg 17 241 write -aiff /tmp/foo1 array2;
#X msg 8 152 read ../sound/bell.aiff array2;
#X msg 17 199 read -raw 128 2 2 b ../sound/bell.aiff array1 array2
;
#X text 26 10 SOUNDFILER - read and write soundfiles to arrays;
#X text 548 3 When reading you can leave soundfiler to figure out which
of the three known soundfile formats the file belongs to or override
all header information using the "-raw" flag.;
#X text 665 52 Flags for reading:;
#X text 574 68 -skip <sample frames to skip in file>;
#X text 574 87 -nframes <maximum number of sample frames to read>;
#X text 575 143 -raw <headersize> <channels> <bytespersample> <endianness>
;
#X text 594 161 This causes all header information to be ignored. Endianness
is "l" ("little") for Intel machines or "b" ("big") for Macintoshes
and SGIs. You can give "n" (natural) to take the byte order your machine
prefers.;
#X text 575 106 -resize;
#X text 575 124 -maxsize <maximum number of samples we can resize to>
;
#X text 560 226 Flags for writing:;
#X text 575 247 -wave \, -nextstep \, -aiff;
#X text 576 266 -big \, -little (nextstep only!);
#X text 575 288 -skip <number of sample frames to skip in array>;
#X text 576 310 -nframes <maximum number to write>;
#X text 577 354 -normalize;
#X text 576 332 -bytes <2 \, 3 \, or 4>;
#X floatatom 11 337 0 0 0 0 - - -;
#X msg 15 175 read -resize ../sound/bell.aiff array2;
#X text 751 539 updated for Pd version 0.29;
#X msg 17 288 write -nextstep -bytes 4 /tmp/foo3 array1 array2;
#X msg 16 265 write -wave -nframes 10000 /tmp/foo2 array2;
#X text 287 150 read a file;
#X text 362 173 ...optionally resize;
#X text 225 217 ...or even overriding everything;
#X text 283 240 write a file;
#X text 352 309 write stereo;
#X text 560 385 The number of channels is limited to 64;
#X text 612 433 see also:;
#X obj 606 456 tabwrite~;
#X obj 607 480 tabread4~;
#X obj 713 435 tabplay~;
#X obj 711 484 writesf~;
#X obj 712 461 readsf~;
#X text 9 31 The soundfiler object reads and writes floating point
arrays to binary soundfiles which may contain 2 or 3 byte fixed point
or 4 byte floating point samples in wave \, aiff \, or next formats
(no floating point aiff \, though.). The number of channels of the
soundfile need not match the number of arrays given (extras are dropped
and unsupplied channels are zeroed out.);
#X connect 2 0 22 0;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 2 0;
#X connect 23 0 2 0;
#X connect 25 0 2 0;
#X connect 26 0 2 0;