#N canvas 744 118 554 546 12;
#X declare -path else;
#N canvas 585 381 444 188 upsample-88.2Khz 0;
#X obj 175 90 block~ 64 1 2;
#X obj 67 120 outlet~;
#X text 272 89 <= 2x upsample;
#X obj 67 40 play.file~ sax.wav 1 1;
#X connect 3 0 1 0;
#X restore 286 285 pd upsample-88.2Khz;
#X obj 286 326 out~;
#X obj 344 238 sr~ 44100;
#X obj 85 271 readsf~;
#X obj 85 313 out~;
#X text 60 147 Here we have Pd set to run at 44.1 Khz via the [sr~]
object \, but we're playing a file with a sample rate of 88.2 Khz.
Hence it has twice as much samples and the playing speed drops in half
and an octave lower.;
#X obj 361 16 declare -path else;
#X obj 85 238 initmess open sax.wav \, 1;
#X text 59 64 For sound files to be played correctly with [tabplay~]
and [readsf~] (or [play.file~] by extension) \, Pd needs to run at
the same sample rate as the sound file's. Or else it'll play at a different
speed. By the way \, most of the sound files used on this tutorial
are at 44.1 Khz \, the most usual one.;
#X text 57 407 A workaround to read a sound file with a different sample
rate is possible with resampling. In the subpatch above we have a 2x
upsampling \, which makes it possible to play at the right speed (it'd
also be possible to play a 96 Khz file when running Pd at 48 khz with
2x upsampling \, or even a 192 Khz file with 4x oversampling).;
#X text 429 284 <= click;
#X connect 0 0 1 0;
#X connect 3 0 4 0;
#X connect 3 1 7 0;
#X connect 7 0 3 0;
