Skip to content

Commit

Permalink
Update sample~-help.pd
Browse files Browse the repository at this point in the history
  • Loading branch information
porres committed Jul 31, 2024
1 parent c06ca47 commit 84cb893
Showing 1 changed file with 22 additions and 21 deletions.
43 changes: 22 additions & 21 deletions Documentation/Help-files/sample~-help.pd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#N canvas 564 58 570 765 10;
#N canvas 540 122 810 483 read/write 0;
#N canvas 535 57 570 765 10;
#N canvas 421 117 825 523 read/write 0;
#X msg 550 168 clear;
#X text 590 168 clears all channels;
#X text 669 250 writes contents of buffer into a file, f 18;
Expand All @@ -14,31 +14,32 @@
#X text 576 36 open a file specified by a symbol (.wav \, .aif/.aiff or .caf), f 22;
#X text 578 139 without symbol \, opens dialog box;
#X text 592 111 load into buffer;
#X text 23 94 Just the 'open' message opens a dialog for you to choose a sound file. Then the buffer is resized and reinitialized according to the sample size and its number of channels. If you give the open message a file name \, same thing happens \, but note that after the sample name you can also define optional arguments. The 1st optional argument sets the start read position in samples in the file \, the 2nd the buffer duration in ms and the 3rd the number of channels in the buffer. This way you can reconfigure the buffer size and its number of channels., f 65;
#X text 23 204 The 'load' needs a file name and it loads this file into the sample buffer according to the previously set buffer size and number of channels. Just 'load' opens a dialog., f 65;
#X text 23 248 The "save" message saves the contents of [sample~] into an audio file and needs a symbol with the file name to save to (in which case the file is saved in the current patch's folder). If no file name is given \, a file dialog is opened for naming it and you can save it anywhere in your computer., f 65;
#X text 23 30 You can set an array name as the first argument. The second argument sets a sound file to open. The size and number of channels from given sound file prevails \, unless the -size \, -ms and -ch flags are given \, in which case the sound file loads into these parameters., f 65;
#X text 23 309 The [sample~] object supports 'wav' \, 'aif/aiff' and 'caf' sound files for opening and saving and in both cases the file extension needs to be set. If you don't specify a format for saving \, [sample~] will save in same format of the most recently opened audio file and by default it saves in .wav format., f 65;
#X text 23 87 Just the 'open' message opens a dialog for you to choose a sound file. Then the buffer is resized and reinitialized according to the sample size and its number of channels. If you give the open message a file name \, same thing happens \, but note that after the sample name you can also define optional arguments. The 1st optional argument sets the start read position in samples in the file \, the 2nd the buffer duration in ms and the 3rd the number of channels in the buffer. This way you can reconfigure the buffer size and its number of channels., f 65;
#X text 23 197 The 'load' needs a file name and it loads this file into the sample buffer according to the previously set buffer size and number of channels. Just 'load' opens a dialog., f 65;
#X text 23 241 The "save" message saves the contents of [sample~] into an audio file and needs a symbol with the file name to save to (in which case the file is saved in the current patch's folder). If no file name is given \, a file dialog is opened for naming it and you can save it anywhere in your computer., f 65;
#X text 23 23 You can set an array name as the first argument. The second argument sets a sound file to open. The size and number of channels from given sound file prevails \, unless the -size \, -ms and -ch flags are given \, in which case the sound file loads into these parameters., f 65;
#X text 23 302 The [sample~] object supports 'wav' \, 'aif/aiff' and 'caf' sound files for opening and saving and in both cases the file extension needs to be set. If you don't specify a format for saving \, [sample~] will save in same format of the most recently opened audio file and by default it saves in .wav format., f 65;
#X listbox 455 371 27 0 0 0 - - - 0;
#X text 459 396 <size \, sr \, ms \, ch \, bits>;
#X msg 478 87 open stereo.wav 500 500 1;
#X msg 465 66 open stereo.wav;
#X obj 455 342 else/sample~ sample_\$0 stereo.aif;
#X text 23 374 The "depth" message sets the bit depth for writing files \, it accepts 16 \, 24 \, 32 and 64 (use double precision Pd for this one). The "sr" message also sets a sample rate for saving a file., f 65;
#X text 23 367 The "depth" message sets the bit depth for writing files \, it accepts 16 \, 24 \, 32 and 64 (use double precision Pd for this one). The "sr" message also sets a sample rate for saving a file., f 65;
#X msg 565 226 depth 32 \, sr 88200;
#X msg 560 198 depth 16 \, sr 44100;
#X connect 0 0 23 0;
#X connect 5 0 23 0;
#X connect 6 0 23 0;
#X connect 7 0 23 0;
#X connect 8 0 23 0;
#X connect 9 0 23 0;
#X connect 10 0 23 0;
#X connect 21 0 23 0;
#X connect 22 0 23 0;
#X connect 23 0 19 0;
#X connect 25 0 23 0;
#X connect 26 0 23 0;
#X text 459 396 <size \, sr \, ms \, ch \, bits> *;
#X text 220 429 * Note that if you specify a buffer size that is smaller than the file you're loading \, the file size that is output will be clipped to the buffer size. On the other hand \, if you set a buffer that is bigger than a sample you're loading \, then the sample size is the original sample size and smaller than the buffer size in ms., f 67;
#X connect 0 0 22 0;
#X connect 5 0 22 0;
#X connect 6 0 22 0;
#X connect 7 0 22 0;
#X connect 8 0 22 0;
#X connect 9 0 22 0;
#X connect 10 0 22 0;
#X connect 20 0 22 0;
#X connect 21 0 22 0;
#X connect 22 0 19 0;
#X connect 24 0 22 0;
#X connect 25 0 22 0;
#X restore 448 193 pd read/write;
#X obj 306 5 cnv 15 250 40 empty empty empty 12 13 0 18 #7c7c7c #e0e4dc 0;
#N canvas 382 141 749 319 (subpatch) 0;
Expand Down

0 comments on commit 84cb893

Please sign in to comment.