From 64fdb009695828b788fce074135b20a5e52c5fc4 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 23 Sep 2003 00:21:28 +0000 Subject: imported version 0.37-0 svn path=/trunk/; revision=1016 --- pd/doc/3.audio.examples/00.INTRO.txt | 43 -- pd/doc/3.audio.examples/01.PART1.sinewave.pd | 32 - pd/doc/3.audio.examples/02.amplitude.pd | 37 - pd/doc/3.audio.examples/03.line.pd | 55 -- pd/doc/3.audio.examples/04.line2.pd | 59 -- pd/doc/3.audio.examples/05.output.subpatch.pd | 30 - pd/doc/3.audio.examples/06.frequency.pd | 60 -- pd/doc/3.audio.examples/07.frequency.mod.pd | 105 --- pd/doc/3.audio.examples/08.phase.mod.pd | 246 ------ pd/doc/3.audio.examples/09.review.pd | 43 -- pd/doc/3.audio.examples/10.PART2.wavetables.pd | 104 --- pd/doc/3.audio.examples/11.wavetable.FM.pd | 147 ---- pd/doc/3.audio.examples/12.tabread4.pd | 128 ---- .../3.audio.examples/13.tabread4.interpolation.pd | 44 -- pd/doc/3.audio.examples/14.more.tabread.pd | 106 --- pd/doc/3.audio.examples/15.table.switching.pd | 127 ---- pd/doc/3.audio.examples/16.table.spectrum.pd | 143 ---- pd/doc/3.audio.examples/17.foldover.pd | 112 --- pd/doc/3.audio.examples/18.PART3.pulse.pd | 126 --- pd/doc/3.audio.examples/19.just.say.pd | 152 ---- pd/doc/3.audio.examples/20.pulse.spectrum.pd | 136 ---- pd/doc/3.audio.examples/21.more.pulses.pd | 138 ---- pd/doc/3.audio.examples/22.pulse.width.mod.pd | 98 --- pd/doc/3.audio.examples/23.stereo.pd | 87 --- pd/doc/3.audio.examples/24.even.odd.pd | 116 --- pd/doc/3.audio.examples/25.bandlimited.pd | 166 ---- pd/doc/3.audio.examples/26.additive.pd | 92 --- pd/doc/3.audio.examples/27.PART4.samplers.pd | 111 --- pd/doc/3.audio.examples/28.sampler.loop.pd | 124 --- pd/doc/3.audio.examples/29.sampler.loop.smooth.pd | 148 ---- pd/doc/3.audio.examples/30.sampler.scratch.pd | 175 ----- pd/doc/3.audio.examples/31.sampler.nodoppler.pd | 180 ----- pd/doc/3.audio.examples/32.sampler.transpose.pd | 207 ----- pd/doc/3.audio.examples/33.sampler.oneshot.pd | 143 ---- pd/doc/3.audio.examples/34.sampler.notes.pd | 321 -------- pd/doc/3.audio.examples/35.qlist.txt | 147 ---- pd/doc/3.audio.examples/35.sampler.poly.pd | 228 ------ pd/doc/3.audio.examples/36.PART5.envelopes.pd | 90 --- pd/doc/3.audio.examples/37.adsr.pd | 34 - pd/doc/3.audio.examples/38.envelope.dB.pd | 158 ---- pd/doc/3.audio.examples/39.envelope.slew.pd | 102 --- pd/doc/3.audio.examples/40.envelope.pitch.pd | 209 ----- pd/doc/3.audio.examples/41.envelope.portamento.pd | 148 ---- .../3.audio.examples/42.PART6.analog.sequencer.pd | 133 ---- pd/doc/3.audio.examples/43.monophonic.synth.pd | 135 ---- pd/doc/3.audio.examples/44.sample.hold.pd | 160 ---- pd/doc/3.audio.examples/45.envelope.follower.pd | 101 --- pd/doc/3.audio.examples/46.PART7.filters.pd | 72 -- pd/doc/3.audio.examples/47.bandpass.pd | 146 ---- pd/doc/3.audio.examples/48.filter.sweep.pd | 173 ----- pd/doc/3.audio.examples/49.filter.floyd.pd | 193 ----- pd/doc/3.audio.examples/50.filter.noise.pd | 196 ----- pd/doc/3.audio.examples/51.ring.modulation.pd | 153 ---- pd/doc/3.audio.examples/52.ssb.modulation.pd | 150 ---- pd/doc/3.audio.examples/53.delays.pd | 225 ------ pd/doc/3.audio.examples/54.delay.loop.pd | 213 ------ pd/doc/3.audio.examples/55.delay.variable.pd | 129 ---- pd/doc/3.audio.examples/56.delay.pitchshift.pd | 226 ------ pd/doc/3.audio.examples/57.delay.reverb.pd | 316 -------- pd/doc/3.audio.examples/58.PART8.moreFM.pd | 132 ---- pd/doc/3.audio.examples/59.packets.pd | 161 ---- pd/doc/3.audio.examples/60.packet.spectrum.pd | 147 ---- pd/doc/3.audio.examples/61.two.cosines.pd | 124 --- pd/doc/3.audio.examples/62.declickit.pd | 132 ---- pd/doc/3.audio.examples/63.sweepable.FM.pd | 161 ---- pd/doc/3.audio.examples/64.paf.pd | 234 ------ pd/doc/3.audio.examples/65.paf.control.pd | 219 ------ pd/doc/3.audio.examples/66.PART9.quartic.pd | 140 ---- pd/doc/3.audio.examples/67.more.quartic.pd | 147 ---- pd/doc/3.audio.examples/68.qlist.pd | 102 --- pd/doc/3.audio.examples/69.more.adsr.pd | 117 --- pd/doc/3.audio.examples/70.vibrato.pd | 158 ---- pd/doc/3.audio.examples/71.adsr.sequenced.pd | 217 ------ pd/doc/3.audio.examples/72.execution.order.pd | 127 ---- pd/doc/3.audio.examples/73.control.blocksize.pd | 111 --- pd/doc/3.audio.examples/74.up.downsampling.pd | 191 ----- pd/doc/3.audio.examples/A00.intro.pd | 10 + pd/doc/3.audio.examples/A00.intro.txt | 9 + pd/doc/3.audio.examples/A07.frequency.mod.pd | 141 ++-- pd/doc/3.audio.examples/A08.phase.mod.pd | 246 ------ pd/doc/3.audio.examples/A08.review.pd | 41 + pd/doc/3.audio.examples/A09.review.pd | 41 - pd/doc/3.audio.examples/B05.tabread.FM.pd | 24 +- pd/doc/3.audio.examples/D01.envelope.gen.pd | 128 ++-- pd/doc/3.audio.examples/D02.adsr.pd | 62 +- pd/doc/3.audio.examples/D03.envelope.dB.pd | 118 +-- pd/doc/3.audio.examples/D04.envelope.pitch.pd | 209 ----- pd/doc/3.audio.examples/D04.envelope.quartic.pd | 81 ++ pd/doc/3.audio.examples/D05.envelope.pitch.pd | 153 ++++ pd/doc/3.audio.examples/D05.envelope.portamento.pd | 148 ---- pd/doc/3.audio.examples/D06.additive.pd | 92 --- pd/doc/3.audio.examples/D06.envelope.portamento.pd | 148 ++++ pd/doc/3.audio.examples/D07.additive.pd | 50 ++ pd/doc/3.audio.examples/D07.sampler.notes.pd | 321 -------- pd/doc/3.audio.examples/D08.sampler.poly.pd | 229 ------ pd/doc/3.audio.examples/D08.table.spectrum.pd | 91 +++ pd/doc/3.audio.examples/D09.shepard.tone.pd | 108 +++ pd/doc/3.audio.examples/D09.table.spectrum.pd | 143 ---- pd/doc/3.audio.examples/D10.risset.bell.pd | 109 --- pd/doc/3.audio.examples/D10.sampler.notes.pd | 263 +++++++ pd/doc/3.audio.examples/D11.sampler.poly.pd | 175 +++++ pd/doc/3.audio.examples/D11.shepard.tone.pd | 110 --- pd/doc/3.audio.examples/D12.sampler.bis.pd | 203 +++++ pd/doc/3.audio.examples/E01.pulse.pd | 126 --- pd/doc/3.audio.examples/E01.spectrum.pd | 179 +++++ pd/doc/3.audio.examples/E02.just.say.pd | 152 ---- pd/doc/3.audio.examples/E02.ring.modulation.pd | 197 +++++ pd/doc/3.audio.examples/E03.octave.divider.pd | 137 ++++ pd/doc/3.audio.examples/E03.pulse.spectrum.pd | 136 ---- pd/doc/3.audio.examples/E04.difference.tone.pd | 45 ++ pd/doc/3.audio.examples/E04.more.pulses.pd | 138 ---- pd/doc/3.audio.examples/E05.chebychev.pd | 257 +++++++ pd/doc/3.audio.examples/E05.pulse.width.mod.pd | 98 --- pd/doc/3.audio.examples/E06.exponential.pd | 335 ++++++++ pd/doc/3.audio.examples/E06.stereo.pd | 87 --- pd/doc/3.audio.examples/E07.envelope.mod.pd | 148 ---- pd/doc/3.audio.examples/E07.evenodd.pd | 109 +++ pd/doc/3.audio.examples/E08.even.odd.pd | 116 --- pd/doc/3.audio.examples/E08.phase.mod.pd | 196 +++++ pd/doc/3.audio.examples/E09.FM.spectrum.pd | 139 ++++ pd/doc/3.audio.examples/E09.bandlimited.pd | 166 ---- pd/doc/3.audio.examples/E10.complex.FM.pd | 156 ++++ pd/doc/3.audio.examples/F01.PART7.filters.pd | 72 -- pd/doc/3.audio.examples/F01.pulse.pd | 82 ++ pd/doc/3.audio.examples/F02.bandpass.pd | 146 ---- pd/doc/3.audio.examples/F02.just.say.pd | 152 ++++ pd/doc/3.audio.examples/F03.filter.sweep.pd | 173 ----- pd/doc/3.audio.examples/F03.pulse.spectrum.pd | 126 +++ pd/doc/3.audio.examples/F04.filter.floyd.pd | 193 ----- pd/doc/3.audio.examples/F04.waveshaping.pulse.pd | 133 ++++ pd/doc/3.audio.examples/F05.filter.noise.pd | 196 ----- pd/doc/3.audio.examples/F05.ring.modulation.pd | 160 ++++ pd/doc/3.audio.examples/F06.packets.pd | 117 +++ pd/doc/3.audio.examples/F06.ring.modulation.pd | 153 ---- pd/doc/3.audio.examples/F07.packet.spectrum.pd | 147 ++++ pd/doc/3.audio.examples/F07.ssb.modulation.pd | 150 ---- pd/doc/3.audio.examples/F08.two.cosines.pd | 70 ++ pd/doc/3.audio.examples/F09.declickit.pd | 94 +++ pd/doc/3.audio.examples/F10.sweepable.FM.pd | 152 ++++ pd/doc/3.audio.examples/F11.anharmonic.FM.pd | 126 +++ pd/doc/3.audio.examples/F12.paf.pd | 226 ++++++ pd/doc/3.audio.examples/F13.paf.control.pd | 164 ++++ pd/doc/3.audio.examples/G05.delay.reverb.pd | 156 ++-- pd/doc/3.audio.examples/H01.intro.filters.pd | 72 ++ pd/doc/3.audio.examples/H01.more.FM.pd | 132 ---- pd/doc/3.audio.examples/H02.bandpass.pd | 146 ++++ pd/doc/3.audio.examples/H02.packets.pd | 161 ---- pd/doc/3.audio.examples/H03.filter.sweep.pd | 173 +++++ pd/doc/3.audio.examples/H03.packet.spectrum.pd | 147 ---- pd/doc/3.audio.examples/H04.filter.floyd.pd | 193 +++++ pd/doc/3.audio.examples/H04.two.cosines.pd | 124 --- pd/doc/3.audio.examples/H05.declickit.pd | 132 ---- pd/doc/3.audio.examples/H05.filter.noise.pd | 196 +++++ pd/doc/3.audio.examples/H06.sweepable.FM.pd | 161 ---- pd/doc/3.audio.examples/H07.paf.pd | 234 ------ pd/doc/3.audio.examples/H07.ssb.modulation.pd | 150 ++++ pd/doc/3.audio.examples/H08.paf.control.pd | 219 ------ pd/doc/3.audio.examples/J01.quartic.pd | 140 ---- pd/doc/3.audio.examples/J02.more.quartic.pd | 147 ---- pd/doc/3.audio.examples/J10.waveshaping.pd | 133 ---- pd/doc/3.audio.examples/K01.pulse.width.mod.pd | 98 +++ pd/doc/3.audio.examples/K02.stereo.pd | 87 +++ pd/doc/3.audio.examples/K03.envelope.mod.pd | 148 ++++ pd/doc/3.audio.examples/K04.even.odd.pd | 116 +++ pd/doc/3.audio.examples/K05.bandlimited.pd | 166 ++++ pd/doc/3.audio.examples/adsr2.pd | 110 --- pd/doc/3.audio.examples/echo.pd | 17 - pd/doc/3.audio.examples/output~.pd | 42 +- pd/doc/3.audio.examples/partial.pd | 127 ++-- pd/doc/3.audio.examples/reverb-echo.pd | 18 + pd/doc/3.audio.examples/sampvoice.pd | 193 ++--- pd/doc/3.audio.examples/sampvoice2.pd | 122 +++ pd/doc/3.audio.examples/shepvoice.pd | 48 +- pd/doc/3.audio.examples/spectrum-partial.pd | 38 +- pd/doc/3.audio.examples/x.ps | 844 --------------------- 175 files changed, 7008 insertions(+), 17782 deletions(-) delete mode 100644 pd/doc/3.audio.examples/00.INTRO.txt delete mode 100644 pd/doc/3.audio.examples/01.PART1.sinewave.pd delete mode 100644 pd/doc/3.audio.examples/02.amplitude.pd delete mode 100644 pd/doc/3.audio.examples/03.line.pd delete mode 100644 pd/doc/3.audio.examples/04.line2.pd delete mode 100644 pd/doc/3.audio.examples/05.output.subpatch.pd delete mode 100644 pd/doc/3.audio.examples/06.frequency.pd delete mode 100644 pd/doc/3.audio.examples/07.frequency.mod.pd delete mode 100644 pd/doc/3.audio.examples/08.phase.mod.pd delete mode 100644 pd/doc/3.audio.examples/09.review.pd delete mode 100644 pd/doc/3.audio.examples/10.PART2.wavetables.pd delete mode 100644 pd/doc/3.audio.examples/11.wavetable.FM.pd delete mode 100644 pd/doc/3.audio.examples/12.tabread4.pd delete mode 100644 pd/doc/3.audio.examples/13.tabread4.interpolation.pd delete mode 100644 pd/doc/3.audio.examples/14.more.tabread.pd delete mode 100644 pd/doc/3.audio.examples/15.table.switching.pd delete mode 100644 pd/doc/3.audio.examples/16.table.spectrum.pd delete mode 100644 pd/doc/3.audio.examples/17.foldover.pd delete mode 100644 pd/doc/3.audio.examples/18.PART3.pulse.pd delete mode 100644 pd/doc/3.audio.examples/19.just.say.pd delete mode 100644 pd/doc/3.audio.examples/20.pulse.spectrum.pd delete mode 100644 pd/doc/3.audio.examples/21.more.pulses.pd delete mode 100644 pd/doc/3.audio.examples/22.pulse.width.mod.pd delete mode 100644 pd/doc/3.audio.examples/23.stereo.pd delete mode 100644 pd/doc/3.audio.examples/24.even.odd.pd delete mode 100644 pd/doc/3.audio.examples/25.bandlimited.pd delete mode 100644 pd/doc/3.audio.examples/26.additive.pd delete mode 100644 pd/doc/3.audio.examples/27.PART4.samplers.pd delete mode 100644 pd/doc/3.audio.examples/28.sampler.loop.pd delete mode 100644 pd/doc/3.audio.examples/29.sampler.loop.smooth.pd delete mode 100644 pd/doc/3.audio.examples/30.sampler.scratch.pd delete mode 100644 pd/doc/3.audio.examples/31.sampler.nodoppler.pd delete mode 100644 pd/doc/3.audio.examples/32.sampler.transpose.pd delete mode 100644 pd/doc/3.audio.examples/33.sampler.oneshot.pd delete mode 100644 pd/doc/3.audio.examples/34.sampler.notes.pd delete mode 100644 pd/doc/3.audio.examples/35.qlist.txt delete mode 100644 pd/doc/3.audio.examples/35.sampler.poly.pd delete mode 100644 pd/doc/3.audio.examples/36.PART5.envelopes.pd delete mode 100644 pd/doc/3.audio.examples/37.adsr.pd delete mode 100644 pd/doc/3.audio.examples/38.envelope.dB.pd delete mode 100644 pd/doc/3.audio.examples/39.envelope.slew.pd delete mode 100644 pd/doc/3.audio.examples/40.envelope.pitch.pd delete mode 100644 pd/doc/3.audio.examples/41.envelope.portamento.pd delete mode 100644 pd/doc/3.audio.examples/42.PART6.analog.sequencer.pd delete mode 100644 pd/doc/3.audio.examples/43.monophonic.synth.pd delete mode 100644 pd/doc/3.audio.examples/44.sample.hold.pd delete mode 100644 pd/doc/3.audio.examples/45.envelope.follower.pd delete mode 100644 pd/doc/3.audio.examples/46.PART7.filters.pd delete mode 100644 pd/doc/3.audio.examples/47.bandpass.pd delete mode 100644 pd/doc/3.audio.examples/48.filter.sweep.pd delete mode 100644 pd/doc/3.audio.examples/49.filter.floyd.pd delete mode 100644 pd/doc/3.audio.examples/50.filter.noise.pd delete mode 100644 pd/doc/3.audio.examples/51.ring.modulation.pd delete mode 100644 pd/doc/3.audio.examples/52.ssb.modulation.pd delete mode 100644 pd/doc/3.audio.examples/53.delays.pd delete mode 100644 pd/doc/3.audio.examples/54.delay.loop.pd delete mode 100644 pd/doc/3.audio.examples/55.delay.variable.pd delete mode 100644 pd/doc/3.audio.examples/56.delay.pitchshift.pd delete mode 100644 pd/doc/3.audio.examples/57.delay.reverb.pd delete mode 100644 pd/doc/3.audio.examples/58.PART8.moreFM.pd delete mode 100644 pd/doc/3.audio.examples/59.packets.pd delete mode 100644 pd/doc/3.audio.examples/60.packet.spectrum.pd delete mode 100644 pd/doc/3.audio.examples/61.two.cosines.pd delete mode 100644 pd/doc/3.audio.examples/62.declickit.pd delete mode 100644 pd/doc/3.audio.examples/63.sweepable.FM.pd delete mode 100644 pd/doc/3.audio.examples/64.paf.pd delete mode 100644 pd/doc/3.audio.examples/65.paf.control.pd delete mode 100644 pd/doc/3.audio.examples/66.PART9.quartic.pd delete mode 100644 pd/doc/3.audio.examples/67.more.quartic.pd delete mode 100644 pd/doc/3.audio.examples/68.qlist.pd delete mode 100644 pd/doc/3.audio.examples/69.more.adsr.pd delete mode 100644 pd/doc/3.audio.examples/70.vibrato.pd delete mode 100644 pd/doc/3.audio.examples/71.adsr.sequenced.pd delete mode 100644 pd/doc/3.audio.examples/72.execution.order.pd delete mode 100644 pd/doc/3.audio.examples/73.control.blocksize.pd delete mode 100644 pd/doc/3.audio.examples/74.up.downsampling.pd create mode 100644 pd/doc/3.audio.examples/A00.intro.pd create mode 100644 pd/doc/3.audio.examples/A00.intro.txt delete mode 100644 pd/doc/3.audio.examples/A08.phase.mod.pd create mode 100644 pd/doc/3.audio.examples/A08.review.pd delete mode 100644 pd/doc/3.audio.examples/A09.review.pd delete mode 100644 pd/doc/3.audio.examples/D04.envelope.pitch.pd create mode 100644 pd/doc/3.audio.examples/D04.envelope.quartic.pd create mode 100644 pd/doc/3.audio.examples/D05.envelope.pitch.pd delete mode 100644 pd/doc/3.audio.examples/D05.envelope.portamento.pd delete mode 100644 pd/doc/3.audio.examples/D06.additive.pd create mode 100644 pd/doc/3.audio.examples/D06.envelope.portamento.pd create mode 100644 pd/doc/3.audio.examples/D07.additive.pd delete mode 100644 pd/doc/3.audio.examples/D07.sampler.notes.pd delete mode 100644 pd/doc/3.audio.examples/D08.sampler.poly.pd create mode 100644 pd/doc/3.audio.examples/D08.table.spectrum.pd create mode 100644 pd/doc/3.audio.examples/D09.shepard.tone.pd delete mode 100644 pd/doc/3.audio.examples/D09.table.spectrum.pd delete mode 100644 pd/doc/3.audio.examples/D10.risset.bell.pd create mode 100644 pd/doc/3.audio.examples/D10.sampler.notes.pd create mode 100644 pd/doc/3.audio.examples/D11.sampler.poly.pd delete mode 100644 pd/doc/3.audio.examples/D11.shepard.tone.pd create mode 100644 pd/doc/3.audio.examples/D12.sampler.bis.pd delete mode 100644 pd/doc/3.audio.examples/E01.pulse.pd create mode 100644 pd/doc/3.audio.examples/E01.spectrum.pd delete mode 100644 pd/doc/3.audio.examples/E02.just.say.pd create mode 100644 pd/doc/3.audio.examples/E02.ring.modulation.pd create mode 100644 pd/doc/3.audio.examples/E03.octave.divider.pd delete mode 100644 pd/doc/3.audio.examples/E03.pulse.spectrum.pd create mode 100644 pd/doc/3.audio.examples/E04.difference.tone.pd delete mode 100644 pd/doc/3.audio.examples/E04.more.pulses.pd create mode 100644 pd/doc/3.audio.examples/E05.chebychev.pd delete mode 100644 pd/doc/3.audio.examples/E05.pulse.width.mod.pd create mode 100644 pd/doc/3.audio.examples/E06.exponential.pd delete mode 100644 pd/doc/3.audio.examples/E06.stereo.pd delete mode 100644 pd/doc/3.audio.examples/E07.envelope.mod.pd create mode 100644 pd/doc/3.audio.examples/E07.evenodd.pd delete mode 100644 pd/doc/3.audio.examples/E08.even.odd.pd create mode 100644 pd/doc/3.audio.examples/E08.phase.mod.pd create mode 100644 pd/doc/3.audio.examples/E09.FM.spectrum.pd delete mode 100644 pd/doc/3.audio.examples/E09.bandlimited.pd create mode 100644 pd/doc/3.audio.examples/E10.complex.FM.pd delete mode 100644 pd/doc/3.audio.examples/F01.PART7.filters.pd create mode 100644 pd/doc/3.audio.examples/F01.pulse.pd delete mode 100644 pd/doc/3.audio.examples/F02.bandpass.pd create mode 100644 pd/doc/3.audio.examples/F02.just.say.pd delete mode 100644 pd/doc/3.audio.examples/F03.filter.sweep.pd create mode 100644 pd/doc/3.audio.examples/F03.pulse.spectrum.pd delete mode 100644 pd/doc/3.audio.examples/F04.filter.floyd.pd create mode 100644 pd/doc/3.audio.examples/F04.waveshaping.pulse.pd delete mode 100644 pd/doc/3.audio.examples/F05.filter.noise.pd create mode 100644 pd/doc/3.audio.examples/F05.ring.modulation.pd create mode 100644 pd/doc/3.audio.examples/F06.packets.pd delete mode 100644 pd/doc/3.audio.examples/F06.ring.modulation.pd create mode 100644 pd/doc/3.audio.examples/F07.packet.spectrum.pd delete mode 100644 pd/doc/3.audio.examples/F07.ssb.modulation.pd create mode 100644 pd/doc/3.audio.examples/F08.two.cosines.pd create mode 100644 pd/doc/3.audio.examples/F09.declickit.pd create mode 100644 pd/doc/3.audio.examples/F10.sweepable.FM.pd create mode 100644 pd/doc/3.audio.examples/F11.anharmonic.FM.pd create mode 100644 pd/doc/3.audio.examples/F12.paf.pd create mode 100644 pd/doc/3.audio.examples/F13.paf.control.pd create mode 100644 pd/doc/3.audio.examples/H01.intro.filters.pd delete mode 100644 pd/doc/3.audio.examples/H01.more.FM.pd create mode 100644 pd/doc/3.audio.examples/H02.bandpass.pd delete mode 100644 pd/doc/3.audio.examples/H02.packets.pd create mode 100644 pd/doc/3.audio.examples/H03.filter.sweep.pd delete mode 100644 pd/doc/3.audio.examples/H03.packet.spectrum.pd create mode 100644 pd/doc/3.audio.examples/H04.filter.floyd.pd delete mode 100644 pd/doc/3.audio.examples/H04.two.cosines.pd delete mode 100644 pd/doc/3.audio.examples/H05.declickit.pd create mode 100644 pd/doc/3.audio.examples/H05.filter.noise.pd delete mode 100644 pd/doc/3.audio.examples/H06.sweepable.FM.pd delete mode 100644 pd/doc/3.audio.examples/H07.paf.pd create mode 100644 pd/doc/3.audio.examples/H07.ssb.modulation.pd delete mode 100644 pd/doc/3.audio.examples/H08.paf.control.pd delete mode 100644 pd/doc/3.audio.examples/J01.quartic.pd delete mode 100644 pd/doc/3.audio.examples/J02.more.quartic.pd delete mode 100644 pd/doc/3.audio.examples/J10.waveshaping.pd create mode 100644 pd/doc/3.audio.examples/K01.pulse.width.mod.pd create mode 100644 pd/doc/3.audio.examples/K02.stereo.pd create mode 100644 pd/doc/3.audio.examples/K03.envelope.mod.pd create mode 100644 pd/doc/3.audio.examples/K04.even.odd.pd create mode 100644 pd/doc/3.audio.examples/K05.bandlimited.pd delete mode 100644 pd/doc/3.audio.examples/adsr2.pd delete mode 100644 pd/doc/3.audio.examples/echo.pd create mode 100644 pd/doc/3.audio.examples/reverb-echo.pd create mode 100644 pd/doc/3.audio.examples/sampvoice2.pd delete mode 100644 pd/doc/3.audio.examples/x.ps (limited to 'pd/doc/3.audio.examples') diff --git a/pd/doc/3.audio.examples/00.INTRO.txt b/pd/doc/3.audio.examples/00.INTRO.txt deleted file mode 100644 index 8792dc1e..00000000 --- a/pd/doc/3.audio.examples/00.INTRO.txt +++ /dev/null @@ -1,43 +0,0 @@ -This is the second of three tutorial series on Pd. The first one shows how to -use Pd to do "control" computations. This one shows the time-domain audio -processing features. - -Here is an approximate table of contents... - -1. sinusoids - oscillators - amplitudes - frequency and pitch - FM - -2. wavetable synthesis and sampling - -3. synthetic waveforms, classic and modern - pulses - rectangles and sawtooth waves - additive synthesis - -4. more sampling - -5. envelopes - two flavors of ADSR envelope - log/linear conversion - -6. control structures - analog-style sequencing - monophonic keyboard synthesizer - sample and hold - envelope following - -7. processing - filters - modulation - delays - -8. formant synthesis - -9. strategies - quartic curves in envelopes - triggering notes from qlists - order of execution and block size - diff --git a/pd/doc/3.audio.examples/01.PART1.sinewave.pd b/pd/doc/3.audio.examples/01.PART1.sinewave.pd deleted file mode 100644 index 42b8aed0..00000000 --- a/pd/doc/3.audio.examples/01.PART1.sinewave.pd +++ /dev/null @@ -1,32 +0,0 @@ -#N canvas 6 2 588 513 12; -#X obj 108 109 osc~ 440; -#X obj 108 168 dac~; -#X text 187 111 <-- 440 Hz. sine wave at full blast; -#X obj 108 138 *~ 0.05; -#X text 202 3 MAKING A SINE WAVE; -#X text 32 195 Audio computation can be turned on and off by sending -messages to the global "pd" object as follows:; -#X msg 98 239 \; pd dsp 1; -#X msg 202 239 \; pd dsp 0; -#X text 113 276 ON; -#X text 222 276 OFF; -#X text 29 297 You should see the Pd window change to reflect whether -audio is on or off. You can also turn audio on and off using the "audio" -menu \, but the buttons are provided as a shortcut.; -#X text 30 368 When DSP is on \, you should hear a tone whose pitch -is A 440 and whose amplitude is 0.05. If instead you are greeted with -silence \, you might want to read the HTML documentation on setting -up audio.; -#X text 28 434 In general when you start a work session with Pd \, -you will want to choose "test audio and MIDI" from the help window -\, which opens a more comprehensive test patch than this one.; -#X text 296 247 <-- click these; -#X text 187 139 <-- reduce amplitude to 0.05; -#X text 160 168 <----- send to the audio output device; -#X text 32 23 Audio computation in Pd is done using "tilde objects" -such as the three below. They use continuous audio streams to intercommunicate -\, as well as communicating with other ("control") Pd objects using -messages.; -#X text 342 490 updated for Pd version 0.36; -#X connect 0 0 3 0; -#X connect 3 0 1 0; diff --git a/pd/doc/3.audio.examples/02.amplitude.pd b/pd/doc/3.audio.examples/02.amplitude.pd deleted file mode 100644 index d24be18d..00000000 --- a/pd/doc/3.audio.examples/02.amplitude.pd +++ /dev/null @@ -1,37 +0,0 @@ -#N canvas 73 190 702 512 12; -#X obj 64 65 osc~ 440; -#X obj 64 283 dac~; -#X text 145 66 <-- 440 Hz. sine wave at full blast; -#X msg 431 7 \; pd dsp 1; -#X msg 514 7 \; pd dsp 0; -#X text 456 45 ON; -#X text 534 43 OFF; -#X text 164 18 CONTROLLING AMPLITUDE; -#X text 35 327 Amplitudes of audio signals can have any reasonable -range \, but when you output a signal via the dac~ object \, the samples -should range between -1 and +1. Values out of that range will be "clipped." -; -#X obj 64 202 *~ 0; -#X floatatom 107 165 0 0 0 0 - - -; -#X obj 95 132 dbtorms; -#X floatatom 95 100 0 0 80 0 - - -; -#X text 141 100 <-- set amplitude here in dB; -#X text 211 133 <-- this converts dB to linear units; -#X text 210 164 <-- this shows the linear gain; -#X text 116 204 <-- multiply the sine wave by the gain \, reducing -its amplitude. You can also use the "*~" object to multiply two signals. -The "0" argument here instructs it that we'll just send it messages -to set the multiplier.; -#X text 35 396 Here we calculate a gain for the multiplier (*~) using -a "dbtorms" object (acronym for "dB to RMS"). 100 dB is normalized -to one \, and zero dB artificially outputs a true 0; -#X text 34 452 Pd assumes you have a two channel audio system unless -you tell it otherwise.; -#X text 440 486 updated for Pd version 0.33; -#X text 114 282 <-- and out. We're sending to both channels now.; -#X connect 0 0 9 0; -#X connect 9 0 1 0; -#X connect 9 0 1 1; -#X connect 11 0 9 1; -#X connect 11 0 10 0; -#X connect 12 0 11 0; diff --git a/pd/doc/3.audio.examples/03.line.pd b/pd/doc/3.audio.examples/03.line.pd deleted file mode 100644 index 392df533..00000000 --- a/pd/doc/3.audio.examples/03.line.pd +++ /dev/null @@ -1,55 +0,0 @@ -#N canvas 369 106 647 598 12; -#X obj 56 79 osc~ 440; -#X obj 56 309 dac~; -#X msg 446 79 \; pd dsp 1; -#X msg 538 79 \; pd dsp 0; -#X text 467 112 ON; -#X text 555 112 OFF; -#X obj 56 269 *~; -#X obj 72 243 line~; -#X text 129 243 <--- ramp generator; -#X text 132 78 <-- sine wave; -#X msg 72 103 0.1 2000; -#X msg 72 177 0 2000; -#X msg 72 125 0.1 50; -#X msg 72 199 0 50; -#X msg 72 147 0.1; -#X msg 72 221 0; -#X text 274 124 ON; -#X text 154 105 <-- slow; -#X text 144 126 <-- fast; -#X text 111 146 <-- instantly; -#X text 271 197 OFF; -#X text 136 178 <-- slow; -#X text 129 199 <-- fast; -#X text 109 219 <-- instantly; -#X text 112 161 ----------------------; -#X text 97 308 <-- out; -#X text 103 7 CONTROLLING AMPLITUDE USING LINE~; -#X text 38 342 Line~'s left inlet is a target value \; it reaches that -target in the time specified (in milliseconds) to its right inlet. -; -#X text 34 495 The line~ object (and its control brother \, line) treat -their right inlet specially. The inlets don't retain values the way -other inlets do but revert to zero whenever a target is received.; -#X text 14 27 In this patch \, the multiplier is configured to multiply -two signals. The amplitude is now a signal computed by the line~ object. -; -#X text 37 395 (In this example \, message boxes with two numbers each -are connected to line~'s left inlet. Except in some special cases \, -Pd objects with more than one inlet will automatically distribute lists -of numbers across their inlets. In this case \, "0 50" becomes \, "50 -at right and 0 at left."); -#X text 386 557 updated for Pd version 0.36; -#X text 93 268 <-- multiply the sine wave by the ramp. There's no longer -a "0" argument-- this tells Pd to expect a signal here.; -#X connect 0 0 6 0; -#X connect 6 0 1 0; -#X connect 6 0 1 1; -#X connect 7 0 6 1; -#X connect 10 0 7 0; -#X connect 11 0 7 0; -#X connect 12 0 7 0; -#X connect 13 0 7 0; -#X connect 14 0 7 0; -#X connect 15 0 7 0; diff --git a/pd/doc/3.audio.examples/04.line2.pd b/pd/doc/3.audio.examples/04.line2.pd deleted file mode 100644 index c6dd1679..00000000 --- a/pd/doc/3.audio.examples/04.line2.pd +++ /dev/null @@ -1,59 +0,0 @@ -#N canvas 30 68 949 754 12; -#X obj 67 77 osc~ 440; -#X obj 67 329 dac~; -#X obj 67 242 *~; -#X obj 86 180 line~; -#X text 116 330 <-- out; -#X text 124 9 LINES GRAPHED; -#X text 24 33 Here again is a line~ controlling the amplitude of an -osc~ \, but with the outputs graphed:; -#X obj 149 89 r graphit; -#X obj 151 179 r graphit; -#X obj 151 246 r graphit; -#X obj 86 149 r to-line; -#X graph graph1 0 -1.02 44100 1.02 631 480 831 350; -#X array product 44100 float 0; -#X pop; -#X graph graph1 0 -1.02 44100 1.02 631 150 831 20; -#X array osc-output 44100 float 0; -#X pop; -#X graph graph1 0 -1.02 44100 1.02 631 315 831 185; -#X array line-output 44100 float 0; -#X pop; -#X obj 149 119 tabwrite~ osc-output; -#X obj 67 299 *~ 0.1; -#X msg 38 401 \; pd dsp 1 \; to-line 0 \, 1 500 \; graphit bang; -#X msg 210 401 \; pd dsp 1 \; to-line 1 \, 0 500 \; graphit bang; -#X obj 151 209 tabwrite~ line-output; -#X obj 151 276 tabwrite~ product; -#X text 70 379 ramp up; -#X text 235 378 ramp down; -#X text 406 376 to 1/2; -#X msg 375 400 \; pd dsp 1 \; to-line 0.5 1000 \; graphit bang; -#X text 634 491 ------ 1 second ------; -#X text 38 485 Click the message boxes above to try it. Note that in -the first two boxes \, the line~ objects get two messages. The first -one \, with no time value \, causes the line~ to jump immediately to -the value. The third box takes line~'s previous value as a point of -departure. What you see will depend on which box you last clicked and -how long you waited between the two.; -#X text 662 727 updated for Pd version 0.33; -#X text 41 600 On most machines \, you will hear an interruption in -the sound one second after you click on the first or third box. This -is because the graphical updates are likely to eat more CPU time than -your audio buffer has pre-buffered for. You can avoid this if you keep -your graphs in sub-windows and open them only when you need them. In -some future version of Pd this behavior will be improved. Until then -\, you'll have to avoid having arrays getting re-drawn during music -performances.; -#X connect 0 0 2 0; -#X connect 0 0 14 0; -#X connect 2 0 15 0; -#X connect 2 0 19 0; -#X connect 3 0 2 1; -#X connect 3 0 18 0; -#X connect 7 0 14 0; -#X connect 8 0 18 0; -#X connect 9 0 19 0; -#X connect 10 0 3 0; -#X connect 15 0 1 0; diff --git a/pd/doc/3.audio.examples/05.output.subpatch.pd b/pd/doc/3.audio.examples/05.output.subpatch.pd deleted file mode 100644 index d24fdba2..00000000 --- a/pd/doc/3.audio.examples/05.output.subpatch.pd +++ /dev/null @@ -1,30 +0,0 @@ -#N canvas 300 159 635 486 12; -#X text 261 20 CONTROLLING OUTPUT AMPLITUDE; -#X obj 32 27 osc~ 440; -#X obj 54 55 osc~ 550; -#X obj 54 116 osc~ 660; -#X obj 32 88 +~; -#X obj 32 142 +~; -#X text 108 177 <-- this is a subwindow--right click on it; -#X text 149 197 and select "open" to see inside.; -#X text 30 401 The output control automatically starts DSP whenever -you touch the level control. Hitting "mute" toggles between the current -level and zero.; -#X obj 32 173 output~; -#X text 383 463 updated for Pd version 0.36; -#X text 143 115 <-- Here we make an A major triad as a test signal. -; -#X text 31 250 In this and subsequent patches \, we'll use a subwindow -\, "output" \, to control overall amplitude. The amplitudes are in -decibels \, with 100 being full blast. In this example \, you can't -actually push the output amplitude past 90 or so without clipping. -You'll know you're clipping if \, instead of an A major chord \, you -hear a single \, distorted tone two octaves down. The clipping happens -at Pd's last stage of audio output. Audio signals internal to Pd have -essentially no level limit.; -#X connect 1 0 4 0; -#X connect 2 0 4 1; -#X connect 3 0 5 1; -#X connect 4 0 5 0; -#X connect 5 0 9 0; -#X connect 5 0 9 1; diff --git a/pd/doc/3.audio.examples/06.frequency.pd b/pd/doc/3.audio.examples/06.frequency.pd deleted file mode 100644 index 50cff7c0..00000000 --- a/pd/doc/3.audio.examples/06.frequency.pd +++ /dev/null @@ -1,60 +0,0 @@ -#N canvas 8 17 693 642 12; -#N canvas 0 0 450 300 graph1 0; -#X array osc-output 4410 float 0; -#X coords 0 1.02 4410 -1.02 200 130 1; -#X restore 473 167 graph; -#X obj 98 261 tabwrite~ osc-output; -#X msg 98 232 bang; -#X floatatom 280 66 0 0 0 0 - - -; -#X text 147 231 <-- click to graph; -#X obj 15 206 r frequency; -#X msg 280 37 set \$1; -#X floatatom 6 66 0 0 0 0 - - -; -#X obj 6 8 r frequency; -#X msg 6 37 set \$1; -#X obj 19 90 s frequency; -#X obj 280 8 r pitch; -#X obj 289 90 s pitch; -#X obj 280 116 mtof; -#X obj 280 145 s frequency; -#X obj 6 145 s pitch; -#X obj 6 116 ftom; -#X text 105 66 <-- set frequency; -#X text 372 65 <-- set MIDI pitch; -#X text 15 429 Frequency and pitch are converted using the "ftom" and -"mtof" objects. Frequency refers to the number of cycles per second. -Pitch is "60" for Middle C \, 61 for C sharp \, 72 for the next C up -\, and so on.; -#X text 476 308 ---- 0.1 seconds ----; -#X text 447 6 FREQUENCY AND PITCH; -#X text 16 363 The osc~ object \, if you give it an argument \, expects -floating-point messages to set its frequency. Without arguments \, -its frequency is controlled by connecting an audio signal to its input. -; -#X text 14 496 Mtof and ftom work fine for microtones (non-integral -"MIDI pitch" ) and don't have MIDI's range restriction-- for example -\, MIDI -36 is about 1 Hz.; -#X text 15 553 Note also the "set" messages going to the number boxes -so that they can each update the other without bringing on an infinite -loop. (get help on number boxes for details.); -#X text 87 291 <-- output level; -#X text 51 116 <-- convert frequency; -#X text 106 134 to "MIDI" pitch; -#X text 327 117 <-- convert "MIDI" pitch to frequency; -#X obj 15 273 output~; -#X text 437 619 updated for Pd version 0.36; -#X obj 15 232 osc~; -#X connect 2 0 1 0; -#X connect 3 0 12 0; -#X connect 3 0 13 0; -#X connect 5 0 31 0; -#X connect 6 0 3 0; -#X connect 7 0 10 0; -#X connect 7 0 16 0; -#X connect 8 0 9 0; -#X connect 9 0 7 0; -#X connect 11 0 6 0; -#X connect 13 0 14 0; -#X connect 16 0 15 0; -#X connect 31 0 1 0; -#X connect 31 0 29 0; diff --git a/pd/doc/3.audio.examples/07.frequency.mod.pd b/pd/doc/3.audio.examples/07.frequency.mod.pd deleted file mode 100644 index a7bab032..00000000 --- a/pd/doc/3.audio.examples/07.frequency.mod.pd +++ /dev/null @@ -1,105 +0,0 @@ -#N canvas 52 144 760 640 12; -#X obj 256 180 *~; -#X floatatom 256 95 0 0 0; -#X floatatom 166 130 0 0 0; -#X obj 166 200 +~; -#X graph graph1 0 -1.02 440 1.02 527 170 727 40; -#X array fm-output 441 float 0; -#X pop; -#X floatatom 204 300 0 0 100; -#N canvas 159 26 516 274 output 1; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 396 182 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 391 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 391 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 104 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 159 audio; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X restore 166 328 pd output; -#X msg 242 301 MUTE; -#X text 283 301 <-- output amplitude; -#X msg 242 248 bang; -#X text 284 248 <-- click to graph; -#X obj 242 272 tabwrite~ fm-output; -#X floatatom 278 150 0 0 0; -#X text 163 87 carrier; -#X text 162 105 frequency; -#X text 241 71 frequency; -#X text 242 54 modulation; -#X text 33 8 FREQUENCY MODULATION ("FM") USING TWO OSCILLATORS; -#X obj 166 252 osc~; -#X text 50 234 "carrier"; -#X text 32 252 oscillator -->; -#X text 40 161 add modulator; -#X text 39 179 to carrier; -#X text 37 198 frequency -->; -#X text 317 162 index; -#X text 319 143 modulation; -#X text 477 601 updated for Pd version 0.34; -#X obj 256 120 osc~; -#X text 52 363 This shows the classical FM synthesis technique developed -by John Chowning. It's nothing but an oscillator with vibrato controlled -by another "modulation" oscillator. First \, to understand the patch -\, set carrier frequency to 400 or so \, modulation frequency between -5 and 10 \, and try modulation index values between 0 and 400 \, say. -You'll hear a sine wave with vibrato.; -#X text 531 172 --- 0.01 seconds ----; -#X text 51 478 To get the FM sound \, set all three of carrier frequency -\, modulation frequency \, and modulation index in the hundreds. Note -that you get a timbral change as you sweep modulation index \, because -this changes the amplitudes of the components of the output sound but -not their frequencies.; -#X text 48 564 The component frequencies are equal to the carrier frequency -\, plus or minus multiples of the modulator frequency.; -#X connect 0 0 3 1; -#X connect 1 0 27 0; -#X connect 2 0 3 0; -#X connect 3 0 18 0; -#X connect 5 0 6 1; -#X connect 6 0 5 0; -#X connect 7 0 6 2; -#X connect 9 0 11 0; -#X connect 12 0 0 1; -#X connect 18 0 11 0; -#X connect 18 0 6 0; -#X connect 27 0 0 0; diff --git a/pd/doc/3.audio.examples/08.phase.mod.pd b/pd/doc/3.audio.examples/08.phase.mod.pd deleted file mode 100644 index 716ba6ab..00000000 --- a/pd/doc/3.audio.examples/08.phase.mod.pd +++ /dev/null @@ -1,246 +0,0 @@ -#N canvas 36 68 722 738 12; -#X obj 216 145 *~; -#X floatatom 216 88 0 0 0; -#X obj 297 125 line~; -#X floatatom 128 108 0 0 0; -#X obj 128 222 cos~; -#X obj 128 178 +~; -#X floatatom 166 299 0 0 100; -#N canvas 159 26 495 270 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 159 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 128 326 pd output; -#X msg 204 299 MUTE; -#X obj 216 113 osc~ 0; -#X obj 297 99 pack 0 50; -#X floatatom 297 46 0 0 0; -#X obj 297 73 / 100; -#X text 271 8 modulation index; -#X text 271 23 in hundredths; -#X text 125 65 carrier; -#X text 124 83 frequency; -#X text 201 64 frequency; -#X text 202 47 modulation; -#X text 33 119 carrier; -#X text 33 134 phase -->; -#X text 6 162 phase; -#X text 5 177 modulation-->; -#X text 12 204 output; -#X text 11 221 waveform -->; -#X text 527 6 PHASE MODULATION; -#X text 417 703 updated for Pd version 0.34; -#X text 13 377 Most implementations of "FM" actually use phase \, not -frequency \, modulation \, because it extends in a more natural way -to "multi-operator FM" with three or more oscillators.; -#X text 15 437 To do phase modulation \, we split the "carrier oscillator" -into its phase calculation (phasor~) and its waveform lookup (cos~). -These together would be equivalent to an osc~ object \, but the "+~" -between them adds the modulating oscillator's output to the phase. -; -#X text 18 587 The units of the "modulation" index change--it is now -dimensionless and relative to the modulation frequency \, and "good" -values tend to be between 0 and 1 In this patch it's in hundredths. -; -#X text 19 658 We also have to use a line~ to smooth changes in the -modulation index \, which wasn't necessary in the previous patch.; -#X obj 128 135 phasor~; -#X obj 117 557 cos~; -#X obj 117 529 phasor~; -#X text 60 539 this:; -#X text 219 532 is the same; -#X text 220 551 as this:; -#X obj 335 544 osc~; -#X graph graph2 0 -1 440 1 509 330 709 190; -#X array phase-out 441 float 1; -#A 0 0.43245 0.433463 0.434452 0.435418 0.43636 0.43728 0.438178 0.439056 -0.439912 0.440749 0.441567 0.442366 0.443148 0.443912 0.444659 0.445391 -0.446107 0.446809 0.447497 0.448172 0.448834 0.449484 0.450122 0.450751 -0.451369 0.451978 0.452579 0.453172 0.453758 0.454338 0.454911 0.45548 -0.456045 0.456606 0.457164 0.457719 0.458274 0.458827 0.45938 0.459934 -0.460489 0.461046 0.461605 0.462168 0.462735 0.463306 0.463883 0.464466 -0.465056 0.465654 0.466259 0.466873 0.467497 0.468131 0.468776 0.469433 -0.470102 0.470783 0.471479 0.472188 0.472913 0.473653 0.474409 0.475182 -0.475973 0.476782 0.477611 0.478459 0.479327 0.480216 0.481127 0.48206 -0.483015 0.483994 0.484997 0.486024 0.487077 0.488156 0.48926 0.490392 -0.491552 0.49274 0.493957 0.495203 0.496479 0.497785 0.499123 0.500493 -0.501896 0.503332 0.504801 0.506304 0.507842 0.509415 0.511023 0.512667 -0.514348 0.516066 0.517821 0.519615 0.521447 0.523318 0.525228 0.527179 -0.52917 0.531202 0.533275 0.53539 0.537547 0.539747 0.541992 0.54428 -0.546613 0.548989 0.551411 0.553877 0.556389 0.558947 0.561551 0.564202 -0.5669 0.569645 0.572437 0.575278 0.578166 0.581104 0.58409 0.587125 -0.59021 0.593345 0.596529 0.599764 0.603051 0.606389 0.609778 0.613219 -0.61671 0.620254 0.62385 0.627497 0.631197 0.634949 0.638754 0.642612 -0.646522 0.650486 0.654503 0.658573 0.662696 0.666873 0.671104 -0.324611 --0.320273 -0.315881 -0.311434 -0.306931 -0.302375 -0.297764 -0.2931 --0.288381 -0.283608 -0.278781 -0.2739 -0.268964 -0.263975 -0.258931 --0.253833 -0.248682 -0.243476 -0.238217 -0.232904 -0.227537 -0.222116 --0.216642 -0.211115 -0.205534 -0.1999 -0.194211 -0.18847 -0.182675 --0.176829 -0.170929 -0.164978 -0.158975 -0.152919 -0.146813 -0.140655 --0.134446 -0.128186 -0.121875 -0.115514 -0.109103 -0.102642 -0.0961313 --0.0895714 -0.0829625 -0.0763049 -0.0695988 -0.0628447 -0.056041 -0.0491896 --0.0422913 -0.0353461 -0.0283546 -0.0213171 -0.0142339 -0.00710538 -6.80089e-05 0.00728586 0.0145478 0.0218535 0.0292025 0.0365944 0.0440286 -0.0515049 0.0590228 0.0665818 0.0741815 0.0818213 0.0895009 0.0972198 -0.104978 0.112776 0.120611 0.128484 0.136393 0.144339 0.15232 0.160337 -0.168388 0.176473 0.184592 0.192744 0.200929 0.209146 0.217393 0.225672 -0.233981 0.24232 0.250688 0.259084 0.267509 0.27596 0.284439 0.292944 -0.301475 0.310031 0.318611 0.327215 0.335842 0.344491 0.353162 0.361854 -0.370566 0.379298 0.38805 0.39682 0.405608 0.414413 0.423234 0.432072 -0.440924 0.449792 0.458673 0.467567 0.476474 0.485394 0.494324 0.503265 -0.512216 0.521176 0.530145 0.539121 0.548104 0.557094 0.566089 0.575089 -0.584094 0.593102 0.602113 0.611126 0.620141 0.629157 0.638173 0.647189 -0.656203 0.665215 0.674225 0.683232 0.692234 0.701231 0.710224 0.71921 -0.728189 0.737161 0.746124 0.755079 0.764024 0.772959 0.781884 0.790796 -0.799697 0.808584 0.817458 0.826318 0.835162 0.843992 0.852804 0.861601 -0.870379 0.879139 0.887879 0.8966 0.905301 0.913981 0.92264 0.931276 -0.93989 0.94848 0.957046 0.965588 0.974105 0.982595 0.99106 0.999497 -1.00791 1.01629 1.02464 1.03296 1.04126 1.04952 1.05775 1.06595 1.07412 -1.08225 1.09035 1.09841 1.10645 1.11444 1.1224 1.13033 1.13822 1.14607 -1.15388 1.16166 1.1694 1.17709 1.18475 1.19237 1.19995 1.20749 1.21498 -1.22244 1.22985 1.23722 1.24454 1.25182 1.25906 1.26625 1.2734 0.280502 -0.287559 0.29457 0.301536 0.308454 0.315325 0.32215 0.328926 0.335655 -0.342335 0.348967 0.35555 0.362084 0.368568 0.375003 0.381388 0.387722 -0.394004 0.400235 0.406415 0.412544 0.418621 0.424647 0.430621 0.436542 -0.442412 0.448228 0.453993 0.459704 0.465363 0.470969 0.476521 0.48202 -0.487466 0.492858 0.498196 0.503481 0.508712 0.513889 0.519011 0.524077 -0.52909 0.534049 0.538953 0.543804 0.5486 0.553342 0.55803 0.562664 -0.567243 0.571769 0.57624 0.580658 0.585021 0.589331 0.593587 0.597789 -0.601938 0.606033 0.610075 0.614064 0.617999 0.621879 0.625706 0.629481 -0.633203 0.636873 0.640491 0.644057 0.647571 0.651033 0.654445 0.657805 -0.661114 0.664372 0.66758 0.670739 0.673847 0.676905 0.679914 0.682875 -; -#X array cos-out 441 float 1; -#A 0 -0.911256 -0.913872 -0.916365 -0.918789 -0.921097 -0.923342 -0.925486 --0.927564 -0.92956 -0.931483 -0.93335 -0.935129 -0.936867 -0.938528 --0.940137 -0.941707 -0.943197 -0.944657 -0.946072 -0.947426 -0.948755 --0.95004 -0.951276 -0.952491 -0.953672 -0.954806 -0.955924 -0.957024 --0.958071 -0.959106 -0.960132 -0.961119 -0.962086 -0.963047 -0.963993 --0.964903 -0.965811 -0.966718 -0.967595 -0.968461 -0.969329 -0.970192 --0.971025 -0.971863 -0.972707 -0.973527 -0.974343 -0.975168 -0.975986 --0.976786 -0.977597 -0.978414 -0.979202 -0.980003 -0.980816 -0.981596 --0.982391 -0.983194 -0.983968 -0.984757 -0.985543 -0.98631 -0.987093 --0.987851 -0.98861 -0.98937 -0.990102 -0.990852 -0.991557 -0.992275 --0.99296 -0.993642 -0.994295 -0.994935 -0.995544 -0.996137 -0.996687 --0.997227 -0.997705 -0.998173 -0.998575 -0.998944 -0.999273 -0.999527 --0.999743 -0.999894 -0.999966 -0.999981 -0.999927 -0.999765 -0.999526 --0.999202 -0.998785 -0.99824 -0.997586 -0.996816 -0.995923 -0.994897 --0.99373 -0.992413 -0.990934 -0.989283 -0.987458 -0.985449 -0.983247 --0.980843 -0.978222 -0.975372 -0.972288 -0.968961 -0.965377 -0.96153 --0.95741 -0.952995 -0.948265 -0.943231 -0.937881 -0.932182 -0.926128 --0.919728 -0.912938 -0.905762 -0.898197 -0.890198 -0.881799 -0.87293 --0.863637 -0.853855 -0.843612 -0.832873 -0.821629 -0.809886 -0.797593 --0.784764 -0.771394 -0.757466 -0.742953 -0.727864 -0.712189 -0.695918 --0.679041 -0.661549 -0.643437 -0.624697 -0.605324 -0.585314 -0.564664 --0.543374 -0.521441 -0.498869 -0.475658 -0.451811 -0.427334 -0.402219 --0.376482 -0.350131 -0.323174 -0.295626 -0.267508 -0.238824 -0.2096 --0.179853 -0.149603 -0.118875 -0.0876953 -0.0560885 -0.0240874 0.00827867 -0.040974 0.0739643 0.107208 0.140666 0.174297 0.208056 0.241893 0.275757 -0.309603 0.343385 0.377036 0.410498 0.443712 0.476616 0.509148 0.541242 -0.572835 0.603858 0.634244 0.66391 0.692797 0.720837 0.747961 0.774084 -0.799131 0.823051 0.845758 0.867169 0.887248 0.90588 0.923037 0.938628 -0.952605 0.964885 0.975433 0.984153 0.991037 0.995988 0.998986 0.999997 -0.998938 0.995807 0.990576 0.983211 0.973668 0.961961 0.948075 0.932007 -0.913757 0.893328 0.87073 0.845995 0.81915 0.790227 0.759268 0.726324 -0.691452 0.654714 0.616181 0.57593 0.534037 0.490599 0.445716 0.399491 -0.352033 0.303459 0.253886 0.203441 0.152259 0.100478 0.0482368 -0.00432081 --0.057045 -0.109786 -0.162386 -0.214696 -0.266564 -0.317814 -0.368301 --0.417864 -0.466337 -0.513584 -0.559424 -0.603732 -0.646344 -0.687125 --0.725934 -0.762631 -0.797101 -0.829205 -0.858847 -0.8859 -0.91028 --0.931885 -0.950636 -0.966466 -0.97929 -0.989092 -0.995773 -0.999358 --0.999773 -0.997042 -0.991152 -0.982099 -0.969941 -0.954655 -0.936332 --0.915008 -0.890737 -0.863625 -0.833713 -0.801132 -0.765979 -0.728348 --0.688394 -0.646219 -0.601975 -0.555817 -0.507869 -0.45832 -0.407319 --0.355036 -0.301652 -0.247328 -0.192258 -0.136617 -0.0805873 -0.0243537 -0.0319027 0.0879985 0.143752 0.198986 0.253526 0.307194 0.359834 0.411262 -0.461345 0.509907 0.556823 0.601935 0.645131 0.686266 0.725245 0.761935 -0.796272 0.828125 0.857461 0.884158 0.9082 0.929508 0.948044 0.9638 -0.976698 0.986778 0.99402 0.998404 0.999981 0.998763 0.994751 0.988022 -0.978621 0.966582 0.95197 0.93487 0.915357 0.893512 0.869405 0.843139 -0.814817 0.784538 0.752408 0.718535 0.68303 0.646007 0.607581 0.567872 -0.526996 0.485074 0.442227 0.398573 0.354231 0.30932 0.263957 0.218256 -0.172326 0.126282 0.0802317 0.0342922 -0.0114471 -0.0568861 -0.101931 --0.146492 -0.190474 -0.233802 -0.276394 -0.318171 -0.359072 -0.399015 --0.437958 -0.475821 -0.512573 -0.548149 -0.582512 -0.615632 -0.647446 --0.677951 -0.707119 -0.734897 -0.761296 -0.786293 -0.80988 -0.83204 --0.852773 -0.872085 -0.88998 -0.906462 -0.921542 -0.935229 -0.94754 --0.95849 -0.968102 -0.976397 -0.9834 -0.989136 -0.993613 -0.996882 --0.998976 -0.99993 -0.999748 -0.998484 -0.996188 -0.99286 -0.988563 --0.983336 -0.977186 -0.970195 -0.962347 -0.953732 -0.944344 -0.934249 --0.923482 -0.912051 -0.900028 -0.887441 -0.874296 -0.860659 -0.846562 --0.832035 -0.817101 -0.801792 -0.786149 -0.770201 -0.753977 -0.737507 --0.720826 -0.703952 -0.686912 -0.669731 -0.652436 -0.635043 -0.617572 --0.600055 -0.582513 -0.564966 -0.547418 -0.529898 -0.512429 -0.495016 --0.477676 -0.460438 -0.443287 -0.426265 -0.409364; -#X pop; -#X obj 251 241 tabwrite~ phase-out; -#X obj 251 268 tabwrite~ cos-out; -#X msg 251 216 bang; -#X text 298 215 <-- graph them; -#X text 386 99 <-- change smoothly to avoid clicks; -#X connect 0 0 5 1; -#X connect 1 0 9 0; -#X connect 2 0 0 1; -#X connect 3 0 31 0; -#X connect 4 0 7 0; -#X connect 4 0 40 0; -#X connect 5 0 4 0; -#X connect 5 0 39 0; -#X connect 6 0 7 1; -#X connect 7 0 6 0; -#X connect 8 0 7 2; -#X connect 9 0 0 0; -#X connect 10 0 2 0; -#X connect 11 0 12 0; -#X connect 12 0 10 0; -#X connect 31 0 5 0; -#X connect 33 0 32 0; -#X connect 41 0 39 0; -#X connect 41 0 40 0; diff --git a/pd/doc/3.audio.examples/09.review.pd b/pd/doc/3.audio.examples/09.review.pd deleted file mode 100644 index 4e683e3c..00000000 --- a/pd/doc/3.audio.examples/09.review.pd +++ /dev/null @@ -1,43 +0,0 @@ -#N canvas 36 68 701 588 12; -#X text 444 567 updated for Pd version 0.34; -#X text 39 14 PART 1 REVIEW; -#X obj 66 131 tabwrite~; -#X obj 66 105 line~; -#X obj 54 298 +; -#X obj 66 79 +~; -#X obj 66 209 cos~; -#X obj 66 157 osc~; -#X obj 66 183 phasor~; -#X obj 54 324 pack; -#X obj 52 536 r; -#X obj 53 512 s; -#X obj 54 433 inlet; -#X obj 53 487 f; -#X obj 53 461 t; -#X obj 54 350 moses; -#X obj 54 403 dbtorms; -#X obj 97 376 mtof; -#X obj 54 375 ftom; -#X obj 105 433 outlet; -#X obj 66 235 dac~; -#X text 26 52 So far we've seen these audio ("tilde") objects:; -#X text 123 104 -- ramp generator; -#X text 157 131 -- sampler (which we've only used for graphing so far) -; -#X text 111 157 -- a cosine wave oscillator; -#X text 139 183 -- phase generator for making your own oscillator; -#X text 112 209 -- cosine waveshape lookup; -#X text 112 236 -- audio output ("digital/analog converter" -- a misnomer) -; -#X text 31 266 ... and these "control" objects:; -#X text 145 374 -- frequency to pitch conversion; -#X text 126 403 -- decibel to amplitude conversion; -#X text 167 434 -- input and output to a subpatch; -#X text 90 462 ("trigger") -- message ordering and conversion; -#X text 93 487 ("float") -- store a (floating point) number; -#X text 90 513 ("send") -- wireless message sending; -#X text 91 538 ("receive") ... and receiving; -#X text 106 78 (etc.) -- arithmetic on audio signals; -#X text 92 296 (etc.) -- arithmetic; -#X text 99 323 -- combine two or more values in a single message; -#X text 107 350 -- arithmetic "if"; diff --git a/pd/doc/3.audio.examples/10.PART2.wavetables.pd b/pd/doc/3.audio.examples/10.PART2.wavetables.pd deleted file mode 100644 index 925988ad..00000000 --- a/pd/doc/3.audio.examples/10.PART2.wavetables.pd +++ /dev/null @@ -1,104 +0,0 @@ -#N canvas 19 22 722 608 12; -#X floatatom 164 43 0 0 0; -#X graph graph1 0 -1.02 258 1.02 445 177 703 47; -#X array table10 259 float 1; -#A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0.612 0.612 0.612 0.612 0.612 0.627692 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 -0.470769 -0.470769 -0.470769 -0.470769 -0.470769 --0.470769 -0.470769 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0.627692 0.627692 0.627692 0.643385 0.643385 0.643385 -0.659077 0 -0.502154 -0.502154 -0.502154 -0.486462 -0.486462 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0.580615 0.596308 0.596308 0.596308 0.596308 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; -#X pop; -#X floatatom 202 171 0 0 100; -#N canvas 159 26 532 285 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 426 180 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 105 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 159 audio; -#X text 96 114 show level; -#X obj 426 155 t b; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X restore 164 199 pd output; -#X msg 240 172 MUTE; -#X text 30 123 oscillator -->; -#X text 456 587 updated for Pd version 0.34; -#X text 33 8 WAVETABLE OSCILLATORS; -#X text 36 106 wavetable; -#X obj 164 70 mtof; -#X floatatom 164 97 0 0 0; -#X obj 164 123 tabosc4~ table10; -#X text 94 42 pitch->; -#X text 35 309 Note that I selected "save contents" in the properties -dialog for table10 (right click on the table to see.) If this isn't -set \, the waveform won't be remembered as part of the patch but will -be reinitialized to zero when the patch is reopened.; -#X msg 35 549 \; table10 cosinesum 256 0.2 -0.2 0.2 -0.2 0.2 -0.2 0.2 -; -#X msg 578 240 \; table10 const 0; -#X text 597 217 CLEAR TABLE; -#X text 35 395 For efficiency's sake tabosc4~ requires that the table -have a power of two plus three points (64+3=67 \, 128+3=131 \, 256+3=259 -\, etc.) If you want wraparound to work smoothly \, you should make -the last three points copies of the first three. This is done because -tabread4~ does 4-point interpolation.; -#X text 38 494 If you want a specific sinusoidal composition \, you -can send table10 a message \, as below (see 11.arrays in the control -examples):; -#X text 36 240 Here \, in place of the "osc~" cosine wave oscillator -\, we introduce the tabosc4~ oscillator which produces an arbitrary -waveform. You can draw in the waveform with the mouse.; -#X connect 0 0 9 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 9 0 10 0; -#X connect 10 0 11 0; -#X connect 11 0 3 0; diff --git a/pd/doc/3.audio.examples/11.wavetable.FM.pd b/pd/doc/3.audio.examples/11.wavetable.FM.pd deleted file mode 100644 index c4cc6d60..00000000 --- a/pd/doc/3.audio.examples/11.wavetable.FM.pd +++ /dev/null @@ -1,147 +0,0 @@ -#N canvas 74 98 749 466 12; -#X graph graph1 0 -1.02 258 1.02 475 298 733 168; -#X array waveform11 259 float 1; -#A 0 -0.0896033 0 0.0896033 0.178356 0.265425 0.350007 0.431348 0.508756 -0.58161 0.649372 0.711597 0.767935 0.818137 0.862053 0.89963 0.930912 -0.956028 0.975187 0.988669 0.996811 1 0.998655 0.993223 0.984158 0.971919 -0.956953 0.939691 0.920538 0.899867 0.878018 0.85529 0.831945 0.808204 -0.784252 0.760239 0.736284 0.712477 0.688888 0.665568 0.642553 0.619872 -0.59755 0.575607 0.554066 0.532953 0.512296 0.49213 0.472491 0.453419 -0.434957 0.417147 0.400027 0.383632 0.367992 0.353126 0.339046 0.32575 -0.313227 0.301453 0.290394 0.280002 0.270224 0.260995 0.252248 0.24391 -0.235908 0.22817 0.220628 0.213219 0.205888 0.198586 0.191278 0.183936 -0.176545 0.169098 0.1616 0.154063 0.146505 0.138954 0.131437 0.123987 -0.116636 0.109415 0.102354 0.0954784 0.0888083 0.08236 0.0761442 0.0701659 -0.0644253 0.0589178 0.0536354 0.0485669 0.0436994 0.0390194 0.0345135 -0.0301695 0.0259776 0.0219306 0.0180245 0.0142591 0.0106377 0.00716724 -0.00385775 0.000722025 -0.00222511 -0.0049675 -0.00748845 -0.00977153 --0.0118014 -0.0135644 -0.0150493 -0.0162479 -0.0171551 -0.0177693 -0.0180928 --0.0181312 -0.0178936 -0.017392 -0.0166417 -0.0156601 -0.0144666 -0.0130822 --0.0115294 -0.00983114 -0.0080113 -0.00609396 -0.0041034 -0.00206402 --2.23572e-07 0.00206358 0.00410297 0.00609353 0.00801089 0.00983075 -0.011529 0.0130819 0.0144663 0.0156599 0.0166416 0.0173919 0.0178935 -0.0181312 0.0180929 0.0177695 0.0171552 0.0162481 0.0150496 0.0135647 -0.0118018 0.009772 0.00748897 0.00496807 0.00222573 -0.000721367 -0.00385706 --0.00716651 -0.010637 -0.0142583 -0.0180237 -0.0219297 -0.0259767 -0.0301686 --0.0345125 -0.0390184 -0.0436984 -0.0485658 -0.0536343 -0.0589167 -0.0644241 --0.0701647 -0.0761429 -0.0823587 -0.0888069 -0.0954769 -0.102353 -0.109414 --0.116634 -0.123985 -0.131435 -0.138952 -0.146504 -0.154061 -0.161598 --0.169097 -0.176543 -0.183935 -0.191276 -0.198584 -0.205886 -0.213218 --0.220627 -0.228169 -0.235906 -0.243908 -0.252246 -0.260993 -0.270222 --0.28 -0.290392 -0.301451 -0.313224 -0.325747 -0.339043 -0.353123 -0.367989 --0.383629 -0.400023 -0.417143 -0.434954 -0.453415 -0.472486 -0.492125 --0.512292 -0.532948 -0.554062 -0.575602 -0.597545 -0.619868 -0.642548 --0.665563 -0.688883 -0.712472 -0.736279 -0.760234 -0.784247 -0.808199 --0.83194 -0.855285 -0.878013 -0.899863 -0.920533 -0.939687 -0.956949 --0.971916 -0.984156 -0.993221 -0.998655 -1 -0.996813 -0.988671 -0.975191 --0.956033 -0.930918 -0.899638 -0.862061 -0.818147 -0.767947 -0.71161 --0.649386 -0.581625 -0.508772 -0.431366 -0.350025 -0.265443 -0.178375 --0.0896226 -1.94061e-05 0.089584; -#X pop; -#X floatatom 202 171 0 0 100; -#N canvas 159 26 532 285 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 426 180 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 155 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 105 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 132 audio; -#X text 96 114 show level; -#X obj 426 155 t b; -#X obj 20 181 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 27 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X connect 27 0 21 0; -#X restore 164 199 pd output; -#X msg 240 172 MUTE; -#X text 30 123 oscillator -->; -#X text 485 445 updated for Pd version 0.34; -#X text 33 8 WAVETABLE OSCILLATORS; -#X text 36 106 wavetable; -#X text 88 54 pitch->; -#X graph graph2 0 0 258 1000 475 155 734 15; -#X array pitch11 259 float 1; -#A 0 757.143 757.143 735.714 700 671.429 650 621.429 600 571.429 550 -521.429 507.143 485.714 464.286 442.857 428.571 414.286 400 378.571 -364.286 342.857 328.571 928.571 921.429 921.429 914.286 907.143 892.857 -885.714 878.571 864.286 850 828.571 807.143 792.857 785.714 775 764.286 -753.571 742.857 735.714 728.571 721.429 714.286 703.571 692.857 682.143 -671.429 650 628.571 617.857 607.143 596.429 585.714 575 564.286 553.571 -542.857 532.143 521.429 510.714 500 485.714 478.571 464.286 450 435.714 -428.571 400 392.857 385.714 378.571 357.143 350 342.857 335.714 328.571 -314.286 292.857 285.714 271.429 264.286 571.429 571.429 571.429 571.429 -571.429 564.286 564.286 278.571 271.429 271.429 278.571 278.571 278.571 -278.571 571.429 571.429 571.429 575 578.571 578.571 278.571 278.571 -285.714 285.714 278.571 278.571 278.571 878.571 878.571 878.571 878.571 -878.571 321.429 325 328.571 328.571 328.571 328.571 885.714 885.714 -885.714 885.714 207.143 207.143 207.143 200 207.143 207.143 207.143 -214.286 214.286 221.429 228.571 228.571 242.857 250 257.143 264.286 -278.571 292.857 307.143 321.429 335.714 350 371.429 392.857 421.429 -435.714 471.429 500 542.857 571.429 628.571 664.286 700 728.571 757.143 -792.857 828.571 885.714 928.571 978.571 1000 1007.14 1007.14 1000 1000 -992.857 985.714 885.714 914.286 671.429 671.429 671.429 671.429 671.429 -671.429 671.429 671.429 671.429 671.429 678.571 635.714 635.714 678.571 -714.286 714.286 678.571 635.714 635.714 635.714 742.857 742.857 685.714 -685.714 635.714 621.429 685.714 792.857 792.857 678.571 521.429 521.429 -521.429 864.286 857.143 857.143 471.429 471.429 471.429 471.429 921.429 -921.429 385.714 385.714 385.714 964.286 964.286 964.286 328.571 328.571 -328.571 328.571 885.714 885.714 885.714 685.714 214.286 214.286 207.143 -207.143 921.429 921.429 921.429 921.429 207.143 207.143 200 200 957.143 -957.143 950 214.286 214.286 207.143 207.143 957.143 957.143 950 200 -207.143 207.143 942.857 942.857 942.857 950 950; -#X pop; -#X obj 164 87 tabosc4~ pitch11; -#X obj 164 123 tabosc4~ waveform11; -#X obj 164 55 sig~ 0.5; -#X text 13 319 Here's a tabosc4~ controlling the frequency of another -one. If you get properties on the two arrays \, you'll see that the -top graph has a vertical scale from 0 to 1000 \; we're looping through -that at a frequency of 0.5 Hz. and the output is used as the frequency -input of the second tabosc4~. I've detected Klingons \, Captain Kirk... -; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 10 0 11 0; -#X connect 11 0 2 0; -#X connect 12 0 10 0; diff --git a/pd/doc/3.audio.examples/12.tabread4.pd b/pd/doc/3.audio.examples/12.tabread4.pd deleted file mode 100644 index b045485c..00000000 --- a/pd/doc/3.audio.examples/12.tabread4.pd +++ /dev/null @@ -1,128 +0,0 @@ -#N canvas 55 137 820 651 12; -#X graph graph1 0 -1.02 130 1.02 462 160 720 30; -#X array waveform12 131 float 1; -#A 0 -0.172615 -0.172615 -0.172615 -0.172615 -0.172615 -0.141231 -0.109846 --0.0941538 -0.0627692 -0.0470769 0.0156923 0.0784615 0.125538 0.188308 -0.235385 0.298154 0.360923 0.392308 0.470769 0.533538 0.596308 0.643385 -0.674769 0.721846 0.753231 0.784615 0.816 0.831692 0.847385 0.878769 -0.894462 0.910154 0.910154 0.910154 0.910154 0.910154 0.894462 0.894462 -0.894462 0.894462 0.878769 0.863077 0.816 0.800308 0.768923 0.737538 -0.706154 0.674769 0.643385 0.596308 0.564923 0.533538 0.470769 0.423692 -0.376615 0.313846 0.266769 0.204 0.172615 0.109846 0.0627692 0.0156923 -0 -0.0313846 -0.0627692 -0.0784615 -0.0941538 -0.109846 -0.141231 -0.156923 --0.172615 -0.204 -0.219692 -0.219692 -0.235385 -0.235385 -0.235385 --0.219692 -0.219692 -0.219692 -0.204 -0.156923 -0.125538 -0.0784615 -0 0.172615 0.313846 0.470769 0.564923 0.627692 0.690462 0.721846 0.737538 -0.753231 0.768923 0.768923 0.753231 0.737538 0.706154 0.674769 0.612 -0.580615 0.549231 0.517846 0.486462 0.423692 0.392308 0.360923 0.282462 -0.219692 0.109846 -0.0156923 -0.0941538 -0.109846 -0.141231 -0.156923 --0.172615 -0.188308 -0.204 -0.204 -0.219692 -0.204 -0.204 -0.219692 --0.219692 -0.204 -0.204 -0.204 -0.204 -0.204 -0.188308; -#X pop; -#X floatatom 194 299 0 0 100; -#N canvas 159 26 532 285 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 426 180 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 155 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 105 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 132 audio; -#X text 96 114 show level; -#X obj 426 155 t b; -#X obj 20 181 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 27 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X connect 27 0 21 0; -#X restore 156 327 pd output; -#X msg 232 300 MUTE; -#X text 554 624 updated for Pd version 0.34; -#X text 33 8 WAVETABLE OSCILLATORS; -#X obj 156 95 phasor~; -#X obj 156 184 tabread4~ waveform12; -#X obj 156 157 +~ 1; -#X floatatom 156 66 4 0 0; -#X floatatom 250 59 4 0 1000; -#X obj 250 111 pack 0 50; -#X obj 250 137 line~; -#X obj 156 131 *~; -#X text 21 81 phase; -#X text 20 96 generation -->; -#X text 25 117 range; -#X text 24 132 adjustment -->; -#X text 250 38 squeeze; -#X text 133 40 frequency; -#X graph graph3 0 -1 440 1 481 330 781 190; -#X array wave-out12 441 float 0; -#X pop; -#X obj 177 247 tabwrite~ wave-out12; -#X msg 177 216 bang; -#X text 223 217 <--click to graph; -#X obj 250 84 + 128; -#X text 25 360 The tabread4~ module is available for situations requiring -more control than tabosc4~ offers. The relationship between the two -is the same as between cos~ and osc~ \, although the units are different -between cos~ and tabread4~. Cos~ assumes input is normalized from 0 -to 1 (and will wrap around as needed.) Tabread4~ takes values from -1 to n-2 where n is the number of points in the table-- for a 259-point -table such as we have here \, it's 1 to 129 (so the "good" segment -is 128 samples long.); -#X text 30 508 You would use tabread4~ (as opposed to tabosc4~) if -you need direct control of the phase \, for instance if you to advance -nonlinearly through the table. In the case shown here \, the "squeeze" -factor makes the phase grow to a value at least \, and possibly much -graeater than \, 129 (to which tabread4~ then limits it). So the resulting -waveform is compressed in time.; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 6 0 13 0; -#X connect 7 0 2 0; -#X connect 7 0 21 0; -#X connect 8 0 7 0; -#X connect 9 0 6 0; -#X connect 10 0 24 0; -#X connect 11 0 12 0; -#X connect 12 0 13 1; -#X connect 13 0 8 0; -#X connect 22 0 21 0; -#X connect 24 0 11 0; diff --git a/pd/doc/3.audio.examples/13.tabread4.interpolation.pd b/pd/doc/3.audio.examples/13.tabread4.interpolation.pd deleted file mode 100644 index 18aef089..00000000 --- a/pd/doc/3.audio.examples/13.tabread4.interpolation.pd +++ /dev/null @@ -1,44 +0,0 @@ -#N canvas 137 102 781 520 12; -#X graph graph1 0 -1.02 10 1.02 468 159 648 29; -#X array waveform13 11 float 1; -#A 0 1 1 1 1 1 1 1 -1 -1 -1 -1; -#X pop; -#X text 533 502 updated for Pd version 0.34; -#X obj 156 157 +~ 1; -#X text 21 81 phase; -#X text 20 96 generation -->; -#X text 25 117 range; -#X text 24 132 adjustment -->; -#X graph graph3 0 -1.02 440 1.02 469 362 769 222; -#X array wave-out13 441 float 0; -#X pop; -#X msg 177 216 bang; -#X text 223 217 <--click to graph; -#N canvas 11 418 523 216 other-stuff 0; -#X obj 41 49 loadbang; -#X msg 39 81 \; waveform13 0 1 1 1 1 1 1 1 -1 -1 -1 -1 \; waveform13 -xlabel -1.2 0 1 2 3 4 5 6 7 8 9 10 \; pd dsp 1; -#X connect 0 0 1 0; -#X restore 626 426 pd other-stuff; -#X obj 156 247 tabwrite~ wave-out13; -#X obj 156 184 tabread4~ waveform13; -#X obj 156 131 *~ 8; -#X obj 156 95 phasor~ 220; -#X text 36 22 4-POINT INTERPOLATION IN DETAIL; -#X obj 216 316 sig~ 220; -#X obj 216 346 tabosc4~ waveform13; -#X text 35 293 (this would be; -#X text 36 313 equivalent to the; -#X text 110 333 above) -->; -#X text 18 409 This patch demonstrates 4-point interpolation in tabread4~. -The 11-point table \, waveform13 \, contains a transition from from -1 to -1 \, which is "smoothed" as seen in wave-out13. There's no such -transition at the wraparoind point--the interpolation always happens -between 4 consccutive samples of the table \, disregarding wraparound. -; -#X connect 2 0 12 0; -#X connect 8 0 11 0; -#X connect 12 0 11 0; -#X connect 13 0 2 0; -#X connect 14 0 13 0; -#X connect 16 0 17 0; diff --git a/pd/doc/3.audio.examples/14.more.tabread.pd b/pd/doc/3.audio.examples/14.more.tabread.pd deleted file mode 100644 index 22ff2846..00000000 --- a/pd/doc/3.audio.examples/14.more.tabread.pd +++ /dev/null @@ -1,106 +0,0 @@ -#N canvas 55 137 777 467 12; -#X graph graph1 0 -1.02 130 1.02 462 160 720 30; -#X array pitchmod14 131 float 1; -#A 0 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 -0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.863077 -0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 -0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 -0.863077 0.863077 0.863077 0.863077 0.863077 0.831692 0.847385 0.847385 -0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 -0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 -0.847385 0.863077 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 --0.800308 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.768923 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.768923 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.800308 -0.800308 --0.800308 -0.800308 -0.800308 -0.800308 -0.800308; -#X pop; -#X floatatom 194 299 0 0 100; -#N canvas 159 26 532 285 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 426 180 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 155 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 105 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 132 audio; -#X text 96 114 show level; -#X obj 426 155 t b; -#X obj 20 181 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 27 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X connect 27 0 21 0; -#X restore 156 327 pd output; -#X msg 232 300 MUTE; -#X text 521 439 updated for Pd version 0.34; -#X floatatom 153 95 4 0 0; -#X text 153 69 frequency; -#X text 33 8 MORE ON FREQUENCY MODULATION; -#X floatatom 195 206 4 0 0; -#X text 155 50 modulation; -#X obj 152 157 *~; -#X text 255 150 modulation; -#X text 253 169 depth; -#X floatatom 201 157 4 0 0; -#X obj 152 205 +~; -#X text 250 212 frequency; -#X obj 152 237 osc~; -#X obj 153 122 tabosc4~ pitchmod14; -#X text 254 194 carrier; -#X text 44 379 This patch is like the original FM patch except in having -a settable wavetable for the modulation oscillator. Try changing the -waveform as well as the three familiar parameters.; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 17 0; -#X connect 8 0 14 1; -#X connect 10 0 14 0; -#X connect 13 0 10 1; -#X connect 14 0 16 0; -#X connect 16 0 2 0; -#X connect 17 0 10 0; diff --git a/pd/doc/3.audio.examples/15.table.switching.pd b/pd/doc/3.audio.examples/15.table.switching.pd deleted file mode 100644 index 558f91c4..00000000 --- a/pd/doc/3.audio.examples/15.table.switching.pd +++ /dev/null @@ -1,127 +0,0 @@ -#N canvas 55 137 835 504 12; -#X graph graph1 0 -1.02 130 1.02 565 153 823 23; -#X array waveshape15a 131 float 1; -#A 0 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 -0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.863077 -0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 -0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 0.863077 -0.863077 0.863077 0.863077 0.863077 0.863077 0.831692 0.847385 0.847385 -0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 -0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 -0.847385 0.863077 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 --0.800308 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.768923 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.768923 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.800308 -0.800308 --0.800308 -0.800308 -0.800308 -0.800308 -0.800308; -#X pop; -#X floatatom 194 299 0 0 100; -#N canvas 159 26 532 285 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 426 180 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 155 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 105 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 132 audio; -#X text 96 114 show level; -#X obj 426 155 t b; -#X obj 20 181 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 27 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X connect 27 0 21 0; -#X restore 156 327 pd output; -#X msg 232 300 MUTE; -#X text 581 481 updated for Pd version 0.34; -#X text 33 8 SWITCHING BETWEEN TABLES; -#X graph graph1 0 -1.02 130 1.02 565 308 823 178; -#X array waveshape15b 131 float 1; -#A 0 -0.659077 -0.643385 -0.643385 -0.627692 -0.612 -0.612 -0.596308 --0.596308 -0.580615 -0.580615 -0.580615 -0.580615 -0.580615 -0.580615 --0.580615 -0.596308 -0.596308 -0.596308 -0.596308 -0.596308 -0.596308 --0.596308 -0.596308 -0.580615 -0.580615 -0.580615 -0.580615 -0.580615 --0.580615 -0.580615 -0.580615 -0.564923 -0.549231 -0.549231 -0.533538 --0.517846 -0.517846 -0.517846 -0.517846 -0.517846 -0.517846 -0.517846 --0.517846 -0.533538 -0.549231 -0.580615 -0.580615 0.847385 0.847385 -0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 0.863077 -0.847385 0.847385 0.847385 0.847385 0.847385 0.847385 -0.800308 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.768923 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.768923 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 -0.784615 --0.784615 -0.784615 -0.784615 -0.800308 -0.800308 -0.800308 -0.800308 --0.800308 -0.800308 -0.800308; -#X pop; -#X obj 156 274 tabosc4~ waveshape15a; -#X obj 156 186 sig~ 110; -#X msg 181 215 set waveshape15a; -#X msg 182 244 set waveshape15b; -#X text 20 51 During a performance you're unlikely to want to draw -or recalculate wavetables on the fly \, because you don't want to give -Pd computationally intensive atomic tasks that could make Pd miss a -DAC deadline. Instead \, use "set" mesages to switch tabosc~ or tabread4~ -between pre-prepared tables. Indeed \, you will eventually want to -save screen space by throwing all your wavetables in a subpatch somewhere. -; -#X obj 161 401 table waveshape15c 131; -#X text 41 362 There's also a "text object" hook so that you can have -arrays with parametrizable names and sizes:; -#X text 31 431 You would use this if you want to include one or more -arrays in an abstraction. In this invocation you can't save the state -of the array--instead \, juts read it in from a file or calculate it -at startup.; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 7 0 2 0; -#X connect 8 0 7 0; -#X connect 9 0 7 0; -#X connect 10 0 7 0; diff --git a/pd/doc/3.audio.examples/16.table.spectrum.pd b/pd/doc/3.audio.examples/16.table.spectrum.pd deleted file mode 100644 index 65ccccde..00000000 --- a/pd/doc/3.audio.examples/16.table.spectrum.pd +++ /dev/null @@ -1,143 +0,0 @@ -#N canvas 227 120 801 403 12; -#X graph graph3 0 0 126 50 496 276 796 136; -#X array spectrum-tab 127 float 1; -#A 0 42.8571 42.5 43.2143 43.2143 43.2143 43.2143 43.2143 42.8571 42.8571 -42.8571 42.8571 42.8571 42.8571 42.5 42.5 42.5 42.5 42.5 42.5 42.5 -42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 -42.5 42.5 42.1429 42.1429 41.7857 41.0714 40.3571 39.6429 39.2857 38.2143 -37.5 37.1429 36.0714 35.3571 33.9286 33.2143 32.8571 31.4286 31.0714 -30.3571 28.9286 28.2143 27.5 26.4286 25.7143 23.9286 23.2143 21.7857 -21.0714 20.7143 20 19.6429 19.6429 23.2143 28.2143 31.4286 33.5714 -36.4286 37.8571 38.9286 43.9286 45.7143 47.8571 47.8571 47.8571 47.8571 -47.5 47.1429 43.2143 40.3571 36.4286 33.9286 32.1429 29.2857 18.2143 -16.7857 16.7857 17.5 19.6429 22.1429 28.2143 33.9286 33.9286 33.9286 -33.5714 22.5 18.5714 16.7857 4.64286 4.64286 18.2143 17.1429 8.92857 -4.28571 11.4286 10 7.5 6.42857 5.71429 5.35714 5 4.64286 4.28571 3.92857 -3.92857 3.57143 3.57143 2.85714 2.5 2.14286 1.78571 0.714286 0.357143 -; -#X pop; -#X floatatom 57 351 0 0 0; -#N canvas 159 26 526 286 output 0; -#X obj 345 163 t b; -#X obj 345 112 f; -#X obj 345 61 inlet; -#X text 351 30 mute; -#X obj 345 189 f; -#X msg 434 182 0; -#X msg 345 87 bang; -#X obj 345 138 moses 1; -#X obj 405 119 moses 1; -#X obj 85 151 dbtorms; -#X obj 405 94 r master-lvl; -#X obj 85 43 r master-lvl; -#X obj 345 214 s master-lvl; -#X obj 22 185 inlet~; -#X obj 203 42 inlet; -#X text 203 18 level; -#X obj 203 102 s master-lvl; -#X msg 98 67 set \$1; -#X obj 98 91 outlet; -#X msg 218 65 \; pd dsp 1; -#X obj 85 198 line~; -#X obj 22 216 *~; -#X obj 22 246 dac~; -#X obj 85 175 pack 0 50; -#X text 20 162 audio; -#X obj 434 155 t b; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 25 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 25 0 5 0; -#X restore 19 376 pd output; -#X msg 95 350 MUTE; -#N canvas 98 16 694 474 oscbank 0; -#X obj 36 53 spectrum-partial 1; -#X obj 36 79 spectrum-partial 2; -#X obj 36 105 spectrum-partial 3; -#X obj 36 131 spectrum-partial 4; -#X obj 36 157 spectrum-partial 5; -#X obj 36 183 spectrum-partial 6; -#X obj 36 209 spectrum-partial 7; -#X obj 36 235 spectrum-partial 8; -#X obj 36 261 spectrum-partial 9; -#X obj 36 287 spectrum-partial 10; -#X obj 216 53 spectrum-partial 11; -#X obj 122 382 loadbang; -#X obj 122 407 metro 30; -#X obj 122 433 s poll-table; -#X text 107 21 This is the bank of oscillators--open one to see:; -#X text 72 345 And here we send bangs to "poll-table" needed by the -abstraction.; -#X obj 216 79 spectrum-partial 12; -#X obj 216 105 spectrum-partial 13; -#X obj 216 131 spectrum-partial 14; -#X obj 216 157 spectrum-partial 15; -#X obj 216 183 spectrum-partial 16; -#X obj 216 209 spectrum-partial 17; -#X obj 216 235 spectrum-partial 18; -#X obj 215 261 spectrum-partial 19; -#X obj 215 287 spectrum-partial 20; -#X obj 395 53 spectrum-partial 21; -#X obj 395 78 spectrum-partial 22; -#X obj 395 104 spectrum-partial 23; -#X obj 395 130 spectrum-partial 24; -#X obj 395 156 spectrum-partial 25; -#X obj 395 182 spectrum-partial 26; -#X obj 395 207 spectrum-partial 27; -#X obj 396 234 spectrum-partial 28; -#X obj 395 260 spectrum-partial 29; -#X obj 395 287 spectrum-partial 30; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X restore 17 251 pd oscbank; -#X obj 19 321 catch~ sum-bus; -#X obj 16 153 s pitch; -#X floatatom 16 125 4 0 0; -#X text 43 18 DRAWABLE SPECTRA; -#X floatatom 14 183 4 0 0; -#X obj 14 211 s whammybar; -#N canvas 0 0 650 341 table-setup 0; -#X obj 39 227 loadbang; -#X msg 39 261 \; spectrum-tab xlabel -5 0 12 24 36 48 60 72 84 96 108 -120; -#X text 82 60 comment; -#X connect 0 0 1 0; -#X restore 17 283 pd table-setup; -#X msg 596 65 \; spectrum-tab const 0; -#X text 555 381 Updated for Pd version 0.34; -#X text 26 42 In this array \, you can draw a spectral envelope that -will be synthesized by an oscillator bank. Each oscillator in the bank -computes its own frequency and uses it to look up amplitude from the -array.; -#X text 113 254 <-- the oscillator bank; -#X text 71 128 <-- pitch; -#X text 61 185 <-- left or right shift (normally 0); -#X text 157 318 <-- here we just collect the sum of all the partials -which are computed in "oscbank".; -#X text 662 44 CLEAR; -#X text 148 283 <-- make the number labels; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 2 0; -#X connect 7 0 6 0; -#X connect 9 0 10 0; diff --git a/pd/doc/3.audio.examples/17.foldover.pd b/pd/doc/3.audio.examples/17.foldover.pd deleted file mode 100644 index 81757423..00000000 --- a/pd/doc/3.audio.examples/17.foldover.pd +++ /dev/null @@ -1,112 +0,0 @@ -#N canvas 17 89 590 637 12; -#X graph graph1 0 -1.02 130 1.02 295 415 553 285; -#X array table17 131 float 1; -#A 0 -0.399997 0 0.399997 0.107489 0.0789648 0.218247 0.115563 0.169861 -0.178655 0.138352 0.235708 0.164533 0.125264 0.214359 0.169042 0.134156 -0.0997789 0.118172 0.270954 0.293566 0.289833 0.12888 -0.215992 -0.0145419 -0.203984 -0.159792 -0.11901 0.135321 -0.0665301 -0.0776689 0.0247374 --0.0222149 0.0755675 4.97363e-06 -0.049046 0.232851 0.2132 -0.0357245 --0.101696 -0.125624 -0.0530428 0.0608632 0.111596 0.0910138 -0.0326553 -0.100844 0.22303 -0.0649953 0.00678476 0.247437 -0.0319972 -0.064833 -0.141408 0.00354245 -0.0891558 -0.227284 -0.293046 0.100474 0.173878 --0.071401 0.0482414 0.0773852 -0.0590095 0.00509727 0.0421473 2.40106e-06 --0.0421444 -0.00510817 0.0590137 -0.0773699 -0.0482621 0.0714097 -0.173852 --0.100516 0.293024 0.227308 0.0891607 -0.0035225 -0.141411 0.0648073 -0.0320313 -0.247433 -0.00682219 0.0650219 -0.223015 -0.100872 0.0326609 --0.0910026 -0.1116 -0.0608712 0.0530287 0.125624 0.101698 0.035742 --0.213174 -0.232876 0.0490274 1.49209e-05 -0.0755759 0.0222125 -0.024735 -0.0776516 0.066554 -0.135321 0.118972 0.159827 -0.203967 0.0144949 -0.216008 -0.128842 -0.289832 -0.293563 -0.270967 -0.118185 -0.0997734 --0.134155 -0.169034 -0.214362 -0.125272 -0.164519 -0.235713 -0.138359 --0.178646 -0.169872 -0.115556 -0.218244 -0.0789868 -0.107456 -0.399993 --7.20319e-05 0.4; -#X pop; -#X floatatom 73 385 0 0 100; -#N canvas 159 26 532 285 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 426 180 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 105 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 159 audio; -#X text 96 114 show level; -#X obj 426 155 t b; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X restore 35 413 pd output; -#X msg 111 386 MUTE; -#X text 343 617 updated for Pd version 0.34; -#X msg 310 531 \; table17 const 0; -#X text 362 513 CLEAR; -#X obj 35 356 tabosc4~ table17; -#X obj 35 329 line~; -#X text 229 3 FOLDOVER; -#X msg 28 532 \; table17 const 0 \, 0 1 1 1 1 1; -#X msg 28 443 \; table17 sinesum 128 1 1 1 1 0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 \, normalize -0.4; -#X msg 35 278 500 \, 1423 4000; -#X text 26 26 WARNING: THIS IS REALLY OBNOXIOUS--TURN YOUR AMP DOWN! -; -#X floatatom 43 303 5 0 0; -#X text 25 125 Foldover occurs when you synthesize frequencies greater -than the Nyquist frequency (half the sample rate). In this example -\, the fundamental only reaches 1423 \, but the tables contain high -partials. As the partials sweep upward you hear them reflect off the -Nyquist frequency. Also \, partials can come into contact with each -other causing beating. The value of 1423 was chosen to make the beating -effect especially strong \, but it's clearly audible even for a 440-Hz. -sawtooth wave \, for example.; -#X text 25 58 Use this patch sparingly... it's probably bad for your -ears. Don't amuse yourself by playing this as part of your club act -unless you want your country's health department to inquire.; -#X text 16 572 Synthesis techniques vary in their tendency to make -foldover. For higher pitched sounds you'll want to try out relatively -folvover-resistant ones.; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 7 0 2 0; -#X connect 8 0 7 0; -#X connect 12 0 8 0; -#X connect 14 0 8 0; diff --git a/pd/doc/3.audio.examples/18.PART3.pulse.pd b/pd/doc/3.audio.examples/18.PART3.pulse.pd deleted file mode 100644 index 8efe6390..00000000 --- a/pd/doc/3.audio.examples/18.PART3.pulse.pd +++ /dev/null @@ -1,126 +0,0 @@ -#N canvas 15 126 821 582 12; -#X obj 285 163 line~; -#X floatatom 66 64 0 0 0; -#X obj 43 315 cos~; -#X graph graph1 0 -1.02 882 1.02 599 472 799 342; -#X array pulse-output 882 float 0; -#X pop; -#X floatatom 72 407 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 43 435 pd output; -#X msg 111 405 MUTE; -#X text 158 406 <-- output amplitude; -#X obj 66 91 phasor~ 0; -#X obj 285 139 pack 0 50; -#X floatatom 285 54 0 0 0; -#X text 63 43 frequency; -#X obj 66 115 -~ 0.5; -#X obj 66 207 *~; -#X obj 285 78 / 10; -#X obj 43 265 clip~ -0.5 0.5; -#X obj 43 371 hip~ 5; -#X graph graph1 0 -1.02 882 1.02 599 168 799 108; -#X array phase-output 882 float 0; -#X pop; -#X graph graph1 0 -1.02 882 1.02 599 335 799 205; -#X array clip-output 882 float 0; -#X pop; -#X text 280 34 bandwidth; -#X text 130 114 phase -1/2 to 1/2; -#X text 152 91 phase 0 to 1; -#X text 132 5 PULSE GENERATOR; -#X obj 32 234 tabwrite~ phase-output; -#X obj 32 346 tabwrite~ pulse-output; -#X text 116 372 high pass filter to cut DC; -#X msg 32 147 bang; -#X text 332 79 fix range; -#X text 337 100 force; -#X text 337 117 nonnegative; -#X text 339 164 smooth it; -#X text 327 187 add 1; -#X text 78 148 <-- click to graph; -#X text 96 209 increase amplitude; -#X text 177 264 clip back to range -1/2 to 1/2; -#X text 103 316 cosine wave lookup (-1/2 and 1/2 give -1); -#X text 24 470 This patch computes a pulse train \, with a "bandwidth" -control that essentually squeezes the pulses. If "bandwidth" is zero -you get a pure cosine wave \, and for larger values of the bandwidth -\, the cosine wave is squeezed to fill smaller portions of the waveform. -; -#X obj 285 188 +~ 1; -#X obj 32 292 tabwrite~ clip-output; -#X text 601 478 ---- 0.02 seconds ----; -#X obj 285 102 max 0; -#X text 544 551 updated for Pd version 0.34; -#X connect 0 0 37 0; -#X connect 1 0 8 0; -#X connect 2 0 16 0; -#X connect 2 0 24 0; -#X connect 4 0 5 1; -#X connect 5 0 4 0; -#X connect 6 0 5 2; -#X connect 8 0 12 0; -#X connect 9 0 0 0; -#X connect 10 0 14 0; -#X connect 12 0 13 0; -#X connect 13 0 15 0; -#X connect 13 0 23 0; -#X connect 14 0 40 0; -#X connect 15 0 2 0; -#X connect 15 0 38 0; -#X connect 16 0 5 0; -#X connect 26 0 23 0; -#X connect 26 0 24 0; -#X connect 26 0 38 0; -#X connect 37 0 13 1; -#X connect 40 0 9 0; diff --git a/pd/doc/3.audio.examples/19.just.say.pd b/pd/doc/3.audio.examples/19.just.say.pd deleted file mode 100644 index b82b4953..00000000 --- a/pd/doc/3.audio.examples/19.just.say.pd +++ /dev/null @@ -1,152 +0,0 @@ -#N canvas 32 67 900 421 12; -#X obj 39 247 cos~; -#X graph graph1 0 -1.02 44100 1.02 452 206 652 76; -#X array env-output 44100 float 0; -#X pop; -#X floatatom 71 305 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 39 333 pd output; -#X msg 115 306 MUTE; -#X msg 162 93 bang; -#X text 203 93 <-- click to graph; -#X obj 39 168 -~ 0.5; -#X obj 39 192 *~; -#X obj 39 219 clip~ -0.5 0.5; -#X obj 39 274 hip~ 5; -#X obj 126 60 *~; -#X floatatom 205 142 0 0 0; -#X floatatom 205 168 0 0 0; -#X obj 126 27 phasor~ -4; -#X obj 126 191 +~ 0.5; -#X obj 162 117 tabwrite~ env-output; -#X text 451 211 --------- 1 second ---------; -#X floatatom 205 194 0 0 0; -#X obj 126 142 lop~ 130; -#N canvas 168 232 351 420 freq 0; -#X obj 180 176 t f f; -#X obj 181 202 *; -#X obj 60 320 line 0 30; -#X obj 90 132 t b b; -#X obj 90 107 metro 100; -#X obj 61 287 pack; -#X obj 60 376 outlet; -#X floatatom 89 82 0 0 0; -#X floatatom 54 243 0 0 0; -#X floatatom 94 248 0 0 0; -#X obj 60 348 pack 0 30; -#X obj 55 202 + 150; -#X obj 88 34 loadbang; -#X msg 89 58 1; -#X obj 56 175 random 300; -#X obj 181 226 + 100; -#X obj 179 152 random 35; -#X connect 0 0 1 0; -#X connect 0 1 1 1; -#X connect 1 0 15 0; -#X connect 2 0 10 0; -#X connect 3 0 14 0; -#X connect 3 1 16 0; -#X connect 4 0 3 0; -#X connect 5 0 2 0; -#X connect 7 0 4 0; -#X connect 8 0 5 0; -#X connect 9 0 5 1; -#X connect 10 0 6 0; -#X connect 11 0 8 0; -#X connect 12 0 13 0; -#X connect 13 0 7 0; -#X connect 14 0 11 0; -#X connect 15 0 4 1; -#X connect 15 0 9 0; -#X connect 16 0 0 0; -#X restore 38 94 pd freq; -#X obj 39 119 line~; -#X obj 39 144 phasor~; -#X text 225 19 negative frequency; -#X text 226 35 makes falling sawtooth; -#X text 155 59 square it to make a curve; -#X text 245 152 you can; -#X text 243 170 adjust these; -#X text 247 189 values; -#X text 334 250 We interrupt this series of patches to bring you an -important message from Nancy Reagan. If \, anywhere \, at any time -\, someone offers you an illicit drug \, just say one word in reply... -; -#X text 334 313 Now that I'm sure you've heard this important message -\, we can return to the essentially frivolous occupation of making -turn-of-the-millenium western art music.; -#X obj 126 165 *~ 6; -#X text 561 384 updated for Pd version 0.34; -#X text 156 305 <-- output; -#X connect 0 0 10 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 5 0 16 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 0 0; -#X connect 10 0 3 0; -#X connect 11 0 16 0; -#X connect 11 0 19 0; -#X connect 12 0 19 1; -#X connect 13 0 31 1; -#X connect 14 0 11 0; -#X connect 14 0 11 1; -#X connect 15 0 8 1; -#X connect 18 0 15 1; -#X connect 19 0 31 0; -#X connect 20 0 21 0; -#X connect 21 0 22 0; -#X connect 22 0 7 0; -#X connect 31 0 15 0; diff --git a/pd/doc/3.audio.examples/20.pulse.spectrum.pd b/pd/doc/3.audio.examples/20.pulse.spectrum.pd deleted file mode 100644 index 49d21cbd..00000000 --- a/pd/doc/3.audio.examples/20.pulse.spectrum.pd +++ /dev/null @@ -1,136 +0,0 @@ -#N canvas 15 126 887 588 12; -#X obj 189 166 line~; -#X obj 42 187 cos~; -#X graph graph1 0 -1.02 882 1.02 633 508 833 378; -#X array pulse-output 882 float 0; -#X pop; -#X floatatom 71 317 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 42 345 pd output; -#X msg 118 319 MUTE; -#X obj 189 142 pack 0 50; -#X floatatom 189 41 0 0 0; -#X text 598 545 updated for Pd version 0.26; -#X obj 43 114 -~ 0.5; -#X obj 43 140 *~; -#X obj 189 67 / 10; -#X obj 189 91 moses 0; -#X msg 189 115 0; -#X obj 42 163 clip~ -0.5 0.5; -#X obj 42 289 hip~ 5; -#X graph graph1 0 0 128 500 503 285 759 155; -#X array spectrum 128 float 0; -#X pop; -#X text 184 23 bandwidth; -#X obj 115 267 tabwrite~ pulse-output; -#X msg 105 229 bang; -#X text 143 226 <-- click to graph; -#X obj 189 191 +~ 1; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 53 267 pd fft; -#X obj 43 90 phasor~ 172.266; -#X obj 42 211 +~ 1; -#X text 63 1 PULSE SPECTRUM MEASUREMENT; -#X text 16 377 Here is a measured amplitude spectrum for the pulse -train. Nutice that \, other than a smallish spillover \, the energy -sits in one "lobe" whose changing width justifies our calling the squeeze -factor the "bandwidth."; -#X text 16 442 The spectrum is in units of amplitude. THe sidelobes -\, although they look small \, are actually only about 34 dB down. -You can design more complicated pulse trains \, little Blackman window -functions \, which control the sidelobes much better.; -#X text 17 518 The spectrum measurement is done in the "pd fft" subwindow -\, but see the "FFT examples" for information about that.; -#X text 501 291 0; -#X text 749 288 5512; -#X text 633 511 ---- 0.02 seconds ----; -#X text 160 319 <-- output; -#X connect 0 0 21 0; -#X connect 1 0 24 0; -#X connect 3 0 4 1; -#X connect 4 0 3 0; -#X connect 5 0 4 2; -#X connect 6 0 0 0; -#X connect 7 0 11 0; -#X connect 9 0 10 0; -#X connect 10 0 14 0; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X connect 12 1 6 0; -#X connect 13 0 6 0; -#X connect 14 0 1 0; -#X connect 15 0 4 0; -#X connect 19 0 18 0; -#X connect 19 0 22 1; -#X connect 21 0 10 1; -#X connect 23 0 9 0; -#X connect 24 0 22 0; -#X connect 24 0 15 0; -#X connect 24 0 18 0; diff --git a/pd/doc/3.audio.examples/21.more.pulses.pd b/pd/doc/3.audio.examples/21.more.pulses.pd deleted file mode 100644 index 1aa97555..00000000 --- a/pd/doc/3.audio.examples/21.more.pulses.pd +++ /dev/null @@ -1,138 +0,0 @@ -#N canvas 15 126 902 581 12; -#X obj 220 171 line~; -#X msg 350 15 \; pd dsp 1; -#X msg 434 16 \; pd dsp 0; -#X text 371 46 ON; -#X text 451 47 OFF; -#X floatatom 68 303 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 39 331 pd output; -#X msg 106 303 MUTE; -#X text 150 302 <-- output amplitude; -#X obj 220 147 pack 0 50; -#X floatatom 220 46 0 0 0; -#X text 640 544 updated for Pd version 0.26; -#X obj 70 108 *~; -#X obj 220 72 / 10; -#X obj 220 96 moses 0; -#X msg 220 120 0; -#X obj 39 275 hip~ 5; -#X graph graph1 0 0 128 300 620 491 876 361; -#X array spectrum 128 float 0; -#X pop; -#X text 215 28 bandwidth; -#X msg 135 235 bang; -#X text 177 234 <-- click to graph; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 68 237 pd fft; -#X text 618 497 0; -#X text 851 492 5512; -#X obj 78 141 *~; -#X obj 18 141 sig~ 1; -#X obj 39 194 /~; -#X obj 54 168 +~; -#X obj 70 79 osc~ 86.1328; -#X text 103 107 call this X; -#X text 111 141 X^2; -#X text 84 171 1+X^2; -#X text 71 196 1/(1+X^2); -#X text 10 357 This is the form of pulse train used in the Phase Aligned -Formant (PAF) algorithm. It has the neat property that its amplitude -spectrum drops off as a perfectly exponential function of frequency. -This algorithm is protected by French and US patents. contact Vincent -Puig to learn what restrictions may apply.; -#X text 11 457 On the other hand \, there are rumors that exp(-X*X) -actually sounds better than 1/(1+X*X). To compute exp(-X*X) efficiently -you will want to employ tabread4~ with a stored bell curve. I don't -want to know you're doing this. However \, the first Pd user who e-mails -me the correct formula for the output spectrum wins a free CO2 fire -extinguisher.; -#X text 28 4 ANOTHER PULSE WIDTH MOD ALGORITHM; -#X connect 0 0 12 1; -#X connect 5 0 6 1; -#X connect 6 0 5 0; -#X connect 7 0 6 2; -#X connect 9 0 0 0; -#X connect 10 0 13 0; -#X connect 12 0 24 0; -#X connect 12 0 24 1; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 14 1 9 0; -#X connect 15 0 9 0; -#X connect 16 0 6 0; -#X connect 19 0 21 1; -#X connect 24 0 27 1; -#X connect 25 0 26 0; -#X connect 25 0 27 0; -#X connect 26 0 16 0; -#X connect 26 0 21 0; -#X connect 27 0 26 1; -#X connect 28 0 12 0; diff --git a/pd/doc/3.audio.examples/22.pulse.width.mod.pd b/pd/doc/3.audio.examples/22.pulse.width.mod.pd deleted file mode 100644 index 214d250a..00000000 --- a/pd/doc/3.audio.examples/22.pulse.width.mod.pd +++ /dev/null @@ -1,98 +0,0 @@ -#N canvas 27 355 931 532 12; -#X floatatom 86 104 0 0 0; -#X graph graph1 0 -1.02 882 1.02 669 456 869 326; -#X array difference-output 882 float 0; -#X pop; -#X floatatom 123 324 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 86 351 pd output; -#X msg 162 324 MUTE; -#X obj 86 137 phasor~ 0; -#X text 83 86 frequency; -#X graph graph1 0 -1.02 882 1.02 668 179 868 49; -#X array phasor1-output 882 float 0; -#X pop; -#X msg 191 77 bang; -#X text 231 76 <-- click to graph; -#X text 57 9 CLASSICAL PULSE WIDTH MODULATION; -#X obj 102 196 phasor~ 0; -#X obj 102 172 + 0.2; -#X obj 86 246 -~; -#X graph graph1 0 -1.02 882 1.02 668 316 868 186; -#X array phasor2-output 882 float 0; -#X pop; -#X obj 191 164 tabwrite~ phasor1-output; -#X obj 191 222 tabwrite~ phasor2-output; -#X obj 191 276 tabwrite~ difference-output; -#X text 12 386 This patch demonstrates pulse width modulation \, which -is accomplished simply by subtracting two sawtooth waves at a varying -phase difference. Here their frequencies are set to differ by 1/5 Hz. -so that the relative phase wanders continuously.; -#X text 669 459 ---- 0.02 seconds ----; -#X text 665 498 updated for Pd version 0.34; -#X text 203 325 <-- output; -#X connect 0 0 5 0; -#X connect 0 0 12 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 5 0 13 0; -#X connect 5 0 15 0; -#X connect 8 0 15 0; -#X connect 8 0 16 0; -#X connect 8 0 17 0; -#X connect 11 0 13 1; -#X connect 11 0 16 0; -#X connect 12 0 11 0; -#X connect 13 0 17 0; -#X connect 13 0 3 0; diff --git a/pd/doc/3.audio.examples/23.stereo.pd b/pd/doc/3.audio.examples/23.stereo.pd deleted file mode 100644 index 1c417df5..00000000 --- a/pd/doc/3.audio.examples/23.stereo.pd +++ /dev/null @@ -1,87 +0,0 @@ -#N canvas 27 355 553 341 12; -#X floatatom 59 63; -#X msg 340 12 \; pd dsp 1; -#X msg 407 12 \; pd dsp 0; -#X text 361 45 ON; -#X text 424 43 OFF; -#X floatatom 123 196; -#N canvas 159 26 618 383 output 0; -#X obj 393 156 t b; -#X obj 393 106 f; -#X obj 393 56 inlet; -#X text 399 25 mute; -#X obj 393 181 f; -#X msg 480 174 0; -#X msg 393 81 bang; -#X obj 393 131 moses 1; -#X obj 480 149 t b f; -#X obj 452 113 moses 1; -#X obj 138 144 dbtorms; -#X obj 452 88 r master-lvl; -#X obj 138 38 r master-lvl; -#X obj 393 206 s master-lvl; -#X obj 22 181 inlet~; -#X obj 254 37 inlet; -#X text 254 14 level; -#X obj 254 96 s master-lvl; -#X msg 151 61 set \$1; -#X obj 151 85 outlet; -#X msg 269 60 \; pd dsp 1; -#X obj 138 190 line~; -#X obj 22 212 *~; -#X obj 138 167 pack 0 50; -#X text 34 159 audio; -#X text 148 106 show level; -#X obj 73 182 inlet~; -#X obj 73 213 *~; -#X obj 22 241 dac~ 1; -#X obj 73 241 dac~ 2; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 23 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 21 0 27 1; -#X connect 22 0 28 0; -#X connect 23 0 21 0; -#X connect 26 0 27 0; -#X connect 27 0 29 0; -#X restore 61 224 pd output; -#X msg 152 196 MUTE; -#X text 186 195 <-- output amplitude; -#X obj 59 111 phasor~ 0; -#X text 56 45 frequency; -#X text 331 323 updated for Pd version 0.26; -#X text 57 9 CLASSICAL PULSE WIDTH MODULATION; -#X obj 131 110 phasor~ 0; -#X obj 59 134 -~ 0.5; -#X obj 131 85 + 0.5; -#X obj 131 135 -~ 0.5; -#X obj 131 160 *~ -1; -#X text 34 262 Here's what happens if you take the previous patch but \, instead of subtracting the two sawtooth waves \, we put them in two speakers with opposite phase.; -#X connect 0 0 9 0; -#X connect 0 0 15 0; -#X connect 5 0 6 2; -#X connect 6 0 5 0; -#X connect 7 0 6 3; -#X connect 9 0 14 0; -#X connect 13 0 16 0; -#X connect 14 0 6 0; -#X connect 15 0 13 0; -#X connect 16 0 17 0; -#X connect 17 0 6 1; diff --git a/pd/doc/3.audio.examples/24.even.odd.pd b/pd/doc/3.audio.examples/24.even.odd.pd deleted file mode 100644 index bfa950a9..00000000 --- a/pd/doc/3.audio.examples/24.even.odd.pd +++ /dev/null @@ -1,116 +0,0 @@ -#N canvas 213 27 840 639 12; -#X floatatom 45 74 0 0 0; -#X obj 99 164 wrap~; -#X graph graph1 0 -1.02 882 1.02 624 153 824 23; -#X array phasor-output 882 float 0; -#X pop; -#X obj 45 102 phasor~ 0; -#X text 81 73 frequency; -#X obj 45 130 -~ 0.5; -#X obj 99 192 -~ 0.5; -#X obj 36 244 -~; -#X obj 98 244 +~; -#X graph graph1 0 -1.02 882 1.02 625 288 825 158; -#X array wrap-output 882 float 0; -#X pop; -#X graph graph1 0 -1.02 882 1.02 626 423 826 293; -#X array sum 882 float 0; -#X pop; -#X graph graph1 0 -1.02 882 1.02 626 563 826 433; -#X array difference 882 float 0; -#X pop; -#X obj 172 166 tabwrite~ phasor-output; -#X obj 172 218 tabwrite~ wrap-output; -#X obj 172 282 tabwrite~ sum; -#X obj 172 327 tabwrite~ difference; -#X msg 172 120 bang; -#X text 106 13 BUCHLA'S METHOD; -#X floatatom 119 369 0 0 0; -#N canvas 159 26 618 383 output 0; -#X obj 393 156 t b; -#X obj 393 106 f; -#X obj 393 56 inlet; -#X text 399 25 mute; -#X obj 393 181 f; -#X msg 480 174 0; -#X msg 393 81 bang; -#X obj 393 131 moses 1; -#X obj 480 149 t b f; -#X obj 452 113 moses 1; -#X obj 138 144 dbtorms; -#X obj 452 88 r master-lvl; -#X obj 138 38 r master-lvl; -#X obj 393 206 s master-lvl; -#X obj 22 181 inlet~; -#X obj 254 37 inlet; -#X text 254 14 level; -#X obj 254 96 s master-lvl; -#X msg 151 61 set \$1; -#X obj 151 85 outlet; -#X msg 269 60 \; pd dsp 1; -#X obj 138 190 line~; -#X obj 22 212 *~; -#X obj 138 167 pack 0 50; -#X text 34 159 audio; -#X text 148 106 show level; -#X obj 73 182 inlet~; -#X obj 73 213 *~; -#X obj 22 241 dac~ 1; -#X obj 73 241 dac~ 2; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 23 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 21 0 27 1; -#X connect 22 0 28 0; -#X connect 23 0 21 0; -#X connect 26 0 27 0; -#X connect 27 0 29 0; -#X restore 81 392 pd output; -#X msg 156 369 MUTE; -#X text 13 430 A patch to split a sawtooth into even and odd harmonics -ala Buchla. The wrap~ object folds its input into the interval [0 \, -1) so taht \, for instance \, subtracting 1/5 from a phasor and wrapping -it gives another phasor a half cycle out of phase frmo the original. -Adding and subtracting the two give the results shown and heard. (Listen -to the two outputs separately \, then together.); -#X text 631 567 ---- 0.02 seconds ----; -#X text 577 613 updated for Pd version 0.34; -#X text 193 369 <-- output; -#X connect 0 0 3 0; -#X connect 1 0 6 0; -#X connect 3 0 5 0; -#X connect 5 0 1 0; -#X connect 5 0 12 0; -#X connect 5 0 8 0; -#X connect 5 0 7 0; -#X connect 6 0 13 0; -#X connect 6 0 8 1; -#X connect 6 0 7 1; -#X connect 7 0 15 0; -#X connect 7 0 19 0; -#X connect 8 0 14 0; -#X connect 8 0 19 1; -#X connect 16 0 13 0; -#X connect 16 0 14 0; -#X connect 16 0 15 0; -#X connect 16 0 12 0; -#X connect 18 0 19 2; -#X connect 19 0 18 0; -#X connect 20 0 19 3; diff --git a/pd/doc/3.audio.examples/25.bandlimited.pd b/pd/doc/3.audio.examples/25.bandlimited.pd deleted file mode 100644 index f49bcb68..00000000 --- a/pd/doc/3.audio.examples/25.bandlimited.pd +++ /dev/null @@ -1,166 +0,0 @@ -#N canvas 21 90 540 752 12; -#X floatatom 183 91; -#X obj 183 115 mtof; -#X floatatom 340 183; -#X obj 164 431 -~; -#N canvas 391 51 561 806 tables 1; -#X graph graph1 0 -1 1002 1 99 322 499 22; -#X array array1 1002 float; -#X pop; -#X graph graph1 0 -1 882 1 96 684 496 384; -#X array array2 882 float; -#X pop; -#X text 138 326 ---------------- 1002 samples ---------------; -#X text 150 693 ---------------- 0.02 sec ---------------; -#X restore 33 201 pd tables; -#N canvas 104 390 728 408 make-table 0; -#X obj 469 146 cos~; -#X obj 303 146 cos~; -#X obj 255 141 cos~; -#X msg 199 210 bang; -#X obj 255 229 tabwrite~ array1; -#X text 366 79 period is 2000 samples \, twice the table length; -#X msg 94 94 \; pd dsp 1; -#X text 118 286 this network puts a half cycle of a band-limited square wave into the table "array1."; -#X text 114 335 logically the half-cycle is in samples 1 through 1000 \; samples 0 and 1001 are provided so that the 4-point interpolation will work everywhere.; -#X text 401 57 back the phase up one sample; -#X msg 336 56 -0.0005; -#X obj 171 16 loadbang; -#X obj 303 120 *~ 3; -#X obj 468 122 *~ 5; -#X obj 303 171 *~ 0.33333; -#X obj 468 172 *~ -0.2; -#X obj 255 169 *~ -1; -#X msg 171 38 bang; -#X obj 254 80 phasor~ 22.05; -#X obj 255 202 *~ 0.57692; -#X connect 0 0 15 0; -#X connect 1 0 14 0; -#X connect 2 0 16 0; -#X connect 3 0 4 0; -#X connect 10 0 18 1; -#X connect 11 0 17 0; -#X connect 12 0 1 0; -#X connect 13 0 0 0; -#X connect 14 0 19 0; -#X connect 15 0 19 0; -#X connect 16 0 19 0; -#X connect 17 0 10 0; -#X connect 17 0 6 0; -#X connect 17 0 3 0; -#X connect 18 0 2 0; -#X connect 18 0 12 0; -#X connect 18 0 13 0; -#X connect 19 0 4 0; -#X restore 34 224 pd make-table; -#X obj 183 163 sig~; -#X obj 341 283 /~; -#X obj 357 256 clip~ 1 999999; -#X obj 183 218 phasor~; -#X obj 196 301 *~; -#X obj 196 325 clip~ -0.5 0.5; -#X floatatom 183 139; -#X obj 196 397 tabread4~ array1; -#X floatatom 340 135; -#X obj 340 206 * 0.33333; -#X obj 340 159 mtof; -#X text 374 110 band limit (MIDI units); -#X text 220 78 pitch; -#X obj 340 87 loadbang; -#X msg 340 111 130; -#X obj 340 230 sig~; -#X text 246 139 frequency; -#X obj 196 349 *~ 1000; -#X obj 196 373 +~ 501; -#X obj 183 242 -~ 0.5; -#X floatatom 206 441; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 177 469 pd output; -#X msg 235 441 MUTE; -#X text 276 440 <-- output amplitude; -#X text 27 503 Patch to make an approximately band-limited sawtooth. This is useful if you intend to use sawtooth generators above about 200 Hz. \, perhaps to use any of the techniques shown in the previous four patches.; -#X text 28 562 We generate a perfect square wave at Nyquist/6 \; this will have partials 1 \, 3 \, and 5 \, but the Nyquist frequency at partial 6 will cut off the rest of the partials. This is stored in array1 using the "make-table" subpatch.; -#X text 64 34 BAND-LIMITED SAWTOOTH GENERATOR; -#X obj 43 459 tabwrite~ array2; -#X msg 44 435 bang; -#X text 28 632 Now any time we wish to make a discontinuity in the output signal \, we make it look exactly like the bandlimited square wave looks. We do this by reading through the table we recorded \, carefully adding a "digital" \, non-band-limited \, sawtooth to "array1" so that the discontinuities in the two cancel out and what you have left is the transition in the table.; -#X text 338 737 updated for Pd version 0.26; -#X text 41 409 graph output; -#X connect 0 0 1 0; -#X connect 1 0 12 0; -#X connect 2 0 15 0; -#X connect 3 0 27 0; -#X connect 3 0 33 0; -#X connect 6 0 8 0; -#X connect 6 0 9 0; -#X connect 7 0 10 1; -#X connect 8 0 7 1; -#X connect 9 0 25 0; -#X connect 10 0 11 0; -#X connect 11 0 23 0; -#X connect 12 0 6 0; -#X connect 13 0 3 0; -#X connect 14 0 16 0; -#X connect 15 0 21 0; -#X connect 16 0 2 0; -#X connect 19 0 20 0; -#X connect 20 0 14 0; -#X connect 21 0 7 0; -#X connect 23 0 24 0; -#X connect 24 0 13 0; -#X connect 25 0 10 0; -#X connect 25 0 3 1; -#X connect 26 0 27 1; -#X connect 27 0 26 0; -#X connect 28 0 27 2; -#X connect 34 0 33 0; diff --git a/pd/doc/3.audio.examples/26.additive.pd b/pd/doc/3.audio.examples/26.additive.pd deleted file mode 100644 index 9070b08b..00000000 --- a/pd/doc/3.audio.examples/26.additive.pd +++ /dev/null @@ -1,92 +0,0 @@ -#N canvas 59 99 696 468 12; -#X floatatom 81 408 0 0 0; -#N canvas 159 26 534 281 output 1; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X obj 425 153 t b; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X restore 43 435 pd output; -#X msg 119 408 MUTE; -#X text 153 407 <-- output amplitude; -#X obj 43 377 catch~ sum; -#X obj 381 288 s frequency; -#X floatatom 381 264 0 0 0; -#X floatatom 495 265 0 0 0; -#X obj 495 289 s duration; -#X msg 260 276 \; trigger bang; -#X obj 45 221 partial 0.67 0.56 0 1; -#X obj 45 245 partial 1 0.56 1 0.9; -#X obj 45 269 partial 1 0.92 0 0.65; -#X obj 45 294 partial 1.8 0.94 0 0.55; -#X floatatom 495 217 0 0 0; -#X obj 495 241 * 100; -#X obj 381 240 mtof; -#X floatatom 381 216 0 0 0; -#X text 87 15 ADDITIVE SYNTHESIS; -#X text 32 73 This patch demonstrates using an abstraction \, "partial" -\, to make a simple additive synthesis instrument.; -#X text 28 114 Partial takes as arguments an amplitude \, a relative -frequency \, a detuning frequency \, and a relative duration. You set -absolute duration and pitch using the controls below. Hit hte trigger -to make sound.; -#X text 460 435 updated for Pd version 0.26; -#X text 535 207 duration in tenths; -#X text 535 222 of a second; -#X text 419 215 pitch; -#X text 251 253 click to start; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 1 0; -#X connect 6 0 5 0; -#X connect 7 0 8 0; -#X connect 14 0 15 0; -#X connect 15 0 7 0; -#X connect 16 0 6 0; -#X connect 17 0 16 0; diff --git a/pd/doc/3.audio.examples/27.PART4.samplers.pd b/pd/doc/3.audio.examples/27.PART4.samplers.pd deleted file mode 100644 index e7aee0cd..00000000 --- a/pd/doc/3.audio.examples/27.PART4.samplers.pd +++ /dev/null @@ -1,111 +0,0 @@ -#N canvas 11 3 930 640 12; -#X msg 306 14 \; pd dsp 1; -#X msg 391 14 \; pd dsp 0; -#X text 327 45 ON; -#X text 408 45 OFF; -#X floatatom 75 275 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 46 303 pd output; -#X msg 114 273 MUTE; -#X text 148 272 <-- output amplitude; -#X obj 46 239 hip~ 5; -#X text 102 240 high pass filter to cut DC; -#X graph graph1 0 -1.02 44103 1.02 594 172 794 42; -#X array sample-table 44104 float 0; -#X pop; -#X obj 46 207 tabread4~ sample-table; -#X obj 46 172 line~; -#X obj 46 123 * 441; -#X floatatom 46 69 0 0 0; -#X obj 46 147 pack 0 100; -#X text 102 13 SCRATCH MACHINE; -#X text 81 70 <-- read point in 100ths of a second; -#X text 103 123 convert to SAMPLES (441 samples in 0.01 sec); -#X obj 414 257 loadbang; -#X text 248 195 read from the table; -#X text 239 213 (the input is the index in samples); -#X text 23 516 For more on reading and writing soundfiles to tables -\, setting their lengths \, etc \, see "arrays" in the "control examples" -series.; -#X text 20 385 This patch introduces the "tabread4~" object \, which -reads audio samples out of a floating-point array \, often called a -"sample table." The input is the index of the sample to read \, counting -from zero. The output is calculated using 4-point cubic interpolation -\, which is adequate for most purposes. Because of the interpolation -scheme \, tabread4~'s input cannot be less than one or greater than -the table length minus two.; -#X text 22 565 Fanatics take note: if you want really high-fidelity -sampling \, use a high-quality resampling program to up-sample your -soundfile to 88200 to drastically reduce interpolation error.; -#X text 600 195 (one second plus three extra; -#X text 602 214 for 4-point interpolation); -#X text 407 330 message to read a soundfile into the table (automatically -sent when you load this patch by the "loadbang" object.); -#X text 93 172 convert smoothly to audio signal; -#X text 93 84 (range is 0-100.) YOU ONLY HEAR OUTPUT; -#X text 94 100 WHEN THIS IS 0-100 AND ACTIVELY CHANGING.; -#X text 605 611 updated for Pd version 0.33; -#X text 593 173 --- 44103 samples ---; -#X msg 414 281 read ../sound/voice.wav sample-table; -#X obj 414 306 soundfiler; -#X connect 4 0 5 1; -#X connect 5 0 4 0; -#X connect 6 0 5 2; -#X connect 8 0 5 0; -#X connect 11 0 8 0; -#X connect 12 0 11 0; -#X connect 13 0 15 0; -#X connect 14 0 13 0; -#X connect 15 0 12 0; -#X connect 19 0 33 0; -#X connect 33 0 34 0; diff --git a/pd/doc/3.audio.examples/28.sampler.loop.pd b/pd/doc/3.audio.examples/28.sampler.loop.pd deleted file mode 100644 index 5d2687a6..00000000 --- a/pd/doc/3.audio.examples/28.sampler.loop.pd +++ /dev/null @@ -1,124 +0,0 @@ -#N canvas 143 17 993 674 12; -#X graph graph1 0 -1.02 44100 1.02 630 370 830 240; -#X array tabread4-out 44100 float 0; -#X pop; -#X msg 354 13 \; pd dsp 1; -#X msg 437 13 \; pd dsp 0; -#X text 379 51 ON; -#X text 457 51 OFF; -#X graph graph1 0 -1.02 44103 1.02 631 144 831 14; -#X array sample-table 44103 float 0; -#X pop; -#X obj 564 556 loadbang; -#X obj 92 318 tabwrite~ tabread4-out; -#X floatatom 90 396 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 55 430 pd output; -#X msg 125 396 MUTE; -#X text 166 395 <-- output amplitude; -#X obj 55 361 hip~ 5; -#X obj 55 248 tabread4~ sample-table; -#X floatatom 55 60 0 0 0; -#X text 254 251 read from the table; -#X text 110 16 LOOPING SAMPLER; -#X text 104 60 <-- frequency (Hz.); -#X floatatom 83 121 0 0 0; -#X obj 83 154 * 441; -#X obj 55 181 *~ 0; -#X obj 55 211 +~ 1; -#X text 136 286 <-- click to display output; -#X obj 55 92 phasor~ 0; -#X msg 91 283 bang; -#X text 130 120 <-- chunk size (100ths of a second); -#X text 25 460 This is a looping sampler in which you specify the number -of loops per second (the frequency) and the size of the chunk to loop. -If the frequency is less than about 20 \, you will hear repetition -and the chunk size will sound like transposition. For frequencies above -50 or so \, you hear a tone whose timbre is controlled by the chunk -size (best kept below 5 or so.) Remember to use the "shift" key on -number boxes to make fine adjustments.; -#X obj 558 426 adc~ 1; -#X obj 558 455 hip~ 5; -#X obj 558 515 tabwrite~ sample-table; -#X msg 576 482 bang; -#X text 614 483 <-- click here to record your own sample; -#X text 674 561 v-- re-read the original sample; -#X text 23 597 In this patch you will frequently hear discontinuities -at the looping point. If you're working in a studio \, you can sometimes -find "good" loop points for samples. Another approach \, better for -live situations \, is shown in the next patch.; -#X text 101 180 <-- readjust phase for range 0 - (chunk size); -#X text 100 211 <-- add one to avoid beginning of table; -#X msg 564 584 read ../sound/voice.wav sample-table; -#X obj 564 609 soundfiler; -#X text 748 653 updated for Pd version 0.33; -#X text 629 153 ---- 44103 samples ----; -#X text 641 376 ---- 1 second ------; -#X connect 6 0 36 0; -#X connect 8 0 9 1; -#X connect 9 0 8 0; -#X connect 10 0 9 2; -#X connect 12 0 9 0; -#X connect 13 0 12 0; -#X connect 13 0 7 0; -#X connect 14 0 23 0; -#X connect 18 0 19 0; -#X connect 19 0 20 1; -#X connect 20 0 21 0; -#X connect 21 0 13 0; -#X connect 23 0 20 0; -#X connect 24 0 7 0; -#X connect 27 0 28 0; -#X connect 28 0 29 0; -#X connect 30 0 29 0; -#X connect 36 0 37 0; diff --git a/pd/doc/3.audio.examples/29.sampler.loop.smooth.pd b/pd/doc/3.audio.examples/29.sampler.loop.smooth.pd deleted file mode 100644 index 52551163..00000000 --- a/pd/doc/3.audio.examples/29.sampler.loop.smooth.pd +++ /dev/null @@ -1,148 +0,0 @@ -#N canvas 75 15 1014 733 12; -#X graph graph1 0 -1.02 44100 1.02 764 446 964 316; -#X array cos-output 44100 float 0; -#X pop; -#X graph graph1 0 -1.02 44103 1.02 761 148 961 18; -#X array sample-table 44103 float 0; -#X pop; -#X obj 593 579 loadbang; -#X floatatom 96 489 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 67 517 pd output; -#X msg 133 490 MUTE; -#X text 176 490 <-- output amplitude; -#X obj 67 460 hip~ 5; -#X obj 47 408 tabread4~ sample-table; -#X floatatom 46 50 0 0 0; -#X text 85 49 <-- frequency (Hz.); -#X floatatom 97 358 0 0 0; -#X obj 97 385 * 441; -#X obj 47 358 *~ 0; -#X obj 47 383 +~ 1; -#X text 271 274 <-- click to display output; -#X msg 229 275 bang; -#X text 136 357 <-- chunk size (100ths of a second); -#X obj 588 471 adc~ 1; -#X obj 588 495 hip~ 5; -#X obj 588 545 tabwrite~ sample-table; -#X msg 603 518 bang; -#X text 635 518 <-- click here to record your own sample; -#X text 704 583 v-- re-read the original sample; -#X text 40 9 ENVELOPING YOUR LOOPING SAMPLER; -#X obj 88 101 -~ 0.5; -#X obj 88 259 clip~ -0.5 0.5; -#X obj 88 237 *~ 1; -#X graph graph1 0 -1.02 44100 1.02 763 311 963 181; -#X array cos-input 44100 float 0; -#X pop; -#X obj 229 303 tabwrite~ cos-input; -#X obj 88 284 cos~; -#X obj 88 126 wrap~; -#X obj 88 155 -~ 0.5; -#X obj 88 332 *~ -0.5; -#X obj 88 307 -~ 1; -#X obj 229 329 tabwrite~ cos-output; -#X floatatom 119 187 0 0 0; -#X obj 67 433 *~; -#X text 157 98 subtracting 0.5 and wrapping produces a sawtooth wave -180 degrees out of phase from the original.; -#X text 153 150 as before we subtract 1/2 again to center the sawtooth -from -1/2 to 1/2.; -#X text 153 188 <-- sharpness (at least 1); -#X msg 593 608 read ../sound/voice.wav sample-table; -#X obj 593 633 soundfiler; -#X text 776 150 -- 44103 samples ---; -#X text 767 447 ----- 1 second ------; -#X obj 119 211 max 1; -#X obj 46 77 phasor~; -#X text 24 560 Here we apply an amplitude envelope to protect against -discontinuities at the loop point. The envelope is based on the pulse -width modulation example \, except that the widening is applied to -the "1" part of the pulse \, not the "0" part.; -#X text 23 647 To see the envelope \, put the phasor on 2 Hz \, select -"sharpness" values between 1 and 3 \, and look at "cos-input" and "cos-output." -You should both see and hear the effect of the "sharpness" parameter. -; -#X text 734 688 updated for Pd version 0.34; -#X connect 2 0 41 0; -#X connect 3 0 4 1; -#X connect 4 0 3 0; -#X connect 5 0 4 2; -#X connect 7 0 4 0; -#X connect 8 0 37 0; -#X connect 9 0 46 0; -#X connect 11 0 12 0; -#X connect 12 0 13 1; -#X connect 13 0 14 0; -#X connect 14 0 8 0; -#X connect 16 0 29 0; -#X connect 16 0 35 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 21 0 20 0; -#X connect 25 0 31 0; -#X connect 26 0 30 0; -#X connect 26 0 29 0; -#X connect 27 0 26 0; -#X connect 30 0 34 0; -#X connect 31 0 32 0; -#X connect 32 0 27 0; -#X connect 33 0 35 0; -#X connect 33 0 37 1; -#X connect 34 0 33 0; -#X connect 36 0 45 0; -#X connect 37 0 7 0; -#X connect 41 0 42 0; -#X connect 45 0 27 1; -#X connect 46 0 13 0; -#X connect 46 0 25 0; diff --git a/pd/doc/3.audio.examples/30.sampler.scratch.pd b/pd/doc/3.audio.examples/30.sampler.scratch.pd deleted file mode 100644 index d4602050..00000000 --- a/pd/doc/3.audio.examples/30.sampler.scratch.pd +++ /dev/null @@ -1,175 +0,0 @@ -#N canvas 33 19 1046 749 12; -#X msg 354 13 \; pd dsp 1; -#X msg 437 13 \; pd dsp 0; -#X text 379 51 ON; -#X text 457 51 OFF; -#X graph graph1 0 -1.02 44100 1.02 757 142 957 12; -#X array sample-table 44103 float 0; -#X pop; -#X floatatom 71 466 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 36 499 pd output; -#X msg 106 466 MUTE; -#X text 145 465 <-- output amplitude; -#X obj 36 427 hip~ 5; -#X obj 55 368 tabread4~ sample-table; -#X floatatom 55 60 0 0 0; -#X text 102 59 <-- frequency (Hz.); -#X floatatom 109 152 0 0 0; -#X obj 109 181 * 441; -#X obj 55 152 *~ 0; -#X obj 55 181 +~ 1; -#X obj 55 89 phasor~ 0; -#X msg 172 246 bang; -#X text 156 151 <-- chunk size (100ths of a second); -#X obj 598 451 adc~ 1; -#X obj 598 480 hip~ 5; -#X obj 598 540 tabwrite~ sample-table; -#X msg 616 508 bang; -#X text 654 507 <-- click here to record your own sample; -#X text 64 17 ENVELOPING YOUR LOOPING SAMPLER; -#X graph graph2 0 0 44100 44100 760 345 960 215; -#X array table-index 44100 float 0; -#X pop; -#X obj 172 308 tabwrite~ table-index; -#X obj 36 398 *~; -#N canvas 160 476 591 415 envelope 0; -#X obj 97 82 -~ 0.5; -#X obj 100 331 clip~ -0.5 0.5; -#X obj 100 305 *~ 1; -#X obj 152 272 moses 1; -#X msg 115 272 1; -#X obj 100 361 cos~; -#X obj 97 112 wrap~; -#X obj 97 146 -~ 0.5; -#X obj 100 419 *~ -0.5; -#X obj 100 389 -~ 1; -#X floatatom 152 234 0 0 0; -#X text 162 78 subtracting 0.5 and wrapping produces a sawtooth wave -180 degrees out of phase from the original.; -#X text 156 139 as before we subtract 1/2 again to center the sawtooth -from -1/2 to 1/2.; -#X text 212 234 <-- sharpness (at least 1); -#X obj 97 50 inlet~; -#X obj 100 455 outlet~; -#X obj 152 208 inlet; -#X connect 0 0 6 0; -#X connect 1 0 5 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 1 2 1; -#X connect 4 0 2 1; -#X connect 5 0 9 0; -#X connect 6 0 7 0; -#X connect 7 0 2 0; -#X connect 8 0 15 0; -#X connect 9 0 8 0; -#X connect 10 0 3 0; -#X connect 14 0 0 0; -#X connect 16 0 10 0; -#X restore 36 122 pd envelope; -#X floatatom 146 124 0 0 0; -#X text 187 123 <-- envelope sharpness; -#X obj 74 304 line~; -#X obj 74 246 * 441; -#X floatatom 174 215 0 0 0; -#X obj 74 275 pack 0 100; -#X text 216 214 <-- read point in 100ths of a second; -#X obj 55 338 +~; -#X text 31 529 In this patch we can loop in any "window" of the input -sample. The "read point" (0-100) gives the starting point of the window -and "chunk" is its size (both in 100ths of a second.) Try \, for example -\, frequency 4 \, sharpness 10 \, chunk size 25 \, and vary the read -point from -25 to 100 \, listening to the result.; -#X text 220 246 <-- graph table index; -#X text 34 627 You should hear some doppler shift as you change the -read point. To see why \, click on "graph table index" and quickly -start changing the read point--- you should see entertaining pictures -in "table-index". THe next patch shows how to prevent this if you wish -to.; -#X text 763 356 ----- 1 second ------; -#X obj 602 583 loadbang; -#X text 711 597 v-- re-read the original sample; -#X msg 602 670 \; graph2 ylabel 48000 0 44100; -#X msg 662 619 read ../sound/voice.wav sample-table; -#X obj 662 643 soundfiler; -#X text 766 719 updated for Pd version 0.33; -#X text 755 151 ---- 44103 samples ---; -#X connect 5 0 6 1; -#X connect 6 0 5 0; -#X connect 7 0 6 2; -#X connect 9 0 6 0; -#X connect 10 0 28 1; -#X connect 11 0 17 0; -#X connect 13 0 14 0; -#X connect 14 0 15 1; -#X connect 15 0 16 0; -#X connect 16 0 37 0; -#X connect 17 0 15 0; -#X connect 17 0 29 0; -#X connect 18 0 27 0; -#X connect 20 0 21 0; -#X connect 21 0 22 0; -#X connect 23 0 22 0; -#X connect 28 0 9 0; -#X connect 29 0 28 0; -#X connect 30 0 29 1; -#X connect 32 0 37 1; -#X connect 33 0 35 0; -#X connect 34 0 33 0; -#X connect 35 0 32 0; -#X connect 37 0 27 0; -#X connect 37 0 10 0; -#X connect 42 0 44 0; -#X connect 42 0 45 0; -#X connect 45 0 46 0; diff --git a/pd/doc/3.audio.examples/31.sampler.nodoppler.pd b/pd/doc/3.audio.examples/31.sampler.nodoppler.pd deleted file mode 100644 index fca63bb9..00000000 --- a/pd/doc/3.audio.examples/31.sampler.nodoppler.pd +++ /dev/null @@ -1,180 +0,0 @@ -#N canvas 113 57 1004 644 12; -#X msg 409 9 \; pd dsp 1; -#X msg 495 10 \; pd dsp 0; -#X text 430 40 ON; -#X text 511 41 OFF; -#X graph graph1 0 -1.02 44100 1.02 631 140 831 10; -#X array sample-table 44103 float 0; -#X pop; -#X obj 586 483 loadbang; -#X floatatom 60 462 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 31 490 pd output; -#X msg 89 462 MUTE; -#X text 124 455 <-- output amplitude; -#X obj 31 430 hip~ 5; -#X obj 47 381 tabread4~ sample-table; -#X floatatom 46 50 0 0 0; -#X text 85 49 <-- frequency (Hz.); -#X floatatom 165 122 0 0 0; -#X obj 164 145 * 441; -#X obj 46 220 +~ 1; -#X obj 46 74 phasor~ 0; -#X msg 151 262 bang; -#X text 204 121 <-- chunk size (100ths of a second); -#X obj 580 379 adc~ 1; -#X obj 580 403 hip~ 5; -#X obj 580 453 tabwrite~ sample-table; -#X msg 595 426 bang; -#X text 627 425 <-- click here to record your own sample; -#X text 695 497 v-- re-read the original sample; -#X graph graph2 0 0 44100 44100 633 309 833 179; -#X array table-index 44100 float 0; -#X pop; -#X obj 151 354 tabwrite~ table-index; -#X obj 31 406 *~; -#N canvas 160 476 591 415 envelope 0; -#X obj 81 68 -~ 0.5; -#X obj 83 276 clip~ -0.5 0.5; -#X obj 83 254 *~ 1; -#X obj 127 227 moses 1; -#X msg 96 227 1; -#X obj 83 301 cos~; -#X obj 81 93 wrap~; -#X obj 81 122 -~ 0.5; -#X obj 83 349 *~ -0.5; -#X obj 83 324 -~ 1; -#X floatatom 127 195 0 0 0; -#X text 135 65 subtracting 0.5 and wrapping produces a sawtooth wave -180 degrees out of phase from the original.; -#X text 130 116 as before we subtract 1/2 again to center the sawtooth -from -1/2 to 1/2.; -#X text 177 195 <-- sharpness (at least 1); -#X obj 81 42 inlet~; -#X obj 83 379 outlet~; -#X obj 127 173 inlet; -#X connect 0 0 6 0; -#X connect 1 0 5 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 1 2 1; -#X connect 4 0 2 1; -#X connect 5 0 9 0; -#X connect 6 0 7 0; -#X connect 7 0 2 0; -#X connect 8 0 15 0; -#X connect 9 0 8 0; -#X connect 10 0 3 0; -#X connect 14 0 0 0; -#X connect 16 0 10 0; -#X restore 30 102 pd envelope; -#X floatatom 149 84 0 0 0; -#X text 183 83 <-- envelope sharpness; -#X obj 65 308 line~; -#X obj 65 260 * 441; -#X floatatom 150 238 0 0 0; -#X obj 65 284 pack 0 100; -#X text 185 237 <-- read point in 100ths of a second; -#X obj 47 356 +~; -#X text 191 262 <-- graph table index; -#X obj 65 332 samphold~; -#X text 26 522 This example differs from the previous one in having -samphold~ objects which allow the chunk size and especially the read -point to change only at points where the phase wraps around. This removes -signal discontinuities (when the chunk size changes) and doppler shift -for changing read point.; -#X obj 99 195 samphold~; -#X obj 164 170 sig~; -#X obj 47 196 *~; -#X text 229 192 explicitly to use samphold~...; -#X text 200 173 <-- you often have to convert to audio; -#X text 643 315 ----- 1 second ------; -#X text 631 144 ---- 44103 samples ---; -#X msg 586 570 \; graph2 ylabel 48000 0 44100; -#X text 739 621 updated for Pd version 0.33; -#X msg 646 519 read ../sound/voice.wav sample-table; -#X obj 646 543 soundfiler; -#X text 21 8 SLIDING STABLE LOOPS WITHOUT DOPPLER SHIFT; -#X connect 5 0 48 0; -#X connect 5 0 50 0; -#X connect 6 0 7 1; -#X connect 7 0 6 0; -#X connect 8 0 7 2; -#X connect 10 0 7 0; -#X connect 11 0 28 1; -#X connect 12 0 17 0; -#X connect 14 0 15 0; -#X connect 15 0 42 0; -#X connect 16 0 37 0; -#X connect 17 0 29 0; -#X connect 17 0 39 1; -#X connect 17 0 41 1; -#X connect 17 0 43 0; -#X connect 18 0 27 0; -#X connect 20 0 21 0; -#X connect 21 0 22 0; -#X connect 23 0 22 0; -#X connect 28 0 10 0; -#X connect 29 0 28 0; -#X connect 30 0 29 1; -#X connect 32 0 39 0; -#X connect 33 0 35 0; -#X connect 34 0 33 0; -#X connect 35 0 32 0; -#X connect 37 0 27 0; -#X connect 37 0 11 0; -#X connect 39 0 37 1; -#X connect 41 0 43 1; -#X connect 42 0 41 0; -#X connect 43 0 16 0; -#X connect 50 0 51 0; diff --git a/pd/doc/3.audio.examples/32.sampler.transpose.pd b/pd/doc/3.audio.examples/32.sampler.transpose.pd deleted file mode 100644 index 02d937f4..00000000 --- a/pd/doc/3.audio.examples/32.sampler.transpose.pd +++ /dev/null @@ -1,207 +0,0 @@ -#N canvas 50 103 992 682 12; -#X graph graph1 0 -1.02 44100 1.02 599 426 799 296; -#X array sample-table 44103 float 0; -#X pop; -#X obj 502 568 loadbang; -#X floatatom 88 616 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 50 641 pd output; -#X msg 126 614 MUTE; -#X text 168 613 <-- output amplitude; -#X obj 50 586 hip~ 5; -#X obj 50 510 tabread4~ sample-table; -#X floatatom 16 306 0 0 0; -#X obj 16 331 * 441; -#X obj 16 453 +~ 1; -#X obj 35 249 phasor~ 0; -#X text 57 303 <-- chunk size (100ths of a second); -#X obj 497 460 adc~ 1; -#X obj 497 485 hip~ 5; -#X obj 497 534 tabwrite~ sample-table; -#X msg 512 507 bang; -#X text 544 506 <-- click here to record your own sample; -#X text 595 575 v-- re-read the original sample; -#X obj 50 561 *~; -#X text 599 432 -------- 44103 samples ------; -#N canvas 160 476 591 415 envelope 0; -#X obj 81 68 -~ 0.5; -#X obj 83 276 clip~ -0.5 0.5; -#X obj 83 254 *~ 1; -#X obj 127 227 moses 1; -#X msg 96 227 1; -#X obj 83 301 cos~; -#X obj 81 93 wrap~; -#X obj 81 122 -~ 0.5; -#X obj 83 349 *~ -0.5; -#X obj 83 324 -~ 1; -#X floatatom 127 195 0 0 0; -#X text 135 65 subtracting 0.5 and wrapping produces a sawtooth wave -180 degrees out of phase from the original.; -#X text 130 116 as before we subtract 1/2 again to center the sawtooth -from -1/2 to 1/2.; -#X text 177 195 <-- sharpness (at least 1); -#X obj 81 42 inlet~; -#X obj 83 379 outlet~; -#X obj 127 173 inlet; -#X connect 0 0 6 0; -#X connect 1 0 5 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 1 2 1; -#X connect 4 0 2 1; -#X connect 5 0 9 0; -#X connect 6 0 7 0; -#X connect 7 0 2 0; -#X connect 8 0 15 0; -#X connect 9 0 8 0; -#X connect 10 0 3 0; -#X connect 14 0 0 0; -#X connect 16 0 10 0; -#X restore 88 560 pd envelope; -#X floatatom 179 535 0 0 0; -#X text 212 534 <-- envelope sharpness; -#X obj 112 456 line~; -#X obj 112 406 * 441; -#X floatatom 112 381 0 0 0; -#X obj 112 431 pack 0 100; -#X text 158 383 <-- read point in 100ths of a second; -#X obj 50 485 +~; -#X obj 112 481 samphold~; -#X obj 16 381 samphold~; -#X obj 16 356 sig~; -#X obj 16 428 *~; -#X text 18 5 CALCULATING LOOP FREQUENCY AS FUNCTION OF TRANSPOSITION -; -#X obj 88 535 r~ phase; -#X obj 35 274 s~ phase; -#X obj 74 356 r~ phase; -#X obj 32 403 r~ phase; -#X obj 170 457 r~ phase; -#X obj 157 351 s chunk-size; -#X floatatom 22 50 0 0 0; -#X text 66 49 <-- transposition (10ths of a halftone); -#X obj 22 75 / 120; -#X obj 36 149 pow; -#X obj 22 100 t b f; -#X msg 22 125 2; -#X text 86 103 2 to the power (octaves); -#X text 85 125 gives speed change for the; -#X text 85 148 desired transposition; -#X obj 157 326 * 0.01; -#X text 270 339 chunk size; -#X text 270 361 in seconds; -#X obj 46 175 r chunk-size; -#X obj 46 200 t b f; -#X obj 35 224 /; -#X text 105 201 divide speed change by chunk; -#X text 103 222 size to get loop frequency; -#X text 402 74 The transposition is frequency in Hz. divided by chunk -size in seconds. This patch calculates the loop frequency as a function -of desired transposition; -#X text 77 75 transposition in octaves; -#X text 404 124 Notice now that we get Doppler effects when the chunk -size changes. You can suppress that if you don't want it \, by converting -the chunk size to an audio signal \, sampling and holding it. But then -there would be more work to deal with very low frequencies never triggering -the sample and hold...; -#X text 403 208 You might also want to have a way to retrigger the -loop to sync it with some other process. By the time we had all this -built the patch would be fairly involved. For now \, we'll move on -to note-oriented samplers instead.; -#X text 665 650 updated for Pd version 0.33; -#X msg 502 595 read ../sound/voice.wav sample-table; -#X obj 502 622 soundfiler; -#X obj 21 28 loadbang; -#X connect 1 0 63 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 6 0 3 0; -#X connect 7 0 19 0; -#X connect 8 0 9 0; -#X connect 8 0 50 0; -#X connect 9 0 32 0; -#X connect 10 0 29 0; -#X connect 11 0 36 0; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 16 0 15 0; -#X connect 19 0 6 0; -#X connect 21 0 19 1; -#X connect 22 0 21 1; -#X connect 24 0 30 0; -#X connect 25 0 27 0; -#X connect 26 0 25 0; -#X connect 27 0 24 0; -#X connect 29 0 7 0; -#X connect 30 0 29 1; -#X connect 31 0 33 0; -#X connect 32 0 31 0; -#X connect 33 0 10 0; -#X connect 35 0 21 0; -#X connect 37 0 31 1; -#X connect 38 0 33 1; -#X connect 39 0 30 1; -#X connect 41 0 43 0; -#X connect 43 0 45 0; -#X connect 44 0 55 0; -#X connect 45 0 46 0; -#X connect 45 1 44 1; -#X connect 46 0 44 0; -#X connect 50 0 40 0; -#X connect 53 0 54 0; -#X connect 54 0 55 0; -#X connect 54 1 55 1; -#X connect 55 0 11 0; -#X connect 63 0 64 0; -#X connect 65 0 41 0; diff --git a/pd/doc/3.audio.examples/33.sampler.oneshot.pd b/pd/doc/3.audio.examples/33.sampler.oneshot.pd deleted file mode 100644 index 75ce9153..00000000 --- a/pd/doc/3.audio.examples/33.sampler.oneshot.pd +++ /dev/null @@ -1,143 +0,0 @@ -#N canvas 34 0 994 773 12; -#X msg 538 26 \; pd dsp 1; -#X msg 622 26 \; pd dsp 0; -#X text 563 64 ON; -#X text 641 64 OFF; -#X graph graph1 0 -1.02 176403 1.02 746 290 946 160; -#X array sample-table 176403 float 0; -#X pop; -#X obj 583 520 loadbang; -#X floatatom 72 407 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 37 440 pd output; -#X msg 107 407 MUTE; -#X text 157 406 <-- output amplitude; -#X obj 37 374 hip~ 5; -#X obj 37 288 tabread4~ sample-table; -#X obj 593 379 adc~ 1; -#X obj 593 409 hip~ 5; -#X obj 564 473 tabwrite~ sample-table; -#X msg 564 340 bang; -#X text 697 525 v-- re-read the original sample; -#X text 18 15 ONE-SHOT SAMPLER USING LINE~ AS PHASE; -#X obj 37 258 line~; -#X obj 77 340 line~; -#X obj 37 340 *~; -#X obj 77 313 r cutoff; -#X obj 37 228 r phase; -#X msg 130 161 \; phase 1 \, 4.41e+08 1e+07 \; cutoff 1 5; -#X msg 30 71 bang; -#X obj 130 126 delay 5; -#X text 83 71 <-- play the sample; -#X msg 30 162 \; cutoff 0 5; -#X text 40 119 cut the; -#X text 40 138 sound off; -#X text 210 111 Wait for the; -#X text 208 131 cutoff to finish; -#X text 355 155 set the upper line~ to start; -#X text 355 174 at the first sample and go; -#X text 354 195 forever (until the next trigger); -#X text 24 479 In this example we're using a line~ object in place -of the phaser~-based network that controls read location.; -#X text 24 520 To start a note \, first we have to mute the output -in case ther's already something playing---otherwise we'll get a click. -The "cutoff" line~ then takes 5 msec to get to zero. After that amount -of delay \, we reset the phase to sample number 1 and set it in motion. -We want the line~ output to increase by 1 each sample of output \, -so we ask for it to do 4.41e+08 samples in 1e+07 milliseconds.; -#X text 24 636 The cutoff mechanism is still safe if we happen to ask -for two notes in under 5 msec. The second request would reset the delay -\, so that there's no way the delay can possibly fire without the cutoff -line~ at zero.; -#X text 602 339 <-- record; -#X obj 628 439 line~; -#X obj 593 444 *~; -#X text 710 328 ------ 4 seconds ------; -#X msg 551 418 1; -#X obj 661 376 del 3990; -#X msg 661 404 0 10; -#X text 712 405 <--stop recording; -#X text 25 706 We avoid clicking at the end of the table by getting -the table's own contents to go smoothly to zero. To do this we added -a level control to the recording patch that cuts off just before the -recording reaches the end of the table.; -#X text 595 641 this is.; -#X text 596 615 My apologies to Jonathan Harvey whose bell; -#X msg 583 550 read ../sound/bell.aiff sample-table; -#X obj 583 579 soundfiler; -#X text 725 751 updated for Pd version 0.33; -#X connect 5 0 49 0; -#X connect 6 0 7 1; -#X connect 7 0 6 0; -#X connect 8 0 7 2; -#X connect 10 0 7 0; -#X connect 11 0 20 0; -#X connect 12 0 13 0; -#X connect 13 0 40 0; -#X connect 15 0 14 0; -#X connect 15 0 43 0; -#X connect 15 0 42 0; -#X connect 18 0 11 0; -#X connect 19 0 20 1; -#X connect 20 0 10 0; -#X connect 21 0 19 0; -#X connect 22 0 18 0; -#X connect 24 0 27 0; -#X connect 24 0 25 0; -#X connect 25 0 23 0; -#X connect 39 0 40 1; -#X connect 40 0 14 0; -#X connect 42 0 39 0; -#X connect 43 0 44 0; -#X connect 44 0 39 0; -#X connect 49 0 50 0; diff --git a/pd/doc/3.audio.examples/34.sampler.notes.pd b/pd/doc/3.audio.examples/34.sampler.notes.pd deleted file mode 100644 index 9b08a10a..00000000 --- a/pd/doc/3.audio.examples/34.sampler.notes.pd +++ /dev/null @@ -1,321 +0,0 @@ -#N canvas 12 0 1074 786 12; -#X msg 862 17 \; pd dsp 1; -#X msg 946 17 \; pd dsp 0; -#X text 887 53 ON; -#X text 965 53 OFF; -#X floatatom 64 512 0 0 0; -#N canvas 159 26 495 262 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 29 546 pd output; -#X msg 98 512 MUTE; -#X text 143 511 <-- output amplitude; -#X msg 253 7 bang; -#X obj 253 35 delay 5; -#X text 493 269 end of note; -#X obj 359 35 r note; -#N canvas 459 46 678 451 samples 0; -#X graph graph1 0 -1.02 176403 1.02 262 171 462 41; -#X array sample1 176403 float 0; -#X pop; -#X text 264 376 ------ 4 seconds ------; -#X graph graph1 0 -1.02 176403 1.02 262 356 462 226; -#X array sample2 176403 float 0; -#X pop; -#X restore 29 277 pd samples; -#N canvas 21 287 947 410 recorder 0; -#X obj 318 43 inlet; -#X obj 272 196 adc~ 1; -#X obj 272 224 hip~ 5; -#X obj 341 254 line~; -#X obj 272 253 *~; -#X msg 341 226 1; -#X obj 400 191 del 3990; -#X msg 377 226 0 10; -#X obj 272 304 tabwrite~ sample1; -#X obj 124 110 makefilename sample%1; -#X msg 124 139 set \$1 \, bang; -#X msg 446 162 stop; -#X msg 400 162 bang; -#X obj 557 182 loadbang; -#X obj 660 137 openpanel; -#X msg 660 109 bang; -#X text 702 108 <-- browse for samples; -#X text 628 233 v-- re-read original samples; -#X obj 318 72 route record stop reload browse; -#X obj 557 319 soundfiler; -#X msg 557 261 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav -sample2; -#X msg 660 164 read \$1 sample1; -#X obj 660 191 soundfiler; -#X connect 0 0 18 0; -#X connect 1 0 2 0; -#X connect 2 0 4 0; -#X connect 3 0 4 1; -#X connect 4 0 8 0; -#X connect 5 0 3 0; -#X connect 6 0 7 0; -#X connect 7 0 3 0; -#X connect 9 0 10 0; -#X connect 10 0 8 0; -#X connect 11 0 6 0; -#X connect 12 0 6 0; -#X connect 13 0 20 0; -#X connect 14 0 21 0; -#X connect 15 0 14 0; -#X connect 18 0 9 0; -#X connect 18 0 12 0; -#X connect 18 0 5 0; -#X connect 18 1 7 0; -#X connect 18 1 11 0; -#X connect 18 2 20 0; -#X connect 18 3 15 0; -#X connect 20 0 19 0; -#X connect 21 0 22 0; -#X restore 29 443 pd recorder; -#X msg 29 305 record 1; -#X msg 29 360 stop; -#N canvas 700 402 671 621 playback 0; -#X obj 37 79 line~; -#X obj 56 271 line~; -#X obj 37 302 *~; -#X obj 56 242 r cutoff; -#X obj 37 50 r phase; -#X obj 37 626 outlet~; -#X obj 37 598 hip~ 5; -#X obj 49 113 r sample-number; -#X obj 49 142 makefilename sample%d; -#X msg 49 170 set \$1; -#X obj 37 211 tabread4~ sample1; -#X obj 55 338 r envelope; -#X obj 55 396 dbtorms; -#X obj 55 367 unpack; -#X obj 55 425 sqrt; -#X obj 55 454 sqrt; -#X obj 55 482 line~; -#X obj 37 569 *~; -#X obj 55 511 *~; -#X obj 55 540 *~; -#X text 107 51 messages to the phase generating line~; -#X text 188 114 setting the sample number.; -#X text 238 143 compute the name; -#X text 110 171 and send a "set" message to the tabread4~.; -#X text 116 270 line~ for de-clicking; -#X text 156 341 The envelope generator. Rather than sending our message -straight to the line~ we unpack it in order to fool with the amplitude -field.; -#X text 126 397 convert amplitude to linear units.; -#X text 121 426 take the fourth root. This because we want to raies -the line~'s output to the 4th power afterward. This is an inexpensive -way to give the rise and decay a more natural sounding evolution than -just a straight line.; -#X text 94 514 square the output twice to get the fourth power.; -#X connect 0 0 10 0; -#X connect 1 0 2 1; -#X connect 2 0 17 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 6 0 5 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 2 0; -#X connect 11 0 13 0; -#X connect 12 0 14 0; -#X connect 13 0 12 0; -#X connect 13 1 16 1; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 18 0; -#X connect 16 0 18 1; -#X connect 17 0 6 0; -#X connect 18 0 19 0; -#X connect 18 0 19 1; -#X connect 19 0 17 1; -#X restore 29 480 pd playback; -#X msg 29 332 record 2; -#X text 641 25 ARGUMENTS FOR NOTES:; -#X text 662 53 pitch in halftones; -#X text 662 77 amplitude (dB); -#X text 662 125 sample number; -#X text 662 101 duration (msec); -#X text 662 149 start location (msec); -#X text 662 173 rise time (msec); -#X text 662 197 decay time (msec); -#X obj 359 62 unpack 0 0 0 0 0 0 0; -#X text 46 6 CHOCOLATE SAMPLER; -#X obj 517 168 f; -#X obj 452 142 f; -#X obj 383 142 f; -#X obj 346 142 f; -#X obj 314 142 f; -#X obj 220 142 f; -#X obj 220 169 mtof; -#X obj 220 197 / 261.62; -#X obj 220 224 * 4.41e+08; -#X obj 220 252 +; -#X obj 485 142 delay; -#X obj 314 312 pack 0 0 0 0 0; -#X obj 253 62 t b b b; -#X text 494 346 This starts the note \, sending to "receives" in the -playback subptach. The new receive "envelope" is an amplitude control -in parallel with the cutoff control. The "sample-number" switches the -tabread4~ between tables.; -#X msg 152 44 \; pd dsp 1 \; cutoff 0 5; -#X obj 383 197 + 1; -#X msg 552 467 60 100 10000 1 0 0 0; -#X obj 552 737 s note; -#X msg 517 196 \; envelope 0 \$1; -#X msg 671 691 62; -#X msg 706 691 64; -#X msg 637 691 60; -#X msg 608 691 55; -#X msg 739 691 72; -#X msg 576 691 48; -#X msg 638 734 60.5; -#X msg 552 494 60 90 10000 1 0 0 0; -#X msg 552 522 60 100 10000 2 0 0 0; -#X msg 552 550 60 100 10000 1 3000 0 0; -#X obj 383 169 * 44.1; -#X msg 552 605 60 100 100 1 0 0 0; -#X msg 552 632 60 100 100 1 0 0 1000; -#X msg 552 577 60 100 10000 1 0 1000 0; -#X msg 314 340 \; envelope 0 \, \$1 \$2 \; phase \$3 \, \$4 1e+07 \; -sample-number \$5 \; cutoff 1 5 \;; -#X text 108 315 <-- record; -#X msg 29 388 reload; -#X msg 29 415 browse; -#X text 6 109 transposition works; -#X text 6 133 by altering the phase; -#X text 6 181 The mtof and / 261; -#X text 6 205 calculate speed change; -#X text 6 229 considering 60 as unity.; -#X text 20 43 as before we; -#X text 11 64 mute and wait; -#X text 6 157 target ($4 below right.); -#X text 446 303 combine amplitude \, rise time \, start phase \, end -phase \, and sample number in one message; -#X text 16 594 This patch take the same principle as the previous one -\, but allows you to parametrize sample playback. Since we must wait -5 msec before starting the playback \, we store all the parameters -in "f" objects \, and recall them to construct the new note. Transposition -is done by altering the amount to play back in the (artificial) ten -thousand seconds (1e+07). The playback segment can be altered to start -in the middle of the sample instead of the beginning \, and you can -change the duration and rise and decay times.; -#X text 744 468 straight playback; -#X text 749 495 change amplitude; -#X text 752 523 change sample number; -#X text 755 550 change start location; -#X text 754 576 change rise time; -#X text 754 609 change duration; -#X text 755 633 ... and decay time; -#X text 688 736 microtones OK too.; -#X text 576 667 If you omit values they stay unchanged; -#X text 799 759 updated for Pd version 0.33; -#X text 548 426 Here are buttons to demonstrate the effect of varying -the parameters one by one.; -#X connect 4 0 5 1; -#X connect 5 0 4 0; -#X connect 6 0 5 2; -#X connect 8 0 9 0; -#X connect 8 0 42 0; -#X connect 9 0 40 0; -#X connect 11 0 26 0; -#X connect 14 0 13 0; -#X connect 15 0 13 0; -#X connect 16 0 5 0; -#X connect 17 0 13 0; -#X connect 26 0 33 1; -#X connect 26 0 8 0; -#X connect 26 1 32 1; -#X connect 26 2 38 1; -#X connect 26 3 31 1; -#X connect 26 4 30 1; -#X connect 26 5 29 1; -#X connect 26 6 28 1; -#X connect 28 0 46 0; -#X connect 29 0 39 1; -#X connect 30 0 57 0; -#X connect 31 0 39 4; -#X connect 32 0 39 0; -#X connect 33 0 34 0; -#X connect 34 0 35 0; -#X connect 35 0 36 0; -#X connect 36 0 37 0; -#X connect 37 0 39 3; -#X connect 38 0 28 0; -#X connect 39 0 61 0; -#X connect 40 0 32 0; -#X connect 40 1 33 0; -#X connect 40 2 29 0; -#X connect 40 2 30 0; -#X connect 40 2 31 0; -#X connect 40 2 38 0; -#X connect 43 0 39 2; -#X connect 43 0 37 1; -#X connect 44 0 45 0; -#X connect 47 0 45 0; -#X connect 48 0 45 0; -#X connect 49 0 45 0; -#X connect 50 0 45 0; -#X connect 51 0 45 0; -#X connect 52 0 45 0; -#X connect 53 0 45 0; -#X connect 54 0 45 0; -#X connect 55 0 45 0; -#X connect 56 0 45 0; -#X connect 57 0 43 0; -#X connect 58 0 45 0; -#X connect 59 0 45 0; -#X connect 60 0 45 0; -#X connect 63 0 13 0; -#X connect 64 0 13 0; diff --git a/pd/doc/3.audio.examples/35.qlist.txt b/pd/doc/3.audio.examples/35.qlist.txt deleted file mode 100644 index 0c412767..00000000 --- a/pd/doc/3.audio.examples/35.qlist.txt +++ /dev/null @@ -1,147 +0,0 @@ -note 60 90 50 2 50 30 30; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -15 note 60; -100 note 59 90 100; -comment measure 1; -100 note 60 90 150 2 0; - note 36 90 200 2 50; -200 note 48 90 250 2 0; - note 40 90 200 2 50; - note 43 90 200 2 50; -200 note 48 90 250 2 0; - note 31 90 200 2 50; -200 note 55 90 100; - note 41 90 200; - note 43 90 200; -100 note 53 90 100; -100 note 52 90 100; - note 36 90 200; -100 note 55 90 100; -100 note 60 90 100; - note 40 90 200; - note 43 90 200; -100 note 59 90 100; -100 note 60 90 100; - note 25 90 200; -100 note 64 90 100; -100 note 62 90 100; - note 39 90 200; - note 43 90 200; -100 note 61 90 100; - -comment measure 2; -100 note 62 90 150 2 0; - note 26 90 200; -200 note 50 90 250 2 50; - note 41 90 200; - note 42 90 200; -200 note 50 90 250; - note 29 90 200; -200 note 50 90 100; - note 30 90 200; - note 44 90 200; - note 48 90 200; -100 note 48 90 100; -100 note 47 90 100; - note 31 90 200; - note 43 90 200; - note 47 90 200; -100 note 50 90 100; -100 note 55 90 100; - note 34 90 200; - note 42 90 200; - note 46 90 200; -100 note 54 90 100; -100 note 55 90 200; - note 35 90 200; - note 42 90 200; - note 45 90 200; -200 note 57 90 100; - note 41 90 200; - note 47 90 200; -100 note 59 90 100; -comment measure 3; -100 note 60 90 100; - note 24 90 200; - note 40 90 200; - note 48 90 200 2 0; - -100 note 59 90 100 2 50; -100 note 57 90 100; -100 note 55 90 100; - -100 note 57 90 100; - note 28 90 200; - note 38 90 200; - note 46 90 200; -100 note 55 90 100; -100 note 53 90 100; -100 note 52 90 100; - -100 note 53 90 100; - note 29 90 100; - note 36 90 100; - note 45 90 100; -100 note 52 90 100; -100 note 50 90 100; - note 29 90 300; - note 36 90 300; - note 45 90 300; -100 note 48 90 100; - -100 note 50 90 100; -100 note 48 90 100; -100 note 47 90 100; - note 29 90 300; - note 38 90 300; - note 44 90 300 2 0; -100 note 45 90 100 2 50; - -comment measure 4; -100 note 43 90 100; - note 31 90 200; - note 38 90 200; -100 note 48 90 100; -100 note 47 90 100; - note 31 90 300; - note 40 90 300; - note 43 90 300 2 0; -100 note 50 90 100 2 50; - -100 note 48 90 100; -100 note 52 90 100; -100 note 50 90 100; - note 31 90 300 2 0; - note 41 90 300; - note 43 90 300; -100 note 53 90 100 2 50; - -100 note 52 90 200; - note 31 90 300 2 50; -200 note 48 90 200; - note 19 90 200 2 50; - note 29 90 200 2 50; - note 36 90 200 2 50; - -200 note 48 90 100 2 50 0 4000; - note 12 90 300; - note 28 90 300; - note 36 90 300; - - - diff --git a/pd/doc/3.audio.examples/35.sampler.poly.pd b/pd/doc/3.audio.examples/35.sampler.poly.pd deleted file mode 100644 index e42b586d..00000000 --- a/pd/doc/3.audio.examples/35.sampler.poly.pd +++ /dev/null @@ -1,228 +0,0 @@ -#N canvas 66 253 1119 674 12; -#X floatatom 582 562 0 0 0; -#N canvas 159 26 495 262 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 547 595 pd output; -#X msg 617 562 MUTE; -#X text 660 561 <-- output amplitude; -#N canvas 0 0 600 392 samples 0; -#N canvas 0 0 450 300 graph1 0; -#X array sample1 176403 float 0; -#X coords 0 1.02 176403 -1.02 200 130 1; -#X restore 262 41 graph; -#X text 282 385 ------ 4 seconds ------; -#N canvas 0 0 450 300 graph1 0; -#X array sample2 176403 float 0; -#X coords 0 1.02 176403 -1.02 200 130 1; -#X restore 262 226 graph; -#X restore 931 97 pd samples; -#N canvas 52 219 967 340 recorder 0; -#X obj 220 21 inlet; -#X obj 174 174 adc~ 1; -#X obj 174 202 hip~ 5; -#X obj 243 232 line~; -#X obj 174 231 *~; -#X msg 243 204 1; -#X obj 302 169 del 3990; -#X msg 279 204 0 10; -#X obj 174 282 tabwrite~ sample1; -#X obj 26 88 makefilename sample%1; -#X msg 26 117 set \$1 \, bang; -#X msg 348 140 stop; -#X msg 302 140 bang; -#X obj 220 50 route record stop reload browse; -#X obj 411 158 loadbang; -#X obj 514 113 openpanel; -#X msg 514 85 bang; -#X text 556 84 <-- browse for samples; -#X text 482 209 v-- re-read original samples; -#X obj 411 295 soundfiler; -#X msg 411 237 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav -sample2; -#X msg 514 140 read \$1 sample1; -#X obj 514 167 soundfiler; -#X connect 0 0 13 0; -#X connect 1 0 2 0; -#X connect 2 0 4 0; -#X connect 3 0 4 1; -#X connect 4 0 8 0; -#X connect 5 0 3 0; -#X connect 6 0 7 0; -#X connect 7 0 3 0; -#X connect 9 0 10 0; -#X connect 10 0 8 0; -#X connect 11 0 6 0; -#X connect 12 0 6 0; -#X connect 13 0 9 0; -#X connect 13 0 12 0; -#X connect 13 0 5 0; -#X connect 13 1 7 0; -#X connect 13 1 11 0; -#X connect 13 2 20 0; -#X connect 13 3 16 0; -#X connect 14 0 20 0; -#X connect 15 0 21 0; -#X connect 16 0 15 0; -#X connect 20 0 19 0; -#X connect 21 0 22 0; -#X restore 931 284 pd recorder; -#X msg 931 146 record 1; -#X msg 931 202 stop; -#X msg 931 174 record 2; -#X text 19 49 ARGUMENTS FOR NOTES:; -#X text 19 71 pitch in halftones; -#X text 19 95 amplitude (dB); -#X text 19 143 sample number; -#X text 19 119 duration (msec); -#X text 19 167 start location (msec); -#X text 19 191 rise time (msec); -#X text 19 215 decay time (msec); -#X msg 931 229 reload; -#X msg 931 257 browse; -#X text 47 10 POLYPHONIC SAMPLER; -#X obj 547 522 sampvoice; -#X obj 547 494 sampvoice; -#X obj 547 467 sampvoice; -#X obj 547 439 sampvoice; -#X obj 547 412 sampvoice; -#X obj 547 384 sampvoice; -#X obj 547 356 sampvoice; -#X obj 547 329 sampvoice; -#X obj 631 17 r note; -#X obj 631 44 unpack 0 0 0 0 0 0 0; -#X obj 604 76 t b f; -#X obj 544 109 f; -#X obj 580 109 + 1; -#X obj 552 146 mod 1e+06; -#X obj 544 175 makenote 64; -#X obj 544 203 poly 8 1; -#X obj 544 230 stripnote; -#X obj 617 272 pack 0 0 0 0 0 0 0 0; -#X obj 617 300 route 1 2 3 4 5 6 7 8; -#X text 929 124 record \, etc.; -#X text 206 142 increment mod 1e+06 to make fake pitch; -#X text 326 177 supply note-off message; -#X text 336 207 allocate sampler voice; -#X text 359 232 drop note off again; -#X obj 736 516 qlist; -#X obj 870 520 r comment; -#X text 732 445 sailors to untie him...; -#X text 735 395 Lashed to the mast of his boat \, Ulysses; -#X text 735 420 hears beautiful singing. He begs his; -#X text 19 271 Here we take the previous patch and make it polyphonic -\, with 8 voices. The single voice which we had before has been made -into an abstraction \, "sampvoice.pd" \, which we instantiate in 8 -copies. Earlier we used sends and receives to pass messages to "cutoff" -\, etc \, but here if we did that the copies of sampvoice would be -sending messages to each other \, so we combine the control and the -audio computation in the sampvoice abstraction without using send and -receive. Click on one to see how.; -#X text 20 421 The "poly" object essentially repeats pitch and velocity -pairs to its output \, but also sending a voice number from its left -outlet. To use it \, we unpack the 7 parameters \, calculate the voice -number \, repack the message as 8 parameters with voice number first -\, and use "route" to send it to one of the 8 voices.; -#X text 20 523 There's some bother because poly expects to track note -on and note off messages separately as they would come from a MIDI -keyboard. So we assign each note a unique fake "pitch" \, use makenote -to generate the note-off messages \, and run poly on the resulting -stream. We then discard both pitch and velocity (using the velocity -only to strip note-offs) and rebuild the original message adding the -voice number we just scored.; -#X text 854 639 updated for Pd version 0.33; -#X msg 736 486 read 35.qlist.txt \, rewind \, tempo 1 \, bang; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 6 0 5 0; -#X connect 7 0 5 0; -#X connect 8 0 5 0; -#X connect 17 0 5 0; -#X connect 18 0 5 0; -#X connect 20 0 1 0; -#X connect 21 0 20 0; -#X connect 22 0 21 0; -#X connect 23 0 22 0; -#X connect 24 0 23 0; -#X connect 25 0 24 0; -#X connect 26 0 25 0; -#X connect 27 0 26 0; -#X connect 28 0 29 0; -#X connect 29 0 30 0; -#X connect 29 1 37 2; -#X connect 29 2 34 2; -#X connect 29 2 37 3; -#X connect 29 3 37 4; -#X connect 29 4 37 5; -#X connect 29 5 37 6; -#X connect 29 6 37 7; -#X connect 30 0 31 0; -#X connect 30 1 37 1; -#X connect 31 0 32 0; -#X connect 31 0 34 0; -#X connect 32 0 33 0; -#X connect 33 0 31 1; -#X connect 34 0 35 0; -#X connect 34 1 35 1; -#X connect 35 0 36 0; -#X connect 35 2 36 1; -#X connect 36 0 37 0; -#X connect 37 0 38 0; -#X connect 38 0 27 1; -#X connect 38 1 26 1; -#X connect 38 2 25 1; -#X connect 38 3 24 1; -#X connect 38 4 23 1; -#X connect 38 5 22 1; -#X connect 38 6 21 1; -#X connect 38 7 20 1; -#X connect 53 0 44 0; diff --git a/pd/doc/3.audio.examples/36.PART5.envelopes.pd b/pd/doc/3.audio.examples/36.PART5.envelopes.pd deleted file mode 100644 index 61e7a6d7..00000000 --- a/pd/doc/3.audio.examples/36.PART5.envelopes.pd +++ /dev/null @@ -1,90 +0,0 @@ -#N canvas 173 105 609 433 12; -#X floatatom 96 358 0 0 100; -#N canvas 448 68 641 420 output 0; -#X obj 430 203 t b; -#X obj 430 143 f; -#X obj 430 83 inlet; -#X obj 430 233 f; -#X msg 541 225 0; -#X msg 430 113 bang; -#X obj 430 173 moses 1; -#X obj 496 151 moses 1; -#X obj 107 174 dbtorms; -#X obj 496 121 r master-lvl; -#X obj 107 56 r master-lvl; -#X obj 430 263 s master-lvl; -#X obj 36 202 inlet~; -#X obj 251 229 inlet; -#X obj 269 257 s master-lvl; -#X msg 119 85 set \$1; -#X obj 119 115 outlet; -#X msg 251 283 \; pd dsp 1; -#X obj 107 236 line~; -#X obj 36 258 *~; -#X obj 36 290 dac~; -#X obj 107 204 pack 0 50; -#X text 23 179 audio in; -#X text 2 313 out both channels; -#X obj 36 231 hip~ 1; -#X obj 541 194 t b; -#X connect 0 0 3 0; -#X connect 1 0 6 0; -#X connect 2 0 5 0; -#X connect 3 0 11 0; -#X connect 4 0 11 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 6 1 25 0; -#X connect 7 1 3 1; -#X connect 8 0 21 0; -#X connect 9 0 1 1; -#X connect 9 0 7 0; -#X connect 10 0 8 0; -#X connect 10 0 15 0; -#X connect 12 0 24 0; -#X connect 13 0 14 0; -#X connect 13 0 17 0; -#X connect 15 0 16 0; -#X connect 18 0 19 1; -#X connect 19 0 20 0; -#X connect 19 0 20 1; -#X connect 21 0 18 0; -#X connect 24 0 19 0; -#X connect 25 0 4 0; -#X restore 58 391 pd output; -#X msg 134 359 MUTE; -#X msg 247 180 bang; -#X msg 328 180 bang; -#X text 244 152 attack; -#X text 325 150 release; -#X obj 247 281 line~; -#X msg 328 254 0 500; -#X text 134 10 ENVELOPE GENERATORS; -#X obj 58 246 phasor~ 50; -#X obj 58 301 *~; -#X obj 58 328 wrap~; -#X msg 247 248 1 2500; -#X obj 58 275 -~ 0.5; -#X msg 179 247 10 200; -#X obj 247 221 del 200; -#X text 349 405 updated for Pd version 0.34; -#X text 39 35 This patch uses an envelope generator to control a sound. -When you hit "attack" two things happen. First \, the line~ object -rises to 10 in 200 milliseconds. Then after a "delay" of the same 200 -msec \, the second message sends the line~ back down to 1 over another -2500 msec. The "release" just ramps us down to zero at the end.; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 15 0; -#X connect 3 0 16 0; -#X connect 4 0 8 0; -#X connect 7 0 11 1; -#X connect 8 0 7 0; -#X connect 10 0 14 0; -#X connect 11 0 12 0; -#X connect 12 0 1 0; -#X connect 13 0 7 0; -#X connect 14 0 11 0; -#X connect 15 0 7 0; -#X connect 16 0 13 0; diff --git a/pd/doc/3.audio.examples/37.adsr.pd b/pd/doc/3.audio.examples/37.adsr.pd deleted file mode 100644 index 06fa21b7..00000000 --- a/pd/doc/3.audio.examples/37.adsr.pd +++ /dev/null @@ -1,34 +0,0 @@ -#N canvas 141 83 672 516 12; -#X text 412 489 updated for Pd version 0.26; -#X graph graph1 0 -1.02 44100 1.02 395 235 595 105; -#X array adsr-output 44100 float 0; -#X pop; -#X text 394 244 ------ 1 second ------; -#X obj 32 74 r trigger; -#X obj 32 148 tabwrite~ adsr-output; -#X obj 54 123 r graphit; -#X msg 31 176 bang; -#X text 75 177 <-- attack and delayed release; -#X obj 42 200 del 500; -#X text 146 283 <-- attack only; -#X msg 31 264 \; pd dsp 1 \; trigger 1 \; graphit bang; -#X text 147 360 <-- release only; -#X msg 30 334 \; pd dsp 1 \; trigger 0 \; graphit bang; -#X msg 42 225 \; trigger 0; -#X text 598 221 -1; -#X text 600 96 1; -#X text 35 24 This patch introduces a simple "adsr" abstraction we'll -use frequently. You can click on the "adsr" object to see what's inside. -; -#X text 30 402 The active ingredient of the ADSR envelope generator -is a single line~ which gets passed messages to make the attack and -release behavior. You can retrigger the ADSR envelope generator all -you wish without having to wait for attacks or releases to finish; -#X text 104 5 ENVELOPE GENERATOR ABSTRACTION; -#X obj 32 100 adsr 1 100 200 50 300; -#X connect 3 0 19 0; -#X connect 5 0 4 0; -#X connect 6 0 10 0; -#X connect 6 0 8 0; -#X connect 8 0 13 0; -#X connect 19 0 4 0; diff --git a/pd/doc/3.audio.examples/38.envelope.dB.pd b/pd/doc/3.audio.examples/38.envelope.dB.pd deleted file mode 100644 index 8ec1d1ae..00000000 --- a/pd/doc/3.audio.examples/38.envelope.dB.pd +++ /dev/null @@ -1,158 +0,0 @@ -#N canvas 112 44 674 673 12; -#X obj 32 80 r trigger; -#X text 85 8 USING ADSR'S OUTPUT AS dB; -#X text 34 28 For natural sounding amplitude control \, you will want -to use the ADSR's output as log amplitude. In practice this is best -done using a lookup table:; -#X obj 32 131 tabread4~ dbtorms; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 387 83 graph; -#N canvas 461 495 663 358 make-table 0; -#X obj 97 195 moses 2; -#X msg 81 44 bang; -#X obj 81 73 t b b; -#X obj 152 134 f; -#X obj 190 134 + 1; -#X msg 174 106 0; -#X obj 81 102 until; -#X obj 73 162 sel 122; -#X msg 97 226 0; -#X obj 141 227 dbtorms; -#X obj 152 162 t f f; -#X obj 97 259 tabwrite dbtorms; -#X floatatom 435 103 0 0 0; -#X floatatom 435 186 0 0 0; -#X obj 435 157 tabread4 dbtorms; -#X floatatom 331 183 0 0 0; -#X obj 331 154 dbtorms; -#X text 35 12 bang to recalculate the table; -#X text 268 62 check accuracy of reading table against; -#X text 268 81 the "real" dbtorms object.; -#X connect 0 0 8 0; -#X connect 0 1 9 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 2 1 5 0; -#X connect 3 0 4 0; -#X connect 3 0 7 0; -#X connect 3 0 10 0; -#X connect 4 0 3 1; -#X connect 5 0 3 1; -#X connect 6 0 3 0; -#X connect 7 0 6 1; -#X connect 8 0 11 0; -#X connect 9 0 11 0; -#X connect 10 0 0 0; -#X connect 10 1 11 1; -#X connect 12 0 14 0; -#X connect 12 0 16 0; -#X connect 14 0 13 0; -#X connect 16 0 15 0; -#X restore 288 328 pd make-table; -#X text 258 299 here's the patch I used to make the table:; -#X obj 48 156 osc~ 440; -#X text 589 176 0; -#X text 590 77 10; -#X text 406 186 ------ 123 samples ------; -#X floatatom 61 204 0 0 0; -#N canvas 159 26 532 285 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X obj 425 153 t b; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X restore 32 232 pd output; -#X msg 108 205 MUTE; -#X text 149 204 <-- output amplitude; -#X text 112 276 <-- attack; -#X text 113 333 <-- release; -#X msg 32 319 \; pd dsp 1 \; trigger 0; -#X obj 32 182 *~; -#X msg 31 264 \; pd dsp 1 \; trigger 1; -#X text 29 431 Notice how the attack sounds different when you retrigger -than when you start from zero. This is because if you go from the steady -state you only rise 30 dB instead of 100 \, so it sounds slower.; -#X obj 32 106 adsr 100 100 200 70 300; -#X text 29 381 The table is indexed from 1 to 120 so that 1 gives a -true zero out and 120 gives 10 (a 20 dB boost.) The extra 20 dB are -for headroom.; -#X text 28 498 If this is a problem you have at least 2 ways of dealing -with it. The best might be to adjust the attack time inside the abstraction -using snapshot~ to find out where you're slewing from \, as demonstrated -in the next patch.; -#X text 406 631 updated for Pd version 0.35; -#X text 28 568 There's also a "real" dbtorms~ object... but it's almost -certainly much more compute-intensive than tabread4~ \, since it has -to call a library "exp" function.; -#X connect 0 0 21 0; -#X connect 3 0 18 0; -#X connect 7 0 18 1; -#X connect 11 0 12 1; -#X connect 12 0 11 0; -#X connect 13 0 12 2; -#X connect 18 0 12 0; -#X connect 21 0 3 0; diff --git a/pd/doc/3.audio.examples/39.envelope.slew.pd b/pd/doc/3.audio.examples/39.envelope.slew.pd deleted file mode 100644 index 74599c6c..00000000 --- a/pd/doc/3.audio.examples/39.envelope.slew.pd +++ /dev/null @@ -1,102 +0,0 @@ -#N canvas 95 40 682 438 12; -#X obj 32 80 r trigger; -#X obj 32 131 tabread4~ dbtorms; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 392 93 graph; -#X obj 55 157 osc~ 440; -#X text 594 186 0; -#X text 596 86 10; -#X text 411 196 ------ 123 samples ------; -#X floatatom 70 206 0 0 0; -#N canvas 159 26 530 278 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 395 183 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 389 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 389 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X restore 32 232 pd output; -#X msg 106 205 MUTE; -#X text 147 204 <-- output amplitude; -#X text 112 276 <-- attack; -#X text 113 333 <-- release; -#X msg 32 319 \; pd dsp 1 \; trigger 0; -#X obj 32 182 *~; -#X msg 31 264 \; pd dsp 1 \; trigger 1; -#X text 82 7 ADSR with constant slew rate instead of constant attack -time; -#X text 34 28 Here we swap in "adsr2" so you cam compare. I think sometimes -you'll want the constant rise time \, and sometimes the constant rise -rate as in adsr2.; -#X text 40 390 Click on the adsr2 object to see how this is done.; -#X obj 32 106 adsr2 100 100 200 70 300; -#X text 420 414 updated for Pd version 0.35; -#X connect 0 0 19 0; -#X connect 1 0 14 0; -#X connect 3 0 14 1; -#X connect 7 0 8 1; -#X connect 8 0 7 0; -#X connect 9 0 8 2; -#X connect 14 0 8 0; -#X connect 19 0 1 0; diff --git a/pd/doc/3.audio.examples/40.envelope.pitch.pd b/pd/doc/3.audio.examples/40.envelope.pitch.pd deleted file mode 100644 index 42fc9ba8..00000000 --- a/pd/doc/3.audio.examples/40.envelope.pitch.pd +++ /dev/null @@ -1,209 +0,0 @@ -#N canvas 222 84 686 544 12; -#X obj 48 106 r trigger; -#X obj 48 154 tabread4~ dbtorms; -#X floatatom 86 232 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 48 258 pd output; -#X msg 124 232 MUTE; -#X text 166 231 <-- output amplitude; -#X text 141 298 <-- attack; -#X text 568 305 <-- release; -#X obj 48 208 *~; -#N canvas 151 343 812 522 make-table 0; -#X msg 82 49 bang; -#X obj 82 78 t b b; -#X obj 141 142 f; -#X obj 179 142 + 1; -#X msg 150 112 0; -#X obj 82 107 until; -#X obj 141 176 t f f; -#X floatatom 369 67 0 0 0; -#X floatatom 369 127 0 0 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 538 298 graph; -#X text 740 391 0; -#X text 742 291 10; -#X text 544 403 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 537 130 graph; -#X obj 283 102 mtof; -#X floatatom 282 127 0 0 0; -#X text 541 237 ------ 130 samples ------; -#X text 746 223 0; -#X text 748 123 12000; -#X obj 81 203 mtof; -#X obj 72 167 sel 129; -#X obj 80 229 tabwrite mtof; -#X obj 369 99 tabread4 mtof; -#X obj 71 418 moses 2; -#X msg 55 267 bang; -#X obj 55 296 t b b; -#X obj 126 357 f; -#X obj 164 357 + 1; -#X msg 148 329 0; -#X obj 55 325 until; -#X obj 47 385 sel 122; -#X msg 71 449 0; -#X obj 115 450 dbtorms; -#X obj 126 385 t f f; -#X obj 71 482 tabwrite dbtorms; -#X text 312 40 ... and test accuracy; -#X text 23 15 patch to recalculate the mtof table; -#X text 107 267 bang to recalculate dbtorms table; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 20 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 19 0; -#X connect 6 1 21 1; -#X connect 7 0 14 0; -#X connect 7 0 22 0; -#X connect 14 0 15 0; -#X connect 19 0 21 0; -#X connect 20 0 5 1; -#X connect 22 0 8 0; -#X connect 23 0 31 0; -#X connect 23 1 32 0; -#X connect 24 0 25 0; -#X connect 25 0 29 0; -#X connect 25 1 28 0; -#X connect 26 0 27 0; -#X connect 26 0 30 0; -#X connect 26 0 33 0; -#X connect 27 0 26 1; -#X connect 28 0 26 1; -#X connect 29 0 26 0; -#X connect 30 0 29 1; -#X connect 31 0 34 0; -#X connect 32 0 34 0; -#X connect 33 0 23 0; -#X connect 33 1 34 1; -#X restore 451 222 pd make-table; -#X text 35 6 PITCH ENVELOPES; -#X text 125 24 For pitch envelopes \, unlike amplitude envelopes \, -discontinuities are allowed and sometimes you would rather the envelope -generator actually jump to zero when it's triggered. The "adsr2" object -does this for you if you send a negative trigger instead of a positive -one:; -#X obj 280 106 r trigger2; -#X obj 280 178 tabread4~ mtof; -#X obj 280 202 osc~; -#X msg 46 288 \; pd dsp 1 \; trigger 1 \; trigger2 1; -#X text 358 297 <-- attack; -#X msg 249 293 \; pd dsp 1 \; trigger 1 \; trigger2 -1; -#X msg 472 293 \; pd dsp 1 \; trigger 0 \; trigger2 0; -#X obj 280 154 +~ 69; -#X text 358 314 restarting; -#X text 363 331 pitch env; -#X text 37 377 We have added a new table \, mtof \, for converting -audio signals from pitch to frequency. Its range is 1-127 \, so you -want to add a base pitch in before you start reading from it.; -#X text 37 443 This is an extreme use of pitch enveloping. In a real -situation you might want an envelope controlling vibrato depth or the -like instead of straight pitch.; -#X obj 48 130 adsr2 100 50 200 90 1000; -#X obj 280 130 adsr2 20 200 100 100 1000; -#X text 413 497 updated for Pd version 0.35; -#X connect 0 0 24 0; -#X connect 1 0 8 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 8 0 3 0; -#X connect 12 0 25 0; -#X connect 13 0 14 0; -#X connect 14 0 8 1; -#X connect 19 0 13 0; -#X connect 24 0 1 0; -#X connect 25 0 19 0; diff --git a/pd/doc/3.audio.examples/41.envelope.portamento.pd b/pd/doc/3.audio.examples/41.envelope.portamento.pd deleted file mode 100644 index 6542e8b5..00000000 --- a/pd/doc/3.audio.examples/41.envelope.portamento.pd +++ /dev/null @@ -1,148 +0,0 @@ -#N canvas 222 84 642 346 12; -#X floatatom 75 227 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 46 255 pd output; -#X msg 123 227 MUTE; -#X text 166 225 <-- output amplitude; -#X obj 46 173 tabread4~ mtof; -#X obj 46 197 osc~; -#N canvas 247 30 505 439 tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 129 49 graph; -#X text 331 142 0; -#X text 333 42 10; -#X text 127 157 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 136 226 graph; -#X text 128 336 ------ 130 samples ------; -#X text 340 318 0; -#X text 342 218 12000; -#X restore 490 225 pd tables; -#X text 35 6 PORTAMENTO; -#X obj 46 149 line~; -#X obj 46 101 r pitch; -#X msg 316 101 36; -#X msg 345 101 48; -#X msg 372 101 60; -#X msg 429 101 72; -#X msg 401 101 67; -#X msg 483 101 76; -#X msg 457 101 74; -#X obj 451 165 s pitch; -#X msg 514 101 84; -#X msg 544 101 96; -#X floatatom 143 125 0 0 0; -#X text 173 126 <-- change speed; -#X floatatom 451 139 0 0 0; -#X obj 46 125 pack 0 100; -#X obj 388 192 loadbang; -#X msg 387 214 \; pitch 72; -#X text 40 37 Portamento can be done using just line~ \, but you still -might want to sweep in pitch \, not frequency:; -#X text 363 293 updated for Pd version 0.35; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 5 0; -#X connect 5 0 1 0; -#X connect 8 0 4 0; -#X connect 9 0 23 0; -#X connect 10 0 22 0; -#X connect 11 0 22 0; -#X connect 12 0 22 0; -#X connect 13 0 22 0; -#X connect 14 0 22 0; -#X connect 15 0 22 0; -#X connect 16 0 22 0; -#X connect 18 0 22 0; -#X connect 19 0 22 0; -#X connect 20 0 23 1; -#X connect 22 0 17 0; -#X connect 23 0 8 0; -#X connect 24 0 25 0; diff --git a/pd/doc/3.audio.examples/42.PART6.analog.sequencer.pd b/pd/doc/3.audio.examples/42.PART6.analog.sequencer.pd deleted file mode 100644 index b217112f..00000000 --- a/pd/doc/3.audio.examples/42.PART6.analog.sequencer.pd +++ /dev/null @@ -1,133 +0,0 @@ -#N canvas 222 24 761 466 12; -#X floatatom 61 408 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 23 433 pd output; -#X msg 99 405 MUTE; -#X text 139 406 <-- output amplitude; -#X obj 336 272 loadbang; -#X text 35 6 ANALOG SYNTH SEQUENCER; -#X obj 215 152 metro 100; -#X obj 214 178 f; -#X obj 248 181 + 1; -#X obj 248 205 mod 11; -#X graph graph1 0 36 11 96 511 197 711 97; -#X array array1 11 float 0; -#X pop; -#X floatatom 215 127 0 0 0; -#X floatatom 304 152 0 0 0; -#X obj 214 230 tabread array1; -#X obj 214 256 mtof; -#X obj 214 283 osc~ 0; -#X msg 26 171 1; -#X obj 24 303 *~; -#X obj 24 350 cos~; -#X obj 24 375 hip~ 5; -#X obj 24 327 +~ 0.1; -#X msg 336 298 \; array1 0 50 51 52 50 52 56 50 56 58 52 58; -#X floatatom 43 219 0 0 0; -#X floatatom 163 221 0 0 0; -#X floatatom 93 219 0 0 0; -#X floatatom 128 220 0 0 0; -#X msg 93 311 0; -#X msg 93 329 0.1; -#X msg 93 348 0.25; -#X msg 215 101 1; -#X text 244 101 <--START; -#X text 126 331 <--symmetry; -#X text 72 185 ADSR controls; -#X text 43 199 lvl; -#X text 95 200 A; -#X text 137 201 D; -#X text 170 202 S; -#X floatatom 298 181 0 0 0; -#X text 332 183 <--increment; -#X text 339 155 <--msec; -#X text 20 35 Analog synths had sequencers which could be used in a -wide variety of ways. You can use an array to hold a sequence of control -values as shown here.; -#X obj 23 274 adsr 1 65 13 10 1000; -#X obj 42 243 / 100; -#X text 336 340 You can also do microtones \; 50.5 is a quarter tone -sharper than 50; -#X text 505 431 updated for Pd version 0.34; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 21 0; -#X connect 6 0 7 0; -#X connect 6 0 16 0; -#X connect 7 0 8 0; -#X connect 7 0 13 0; -#X connect 8 0 9 0; -#X connect 9 0 7 1; -#X connect 11 0 6 0; -#X connect 12 0 6 1; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 17 1; -#X connect 16 0 41 0; -#X connect 17 0 20 0; -#X connect 18 0 19 0; -#X connect 19 0 1 0; -#X connect 20 0 18 0; -#X connect 22 0 42 0; -#X connect 23 0 41 4; -#X connect 24 0 41 2; -#X connect 25 0 41 3; -#X connect 26 0 20 1; -#X connect 27 0 20 1; -#X connect 28 0 20 1; -#X connect 29 0 11 0; -#X connect 37 0 8 1; -#X connect 41 0 17 0; -#X connect 42 0 41 1; diff --git a/pd/doc/3.audio.examples/43.monophonic.synth.pd b/pd/doc/3.audio.examples/43.monophonic.synth.pd deleted file mode 100644 index 26603430..00000000 --- a/pd/doc/3.audio.examples/43.monophonic.synth.pd +++ /dev/null @@ -1,135 +0,0 @@ -#N canvas 63 28 664 702 12; -#X floatatom 71 494 4 0 0; -#X floatatom 104 625 0 0 100; -#N canvas 269 205 698 344 output 0; -#X obj 388 156 t b; -#X obj 388 105 f; -#X obj 388 54 inlet; -#X obj 388 181 f; -#X msg 482 174 0; -#X msg 388 79 bang; -#X obj 388 130 moses 1; -#X obj 482 149 t b f; -#X obj 444 111 moses 1; -#X obj 91 148 dbtorms; -#X obj 444 86 r master-lvl; -#X obj 91 48 r master-lvl; -#X obj 388 207 s master-lvl; -#X obj 28 169 inlet~; -#X obj 213 195 inlet; -#X obj 229 218 s master-lvl; -#X msg 101 72 set \$1; -#X obj 101 98 outlet; -#X msg 213 241 \; pd dsp 1; -#X obj 91 201 line~; -#X obj 31 219 *~; -#X obj 31 247 dac~; -#X obj 91 173 pack 0 50; -#X text 17 149 audio in; -#X obj 28 194 hip~ 1; -#X connect 0 0 3 0; -#X connect 1 0 6 0; -#X connect 2 0 5 0; -#X connect 3 0 12 0; -#X connect 4 0 12 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 6 1 7 0; -#X connect 7 0 4 0; -#X connect 8 1 3 1; -#X connect 9 0 22 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 16 0; -#X connect 13 0 24 0; -#X connect 14 0 15 0; -#X connect 14 0 18 0; -#X connect 16 0 17 0; -#X connect 19 0 20 1; -#X connect 20 0 21 0; -#X connect 20 0 21 1; -#X connect 22 0 19 0; -#X connect 24 0 20 0; -#X restore 72 648 pd output; -#X msg 137 625 MUTE; -#X obj 71 521 mtof; -#X obj 77 345 stripnote; -#X obj 201 500 select; -#X obj 246 369 float; -#X obj 255 318 t b f; -#X obj 255 462 float; -#X text 318 310 f - store pitch below; -#X text 301 368 velocity stored here; -#X text 349 395 test velocity for note on or off; -#X text 301 425 note on; -#X text 201 408 note; -#X text 205 423 off; -#X text 308 464 recall pitch; -#X text 272 508 test against latest note-on pitch; -#X text 96 367 pitch \, only; -#X text 96 386 for note-on; -#X text 86 456 pitch; -#X text 197 6 MONOPHONIC MIDI SYNTH; -#X obj 79 308 unpack; -#X obj 80 228 notein; -#X obj 79 260 pack; -#X obj 71 547 osc~; -#X obj 71 573 *~; -#X obj 71 600 cos~; -#X obj 166 557 line~; -#X msg 121 526 \$1 100; -#X msg 201 526 0 1000; -#X obj 121 500 / 100; -#X text 81 74 First \, at top \, incoming MIDI notes are parsed and -used to set pitch and trigger an ADSR envelope. Second \, the envelope -generator itself has been extended to offer controls over the time -and target values via number boxes.; -#X text 82 25 This patch shows how to make a monophonic synthesizer -that could be controlled from a MIDI or voltage-control keyboard--in -this example we assume MIDI.; -#X text 350 658 updated for Pd version 0.34; -#X msg 237 256 55 64; -#X msg 237 282 55 0; -#X msg 181 230 48 200; -#X msg 180 257 48 64; -#X msg 180 283 48 0; -#X text 79 140 The note-off testing is complicated by the fact that -we have to test both that the velocity is zero \, and further that -the note-off pitch matches the pitch that is now playing (the most -recent note-on pitch.); -#X text 317 327 b - bang to recall velocity; -#X obj 246 417 sel 0; -#X connect 0 0 4 0; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 4 0 25 0; -#X connect 5 0 0 0; -#X connect 5 0 6 1; -#X connect 6 0 30 0; -#X connect 7 0 42 0; -#X connect 8 0 7 0; -#X connect 8 1 9 1; -#X connect 9 0 6 0; -#X connect 22 0 5 0; -#X connect 22 0 8 0; -#X connect 22 1 5 1; -#X connect 22 1 7 1; -#X connect 23 0 24 0; -#X connect 23 1 24 1; -#X connect 24 0 22 0; -#X connect 25 0 26 0; -#X connect 26 0 27 0; -#X connect 27 0 2 0; -#X connect 28 0 26 1; -#X connect 29 0 28 0; -#X connect 30 0 28 0; -#X connect 31 0 29 0; -#X connect 35 0 22 0; -#X connect 36 0 22 0; -#X connect 37 0 22 0; -#X connect 38 0 22 0; -#X connect 39 0 22 0; -#X connect 42 0 9 0; -#X connect 42 1 31 0; diff --git a/pd/doc/3.audio.examples/44.sample.hold.pd b/pd/doc/3.audio.examples/44.sample.hold.pd deleted file mode 100644 index ef504816..00000000 --- a/pd/doc/3.audio.examples/44.sample.hold.pd +++ /dev/null @@ -1,160 +0,0 @@ -#N canvas 186 95 944 489 12; -#X text 597 420 updated for Pd version 0.26; -#X floatatom 94 393 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 65 421 pd output; -#X msg 141 393 MUTE; -#X text 184 392 <-- output amplitude; -#N canvas 0 0 450 300 graph1 0; -#X array samphold 44100 float 0; -#X coords 0 1 44100 0 300 200 1; -#X restore 606 36 graph; -#N canvas 0 0 439 429 tables 1; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 78 55 graph; -#X text 280 148 0; -#X text 282 48 10; -#X text 97 158 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 85 232 graph; -#X text 95 340 ------ 130 samples ------; -#X text 294 325 0; -#X text 296 225 12000; -#X restore 648 280 pd tables; -#X text 67 8 SAMPLE AND HOLD; -#X obj 141 292 phasor~ 5; -#X obj 44 267 phasor~ 7; -#X obj 44 292 samphold~; -#X floatatom 44 242 0 0 0; -#X floatatom 141 237 0 0 0; -#X obj 216 345 tabwrite~ samphold; -#X msg 216 320 bang; -#X obj 44 367 tabread4~ mtof; -#X obj 44 317 *~ 48; -#X obj 44 342 +~ 36; -#X obj 44 392 osc~; -#X msg 216 262 0; -#X text 259 319 <--graph output; -#X obj 44 217 unpack; -#X text 254 259 <-- reset phase; -#X msg 311 131 32 96.33; -#X msg 124 131 5 7; -#X msg 44 131 1 5; -#X msg 78 131 2 11; -#X msg 161 131 3.7 8.8; -#X msg 235 131 3.4 8.9; -#X text 16 31 Another analog favorite \, the sample and hold unit freezes -an audio signal on command. In the Pd version \, the second input of -samphold~ triggers it \, and the first input becomes the output's new -value whenever the trigger decreases from one sample to the next. This -is ideal for updating values when a phasor wraps around.; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 8 0 10 1; -#X connect 9 0 10 0; -#X connect 10 0 16 0; -#X connect 10 0 13 0; -#X connect 11 0 9 0; -#X connect 12 0 8 0; -#X connect 14 0 13 0; -#X connect 15 0 18 0; -#X connect 16 0 17 0; -#X connect 17 0 15 0; -#X connect 18 0 2 0; -#X connect 19 0 8 1; -#X connect 19 0 9 1; -#X connect 21 0 11 0; -#X connect 21 1 12 0; -#X connect 23 0 21 0; -#X connect 24 0 21 0; -#X connect 25 0 21 0; -#X connect 26 0 21 0; -#X connect 27 0 21 0; -#X connect 28 0 21 0; diff --git a/pd/doc/3.audio.examples/45.envelope.follower.pd b/pd/doc/3.audio.examples/45.envelope.follower.pd deleted file mode 100644 index 0c3de2b4..00000000 --- a/pd/doc/3.audio.examples/45.envelope.follower.pd +++ /dev/null @@ -1,101 +0,0 @@ -#N canvas 64 77 982 581 12; -#X text 759 566 updated for Pd version 0.26; -#X text 67 8 ENVELOPE FOLLOWERS; -#X text 17 28 The env~ object reports ths RMS signal level over the last 256 samples (by default) or any other power of 2 that's at least twice the block size. The analysis is done in an overlapped fashion so that results appear every N/2 points if N is the analysis window size. So the larger the window \, the stabler the result and the less frequently it appears. Computation time doesn't depend heavily on N.; -#X text 471 28 Envelope followers are frequently used to detect attacks and periods of silence. (There are fancier attack detectors out there \, though.) Here is a simple threshold-based attack and rest detector.; -#X obj 152 160 dbtorms; -#X floatatom 75 142; -#X obj 75 165 osc~ 440; -#X obj 75 188 *~ 0; -#X obj 75 211 env~; -#X floatatom 136 216; -#X floatatom 152 137; -#X msg 219 155 \; pd dsp 1; -#X obj 87 307 t b f; -#X floatatom 87 330; -#X obj 94 385 pack; -#X text 198 215 note 3.01 dB difference between peak and RMS amplitudes.; -#X obj 94 408 route 0 1; -#X obj 94 431 > 55; -#X obj 139 433 < 45; -#X obj 94 454 sel 1; -#X obj 139 456 sel 1; -#X msg 16 494 1; -#X msg 45 494 0; -#X obj 94 494 print attack; -#X obj 87 365 != 0; -#X obj 517 267 t b f; -#X floatatom 517 290; -#X obj 524 348 pack; -#X obj 524 371 route 0 1; -#X obj 524 404 sel 1; -#X msg 458 525 1; -#X msg 488 525 0; -#X obj 517 326 != 0; -#X obj 547 290 < 45; -#X obj 542 441 timer; -#X obj 600 371 sel 0; -#X obj 616 496 sel 0; -#X obj 542 487 sel 1; -#X obj 542 528 print rest; -#X obj 542 464 > 1000; -#X text 125 330 state -- 1 if waiting for low threshold \,; -#X text 151 345 0 if we've attained it and now want the; -#X text 180 359 high one.; -#X text 165 408 route the RMS value according to state; -#X text 191 435 if off \, 55 dB means attack. If on \, 45; -#X text 192 456 dB or less means state changes to off.; -#X text 106 279 ATTACK DETECTION; -#X text 515 244 REST DETECTION; -#X text 590 288 Here we always will test RMS against a low value; -#X text 615 305 but as before we route the result according to; -#X text 637 322 our state \, 1 if "resting" \, 0 if not.; -#X text 645 368 regardless of state \, when RMS isn't low; -#X text 667 383 reset the timer; -#X text 691 511 RMS isn't low enough.; -#X text 602 403 If we're not in rest \, and the RMS is low \,; -#X text 626 419 check elapsed time sinse RMS last wasn't low.; -#X text 613 461 If more than 1 second \, report a rest.; -#X text 664 495 If we're at rest \, pop out of it when; -#X text 471 94 Both detectors are state machines with two states \, on and off. If on \, a test is run to determine whether to turn off \, and vice versa. The tests are run at each output of the rms~ object.; -#X connect 4 0 7 1; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 8 0 12 0; -#X connect 8 0 25 0; -#X connect 10 0 4 0; -#X connect 10 0 11 0; -#X connect 12 0 13 0; -#X connect 12 1 14 1; -#X connect 13 0 24 0; -#X connect 14 0 16 0; -#X connect 16 0 17 0; -#X connect 16 1 18 0; -#X connect 17 0 19 0; -#X connect 18 0 20 0; -#X connect 19 0 21 0; -#X connect 19 0 23 0; -#X connect 20 0 22 0; -#X connect 21 0 13 0; -#X connect 22 0 13 0; -#X connect 24 0 14 0; -#X connect 25 0 26 0; -#X connect 25 1 33 0; -#X connect 26 0 32 0; -#X connect 27 0 28 0; -#X connect 28 0 29 0; -#X connect 28 1 36 0; -#X connect 29 0 34 1; -#X connect 30 0 26 0; -#X connect 31 0 26 0; -#X connect 32 0 27 0; -#X connect 33 0 27 1; -#X connect 33 0 35 0; -#X connect 34 0 39 0; -#X connect 35 0 34 0; -#X connect 36 0 31 0; -#X connect 37 0 30 0; -#X connect 37 0 38 0; -#X connect 39 0 37 0; diff --git a/pd/doc/3.audio.examples/46.PART7.filters.pd b/pd/doc/3.audio.examples/46.PART7.filters.pd deleted file mode 100644 index 4a64a0b5..00000000 --- a/pd/doc/3.audio.examples/46.PART7.filters.pd +++ /dev/null @@ -1,72 +0,0 @@ -#N canvas 124 28 964 549 12; -#X floatatom 20 391; -#X floatatom 297 394; -#X floatatom 210 394; -#X graph graph1 0 -1 400 1 544 335 944 35; -#X array orig 400 float; -#X array lop 400 float; -#X array hip 400 float; -#X array bp 400 float; -#X pop; -#X obj 334 457 r metro; -#X obj 180 322 hip~ 100; -#X obj 105 320 lop~ 100; -#X obj 273 322 bp~ 100 10; -#X floatatom 255 245; -#X floatatom 338 295; -#X floatatom 118 393; -#X text 9 11 Filters; -#X msg 87 130 \; pd dsp 1 \; metro bang; -#X msg 191 135 \; pd dsp 0; -#X text 15 417 Original; -#X text 122 417 Low pass; -#X text 210 417 High pass; -#X text 298 416 Band pass; -#X obj 14 517 tabwrite~ orig; -#X obj 309 520 tabwrite~ bp; -#X obj 213 520 tabwrite~ hip; -#X obj 116 519 tabwrite~ lop; -#X text 97 110 start; -#X text 193 111 stop; -#X floatatom 14 235; -#X obj 14 261 osc~ 440; -#X text 51 236 <-- change frequency; -#X text 294 247 <-- center/rolloff frequency; -#X text 374 297 <-- Q; -#X text 548 341 This graph holds 4 arrays for the input and three filter outputs.; -#X text 375 389 RMS amplitudes of the original signal and the three filter outputs; -#X text 746 536 updated for Pd version 0.26; -#X obj 334 482 metro 1000; -#X text 29 33 Pd provides low \, high \, and band pass filters \, as shown here. By changing the test frequency \, the filter frequency \, and the "Q" value \, you can see how these filters affect the amplitude and phase of incoming signals; -#X obj 20 366 env~ 4096; -#X obj 118 368 env~ 4096; -#X obj 210 369 env~ 4096; -#X obj 297 369 env~ 4096; -#X obj 91 213 print~; -#X text 456 434 Notice how the phase of the graphed sinusoids slips back and forth... this is because graphing always starts on the nearest 64-sample boundary to the time the metronome fires. If you run at 48K the slippage disappears \, because then the metronome fires every 48K samples \, which is a multiple of 64; -#X connect 4 0 32 0; -#X connect 5 0 20 0; -#X connect 5 0 36 0; -#X connect 6 0 21 0; -#X connect 6 0 35 0; -#X connect 7 0 19 0; -#X connect 7 0 37 0; -#X connect 8 0 6 1; -#X connect 8 0 5 1; -#X connect 8 0 7 1; -#X connect 9 0 7 2; -#X connect 24 0 25 0; -#X connect 25 0 18 0; -#X connect 25 0 6 0; -#X connect 25 0 5 0; -#X connect 25 0 7 0; -#X connect 25 0 34 0; -#X connect 25 0 38 0; -#X connect 32 0 18 0; -#X connect 32 0 21 0; -#X connect 32 0 20 0; -#X connect 32 0 19 0; -#X connect 34 0 0 0; -#X connect 35 0 10 0; -#X connect 36 0 2 0; -#X connect 37 0 1 0; diff --git a/pd/doc/3.audio.examples/47.bandpass.pd b/pd/doc/3.audio.examples/47.bandpass.pd deleted file mode 100644 index 0ce9cc47..00000000 --- a/pd/doc/3.audio.examples/47.bandpass.pd +++ /dev/null @@ -1,146 +0,0 @@ -#N canvas 58 17 943 765 12; -#X floatatom 91 731 0 0 0; -#X graph graph1 0 -1 155947 1 624 401 824 251; -#X array array1 155948 float 0; -#X pop; -#X floatatom 247 705 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 210 740 pd output; -#X msg 280 707 MUTE; -#X text 320 706 <-- output amplitude; -#X obj 206 654 hip~ 5; -#X obj 31 545 tabread4~ array1; -#X obj 31 340 r totsamps; -#X obj 31 430 /; -#X obj 206 625 bp~; -#X obj 206 596 bp~; -#X obj 216 463 mtof; -#X floatatom 216 491 0 0 0; -#X floatatom 319 570 0 0 0; -#X obj 319 541 r q; -#X floatatom 216 434 0 0 0; -#X msg 227 550 \; p set \$1; -#X obj 216 406 r p; -#X obj 90 647 env~ 4096; -#X obj 31 487 *~ 0; -#X obj 31 458 phasor~ 0; -#X obj 31 516 +~ 1; -#X obj 227 521 ftom; -#X msg 826 49 \; pd dsp 0; -#X obj 90 674 + 0.5; -#X obj 91 702 int; -#X msg 31 400 44100; -#X obj 31 368 t b f; -#X text 648 14 START; -#X text 845 19 STOP; -#X text 88 11 BANDPASS FILTERS; -#X text 12 41 In this example we use two cascaded bandpass filters -to troll for partials in Jonathan Harvey's famous bell sample.; -#X obj 78 487 r totsamps; -#X text 14 82 Note that filters can give unexpected level changes. -The bp~ object is designed to have roughly unit gain at teh pass band -\, so the higher you set "Q" the more amplitude is lost. YOu can correct -for this by pushing the output amplitude \, but be sure to remember -to reset the output amplitude before you reduce Q again. I set the -Q to 100 and the output amplitude to 110 or 120 (with the room gain -way down.) Then holding the shift key \, slowly drag the center pitch -upward listening for modes.; -#X text 16 233 You can hear partials around 48 \, 51.3 \, 55 (faint!) -\, 57 (fainter!) \, 60 \, two beating partials around 65 \, 67 \, 69 -\, 70.9 \, 71.75 \, 72.6 \, 74 \, 74.65 \, 75.6 \, 77 \, 81.2 \, 84.6 -\, 86.5 \, and probably many more. There's also one down at 36 \, but -it's easier to see it on the meter than hear it.; -#X text 271 436 <-- center pitch; -#X text 281 450 (shift-drag to fine tune); -#X text 292 492 <-- center frequency; -#X text 359 570 <-- Q (filter selectivity); -#X obj 683 453 r readfile; -#X obj 683 530 soundfiler; -#X msg 683 503 read -resize \$1 array1; -#X obj 683 478 symbol; -#X msg 553 48 \; readfile ../sound/bell.aiff \; totsamps 143718 \; -p 69 \; q 0 \; pd dsp 1; -#X text 681 739 updated for Pd version 0.33; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 6 0 3 0; -#X connect 7 0 11 0; -#X connect 8 0 28 0; -#X connect 9 0 21 0; -#X connect 10 0 6 0; -#X connect 10 0 19 0; -#X connect 11 0 10 0; -#X connect 12 0 13 0; -#X connect 13 0 11 1; -#X connect 13 0 10 1; -#X connect 13 0 23 0; -#X connect 14 0 11 2; -#X connect 14 0 10 2; -#X connect 15 0 14 0; -#X connect 16 0 12 0; -#X connect 18 0 16 0; -#X connect 19 0 25 0; -#X connect 20 0 22 0; -#X connect 21 0 20 0; -#X connect 22 0 7 0; -#X connect 23 0 17 0; -#X connect 25 0 26 0; -#X connect 26 0 0 0; -#X connect 27 0 9 0; -#X connect 28 0 27 0; -#X connect 28 1 9 1; -#X connect 33 0 20 1; -#X connect 40 0 43 0; -#X connect 42 0 41 0; -#X connect 43 0 42 0; diff --git a/pd/doc/3.audio.examples/48.filter.sweep.pd b/pd/doc/3.audio.examples/48.filter.sweep.pd deleted file mode 100644 index 0d478275..00000000 --- a/pd/doc/3.audio.examples/48.filter.sweep.pd +++ /dev/null @@ -1,173 +0,0 @@ -#N canvas 194 58 693 586 12; -#X text 437 559 updated for Pd version 0.26; -#X floatatom 70 539 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 41 567 pd output; -#X msg 99 539 MUTE; -#X text 138 538 <-- output amplitude; -#X obj 41 212 line~; -#X floatatom 41 164 0 0 0; -#X obj 41 188 pack 0 100; -#X obj 528 110 loadbang; -#X text 35 6 SWEEPING FILTERS; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 302 48 graph; -#X text 504 141 0; -#X text 506 41 10; -#X text 321 151 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 309 225 graph; -#X text 319 333 ------ 130 samples ------; -#X text 518 318 0; -#X text 520 218 12000; -#X restore 461 256 pd conversion-tables; -#X obj 41 260 phasor~; -#X obj 41 236 tabread4~ mtof; -#X obj 174 384 +~; -#X obj 190 361 line~; -#X obj 190 337 pack 0 100; -#X floatatom 190 313 0 0 0; -#X floatatom 174 164 0 0 0; -#X floatatom 197 238 0 0 0; -#X obj 41 140 r pitch; -#X obj 197 214 r depth; -#X obj 174 140 r speed; -#X obj 190 289 r offset; -#X obj 121 465 r q; -#X floatatom 121 489 0 0 0; -#X obj 41 484 vcf~; -#X obj 41 508 hip~ 5; -#X obj 174 263 *~ 0; -#X obj 174 188 phasor~ 0; -#X obj 174 408 tabread4~ mtof; -#X msg 528 134 \; pitch 48 \; speed -2 \; depth 27 \; offset 56 \; -q 2; -#X text 160 490 <-- Q (selectivity); -#X text 51 277 sawtooth; -#X text 50 291 oscillator; -#X text 228 167 <-- sweep speed; -#X text 265 189 LFO for sweep; -#X text 251 241 <-- sweep depth; -#X text 242 316 <-- base center frequency; -#X text 218 383 add base to sweep; -#X text 307 408 convert to Hz.; -#X text 13 28 If you want actively changing center frequencies \, use -"vcf~" instead of "bp~". The vcf~ module takes an audio signal to set -center frequency. (Q is still set by messages though.) Vcf is somewhat -more expensive than bp~.; -#X text 78 165 <-- pitch; -#X text 13 95 Note the effect of negative and positive sweep speed. -; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 12 0; -#X connect 6 0 7 0; -#X connect 7 0 5 0; -#X connect 8 0 30 0; -#X connect 11 0 25 0; -#X connect 12 0 11 0; -#X connect 13 0 29 0; -#X connect 14 0 13 1; -#X connect 15 0 14 0; -#X connect 16 0 15 0; -#X connect 17 0 28 0; -#X connect 18 0 27 1; -#X connect 19 0 6 0; -#X connect 20 0 18 0; -#X connect 21 0 17 0; -#X connect 22 0 16 0; -#X connect 23 0 24 0; -#X connect 24 0 25 2; -#X connect 25 0 26 0; -#X connect 26 0 2 0; -#X connect 27 0 13 0; -#X connect 28 0 27 0; -#X connect 29 0 25 1; diff --git a/pd/doc/3.audio.examples/49.filter.floyd.pd b/pd/doc/3.audio.examples/49.filter.floyd.pd deleted file mode 100644 index 02027117..00000000 --- a/pd/doc/3.audio.examples/49.filter.floyd.pd +++ /dev/null @@ -1,193 +0,0 @@ -#N canvas 133 190 795 593 12; -#X floatatom 44 540 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 15 568 pd output; -#X msg 90 540 MUTE; -#X text 151 539 <-- output amplitude; -#X obj 487 217 loadbang; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 302 48 graph; -#X text 504 141 0; -#X text 506 41 10; -#X text 321 151 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 309 225 graph; -#X text 319 333 ------ 130 samples ------; -#X text 518 318 0; -#X text 520 218 12000; -#X restore 490 428 pd conversion-tables; -#X obj 250 308 line~; -#X obj 250 284 pack 0 100; -#X floatatom 251 213 0 0 0; -#X obj 171 413 r q; -#X floatatom 171 437 0 0 0; -#X obj 15 492 vcf~; -#X obj 15 516 hip~ 5; -#X obj 250 333 tabread4~ mtof; -#X text 214 436 <-- Q (selectivity); -#X text 277 354 convert to Hz.; -#X text 35 6 ANOTHER SWEEPING FILTER EXAMPLE; -#X obj 15 286 clip~ 0 0.5; -#X obj 15 310 *~ 2; -#X obj 15 334 -~; -#X text 121 270 trick to; -#X text 121 291 make symmetric; -#X text 121 312 triangle wave; -#X obj 31 161 f; -#X obj 64 159 + 1; -#X obj 31 211 tabread array1; -#X obj 31 235 mtof; -#X obj 31 113 r metro; -#X obj 64 183 mod 8; -#X obj 31 259 phasor~ 0; -#N canvas 0 0 450 300 graph1 0; -#X array array1 8 float 0; -#X coords 0 96 8 36 200 100 1; -#X restore 464 75 graph; -#X obj 251 189 r cf; -#X text 293 210 <-- center frequency; -#X obj 31 137 metro 85; -#X obj 15 376 hip~ 5000; -#X obj 15 399 *~ 100; -#X obj 252 237 moses 61; -#X msg 251 260 61; -#X msg 487 241 \; cf 61 \; q 30 \; metro 1 \; array1 0 45 48 50 48 -55 53 55 57; -#X text 13 28 Here's an approximate reconstruction of an old riff by -Pink Floyd (I haven't checked the tempo or transposition against the -original yet.) Because we're filtering a waveform with odd partials -\, it's easier to pick out the partials in the filtered sound.; -#X text 104 352 Here we fudge; -#X text 100 371 to better imitate; -#X text 100 390 the EMS3 bandpass; -#X text 85 403 sound; -#X text 340 231 protect against; -#X text 341 252 hitting the; -#X text 341 271 fundamental; -#X text 137 139 sequencer for; -#X text 137 158 8 note loop; -#X obj 171 459 moses 1; -#X msg 144 459 1; -#X text 241 460 speaker protection; -#X text 437 558 updated for Pd version 0.35; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 38 0; -#X connect 6 0 13 0; -#X connect 7 0 6 0; -#X connect 8 0 36 0; -#X connect 9 0 10 0; -#X connect 10 0 49 0; -#X connect 11 0 12 0; -#X connect 12 0 1 0; -#X connect 13 0 11 1; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 19 0 34 0; -#X connect 23 0 24 0; -#X connect 23 0 25 0; -#X connect 24 0 28 0; -#X connect 25 0 26 0; -#X connect 26 0 29 0; -#X connect 27 0 33 0; -#X connect 28 0 23 1; -#X connect 29 0 17 0; -#X connect 29 0 19 1; -#X connect 31 0 8 0; -#X connect 33 0 23 0; -#X connect 34 0 35 0; -#X connect 35 0 11 0; -#X connect 36 0 37 0; -#X connect 36 1 7 0; -#X connect 37 0 7 0; -#X connect 49 0 50 0; -#X connect 49 1 11 2; -#X connect 50 0 11 2; diff --git a/pd/doc/3.audio.examples/50.filter.noise.pd b/pd/doc/3.audio.examples/50.filter.noise.pd deleted file mode 100644 index 7421c180..00000000 --- a/pd/doc/3.audio.examples/50.filter.noise.pd +++ /dev/null @@ -1,196 +0,0 @@ -#N canvas 137 175 735 587 12; -#X text 437 559 updated for Pd version 0.26; -#X floatatom 67 397 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 38 425 pd output; -#X msg 96 397 MUTE; -#X text 135 396 <-- output amplitude; -#X obj 515 150 loadbang; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 70 45 graph; -#X text 272 138 0; -#X text 274 38 10; -#X text 89 148 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 77 222 graph; -#X text 87 330 ------ 130 samples ------; -#X text 286 315 0; -#X text 288 215 12000; -#N canvas 244 212 672 338 regenerate-tables 0; -#X msg 415 84 bang; -#X obj 415 113 t b b; -#X obj 474 177 f; -#X obj 512 177 + 1; -#X msg 483 147 0; -#X obj 415 142 until; -#X obj 474 211 t f f; -#X obj 414 238 mtof; -#X obj 405 202 sel 129; -#X obj 413 264 tabwrite mtof; -#X obj 35 227 moses 2; -#X msg 19 76 bang; -#X obj 19 105 t b b; -#X obj 90 166 f; -#X obj 128 166 + 1; -#X msg 112 138 0; -#X obj 19 134 until; -#X obj 11 194 sel 122; -#X msg 35 258 0; -#X obj 79 259 dbtorms; -#X obj 90 194 t f f; -#X obj 35 291 tabwrite dbtorms; -#X text 18 49 bang to recalculate dbtorms table; -#X text 356 50 bang to recalculate the mtof table; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 8 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 7 0; -#X connect 6 1 9 1; -#X connect 7 0 9 0; -#X connect 8 0 5 1; -#X connect 10 0 18 0; -#X connect 10 1 19 0; -#X connect 11 0 12 0; -#X connect 12 0 16 0; -#X connect 12 1 15 0; -#X connect 13 0 14 0; -#X connect 13 0 17 0; -#X connect 13 0 20 0; -#X connect 14 0 13 1; -#X connect 15 0 13 1; -#X connect 16 0 13 0; -#X connect 17 0 16 1; -#X connect 18 0 21 0; -#X connect 19 0 21 0; -#X connect 20 0 10 0; -#X connect 20 1 21 1; -#X restore 375 76 pd regenerate-tables; -#X restore 449 418 pd conversion-tables; -#X obj 49 201 line~; -#X obj 49 177 pack 0 100; -#X floatatom 49 151 0 0 0; -#X obj 88 254 r q; -#X floatatom 88 278 0 0 0; -#X obj 38 342 vcf~; -#X obj 38 366 hip~ 5; -#X obj 49 226 tabread4~ mtof; -#X text 124 277 <-- Q (selectivity); -#X obj 49 127 r cf; -#X text 84 145 <-- center frequency; -#X text 35 6 FILTERING NOISE; -#X obj 39 102 noise~; -#X msg 515 174 \; cf 60 \; q 3 \;; -#X text 13 28 THe noise~ module puts out unit-amplitude white noise. -Be careful again here about surging amplitudes if Q hits zero.; -#X obj 88 305 moses 1; -#X msg 60 305 1; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 20 0; -#X connect 7 0 14 0; -#X connect 8 0 7 0; -#X connect 9 0 8 0; -#X connect 10 0 11 0; -#X connect 11 0 22 0; -#X connect 12 0 13 0; -#X connect 13 0 2 0; -#X connect 14 0 12 1; -#X connect 16 0 9 0; -#X connect 19 0 12 0; -#X connect 22 0 23 0; -#X connect 22 1 12 2; -#X connect 23 0 12 2; diff --git a/pd/doc/3.audio.examples/51.ring.modulation.pd b/pd/doc/3.audio.examples/51.ring.modulation.pd deleted file mode 100644 index 0380a07d..00000000 --- a/pd/doc/3.audio.examples/51.ring.modulation.pd +++ /dev/null @@ -1,153 +0,0 @@ -#N canvas 1 23 809 567 12; -#X graph graph1 0 -1.02 882 1.02 542 471 742 341; -#X array pulse-output 882 float 0; -#X pop; -#X floatatom 101 331 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 63 359 pd output; -#X msg 139 332 MUTE; -#X text 179 331 <-- output amplitude; -#X floatatom 63 48 0 0 0; -#X obj 63 303 hip~ 5; -#X graph graph1 0 0 128 1000 490 259 746 129; -#X array spectrum 128 float 0; -#X pop; -#X obj 129 278 tabwrite~ pulse-output; -#X msg 129 243 bang; -#X text 170 244 <-- click to graph; -#N canvas 204 17 358 234 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 2048 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 74 281 pd fft; -#X text 488 265 0; -#X obj 79 194 osc~ 0; -#N canvas 0 0 600 384 pulse-train 0; -#X obj 185 162 line~; -#X obj 39 251 cos~; -#X obj 185 138 pack 0 50; -#X obj 40 178 -~ 0.5; -#X obj 40 204 *~; -#X obj 185 63 / 10; -#X obj 185 87 moses 0; -#X msg 185 111 0; -#X obj 39 227 clip~ -0.5 0.5; -#X obj 185 187 +~ 1; -#X obj 38 274 +~ 1; -#X obj 184 38 inlet; -#X obj 38 299 outlet~; -#X obj 40 154 phasor~ 344.532; -#X text 51 13 This is the pulse train generator from example 17; -#X connect 0 0 9 0; -#X connect 1 0 10 0; -#X connect 2 0 0 0; -#X connect 3 0 4 0; -#X connect 4 0 8 0; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 6 1 2 0; -#X connect 7 0 2 0; -#X connect 8 0 1 0; -#X connect 9 0 4 1; -#X connect 10 0 12 0; -#X connect 11 0 5 0; -#X connect 13 0 3 0; -#X restore 63 75 pd pulse-train; -#X floatatom 79 168 0 0 0; -#X text 124 167 <-- modulation frequency; -#X text 102 48 <-- bandwidth; -#X obj 63 218 *~; -#X text 736 262 2656 Hz.; -#X text 196 77 fundamental is 344.5 Hz; -#X text 157 210 an oscillator...; -#X text 66 22 RING MODULATION; -#X text 542 473 ---- 0.02 seconds ----; -#X text 528 533 updated for Pd version 0.34; -#X text 156 195 Just multiply by; -#X text 12 422 Ring modulation is just multiplication by an oscillator. -This patch shows the effect of ring modulation on a pulse train. When -bandwidth is high and modulation frequency is moderately low \, you -see the spectrum reflect off the "y axis".; -#X obj 79 140 * 344.5; -#X floatatom 79 114 0 0 0; -#X text 120 114 <-- modulation frequency as; -#X text 159 128 multiple of fundamental; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 14 0; -#X connect 6 0 2 0; -#X connect 9 0 8 0; -#X connect 9 0 11 1; -#X connect 13 0 18 1; -#X connect 14 0 18 0; -#X connect 15 0 13 0; -#X connect 18 0 11 0; -#X connect 18 0 6 0; -#X connect 18 0 8 0; -#X connect 27 0 15 0; -#X connect 28 0 27 0; diff --git a/pd/doc/3.audio.examples/52.ssb.modulation.pd b/pd/doc/3.audio.examples/52.ssb.modulation.pd deleted file mode 100644 index 968b3b45..00000000 --- a/pd/doc/3.audio.examples/52.ssb.modulation.pd +++ /dev/null @@ -1,150 +0,0 @@ -#N canvas 7 6 923 594 12; -#X obj 170 349 phasor~ 0; -#X obj 170 393 cos~; -#X obj 206 371 +~ -0.25; -#X obj 206 394 cos~; -#X obj 23 438 *~; -#X obj 88 438 *~; -#X obj 22 462 -~; -#X floatatom 170 322 0 0 0; -#X obj 23 238 tabread4~ array1; -#X obj 23 67 r totsamps; -#X obj 23 142 /; -#X obj 23 190 *~ 0; -#X obj 23 166 phasor~ 0; -#X obj 23 214 +~ 1; -#X msg 23 117 44100; -#X obj 23 91 t b f; -#X obj 62 190 r totsamps; -#X msg 636 38 \; pd dsp 0; -#X text 429 14 START; -#X text 653 20 STOP; -#X floatatom 51 499 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 22 527 pd output; -#X msg 87 500 MUTE; -#X text 121 499 <-- output amplitude; -#N canvas 0 0 600 388 hilbert 0; -#X obj 166 190 biquad~ 0.83774 -0.06338 0.06338 -0.83774 1; -#X obj 166 164 biquad~ 1.94632 -0.94657 0.94657 -1.94632 1; -#X obj 99 111 biquad~ -0.02569 0.260502 -0.260502 0.02569 1; -#X obj 99 137 biquad~ 1.8685 -0.870686 0.870686 -1.8685 1; -#X obj 98 76 inlet~; -#X obj 166 213 outlet~; -#X obj 99 213 outlet~; -#X text 95 261 This is a pair of all-pass filters whose outputs somehow -manage to be about 90 degrees out of phase from each other. I don't -know what phase relation they have with the original signal. I adapted -this from a 4X patch by Emmanuel Favreau \, circa 1982; -#X connect 0 0 5 0; -#X connect 1 0 0 0; -#X connect 2 0 3 0; -#X connect 3 0 6 0; -#X connect 4 0 1 0; -#X connect 4 0 2 0; -#X restore 23 400 pd hilbert; -#X graph graph1 0 -1 155947 1 441 284 641 134; -#X array array1 155948 float 0; -#X pop; -#X text 36 257 sample loop for; -#X text 36 271 test signal; -#X text 35 314 pair of allpass; -#X text 34 333 filters to make; -#X text 34 353 90 degree phase; -#X text 32 373 shifted versions; -#X text 201 323 <-- shift frequency; -#X text 122 438 <-- complex multiply; -#X text 123 452 (calculate real part); -#X text 161 412 cosine and sine waves; -#X text 55 7 SINGLE SIDEBAND MODULATION; -#X text 55 26 (AKA FREQUENCY SHIFTING); -#X text 394 296 The signal sideband modulator gives you only one sideband -for each frequency in teh input signal (whereas ring modulation gave -both a positie and negative sideband.) You can set the shift frequency -positive to shift all frequencies upward \, or negative to shift them -downwards.; -#X obj 484 417 r readfile; -#X msg 334 34 \; readfile ../sound/bell.aiff \; pd dsp 1; -#X obj 484 444 symbol; -#X msg 483 470 read -resize \$1 array1; -#X obj 483 496 soundfiler; -#X obj 483 521 s totsamps; -#X text 671 568 updated for Pd version 0.33; -#X connect 0 0 2 0; -#X connect 0 0 1 0; -#X connect 1 0 4 1; -#X connect 2 0 3 0; -#X connect 3 0 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 1; -#X connect 6 0 21 0; -#X connect 7 0 0 0; -#X connect 8 0 24 0; -#X connect 9 0 15 0; -#X connect 10 0 12 0; -#X connect 11 0 13 0; -#X connect 12 0 11 0; -#X connect 13 0 8 0; -#X connect 14 0 10 0; -#X connect 15 0 14 0; -#X connect 15 1 10 1; -#X connect 16 0 11 1; -#X connect 20 0 21 1; -#X connect 21 0 20 0; -#X connect 22 0 21 2; -#X connect 24 0 4 0; -#X connect 24 1 5 0; -#X connect 39 0 41 0; -#X connect 41 0 42 0; -#X connect 42 0 43 0; -#X connect 43 0 44 0; diff --git a/pd/doc/3.audio.examples/53.delays.pd b/pd/doc/3.audio.examples/53.delays.pd deleted file mode 100644 index 5c4f20de..00000000 --- a/pd/doc/3.audio.examples/53.delays.pd +++ /dev/null @@ -1,225 +0,0 @@ -#N canvas 22 1 729 584 12; -#X floatatom 62 506 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 33 534 pd output; -#X msg 91 506 MUTE; -#X text 130 505 <-- output amplitude; -#X obj 33 482 hip~ 5; -#X text 92 12 DELAYS; -#X obj 33 341 -~; -#X obj 30 241 tabread4~ mtof; -#X obj 33 317 *~ 3; -#X obj 69 318 *~ 2; -#X obj 49 266 phasor~; -#X floatatom 81 215 0 0 0; -#X obj 33 293 clip~ 0 0.667; -#X obj 30 190 line~; -#X obj 30 165 pack 0 1000; -#X obj 28 64 metro 1000; -#X obj 28 88 random 200; -#X obj 29 114 - 100; -#X obj 30 141 * 0.001; -#X obj 33 453 +~; -#X obj 44 374 delwrite~ delay1 2000; -#X floatatom 49 401 0 0 0; -#X obj 49 426 delread~ delay1 1000; -#X obj 27 41 loadbang; -#X text 210 37 You can delay a signal using the delwrite~ and delread~ -objects. In this example \, the pitch of the oscillator is varying -slightly so that the delayed signal is different from the straight -signal.; -#X text 212 99 delread always delays the signal an integer number of -samples and does no interpolation.; -#X text 211 137 The delwrite~ object creates the delay line \; you -give it a name and a size in milliseconds. Each delwrite~ should have -a different name.; -#X text 209 184 Delread~'s arguments are the name of a delwrite (of -which there should be exactly one) and a delay time in milliseconds -between 0 and the length of the delay line. Each delwrite~ may have -as many delread~s as you wish \, which function as multiple delay taps. -; -#X obj 30 215 +~ 60; -#X text 112 215 <-- pitch; -#X text 83 401 <-- delay time; -#X text 60 341 asymmetric triangle wave; -#X text 236 372 write to delay line; -#X text 232 425 read from delay line; -#X text 59 454 add the original and the delayed signal; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 70 45 graph; -#X text 272 138 0; -#X text 274 38 10; -#X text 89 148 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 77 222 graph; -#X text 87 330 ------ 130 samples ------; -#X text 286 315 0; -#X text 288 215 12000; -#N canvas 244 212 672 338 regenerate-tables 0; -#X msg 415 84 bang; -#X obj 415 113 t b b; -#X obj 474 177 f; -#X obj 512 177 + 1; -#X msg 483 147 0; -#X obj 415 142 until; -#X obj 474 211 t f f; -#X obj 414 238 mtof; -#X obj 405 202 sel 129; -#X obj 413 264 tabwrite mtof; -#X obj 35 227 moses 2; -#X msg 19 76 bang; -#X obj 19 105 t b b; -#X obj 90 166 f; -#X obj 128 166 + 1; -#X msg 112 138 0; -#X obj 19 134 until; -#X obj 11 194 sel 122; -#X msg 35 258 0; -#X obj 79 259 dbtorms; -#X obj 90 194 t f f; -#X obj 35 291 tabwrite dbtorms; -#X text 18 49 bang to recalculate dbtorms table; -#X text 356 50 bang to recalculate the mtof table; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 8 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 7 0; -#X connect 6 1 9 1; -#X connect 7 0 9 0; -#X connect 8 0 5 1; -#X connect 10 0 18 0; -#X connect 10 1 19 0; -#X connect 11 0 12 0; -#X connect 12 0 16 0; -#X connect 12 1 15 0; -#X connect 13 0 14 0; -#X connect 13 0 17 0; -#X connect 13 0 20 0; -#X connect 14 0 13 1; -#X connect 15 0 13 1; -#X connect 16 0 13 0; -#X connect 17 0 16 1; -#X connect 18 0 21 0; -#X connect 19 0 21 0; -#X connect 20 0 10 0; -#X connect 20 1 21 1; -#X restore 375 76 pd regenerate-tables; -#X restore 449 418 pd conversion-tables; -#X text 427 536 updated for Pd version 0.35; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 1 0; -#X connect 6 0 19 0; -#X connect 6 0 20 0; -#X connect 7 0 10 0; -#X connect 8 0 6 0; -#X connect 9 0 6 1; -#X connect 10 0 9 0; -#X connect 10 0 12 0; -#X connect 11 0 28 1; -#X connect 12 0 8 0; -#X connect 13 0 28 0; -#X connect 14 0 13 0; -#X connect 15 0 16 0; -#X connect 16 0 17 0; -#X connect 17 0 18 0; -#X connect 18 0 14 0; -#X connect 19 0 4 0; -#X connect 21 0 22 0; -#X connect 22 0 19 1; -#X connect 23 0 15 0; -#X connect 28 0 7 0; diff --git a/pd/doc/3.audio.examples/54.delay.loop.pd b/pd/doc/3.audio.examples/54.delay.loop.pd deleted file mode 100644 index 71b35253..00000000 --- a/pd/doc/3.audio.examples/54.delay.loop.pd +++ /dev/null @@ -1,213 +0,0 @@ -#N canvas 22 1 630 601 12; -#X text 309 531 updated for Pd version 0.26; -#X floatatom 58 505 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 29 533 pd output; -#X msg 87 505 MUTE; -#X text 126 504 <-- output amplitude; -#X obj 29 476 hip~ 5; -#X obj 29 297 -~; -#X obj 29 273 *~ 3; -#X obj 66 279 *~ 2; -#X floatatom 29 177 0 0 0; -#X obj 29 249 clip~ 0 0.667; -#X obj 39 450 delwrite~ delay1 2000; -#X floatatom 45 353 0 0 0; -#X text 79 176 <-- pitch; -#X text 75 352 <-- delay time; -#X text 238 450 write to delay line; -#X text 226 378 read from delay line; -#X text 64 426 add the original and the delayed signal; -#X obj 29 201 mtof; -#X msg 135 238 1; -#X obj 29 321 *~; -#X obj 29 225 phasor~ 0; -#X obj 135 286 tabread4~ dbtorms; -#X obj 135 262 adsr 100 100 2000 0 2000; -#X obj 29 427 +~; -#X obj 45 377 delread~ delay1 160; -#X obj 45 401 *~ 0.7; -#X text 103 401 feedback gain; -#X text 57 9 DELAYS WITH FEEDBACK; -#X text 33 39 You can feed the result of a delread~ module back into -its own delwrite~ \, as long as you're careful about stability. For -delays below 30 msec \, you can frequently hear teh resonant pitch. -For longer delay times you get the famous old delay loop effect.; -#X text 32 118 We've added an amplitude control here so that teh test -oscillator only speaks while you're dragging the pitch up and down. -Be sure to try the shift key.; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 70 45 graph; -#X text 272 138 0; -#X text 274 38 10; -#X text 89 148 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 77 222 graph; -#X text 87 330 ------ 130 samples ------; -#X text 286 315 0; -#X text 288 215 12000; -#N canvas 244 212 672 338 regenerate-tables 0; -#X msg 415 84 bang; -#X obj 415 113 t b b; -#X obj 474 177 f; -#X obj 512 177 + 1; -#X msg 483 147 0; -#X obj 415 142 until; -#X obj 474 211 t f f; -#X obj 414 238 mtof; -#X obj 405 202 sel 129; -#X obj 413 264 tabwrite mtof; -#X obj 35 227 moses 2; -#X msg 19 76 bang; -#X obj 19 105 t b b; -#X obj 90 166 f; -#X obj 128 166 + 1; -#X msg 112 138 0; -#X obj 19 134 until; -#X obj 11 194 sel 122; -#X msg 35 258 0; -#X obj 79 259 dbtorms; -#X obj 90 194 t f f; -#X obj 35 291 tabwrite dbtorms; -#X text 18 49 bang to recalculate dbtorms table; -#X text 356 50 bang to recalculate the mtof table; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 8 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 7 0; -#X connect 6 1 9 1; -#X connect 7 0 9 0; -#X connect 8 0 5 1; -#X connect 10 0 18 0; -#X connect 10 1 19 0; -#X connect 11 0 12 0; -#X connect 12 0 16 0; -#X connect 12 1 15 0; -#X connect 13 0 14 0; -#X connect 13 0 17 0; -#X connect 13 0 20 0; -#X connect 14 0 13 1; -#X connect 15 0 13 1; -#X connect 16 0 13 0; -#X connect 17 0 16 1; -#X connect 18 0 21 0; -#X connect 19 0 21 0; -#X connect 20 0 10 0; -#X connect 20 1 21 1; -#X restore 375 76 pd regenerate-tables; -#X restore 334 483 pd conversion-tables; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 2 0; -#X connect 6 0 20 0; -#X connect 7 0 6 0; -#X connect 8 0 6 1; -#X connect 9 0 18 0; -#X connect 9 0 19 0; -#X connect 10 0 7 0; -#X connect 12 0 25 0; -#X connect 18 0 21 0; -#X connect 19 0 23 0; -#X connect 20 0 24 0; -#X connect 21 0 8 0; -#X connect 21 0 10 0; -#X connect 22 0 20 1; -#X connect 23 0 22 0; -#X connect 24 0 11 0; -#X connect 24 0 5 0; -#X connect 25 0 26 0; -#X connect 26 0 24 1; diff --git a/pd/doc/3.audio.examples/55.delay.variable.pd b/pd/doc/3.audio.examples/55.delay.variable.pd deleted file mode 100644 index bb16de95..00000000 --- a/pd/doc/3.audio.examples/55.delay.variable.pd +++ /dev/null @@ -1,129 +0,0 @@ -#N canvas 100 17 671 522 12; -#X obj 63 306 hip~ 10; -#X floatatom 331 222; -#X obj 331 270 line~; -#X obj 331 246 pack 0 100; -#X floatatom 256 192; -#X floatatom 442 297; -#X obj 442 369 line~; -#X obj 442 345 pack 0 100; -#X obj 442 321 * 0.01; -#X floatatom 143 167; -#X obj 143 238 line~; -#X obj 143 214 pack 0 100; -#X obj 63 258 *~; -#X obj 63 282 cos~; -#X floatatom 63 135; -#X obj 63 159 mtof; -#X obj 63 183 * 0.5; -#X obj 63 330 clip~ -0.2 0.2; -#X obj 143 190 * 0.01; -#X obj 426 444 delwrite~ delay1 1000; -#X obj 63 354 +~; -#X obj 426 396 *~; -#X obj 256 336 vd~ delay1; -#X obj 256 288 *~; -#X obj 256 216 / 100; -#X floatatom 93 419; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 64 447 pd output; -#X msg 122 419 MUTE; -#X text 161 418 <-- output amplitude; -#X obj 63 378 hip~ 5; -#X text 401 505 updated for Pd version 0.26; -#X obj 256 264 +~ 1; -#X obj 256 240 osc~ 0; -#X obj 256 312 +~ 1.46; -#X obj 426 420 clip~ -5 5; -#X text 43 35 This is a fuzzed FM generator going into a delay loop \, this time using a variable delay object (vd~). You can get several interesting effects this way. We have taken the precaution if clipping inside the loop to avoid instabilities. You can push the loop gain past 1 if you want \, it will just uscillate.; -#X text 184 165 <-- timbre; -#X text 96 136 <-- pitch; -#X text 300 192 <-- cycle frequency (hundredths); -#X text 361 222 <-- cycle depth (msec); -#X text 491 298 <-- feedback (hundredths); -#X text 86 9 VARIABLE DELAYS; -#X obj 63 207 osc~ 0; -#X connect 0 0 17 0; -#X connect 1 0 3 0; -#X connect 2 0 23 1; -#X connect 3 0 2 0; -#X connect 4 0 24 0; -#X connect 5 0 8 0; -#X connect 6 0 21 1; -#X connect 7 0 6 0; -#X connect 8 0 7 0; -#X connect 9 0 18 0; -#X connect 10 0 12 1; -#X connect 11 0 10 0; -#X connect 12 0 13 0; -#X connect 13 0 0 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 42 0; -#X connect 17 0 20 0; -#X connect 18 0 11 0; -#X connect 20 0 29 0; -#X connect 21 0 34 0; -#X connect 22 0 20 1; -#X connect 23 0 33 0; -#X connect 24 0 32 0; -#X connect 25 0 26 1; -#X connect 26 0 25 0; -#X connect 27 0 26 2; -#X connect 29 0 26 0; -#X connect 29 0 21 0; -#X connect 31 0 23 0; -#X connect 32 0 31 0; -#X connect 33 0 22 0; -#X connect 34 0 19 0; -#X connect 42 0 12 0; diff --git a/pd/doc/3.audio.examples/56.delay.pitchshift.pd b/pd/doc/3.audio.examples/56.delay.pitchshift.pd deleted file mode 100644 index feb56e2f..00000000 --- a/pd/doc/3.audio.examples/56.delay.pitchshift.pd +++ /dev/null @@ -1,226 +0,0 @@ -#N canvas 93 36 1005 580 12; -#X obj 19 493 hip~ 5; -#X floatatom 19 87 0 0 0; -#X obj 84 359 *~; -#X obj 192 290 line~; -#X floatatom 265 114 0 0 0; -#X text 68 9 PITCH SHIFTER; -#X obj 192 264 pack 0 200; -#X obj 266 141 moses 1; -#X msg 227 141 1; -#X obj 266 88 r window; -#X obj 19 61 r transpose; -#X obj 19 143 exp; -#X floatatom 19 169 0 0 0; -#X obj 19 259 /; -#X obj 146 189 * 0.001; -#X obj 314 366 line~; -#X obj 315 338 pack 0 200; -#X floatatom 315 258 0 0 0; -#X text 314 202 delay (msec); -#X obj 315 232 r delay; -#X obj 84 385 +~; -#X msg 315 311 1; -#X obj 315 285 moses 1.5; -#X obj 84 411 vd~ delay1; -#X obj 19 410 cos~; -#X obj 19 437 *~; -#X obj 19 466 +~; -#X obj 106 317 wrap~; -#X obj 251 360 *~; -#X obj 251 393 +~; -#X obj 251 422 vd~ delay1; -#X obj 188 420 cos~; -#X obj 188 447 *~; -#X msg 492 56 \; transpose 0 \; window 100 \; delay 0; -#X obj 492 30 loadbang; -#X obj 264 42 delwrite~ delay1 5000; -#X obj 146 216 t b f; -#X floatatom 19 285 0 0 0; -#X obj 19 312 phasor~ 0; -#X floatatom 51 526 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 372 176 t b; -#X obj 372 121 f; -#X obj 372 66 inlet; -#X text 378 32 mute; -#X obj 372 204 f; -#X msg 468 196 0; -#X msg 372 94 bang; -#X obj 372 149 moses 1; -#X obj 468 168 t b f; -#X obj 437 129 moses 1; -#X obj 91 163 dbtorms; -#X obj 437 101 r master-lvl; -#X obj 91 46 r master-lvl; -#X obj 372 231 s master-lvl; -#X obj 24 199 inlet~; -#X obj 219 45 inlet; -#X text 219 20 level; -#X obj 219 110 s master-lvl; -#X msg 106 72 set \$1; -#X obj 106 98 outlet; -#X msg 235 70 \; pd dsp 1; -#X obj 91 213 line~; -#X obj 24 233 *~; -#X obj 24 265 dac~; -#X obj 91 188 pack 0 50; -#X text 22 174 audio; -#X text 102 121 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 19 557 pd output; -#X msg 83 526 MUTE; -#X text 125 525 <-- output amplitude; -#X obj 106 290 +~ 0.5; -#X obj 19 358 -~ 0.5; -#X obj 19 384 *~ 0.5; -#X obj 188 359 -~ 0.5; -#X obj 188 392 *~ 0.5; -#X floatatom 227 167 0 0 0; -#X obj 19 196 - 1; -#X obj 19 117 * 0.05776; -#X obj 19 222 * -1; -#X text 53 86 <-- transposition; -#X text 96 99 (halftones); -#X text 86 177 speed; -#X text 85 191 change; -#X text 310 113 <--window (msec); -#X text 54 252 tape head; -#X text 55 265 rotation speed; -#N canvas 0 0 612 637 test-input 0; -#X graph graph1 0 -1 155947 1 150 291 350 141; -#X array array1 155948 float 0; -#X pop; -#X obj 139 518 tabread4~ array1; -#X obj 139 333 r totsamps; -#X obj 139 413 /; -#X obj 139 465 *~ 0; -#X obj 139 439 phasor~ 0; -#X obj 139 492 +~ 1; -#X msg 139 386 44100; -#X obj 139 360 t b f; -#X obj 182 469 r totsamps; -#X text 153 538 sample loop for; -#X text 153 555 test signal; -#X obj 162 30 loadbang; -#X obj 139 590 outlet~; -#X obj 393 169 r readfile; -#X obj 393 199 symbol; -#X msg 392 228 read -resize \$1 array1; -#X obj 392 256 soundfiler; -#X obj 392 284 s totsamps; -#X msg 161 64 \; readfile ../sound/bell.aiff; -#X connect 1 0 13 0; -#X connect 2 0 8 0; -#X connect 3 0 5 0; -#X connect 4 0 6 0; -#X connect 5 0 4 0; -#X connect 6 0 1 0; -#X connect 7 0 3 0; -#X connect 8 0 7 0; -#X connect 8 1 3 1; -#X connect 9 0 4 1; -#X connect 12 0 19 0; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 17 0; -#X connect 17 0 18 0; -#X restore 264 11 pd test-input; -#X text 439 161 This is a classic rotating-tape-head style pitch shifter -using the vd~ variable delay object. Ther are two moving tape heads -\, each of which is loudest at the middle of its trajectory \, and -enveloped out at the moment it has to jump back (or forward) to start -another scratch. Most of the brain work is in computing how fast the -tape heads have to move to get the desired transposition.; -#X text 439 280 The "window size" is the total trajectory of the read -points in the delay line \, in milliseconds. The delay times are controlled -by a phasor~ object. The second delay time \, 180 degrees out of phase -from the first one \, is computed using the "wrap" object.; -#X text 437 370 The "window size" is the total trajectory of the read -points in the delay line \, in milliseconds. The delay times are controlled -by a phasor~ object. The second delay time \, 180 degrees out of phase -from the first one \, is computed using the "wrap" object.; -#X text 436 462 The cos~ objects compute the fadein and fadeout of -the two delay line outputs. They each traverse the positive half of -the cosine waveform (phase -0.25 to +0.25) over the time the phase -goes from one end to the other.; -#X text 757 557 updated for Pd version 0.33; -#X connect 0 0 40 0; -#X connect 1 0 50 0; -#X connect 2 0 20 0; -#X connect 3 0 2 1; -#X connect 3 0 28 1; -#X connect 4 0 7 0; -#X connect 6 0 3 0; -#X connect 7 0 8 0; -#X connect 7 1 48 0; -#X connect 8 0 48 0; -#X connect 9 0 4 0; -#X connect 10 0 1 0; -#X connect 11 0 12 0; -#X connect 12 0 49 0; -#X connect 13 0 37 0; -#X connect 14 0 36 0; -#X connect 15 0 20 1; -#X connect 15 0 29 1; -#X connect 16 0 15 0; -#X connect 17 0 22 0; -#X connect 19 0 17 0; -#X connect 20 0 23 0; -#X connect 21 0 16 0; -#X connect 22 0 21 0; -#X connect 22 1 16 0; -#X connect 23 0 25 1; -#X connect 24 0 25 0; -#X connect 25 0 26 0; -#X connect 26 0 0 0; -#X connect 27 0 28 0; -#X connect 27 0 46 0; -#X connect 28 0 29 0; -#X connect 29 0 30 0; -#X connect 30 0 32 1; -#X connect 31 0 32 0; -#X connect 32 0 26 1; -#X connect 34 0 33 0; -#X connect 36 0 13 0; -#X connect 36 1 13 1; -#X connect 37 0 38 0; -#X connect 38 0 2 0; -#X connect 38 0 44 0; -#X connect 38 0 43 0; -#X connect 39 0 40 1; -#X connect 40 0 39 0; -#X connect 41 0 40 2; -#X connect 43 0 27 0; -#X connect 44 0 45 0; -#X connect 45 0 24 0; -#X connect 46 0 47 0; -#X connect 47 0 31 0; -#X connect 48 0 6 0; -#X connect 48 0 14 0; -#X connect 49 0 51 0; -#X connect 50 0 11 0; -#X connect 51 0 13 0; -#X connect 59 0 35 0; diff --git a/pd/doc/3.audio.examples/57.delay.reverb.pd b/pd/doc/3.audio.examples/57.delay.reverb.pd deleted file mode 100644 index aad17023..00000000 --- a/pd/doc/3.audio.examples/57.delay.reverb.pd +++ /dev/null @@ -1,316 +0,0 @@ -#N canvas 127 171 643 406 12; -#N canvas 0 0 499 321 test-input 0; -#X obj 75 253 outlet~; -#X obj 74 201 -~; -#X obj 74 177 *~ 3; -#X obj 111 183 *~ 2; -#X floatatom 74 81 0 0 0; -#X obj 74 153 clip~ 0 0.667; -#X text 124 80 <-- pitch; -#X obj 74 105 mtof; -#X msg 195 142 1; -#X obj 74 225 *~; -#X obj 74 129 phasor~ 0; -#X obj 195 190 tabread4~ dbtorms; -#X obj 195 166 adsr 100 100 2000 0 2000; -#X obj 73 54 inlet; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 70 45 graph; -#X text 272 138 0; -#X text 274 38 10; -#X text 89 148 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 77 222 graph; -#X text 87 330 ------ 130 samples ------; -#X text 286 315 0; -#X text 288 215 12000; -#N canvas 244 212 672 338 regenerate-tables 0; -#X msg 415 84 bang; -#X obj 415 113 t b b; -#X obj 474 177 f; -#X obj 512 177 + 1; -#X msg 483 147 0; -#X obj 415 142 until; -#X obj 474 211 t f f; -#X obj 414 238 mtof; -#X obj 405 202 sel 129; -#X obj 413 264 tabwrite mtof; -#X obj 35 227 moses 2; -#X msg 19 76 bang; -#X obj 19 105 t b b; -#X obj 90 166 f; -#X obj 128 166 + 1; -#X msg 112 138 0; -#X obj 19 134 until; -#X obj 11 194 sel 122; -#X msg 35 258 0; -#X obj 79 259 dbtorms; -#X obj 90 194 t f f; -#X obj 35 291 tabwrite dbtorms; -#X text 18 49 bang to recalculate dbtorms table; -#X text 356 50 bang to recalculate the mtof table; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 8 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 7 0; -#X connect 6 1 9 1; -#X connect 7 0 9 0; -#X connect 8 0 5 1; -#X connect 10 0 18 0; -#X connect 10 1 19 0; -#X connect 11 0 12 0; -#X connect 12 0 16 0; -#X connect 12 1 15 0; -#X connect 13 0 14 0; -#X connect 13 0 17 0; -#X connect 13 0 20 0; -#X connect 14 0 13 1; -#X connect 15 0 13 1; -#X connect 16 0 13 0; -#X connect 17 0 16 1; -#X connect 18 0 21 0; -#X connect 19 0 21 0; -#X connect 20 0 10 0; -#X connect 20 1 21 1; -#X restore 375 76 pd regenerate-tables; -#X restore 260 101 pd conversion-tables; -#X connect 1 0 9 0; -#X connect 2 0 1 0; -#X connect 3 0 1 1; -#X connect 4 0 7 0; -#X connect 4 0 8 0; -#X connect 5 0 2 0; -#X connect 7 0 10 0; -#X connect 8 0 12 0; -#X connect 9 0 0 0; -#X connect 10 0 3 0; -#X connect 10 0 5 0; -#X connect 11 0 9 1; -#X connect 12 0 11 0; -#X connect 13 0 4 0; -#X restore 75 129 pd test-input; -#X text 328 322 updated for Pd version 0.26; -#X text 62 8 REVERBERATOR; -#X floatatom 75 100 0 0 0; -#X text 126 105 <-- pitch; -#X floatatom 137 219 0 0 0; -#N canvas 159 26 618 379 output 0; -#X obj 393 156 t b; -#X obj 393 106 f; -#X obj 393 56 inlet; -#X text 399 25 mute; -#X obj 393 181 f; -#X msg 480 174 0; -#X msg 393 81 bang; -#X obj 393 131 moses 1; -#X obj 480 149 t b f; -#X obj 452 113 moses 1; -#X obj 138 144 dbtorms; -#X obj 452 88 r master-lvl; -#X obj 138 38 r master-lvl; -#X obj 393 206 s master-lvl; -#X obj 22 140 inlet~; -#X obj 254 37 inlet; -#X text 254 14 level; -#X obj 254 96 s master-lvl; -#X msg 151 61 set \$1; -#X obj 151 85 outlet; -#X msg 269 60 \; pd dsp 1; -#X obj 138 190 line~; -#X obj 22 231 *~; -#X obj 138 167 pack 0 50; -#X text 34 118 audio; -#X text 148 106 show level; -#X obj 73 140 inlet~; -#X obj 73 232 *~; -#X obj 22 260 dac~ 1; -#X obj 73 260 dac~ 2; -#X obj 22 182 hip~ 5; -#X obj 73 181 hip~ 5; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 23 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 30 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 21 0 27 1; -#X connect 22 0 28 0; -#X connect 23 0 21 0; -#X connect 26 0 31 0; -#X connect 27 0 29 0; -#X connect 30 0 22 0; -#X connect 31 0 27 0; -#X restore 75 247 pd output; -#X msg 166 219 MUTE; -#X text 184 217 <-- output amplitude; -#N canvas 137 269 1056 577 reverb 0; -#X obj 77 37 inlet~; -#X obj 77 85 echo echo-del2 8.45346; -#X obj 77 61 echo echo-del1 5.43216; -#X obj 77 109 echo echo-del3 13.4367; -#X obj 77 133 echo echo-del4 21.5463; -#X obj 77 157 echo echo-del5 34.3876; -#X obj 77 181 echo echo-del6 55.5437; -#X obj 253 545 delwrite~ loop-del1 70; -#X obj 295 157 delread~ loop-del1 70; -#X obj 466 157 delread~ loop-del2 81.9345; -#X obj 416 545 delwrite~ loop-del2 81.9345; -#X obj 665 154 delread~ loop-del3 94.7545; -#X obj 855 154 delread~ loop-del4 115.945; -#X obj 622 545 delwrite~ loop-del3 94.7545; -#X obj 820 545 delwrite~ loop-del4 115.945; -#X obj 282 215 +~; -#X obj 443 215 +~; -#X obj 187 251 outlet~; -#X obj 364 244 outlet~; -#X obj 251 337 +~; -#X obj 619 328 +~; -#X obj 408 334 -~; -#X obj 791 327 -~; -#X obj 251 391 +~; -#X obj 411 397 +~; -#X obj 615 407 -~; -#X obj 785 388 -~; -#X obj 620 474 *~ 0; -#X obj 620 511 lop~ 5000; -#X obj 415 472 *~ 0; -#X obj 415 510 lop~ 5000; -#X obj 246 475 *~ 0; -#X obj 246 513 lop~ 5000; -#X obj 821 472 *~ 0; -#X obj 821 506 lop~ 5000; -#X obj 924 254 inlet; -#X obj 924 278 moses 100; -#X obj 926 325 moses -100; -#X msg 979 303 100; -#X msg 930 349 -100; -#X obj 934 386 / 200; -#X connect 0 0 2 0; -#X connect 1 0 3 0; -#X connect 1 1 3 1; -#X connect 2 0 1 0; -#X connect 2 1 1 1; -#X connect 3 0 4 0; -#X connect 3 1 4 1; -#X connect 4 0 5 0; -#X connect 4 1 5 1; -#X connect 5 0 6 0; -#X connect 5 1 6 1; -#X connect 6 0 15 0; -#X connect 6 1 16 0; -#X connect 8 0 15 1; -#X connect 9 0 16 1; -#X connect 11 0 19 1; -#X connect 11 0 21 1; -#X connect 12 0 20 1; -#X connect 12 0 22 1; -#X connect 15 0 17 0; -#X connect 15 0 19 0; -#X connect 15 0 21 0; -#X connect 16 0 18 0; -#X connect 16 0 20 0; -#X connect 16 0 22 0; -#X connect 19 0 23 0; -#X connect 19 0 25 0; -#X connect 20 0 25 1; -#X connect 20 0 23 1; -#X connect 21 0 24 0; -#X connect 21 0 26 0; -#X connect 22 0 24 1; -#X connect 22 0 26 1; -#X connect 23 0 27 0; -#X connect 24 0 29 0; -#X connect 25 0 31 0; -#X connect 26 0 33 0; -#X connect 27 0 28 0; -#X connect 28 0 13 0; -#X connect 29 0 30 0; -#X connect 30 0 10 0; -#X connect 31 0 32 0; -#X connect 32 0 7 0; -#X connect 33 0 34 0; -#X connect 34 0 14 0; -#X connect 35 0 36 0; -#X connect 36 0 37 0; -#X connect 36 1 38 0; -#X connect 37 0 39 0; -#X connect 37 1 40 0; -#X connect 38 0 37 0; -#X connect 39 0 40 0; -#X connect 40 0 33 1; -#X connect 40 0 31 1; -#X connect 40 0 29 1; -#X connect 40 0 27 1; -#X restore 50 193 pd reverb; -#X floatatom 108 163 0 0 0; -#X text 143 163 <-- feedback (100 maximum); -#X text 32 41 Here is a simple recirculating reverberator. "Feedback" -should be between -100 and 100; -#X text 37 285 You can spend a lifetime tweaking reverberators... we'll -just leave it at that for now.; -#X connect 0 0 9 0; -#X connect 0 0 6 0; -#X connect 3 0 0 0; -#X connect 5 0 6 2; -#X connect 6 0 5 0; -#X connect 7 0 6 3; -#X connect 9 0 6 0; -#X connect 9 1 6 1; -#X connect 10 0 9 1; diff --git a/pd/doc/3.audio.examples/58.PART8.moreFM.pd b/pd/doc/3.audio.examples/58.PART8.moreFM.pd deleted file mode 100644 index 1b0e112b..00000000 --- a/pd/doc/3.audio.examples/58.PART8.moreFM.pd +++ /dev/null @@ -1,132 +0,0 @@ -#N canvas 25 100 785 694 12; -#X floatatom 197 602 0 0 0; -#N canvas 159 26 541 274 output 0; -#X obj 351 166 t b; -#X obj 351 114 f; -#X obj 351 62 inlet; -#X text 358 30 mute; -#X obj 351 192 f; -#X msg 442 186 0; -#X msg 351 88 bang; -#X obj 351 140 moses 1; -#X obj 413 114 moses 1; -#X obj 86 153 dbtorms; -#X obj 413 88 r master-lvl; -#X obj 86 44 r master-lvl; -#X obj 351 218 s master-lvl; -#X obj 12 166 inlet~; -#X obj 207 43 inlet; -#X text 207 19 level; -#X obj 207 104 s master-lvl; -#X msg 100 67 set \$1; -#X obj 100 93 outlet; -#X msg 222 67 \; pd dsp 1; -#X obj 86 205 line~; -#X obj 12 218 *~; -#X obj 12 244 dac~; -#X obj 86 179 pack 0 50; -#X text 12 142 audio; -#X text 100 118 show level; -#X obj 12 192 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 158 630 pd output; -#X msg 234 602 MUTE; -#X text 528 618 updated for Pd version 0.34; -#X text 277 601 <-- output; -#X text 79 4 FM \, PWM \, PAF as formant generators; -#X text 39 22 The next several patches illustrate "Synthesizing Sounds -with Specified \, Time-Varying Spectra" presented at ICMC 2001 and -reprinted on http://www.crca.ucsd.edu/~msp/publications.html.; -#X obj 146 468 line~; -#X obj 146 444 pack 0 50; -#X floatatom 146 389 0 0 0; -#X obj 124 493 *~; -#X text 145 367 index; -#X floatatom 248 398 0 0 0; -#X text 250 370 carrier freq; -#X obj 158 547 cos~; -#X graph graph1 0 0 128 500 499 556 755 426; -#X array spectrum 128 float 0; -#X pop; -#X msg 233 546 bang; -#X text 271 543 <-- click to graph; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 187 574 pd fft; -#X text 490 562 0; -#X text 738 559 5512; -#X obj 153 520 +~; -#X obj 248 448 phasor~; -#X obj 23 458 osc~ 172.266; -#X obj 146 417 / 100; -#X obj 248 422 * 172.266; -#X text 34 93 First compare this phase modulation example with the -ring modulation example from the section on processing (patch 51). -Here we choose a convenient \, fixed modulation frequency and consider -the effect of changing carrier frequency and modulation index. It's -exactly as if the carrier frequency were a ring modulation frequency. -; -#X text 33 331 Next we'll look at two techniques for sliding a formant -frequency without losing harmonicity.; -#X text 33 191 Using either method we can synthesize the hat-shaped -spectra called "formants." However \, if you try to move the formant -up or down in frequency \, you'll lose harmonicity \; the partials -are only integer multiples of the fundamental \, 172.266 \, when the -carrier is an integer multiple. To hear this \, set index to 20 and -carrier frequency to zero \, and scroll carrier through integers. Then -shift-drag on the carrier frequency to change it in hundredths. Presto -\, inharmonic sounds...; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 7 0 10 1; -#X connect 8 0 7 0; -#X connect 9 0 24 0; -#X connect 10 0 21 0; -#X connect 12 0 25 0; -#X connect 14 0 1 0; -#X connect 14 0 18 0; -#X connect 16 0 18 1; -#X connect 21 0 14 0; -#X connect 22 0 21 1; -#X connect 23 0 10 0; -#X connect 24 0 8 0; -#X connect 25 0 22 0; diff --git a/pd/doc/3.audio.examples/59.packets.pd b/pd/doc/3.audio.examples/59.packets.pd deleted file mode 100644 index 072ae27d..00000000 --- a/pd/doc/3.audio.examples/59.packets.pd +++ /dev/null @@ -1,161 +0,0 @@ -#N canvas 83 221 878 705 12; -#X obj 315 424 line~; -#X obj 47 517 cos~; -#X graph graph1 0 -2 882 2 644 469 844 339; -#X array pulse-output 882 float 0; -#X pop; -#X floatatom 84 633 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 48 660 pd output; -#X msg 124 633 MUTE; -#X obj 315 400 pack 0 50; -#X floatatom 315 328 0 0 0; -#X obj 47 429 -~ 0.5; -#X obj 47 468 *~; -#X obj 315 352 / 10; -#X obj 47 493 clip~ -0.5 0.5; -#X text 315 306 bandwidth; -#X msg 165 602 bang; -#X obj 315 448 +~ 1; -#X obj 48 540 +~ 1; -#X obj 197 513 cos~; -#X obj 48 569 *~; -#X floatatom 219 342 4 0 0; -#X obj 219 366 / 10; -#X text 644 472 --- 0.02 seconds ---; -#X obj 197 487 *~; -#N canvas 204 427 939 588 graph 0; -#X obj 91 345 inlet~; -#X obj 729 341 inlet; -#X obj 74 395 tabwrite~ pulse-output; -#X obj 319 350 inlet~; -#X obj 493 343 inlet~; -#X obj 302 400 tabwrite~ window; -#X obj 484 401 tabwrite~ carrier; -#X msg 390 53 \; array2 rename window; -#X connect 0 0 2 0; -#X connect 1 0 2 0; -#X connect 1 0 5 0; -#X connect 1 0 6 0; -#X connect 3 0 5 0; -#X connect 4 0 6 0; -#X restore 76 602 pd graph; -#X obj 315 376 max 0; -#X obj 219 438 line~; -#X obj 219 414 pack 0 50; -#X obj 219 390 max 0; -#X graph graph3 0 -2 881 2 644 328 844 188; -#X array carrier 882 float 0; -#X pop; -#X graph graph4 0 -2 881 2 645 175 845 35; -#X array window 882 float 0; -#X pop; -#X text 211 601 <-- graph; -#X floatatom 47 381 4 0 0; -#X obj 47 405 phasor~ 100; -#X text 31 2 WINDOWED PACKETS; -#X text 169 632 <-- output; -#X text 43 356 freq.; -#X text 43 337 fundamental; -#X text 28 51 The simpler technique is to synthesize enveloped sinusoidal -wave packets. The packets should repeat at the fundamental frequency -\, but the frequency of the packet itself controls the center frequency -of the formant. The length of the packet varies inversely with bandwidth. -; -#X text 27 132 In the patch below \, the "clip~" followed by "cos~" -and "+~ 1" is the enveloping ("windowing" function \, which appears -in the top graph. This is just the original PWM patch from part 2 The -carrier \, on the other hand \, is a broken sinusoid made by amplifying -the phasor~ (the "*~" controlled by "center freq.") and taking the -cos~ of the result. The "breaks" in the sinusoid only occur when the -enveloping signal is zero.; -#X text 197 256 center; -#X text 195 275 freq. (in; -#X text 194 294 tenths of; -#X text 193 314 fundamental); -#X text 92 535 window; -#X text 233 487 magnified phase; -#X text 278 531 desired center frequency; -#X text 250 514 <--this cosine goes at the; -#X text 279 550 but its phase is reset each; -#X text 277 569 fundamental period.; -#X text 612 666 updated for Pd version 0.34; -#X connect 0 0 14 0; -#X connect 1 0 15 0; -#X connect 3 0 4 1; -#X connect 4 0 3 0; -#X connect 5 0 4 2; -#X connect 6 0 0 0; -#X connect 7 0 10 0; -#X connect 8 0 9 0; -#X connect 8 0 21 0; -#X connect 9 0 11 0; -#X connect 10 0 23 0; -#X connect 11 0 1 0; -#X connect 13 0 22 3; -#X connect 14 0 9 1; -#X connect 15 0 17 0; -#X connect 15 0 22 1; -#X connect 16 0 17 1; -#X connect 16 0 22 2; -#X connect 17 0 22 0; -#X connect 17 0 4 0; -#X connect 18 0 19 0; -#X connect 19 0 26 0; -#X connect 21 0 16 0; -#X connect 23 0 6 0; -#X connect 24 0 21 1; -#X connect 25 0 24 0; -#X connect 26 0 25 0; -#X connect 30 0 31 0; -#X connect 31 0 8 0; diff --git a/pd/doc/3.audio.examples/60.packet.spectrum.pd b/pd/doc/3.audio.examples/60.packet.spectrum.pd deleted file mode 100644 index bef1483b..00000000 --- a/pd/doc/3.audio.examples/60.packet.spectrum.pd +++ /dev/null @@ -1,147 +0,0 @@ -#N canvas 83 221 774 628 12; -#X obj 302 351 line~; -#X obj 34 444 cos~; -#X floatatom 71 560 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 35 587 pd output; -#X msg 111 560 MUTE; -#X obj 302 327 pack 0 50; -#X floatatom 302 255 0 0 0; -#X obj 34 356 -~ 0.5; -#X obj 34 395 *~; -#X obj 302 279 / 10; -#X obj 34 420 clip~ -0.5 0.5; -#X text 302 233 bandwidth; -#X obj 302 375 +~ 1; -#X obj 35 467 +~ 1; -#X obj 184 440 cos~; -#X obj 35 496 *~; -#X floatatom 206 269 4 0 0; -#X obj 206 293 / 10; -#X obj 184 414 *~; -#X text 204 224 center; -#X text 204 243 freq.; -#X obj 302 303 max 0; -#X obj 206 365 line~; -#X obj 206 341 pack 0 50; -#X obj 206 317 max 0; -#X floatatom 34 308 4 0 0; -#X obj 34 332 phasor~ 100; -#X text 156 559 <-- output; -#X text 30 283 freq.; -#X text 30 264 fundamental; -#X graph graph1 0 0 128 500 440 492 696 362; -#X array spectrum 128 float 0; -#X pop; -#X msg 108 498 bang; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 59 524 pd fft; -#X text 439 502 0; -#X text 687 499 5512; -#X text 149 498 <-- graph; -#X text 31 2 WINDOWED PACKET SPECTRUM; -#X text 19 34 Here's the spectrum you get. Note that even if you put -the center frequency right on a partial \, there is significant energy -in neighboring partials (try fundamental 440 \, "center freq" 30 \, -bandwidth 0.); -#X text 18 104 The center frequency is in units of ten per partial -\, or in other words a value of "30" means "centered on the third partial". -; -#X text 505 596 updated for Pd version 0.34; -#X text 22 155 This technique only works if you're doing Hanning-window -shaped PWM--you can't combine this naturally with FM or with the waveshaping -technique we'll see later.; -#X connect 0 0 12 0; -#X connect 1 0 13 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 5 0 0 0; -#X connect 6 0 9 0; -#X connect 7 0 8 0; -#X connect 7 0 18 0; -#X connect 8 0 10 0; -#X connect 9 0 21 0; -#X connect 10 0 1 0; -#X connect 12 0 8 1; -#X connect 13 0 15 0; -#X connect 14 0 15 1; -#X connect 15 0 3 0; -#X connect 15 0 32 0; -#X connect 16 0 17 0; -#X connect 17 0 24 0; -#X connect 18 0 14 0; -#X connect 21 0 5 0; -#X connect 22 0 18 1; -#X connect 23 0 22 0; -#X connect 24 0 23 0; -#X connect 25 0 26 0; -#X connect 26 0 7 0; -#X connect 31 0 32 1; diff --git a/pd/doc/3.audio.examples/61.two.cosines.pd b/pd/doc/3.audio.examples/61.two.cosines.pd deleted file mode 100644 index 0f813164..00000000 --- a/pd/doc/3.audio.examples/61.two.cosines.pd +++ /dev/null @@ -1,124 +0,0 @@ -#N canvas 10 49 705 610 12; -#X floatatom 262 549 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 226 576 pd output; -#X msg 302 549 MUTE; -#X msg 59 550 bang; -#X obj 185 427 cos~; -#X floatatom 232 217 4 0 0; -#X obj 232 241 / 10; -#X text 464 288 --- 0.02 seconds ---; -#X obj 185 397 *~; -#X text 236 133 center; -#X obj 232 313 line~; -#X obj 232 265 max 0; -#X graph graph3 0 -2 881 2 450 276 650 136; -#X array carrier 882 float 0; -#X pop; -#X floatatom 33 284 4 0 0; -#X text 29 240 fundamental; -#X text 31 2 ADDING TWO COSINES; -#X text 234 152 freq. (in; -#X text 233 171 tenths of; -#X text 232 191 fundamental); -#X text 29 259 frequency; -#X obj 227 427 cos~; -#X obj 268 340 wrap~; -#X obj 232 367 -~; -#X obj 227 397 +~; -#X obj 232 464 -~; -#X obj 247 494 *~; -#X obj 225 519 +~; -#X obj 59 578 tabwrite~ carrier; -#X obj 33 308 phasor~ 40; -#X obj 232 289 pack 0 50; -#X text 27 36 The other \, spiffier way is to make a sum of cosines -to interpolate between adjacent harmonics. Suppose for example we want -a center frequency of 5.3 (in units of the fundamental.) We just take -partial 5 with amplitude 0.7 and partial 6 with amplitude 0.7:; -#X text 451 581 updated for Pd version 0.34; -#X text 281 366 subtract to get the integer part "n"; -#X text 277 399 multiply phase by n and n+1; -#X text 282 427 synthesize the two partials; -#X text 54 526 graph; -#X text 347 548 <--output; -#X text 323 339 the fractional part "b"; -#X text 280 463 p2 - p1; -#X text 295 492 b * (p2 - p1); -#X text 264 519 b * p2 + (1-b) * p1; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 27 0; -#X connect 4 0 24 1; -#X connect 4 0 26 0; -#X connect 5 0 6 0; -#X connect 6 0 11 0; -#X connect 8 0 4 0; -#X connect 8 0 23 0; -#X connect 10 0 22 0; -#X connect 10 0 21 0; -#X connect 11 0 29 0; -#X connect 13 0 28 0; -#X connect 20 0 24 0; -#X connect 21 0 22 1; -#X connect 21 0 25 1; -#X connect 22 0 8 1; -#X connect 23 0 20 0; -#X connect 24 0 25 0; -#X connect 25 0 26 1; -#X connect 26 0 1 0; -#X connect 26 0 27 0; -#X connect 28 0 8 0; -#X connect 28 0 23 1; -#X connect 29 0 10 0; diff --git a/pd/doc/3.audio.examples/62.declickit.pd b/pd/doc/3.audio.examples/62.declickit.pd deleted file mode 100644 index eb296e63..00000000 --- a/pd/doc/3.audio.examples/62.declickit.pd +++ /dev/null @@ -1,132 +0,0 @@ -#N canvas 10 49 715 680 12; -#X floatatom 242 612 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 206 639 pd output; -#X msg 282 612 MUTE; -#X obj 165 490 cos~; -#X obj 165 460 *~; -#X obj 207 490 cos~; -#X obj 249 406 wrap~; -#X obj 212 415 -~; -#X obj 207 460 +~; -#X obj 207 525 -~; -#X obj 227 557 *~; -#X obj 205 582 +~; -#X text 454 648 updated for Pd version 0.34; -#X text 327 611 <--output; -#X obj 191 184 loadbang; -#X obj 191 210 metro 400; -#X obj 203 234 del 200; -#X obj 204 335 samphold~; -#X obj 259 364 toggle 20 0 empty empty empty 20 8 0 10 -262144 -1 -1 -0 1; -#X obj 166 290 sig~; -#X msg 203 263 3.5; -#X msg 166 263 2; -#X obj 23 280 phasor~ 169; -#N canvas 0 0 600 400 switch 0; -#X obj 85 52 inlet~; -#X obj 177 58 inlet~; -#X obj 298 66 inlet; -#X obj 112 107 -~; -#X obj 112 131 *~ 0; -#X obj 90 157 +~; -#X obj 160 249 outlet~; -#X connect 0 0 3 1; -#X connect 0 0 5 0; -#X connect 1 0 3 0; -#X connect 2 0 4 1; -#X connect 3 0 4 0; -#X connect 4 0 5 1; -#X connect 5 0 6 0; -#X restore 166 364 pd switch; -#X text 31 2 CHANGING THE CENTER FREQUENCY QUICKLY; -#X text 313 381 off to hear the straight sig~; -#X text 286 363 <--on to hear the "samphold~" \,; -#X text 25 27 Since in the previous patch the amplitudes of the two -cosines depend on "center frequency" we can't change that discontinuously -without clicking \, as you hear in this patch. The fix is to use a -samphold~ object to keep the center frequency frozen except at phase -crossings. At the phase crossings the two weighted cosines add to one -\, so we can discontinuously change the frequencies and weights there. -; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 9 1; -#X connect 3 0 11 0; -#X connect 4 0 3 0; -#X connect 4 0 8 0; -#X connect 5 0 9 0; -#X connect 6 0 7 1; -#X connect 6 0 10 1; -#X connect 7 0 4 1; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 1 0; -#X connect 14 0 15 0; -#X connect 15 0 21 0; -#X connect 15 0 16 0; -#X connect 16 0 20 0; -#X connect 17 0 23 1; -#X connect 18 0 23 2; -#X connect 19 0 17 0; -#X connect 19 0 23 0; -#X connect 20 0 19 0; -#X connect 21 0 19 0; -#X connect 22 0 4 0; -#X connect 22 0 8 1; -#X connect 22 0 17 1; -#X connect 23 0 7 0; -#X connect 23 0 6 0; diff --git a/pd/doc/3.audio.examples/63.sweepable.FM.pd b/pd/doc/3.audio.examples/63.sweepable.FM.pd deleted file mode 100644 index ff3827ee..00000000 --- a/pd/doc/3.audio.examples/63.sweepable.FM.pd +++ /dev/null @@ -1,161 +0,0 @@ -#N canvas 89 117 803 661 12; -#X floatatom 242 605 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 204 634 pd output; -#X msg 280 606 MUTE; -#X obj 165 506 cos~; -#X obj 165 460 *~; -#X obj 208 508 cos~; -#X obj 249 409 wrap~; -#X obj 212 408 -~; -#X obj 208 485 +~; -#X obj 206 543 -~; -#X obj 226 575 *~; -#X obj 204 600 +~; -#X text 520 628 updated for Pd version 0.34; -#X text 325 605 <--output; -#X obj 212 378 samphold~; -#X text 31 2 APPLYING TWO-COSINE CARRIER TO FM; -#X floatatom 229 238 4 0 0; -#X obj 229 261 / 10; -#X text 229 157 center; -#X obj 229 330 line~; -#X obj 229 284 max 0; -#X text 229 177 freq. (in; -#X text 229 197 tenths of; -#X text 229 217 fundamental); -#X obj 229 307 pack 0 50; -#X obj 118 313 phasor~; -#X floatatom 118 290 4 0 0; -#X text 103 237 fundamental; -#X text 103 257 (= mod freq); -#X text 432 284 index; -#X text 432 304 (percent); -#X floatatom 432 325 4 0 0; -#X obj 382 391 cos~; -#X obj 432 394 line~; -#X obj 382 414 *~; -#X obj 432 348 / 100; -#X obj 432 371 pack 0 50; -#X obj 165 483 +~; -#X graph graph1 0 0 128 500 515 256 771 126; -#X array spectrum 128 float 0; -#X pop; -#X text 511 261 0; -#X text 759 258 5512; -#X msg 117 599 bang; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 68 630 pd fft; -#X text 25 33 And now we just treat the cosines like carrier signals -in an FM instrument. This doesn't work as well as you'd wish \, because -the phases of the partials of the two FM instruments don't line up -\, so that \, for indices of modulation above about 20% \, you get -beating effects as the center frequency goes up and down.; -#X text 385 440 modulating; -#X text 385 460 oscillator; -#X text 37 482 both phases-->; -#X text 6 465 add modulator to; -#X text 117 577 graph; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 9 1; -#X connect 3 0 11 0; -#X connect 4 0 37 0; -#X connect 5 0 9 0; -#X connect 6 0 7 1; -#X connect 6 0 10 1; -#X connect 7 0 4 1; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 1 0; -#X connect 11 0 42 0; -#X connect 14 0 7 0; -#X connect 14 0 6 0; -#X connect 16 0 17 0; -#X connect 17 0 20 0; -#X connect 19 0 14 0; -#X connect 20 0 24 0; -#X connect 24 0 19 0; -#X connect 25 0 14 1; -#X connect 25 0 32 0; -#X connect 25 0 4 0; -#X connect 25 0 8 1; -#X connect 26 0 25 0; -#X connect 31 0 35 0; -#X connect 32 0 34 0; -#X connect 33 0 34 1; -#X connect 34 0 37 1; -#X connect 35 0 36 0; -#X connect 36 0 33 0; -#X connect 37 0 8 0; -#X connect 37 0 3 0; -#X connect 41 0 42 1; diff --git a/pd/doc/3.audio.examples/64.paf.pd b/pd/doc/3.audio.examples/64.paf.pd deleted file mode 100644 index 56c024c0..00000000 --- a/pd/doc/3.audio.examples/64.paf.pd +++ /dev/null @@ -1,234 +0,0 @@ -#N canvas 53 0 782 687 12; -#X floatatom 253 735 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 215 764 pd output; -#X msg 291 735 MUTE; -#X obj 158 616 cos~; -#X obj 158 593 *~; -#X obj 201 616 cos~; -#X obj 257 542 wrap~; -#X obj 221 542 -~; -#X obj 201 593 +~; -#X obj 194 646 -~; -#X obj 214 678 *~; -#X obj 176 678 +~; -#X text 515 768 updated for Pd version 0.34; -#X text 336 734 <--output; -#X obj 221 510 samphold~; -#X floatatom 221 369 4 0 0; -#X obj 221 392 / 10; -#X text 221 288 center; -#X obj 221 461 line~; -#X obj 221 415 max 0; -#X text 221 308 freq. (in; -#X text 221 328 tenths of; -#X text 221 348 fundamental); -#X obj 221 438 pack 0 50; -#X obj 104 445 phasor~; -#X floatatom 104 399 4 0 0; -#X text 84 372 fundamental; -#X text 435 441 index; -#X text 435 461 (percent); -#X floatatom 435 482 4 0 0; -#X obj 435 528 line~; -#X obj 343 550 *~; -#X obj 435 505 pack 0 50; -#X graph graph1 0 0 128 500 510 395 766 265; -#X array spectrum 128 float 0; -#X pop; -#X text 501 397 0; -#X text 745 398 5512; -#X msg 80 713 bang; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 31 745 pd fft; -#X text 82 687 graph; -#X text 31 2 THE PAF: TWO-COSINE RING MODULATOR FOR WAVESHAPER; -#X graph graph4 0 0 199 1 563 718 763 578; -#X array bell-curve 200 float 1; -#A 0 1.12535e-07 1.54727e-07 2.12059e-07 2.89706e-07 3.94519e-07 5.35535e-07 -7.24633e-07 9.77371e-07 1.31404e-06 1.76105e-06 2.35258e-06 3.13275e-06 -4.15832e-06 5.50199e-06 7.25659e-06 9.54016e-06 1.25023e-05 1.63317e-05 -2.1266e-05 2.76026e-05 3.57128e-05 4.60584e-05 5.92113e-05 7.58768e-05 -9.69224e-05 0.00012341 0.000156634 0.000198167 0.000249912 0.000314163 -0.000393669 0.000491721 0.000612231 0.000759842 0.000940028 0.00115923 -0.00142498 0.00174605 0.00213263 0.00259648 0.00315111 0.00381201 0.00459678 -0.0055254 0.0066204 0.00790705 0.0094136 0.0111714 0.013215 0.0155826 -0.0183156 0.0214592 0.0250621 0.0291763 0.0338573 0.0391639 0.0451575 -0.0519019 0.0594631 0.0679081 0.0773047 0.0877205 0.0992216 0.111872 -0.125732 0.140858 0.1573 0.1751 0.194291 0.214896 0.236928 0.260383 -0.285247 0.311486 0.339053 0.367879 0.397882 0.428956 0.46098 0.493812 -0.527292 0.561244 0.595473 0.62977 0.663916 0.697676 0.730811 0.763074 -0.794216 0.823987 0.852144 0.878447 0.902668 0.924595 0.944027 0.960789 -0.974725 0.985703 0.99362 0.998401 1 0.998401 0.99362 0.985703 0.974725 -0.960789 0.944027 0.924595 0.902668 0.878447 0.852144 0.823987 0.794216 -0.763074 0.730811 0.697676 0.663916 0.62977 0.595473 0.561244 0.527292 -0.493812 0.46098 0.428956 0.397882 0.367879 0.339053 0.311486 0.285247 -0.260383 0.236928 0.214896 0.194291 0.1751 0.1573 0.140858 0.125732 -0.111872 0.0992216 0.0877205 0.0773047 0.0679081 0.0594631 0.0519019 -0.0451575 0.0391639 0.0338573 0.0291763 0.0250621 0.0214592 0.0183156 -0.0155826 0.013215 0.0111714 0.0094136 0.00790705 0.0066204 0.0055254 -0.00459678 0.00381201 0.00315111 0.00259648 0.00213263 0.00174605 0.00142498 -0.00115923 0.000940028 0.000759842 0.000612231 0.000491721 0.000393669 -0.000314163 0.000249912 0.000198167 0.000156634 0.00012341 9.69224e-05 -7.58768e-05 5.92113e-05 4.60584e-05 3.57128e-05 2.76026e-05 2.1266e-05 -1.63317e-05 1.25023e-05 9.54016e-06 7.25659e-06 5.50199e-06 4.15832e-06 -3.13275e-06 2.35258e-06 1.76105e-06 1.31404e-06 9.77371e-07 7.24633e-07 -5.35535e-07 3.94519e-07 2.89706e-07 2.12059e-07 1.54727e-07; -#X pop; -#N canvas 94 264 600 388 make-table 0; -#X msg 81 44 bang; -#X obj 81 73 t b b; -#X obj 159 142 f; -#X obj 197 142 + 1; -#X msg 175 112 0; -#X obj 81 102 until; -#X obj 161 177 t f f; -#X obj 76 306 tabwrite bell-curve; -#X obj 52 270 expr exp(-$f1*$f1); -#X obj 63 168 sel 199; -#X obj 51 241 expr ($f1-100)/25; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 9 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 10 0; -#X connect 6 1 7 1; -#X connect 8 0 7 0; -#X connect 9 0 5 1; -#X connect 10 0 8 0; -#X restore 627 538 pd make-table; -#X obj 104 422 * 0.5; -#X obj 343 527 cos~; -#X obj 343 504 -~ 0.25; -#X obj 343 573 +~ 100; -#X obj 343 596 tabread4~ bell-curve; -#X obj 104 474 *~ 2; -#X obj 215 707 *~; -#X text 25 33 Instead of using the two cosines as FM carrier oscillators -\, we can use them as ring modulators for a synthetic tone. Here (as -described in the paper) we use a sinusoid looking up a Gaussian bell -curve. This has the nice properties that the partials are always positive -cosines in phase \, and the spectrum spreads out smoothly as the index -changes.; -#X text 26 137 We needed the sine wave to have half the fundamental -frequency \, so we run the phasor~ at half speed but double its output -to the cosine pair and the samphold~ \, thus giving us the original -frequency. As to the half-speed signal \, we take its sine (-~ 0.25 -and cos~) \, then center it for lookup in a 200-point table containing -a bell curve.; -#X text 251 705 <--ring mod step; -#X text 375 621 waveshaper; -#X text 27 239 Then with ~* we do the ring modulation and we're done. -; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 9 1; -#X connect 3 0 11 0; -#X connect 4 0 8 0; -#X connect 4 0 3 0; -#X connect 5 0 9 0; -#X connect 6 0 7 1; -#X connect 6 0 10 1; -#X connect 7 0 4 1; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 48 0; -#X connect 14 0 7 0; -#X connect 14 0 6 0; -#X connect 15 0 16 0; -#X connect 16 0 19 0; -#X connect 18 0 14 0; -#X connect 19 0 23 0; -#X connect 23 0 18 0; -#X connect 24 0 44 0; -#X connect 24 0 47 0; -#X connect 25 0 42 0; -#X connect 29 0 32 0; -#X connect 30 0 31 1; -#X connect 31 0 45 0; -#X connect 32 0 30 0; -#X connect 36 0 37 1; -#X connect 42 0 24 0; -#X connect 43 0 31 0; -#X connect 44 0 43 0; -#X connect 45 0 46 0; -#X connect 46 0 48 1; -#X connect 47 0 14 1; -#X connect 47 0 4 0; -#X connect 47 0 8 0; -#X connect 48 0 1 0; -#X connect 48 0 37 0; diff --git a/pd/doc/3.audio.examples/65.paf.control.pd b/pd/doc/3.audio.examples/65.paf.control.pd deleted file mode 100644 index 7d329357..00000000 --- a/pd/doc/3.audio.examples/65.paf.control.pd +++ /dev/null @@ -1,219 +0,0 @@ -#N canvas 89 36 743 752 12; -#X floatatom 217 684 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 179 713 pd output; -#X msg 255 684 MUTE; -#X obj 122 565 cos~; -#X obj 122 542 *~; -#X obj 165 565 cos~; -#X obj 220 510 wrap~; -#X obj 184 510 -~; -#X obj 165 542 +~; -#X obj 158 595 -~; -#X obj 178 627 *~; -#X obj 140 627 +~; -#X text 478 719 updated for Pd version 0.34; -#X text 299 702 <--output; -#X obj 184 478 samphold~; -#X floatatom 183 266 4 0 0; -#X text 181 218 center; -#X obj 184 345 line~; -#X obj 184 322 pack 0 50; -#X obj 67 413 phasor~; -#X floatatom 69 305 4 0 0; -#X text 52 256 fundamental; -#X floatatom 408 361 4 0 0; -#X obj 408 438 line~; -#X obj 306 518 *~; -#X obj 408 415 pack 0 50; -#N canvas 94 264 600 388 make-table 0; -#X msg 81 44 bang; -#X obj 81 73 t b b; -#X obj 159 142 f; -#X obj 197 142 + 1; -#X msg 175 112 0; -#X obj 81 102 until; -#X obj 161 177 t f f; -#X obj 76 306 tabwrite bell-curve; -#X obj 52 270 expr exp(-$f1*$f1); -#X obj 63 168 sel 199; -#X obj 51 241 expr ($f1-100)/25; -#X graph graph4 0 0 199 1 342 225 542 85; -#X array bell-curve 200 float 1; -#A 0 1.12535e-07 1.54727e-07 2.12059e-07 2.89706e-07 3.94519e-07 5.35535e-07 -7.24633e-07 9.77371e-07 1.31404e-06 1.76105e-06 2.35258e-06 3.13275e-06 -4.15832e-06 5.50199e-06 7.25659e-06 9.54016e-06 1.25023e-05 1.63317e-05 -2.1266e-05 2.76026e-05 3.57128e-05 4.60584e-05 5.92113e-05 7.58768e-05 -9.69224e-05 0.00012341 0.000156634 0.000198167 0.000249912 0.000314163 -0.000393669 0.000491721 0.000612231 0.000759842 0.000940028 0.00115923 -0.00142498 0.00174605 0.00213263 0.00259648 0.00315111 0.00381201 0.00459678 -0.0055254 0.0066204 0.00790705 0.0094136 0.0111714 0.013215 0.0155826 -0.0183156 0.0214592 0.0250621 0.0291763 0.0338573 0.0391639 0.0451575 -0.0519019 0.0594631 0.0679081 0.0773047 0.0877205 0.0992216 0.111872 -0.125732 0.140858 0.1573 0.1751 0.194291 0.214896 0.236928 0.260383 -0.285247 0.311486 0.339053 0.367879 0.397882 0.428956 0.46098 0.493812 -0.527292 0.561244 0.595473 0.62977 0.663916 0.697676 0.730811 0.763074 -0.794216 0.823987 0.852144 0.878447 0.902668 0.924595 0.944027 0.960789 -0.974725 0.985703 0.99362 0.998401 1 0.998401 0.99362 0.985703 0.974725 -0.960789 0.944027 0.924595 0.902668 0.878447 0.852144 0.823987 0.794216 -0.763074 0.730811 0.697676 0.663916 0.62977 0.595473 0.561244 0.527292 -0.493812 0.46098 0.428956 0.397882 0.367879 0.339053 0.311486 0.285247 -0.260383 0.236928 0.214896 0.194291 0.1751 0.1573 0.140858 0.125732 -0.111872 0.0992216 0.0877205 0.0773047 0.0679081 0.0594631 0.0519019 -0.0451575 0.0391639 0.0338573 0.0291763 0.0250621 0.0214592 0.0183156 -0.0155826 0.013215 0.0111714 0.0094136 0.00790705 0.0066204 0.0055254 -0.00459678 0.00381201 0.00315111 0.00259648 0.00213263 0.00174605 0.00142498 -0.00115923 0.000940028 0.000759842 0.000612231 0.000491721 0.000393669 -0.000314163 0.000249912 0.000198167 0.000156634 0.00012341 9.69224e-05 -7.58768e-05 5.92113e-05 4.60584e-05 3.57128e-05 2.76026e-05 2.1266e-05 -1.63317e-05 1.25023e-05 9.54016e-06 7.25659e-06 5.50199e-06 4.15832e-06 -3.13275e-06 2.35258e-06 1.76105e-06 1.31404e-06 9.77371e-07 7.24633e-07 -5.35535e-07 3.94519e-07 2.89706e-07 2.12059e-07 1.54727e-07; -#X pop; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 9 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 10 0; -#X connect 6 1 7 1; -#X connect 8 0 7 0; -#X connect 9 0 5 1; -#X connect 10 0 8 0; -#X restore 573 591 pd make-table; -#X obj 67 390 * 0.5; -#X obj 306 495 cos~; -#X obj 306 472 -~ 0.25; -#X obj 306 549 +~ 100; -#X obj 306 572 tabread4~ bell-curve; -#X obj 67 442 *~ 2; -#X obj 179 656 *~; -#X text 338 597 waveshaper; -#X text 31 2 CHANGING PAF CONTROLS TO NATURAL UNITS; -#X obj 67 362 mtof; -#X obj 68 335 max 0; -#X obj 206 370 expr 1/$f1; -#X obj 183 296 mtof; -#X text 181 238 freq.; -#X obj 184 394 *~; -#X text 406 340 bandwidth; -#X obj 408 389 mtof; -#X obj 408 474 *~; -#X obj 408 498 *~ 25; -#X text 25 33 The more "natural" units for describing a formant might -be center frequency and bandwidth \, so that you can change the fundamental -without having the formant shift up and down in parallel. Here all -three frequencies are expressed in MIDI units. The bandwidth and center -frequency have to be divided by the fundamental (the expr 1/$f1 takes -its reciprocal and two *~ objects finish the division.); -#X text 448 473 divide by fundamental; -#X text 466 497 range for table; -#X text 372 548 offset to middle of table; -#X text 191 416 C.F. relative; -#X text 192 432 to fundamental; -#X text 48 275 (MIDI units); -#X text 215 654 ring mod; -#X text 25 150 And now you essentially have the PAF. Note \, however -\, that there's a nice paf~ "external" object in the "extras" library -that does this all more efficiently and takes care of a couple of subtle -details we don't see here...; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 9 1; -#X connect 3 0 11 0; -#X connect 4 0 8 0; -#X connect 4 0 3 0; -#X connect 5 0 9 0; -#X connect 6 0 7 1; -#X connect 6 0 10 1; -#X connect 7 0 4 1; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 33 0; -#X connect 14 0 7 0; -#X connect 14 0 6 0; -#X connect 15 0 39 0; -#X connect 17 0 41 0; -#X connect 18 0 17 0; -#X connect 19 0 29 0; -#X connect 19 0 32 0; -#X connect 20 0 37 0; -#X connect 22 0 43 0; -#X connect 23 0 44 0; -#X connect 24 0 30 0; -#X connect 25 0 23 0; -#X connect 27 0 19 0; -#X connect 28 0 24 0; -#X connect 29 0 28 0; -#X connect 30 0 31 0; -#X connect 31 0 33 1; -#X connect 32 0 14 1; -#X connect 32 0 4 0; -#X connect 32 0 8 0; -#X connect 33 0 1 0; -#X connect 36 0 27 0; -#X connect 36 0 38 0; -#X connect 37 0 36 0; -#X connect 38 0 41 1; -#X connect 38 0 44 1; -#X connect 39 0 18 0; -#X connect 41 0 14 0; -#X connect 43 0 25 0; -#X connect 44 0 45 0; -#X connect 45 0 24 1; diff --git a/pd/doc/3.audio.examples/66.PART9.quartic.pd b/pd/doc/3.audio.examples/66.PART9.quartic.pd deleted file mode 100644 index d71da05a..00000000 --- a/pd/doc/3.audio.examples/66.PART9.quartic.pd +++ /dev/null @@ -1,140 +0,0 @@ -#N canvas 57 35 614 650 12; -#X graph graph1 0 0 40 1 151 551 551 301; -#X array array-ampdb 41 float 1; -#A 0 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1; -#X array array-dbdb 41 float 1; -#A 0 0 0.025 0.05 0.075 0.1 0.125 0.15 0.175 0.2 0.225 0.25 0.275 0.3 -0.325 0.35 0.375 0.4 0.425 0.45 0.475 0.5 0.525 0.55 0.575 0.6 0.625 -0.65 0.675 0.7 0.725 0.75 0.775 0.8 0.825 0.85 0.875 0.9 0.925 0.95 -0.975 1; -#X array array-4thpow 41 float 1; -#A 0 0 3.90624e-07 6.25001e-06 3.16406e-05 1e-04 0.000244141 0.00050625 -0.000937891 0.0016 0.00256289 0.00390625 0.00571914 0.0081 0.0111566 -0.0150063 0.0197754 0.0256 0.0326254 0.0410062 0.0509067 0.0625 0.0759691 -0.0915063 0.109313 0.1296 0.152588 0.178506 0.207594 0.2401 0.276282 -0.316406 0.36075 0.4096 0.46325 0.522006 0.586182 0.6561 0.732094 0.814506 -0.903688 1; -#X pop; -#N canvas 293 37 890 657 otherstuff 0; -#X obj 42 438 loadbang; -#X msg 259 94 bang; -#X obj 259 123 t b b; -#X obj 337 192 f; -#X obj 375 192 + 1; -#X msg 353 162 0; -#X obj 259 152 until; -#X obj 263 329 dbtorms; -#X obj 339 227 t f f; -#X msg 51 101 bang; -#X obj 51 130 t b b; -#X obj 129 199 f; -#X obj 167 199 + 1; -#X msg 145 169 0; -#X obj 51 159 until; -#X obj 131 234 t f f; -#X obj 59 339 tabwrite array-dbdb; -#X obj 263 355 tabwrite array-ampdb; -#X msg 505 98 bang; -#X obj 505 127 t b b; -#X obj 583 196 f; -#X obj 621 196 + 1; -#X msg 599 166 0; -#X obj 505 156 until; -#X obj 585 231 t f f; -#X obj 559 432 expr $f1 * $f1 * $f1 * $f1; -#X obj 559 341 expr 1 + $f2 * ($f1 - 1); -#X obj 705 253 loadbang; -#X floatatom 703 309 0 0 0; -#X msg 705 281 1; -#X obj 559 385 max 0; -#X obj 561 464 tabwrite array-4thpow; -#X obj 263 274 + 100; -#X obj 51 232 sel 40; -#X obj 258 221 sel 40; -#X obj 503 226 sel 40; -#X obj 559 300 / 40; -#X obj 263 302 - 40; -#X obj 93 303 / 40; -#X msg 43 465 \; graph1 xlabel -0.03 0 10 20 30 40 \; graph1 ylabel --2 0.25 0.5 0.75 1; -#X text 53 27 (here's how I computed the three transfer functions...) -; -#X connect 0 0 39 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 2 1 5 0; -#X connect 3 0 4 0; -#X connect 3 0 8 0; -#X connect 3 0 34 0; -#X connect 4 0 3 1; -#X connect 5 0 3 1; -#X connect 6 0 3 0; -#X connect 7 0 17 0; -#X connect 8 0 32 0; -#X connect 8 1 17 1; -#X connect 9 0 10 0; -#X connect 10 0 14 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 11 0 15 0; -#X connect 11 0 33 0; -#X connect 12 0 11 1; -#X connect 13 0 11 1; -#X connect 14 0 11 0; -#X connect 15 0 38 0; -#X connect 15 1 16 1; -#X connect 18 0 19 0; -#X connect 19 0 23 0; -#X connect 19 1 22 0; -#X connect 20 0 21 0; -#X connect 20 0 24 0; -#X connect 20 0 35 0; -#X connect 21 0 20 1; -#X connect 22 0 20 1; -#X connect 23 0 20 0; -#X connect 24 0 36 0; -#X connect 24 1 31 1; -#X connect 25 0 31 0; -#X connect 26 0 30 0; -#X connect 27 0 29 0; -#X connect 28 0 26 1; -#X connect 29 0 28 0; -#X connect 30 0 25 0; -#X connect 32 0 37 0; -#X connect 33 0 14 1; -#X connect 34 0 6 1; -#X connect 35 0 23 1; -#X connect 36 0 26 0; -#X connect 37 0 7 0; -#X connect 38 0 16 0; -#X restore 53 608 pd otherstuff; -#X text 292 403 linear; -#X text 279 509 decibels; -#X text 387 518 quartic; -#X text 45 5 QUARTIC CURVES AS THE IDEAL AMPLITUDE AND FREQUENCY SCALERS -; -#X text 346 611 updated for Pd version 0.34; -#X text 246 578 units-->; -#X text 45 447 amplitude; -#X text 79 429 |; -#X text 79 420 |; -#X text 79 410 |; -#X text 79 402 |; -#X text 78 398 ^; -#X text 38 149 The graph below shows that a simple quartic curve \, -x-to-the-fourth-power \, twists like decibels but--unlike decibels--actually -hits zero at left. You get the best of both worlds. Moreover \, raising -something to the fourth power is very cheap: just two multiplications--whereas -\, if you're computing envelopes in dB \, eventually you'll have to -exponentiate \, sample by sample \, to get to linear units.; -#X text 36 34 It's an old saw that we perceive amplitude and frequency -logarithmically. But using decibels as a unit for controlling amplitude -and frequency gets ugly for two reasons. First \, it's expensive to -do the conversion. Second and more profoundly \, decibels grow by shifting -\, and things should grow by scaling \, so that \, for example \, zero -really means "nothing."; diff --git a/pd/doc/3.audio.examples/67.more.quartic.pd b/pd/doc/3.audio.examples/67.more.quartic.pd deleted file mode 100644 index fdb01dab..00000000 --- a/pd/doc/3.audio.examples/67.more.quartic.pd +++ /dev/null @@ -1,147 +0,0 @@ -#N canvas 130 66 880 587 12; -#X floatatom 89 506 0 0 100; -#N canvas 159 26 516 274 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 396 182 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 391 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 391 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 104 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 159 audio; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X restore 51 534 pd output; -#X msg 127 507 MUTE; -#X obj 32 441 *~; -#X obj 12 469 -~; -#X obj 73 446 *~; -#X floatatom 170 421 1 0 100; -#X obj 365 337 osc~; -#X obj 365 362 *~; -#X obj 425 342 line~; -#X obj 365 312 line~; -#X obj 550 468 osc~; -#X obj 599 496 *~; -#X obj 621 379 line~; -#X obj 550 379 line~; -#X obj 550 326 sqrt; -#X obj 550 352 sqrt; -#X obj 621 326 sqrt; -#X obj 621 352 sqrt; -#X obj 550 411 *~; -#X obj 550 441 *~; -#X obj 621 411 *~; -#X obj 621 440 *~; -#X obj 550 301 unpack; -#X obj 621 301 unpack; -#X obj 365 287 r freq; -#X obj 425 318 r amp; -#X obj 550 276 r freq; -#X obj 621 276 r amp; -#X obj 365 388 s~ linear; -#X obj 599 523 s~ quartic; -#X obj 12 377 r~ linear; -#X obj 56 406 r~ quartic; -#X msg 27 185 \; amp 0 5000 \;; -#X msg 29 139 \; amp 1 5000 \;; -#X msg 139 185 \; amp 0 1000 \;; -#X msg 141 139 \; amp 1 1000 \;; -#X msg 26 238 \; freq 1760 5000 \;; -#X msg 29 286 \; freq 55 5000 \;; -#X msg 180 238 \; freq 1760 1000 \;; -#X msg 183 286 \; freq 55 1000 \;; -#X text 90 15 QUARTIC AND LINEAR ENVELOPES COMPARED; -#X obj 202 488 loadbang; -#X msg 202 516 \; amp 1 \; freq 1760; -#X text 194 414 1 for quartic \; 0 for linear; -#X text 19 39 This patch has two sine wave oscillators \, one with -linear envelopes \, the other with quartic ones which sound more uniform. -The "toggle switch" at bottom selects between the two \, and the message -boxes sweep the amplitude and frequency up and down.; -#X text 366 257 LINEAR; -#X text 555 249 QUARTIC; -#X text 335 120 The two oscillators are below. In the quartic one \, -for both the amplitude and the frequency \, we have to take the fourth -root of the target value (which we get by taking square root twice.) -Then we raise the line~ output to the fourth power by squaring twice -(the *~ objects \, whose left and right inlets are the same.) The cost -is mostly that of the four additional *~ objects.; -#X text 579 560 updated for Pd version 0.34; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 4 1; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 5 1; -#X connect 6 0 3 1; -#X connect 7 0 8 0; -#X connect 8 0 29 0; -#X connect 9 0 8 1; -#X connect 10 0 7 0; -#X connect 11 0 12 0; -#X connect 12 0 30 0; -#X connect 13 0 21 0; -#X connect 13 0 21 1; -#X connect 14 0 19 0; -#X connect 14 0 19 1; -#X connect 15 0 16 0; -#X connect 16 0 14 0; -#X connect 17 0 18 0; -#X connect 18 0 13 0; -#X connect 19 0 20 0; -#X connect 19 0 20 1; -#X connect 20 0 11 0; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 22 0 12 1; -#X connect 23 0 15 0; -#X connect 23 1 14 1; -#X connect 24 0 17 0; -#X connect 24 1 13 1; -#X connect 25 0 10 0; -#X connect 26 0 9 0; -#X connect 27 0 23 0; -#X connect 28 0 24 0; -#X connect 31 0 3 0; -#X connect 31 0 4 0; -#X connect 32 0 5 0; -#X connect 42 0 43 0; diff --git a/pd/doc/3.audio.examples/68.qlist.pd b/pd/doc/3.audio.examples/68.qlist.pd deleted file mode 100644 index 58495ca1..00000000 --- a/pd/doc/3.audio.examples/68.qlist.pd +++ /dev/null @@ -1,102 +0,0 @@ -#N canvas 233 179 684 516 12; -#X floatatom 57 459 0 0 0; -#N canvas 159 26 497 272 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 159 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 19 488 pd output; -#X msg 95 459 MUTE; -#X obj 19 211 osc-voice amp1 pit1; -#X obj 19 240 osc-voice amp2 pit2; -#X obj 19 269 osc-voice amp3 pit3; -#X obj 19 298 osc-voice amp4 pit4; -#X obj 19 327 osc-voice amp5 pit5; -#X obj 19 356 osc-voice amp6 pit6; -#X obj 19 385 osc-voice amp7 pit7; -#X obj 19 414 osc-voice amp8 pit8; -#X obj 467 382 qlist; -#X msg 389 226 stop; -#X msg 527 339 read qlist.txt; -#X obj 527 294 loadbang; -#X text 261 203 start; -#X text 391 202 stop; -#X text 537 318 reread file; -#X msg 470 238 rewind; -#X msg 538 238 next; -#X msg 258 254 tempo 100 \, bang; -#X msg 253 227 tempo 1 \, bang; -#X text 82 11 USING QLIST TO SEQUENCE AN OSCILLATOR BANK; -#X text 474 215 single step; -#X obj 556 454 r #; -#X text 35 61 Here is an eight voice additive synthesis patch controlled -by a qlist. Open a text editor on the file \, "qlist.txt" \, to see -how the oscillators' amplitudes and frequencies are specified. The -abstraction \, "osc-voice" \, shows an effective way to make patches -react to qlists but also to mousing.; -#X text 258 453 this is where qlist comments go:; -#X text 418 485 updatged for Pd version 0.34; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 4 0; -#X connect 4 0 5 0; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 1 0; -#X connect 12 0 11 0; -#X connect 13 0 11 0; -#X connect 14 0 13 0; -#X connect 18 0 11 0; -#X connect 19 0 11 0; -#X connect 20 0 11 0; -#X connect 21 0 11 0; diff --git a/pd/doc/3.audio.examples/69.more.adsr.pd b/pd/doc/3.audio.examples/69.more.adsr.pd deleted file mode 100644 index 5b38917a..00000000 --- a/pd/doc/3.audio.examples/69.more.adsr.pd +++ /dev/null @@ -1,117 +0,0 @@ -#N canvas 105 38 705 609 12; -#X obj 39 140 r trigger; -#X floatatom 70 376 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 351 166 t b; -#X obj 351 114 f; -#X obj 351 62 inlet; -#X text 358 30 mute; -#X obj 351 192 f; -#X msg 442 185 0; -#X msg 351 88 bang; -#X obj 351 140 moses 1; -#X obj 442 159 t b f; -#X obj 413 122 moses 1; -#X obj 86 154 dbtorms; -#X obj 413 96 r master-lvl; -#X obj 86 44 r master-lvl; -#X obj 351 218 s master-lvl; -#X obj 23 188 inlet~; -#X obj 207 42 inlet; -#X text 207 19 level; -#X obj 207 104 s master-lvl; -#X msg 100 67 set \$1; -#X obj 100 93 outlet; -#X msg 222 66 \; pd dsp 1; -#X obj 86 202 line~; -#X obj 23 221 *~; -#X obj 23 250 dac~; -#X obj 86 178 pack 0 50; -#X text 21 165 audio; -#X text 97 114 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 39 406 pd output; -#X msg 107 376 MUTE; -#X text 150 375 <-- output amplitude; -#X text 518 189 <-- attack; -#X text 485 281 <-- release; -#X obj 39 338 *~; -#X obj 39 282 *~; -#X obj 39 310 *~; -#X obj 80 340 osc~ 440; -#X text 88 9 ADSR envelope; -#X text 35 29 You can use the quartic trick to simplify patches using -ADSR envelopes. For amplitude control it's especially simple. It's -usually good enough in practice to control amplitudes by ranging an -ADSR from 0 to 1 (divide by 100 so your input range can be a comfortable -0-100) \, then take fourth power:; -#X obj 77 227 / 100; -#X floatatom 77 197 3 0 100; -#X msg 383 269 \; trigger 0; -#X obj 39 166 unpack; -#X floatatom 39 197 1 0 100; -#X msg 383 175 \; trigger 1 100; -#X text 503 229 <-- softer attack; -#X msg 382 222 \; trigger 1 60; -#X text 441 583 updated for Pd version 0.34; -#X text 14 437 Note that the units aren't dB \; for most of the range -0-100 it's about 0.4 dB per unit. If you want something closer to dB -\, you can set the scale as 0-40 instead of 0-100 (just change "/ 100" -to "/ 40") and then you'll get the response shown in the first patch -in this section.; -#X obj 596 519 *~; -#X obj 596 547 *~; -#X floatatom 605 390 3 0 100; -#X obj 605 416 mtof; -#X obj 605 441 sqrt; -#X obj 605 466 sqrt; -#X text 174 526 To use ADSR to control pitch \, you should; -#X text 173 545 usually just use real pitch units like this-->; -#X obj 596 490 adsr 0; -#X obj 39 253 adsr 0 100 200 70 300; -#X connect 0 0 16 0; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 7 0 2 0; -#X connect 8 0 9 0; -#X connect 8 0 9 1; -#X connect 9 0 7 0; -#X connect 10 0 7 1; -#X connect 13 0 32 1; -#X connect 14 0 13 0; -#X connect 16 0 17 0; -#X connect 16 1 14 0; -#X connect 17 0 32 0; -#X connect 23 0 24 0; -#X connect 23 0 24 1; -#X connect 25 0 26 0; -#X connect 26 0 27 0; -#X connect 27 0 28 0; -#X connect 28 0 31 1; -#X connect 31 0 23 0; -#X connect 31 0 23 1; -#X connect 32 0 8 0; -#X connect 32 0 8 1; diff --git a/pd/doc/3.audio.examples/70.vibrato.pd b/pd/doc/3.audio.examples/70.vibrato.pd deleted file mode 100644 index 78c38efd..00000000 --- a/pd/doc/3.audio.examples/70.vibrato.pd +++ /dev/null @@ -1,158 +0,0 @@ -#N canvas 80 10 736 726 12; -#X obj 27 220 r trigger; -#X floatatom 65 581 0 0 0; -#N canvas 159 26 531 288 output 0; -#X obj 351 166 t b; -#X obj 351 114 f; -#X obj 351 62 inlet; -#X text 358 30 mute; -#X obj 351 192 f; -#X msg 442 185 0; -#X msg 351 88 bang; -#X obj 351 140 moses 1; -#X obj 413 122 moses 1; -#X obj 86 154 dbtorms; -#X obj 413 96 r master-lvl; -#X obj 86 44 r master-lvl; -#X obj 351 218 s master-lvl; -#X obj 24 163 inlet~; -#X obj 207 42 inlet; -#X text 207 19 level; -#X obj 207 104 s master-lvl; -#X msg 100 67 set \$1; -#X obj 100 93 outlet; -#X msg 222 66 \; pd dsp 1; -#X obj 86 202 line~; -#X obj 23 221 *~; -#X obj 23 250 dac~; -#X obj 86 178 pack 0 50; -#X text 22 140 audio; -#X obj 442 159 t b; -#X obj 21 191 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 25 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 25 0 5 0; -#X connect 26 0 21 0; -#X restore 26 610 pd output; -#X msg 102 581 MUTE; -#X obj 27 446 *~; -#X obj 27 474 *~; -#X floatatom 62 277 3 0 100; -#X msg 484 482 \; trigger 0; -#X obj 27 246 unpack; -#X floatatom 27 277 1 0 100; -#X text 463 668 updated for Pd version 0.34; -#X obj 26 525 +~ 0.3; -#X obj 26 551 cos~; -#X obj 26 499 osc~; -#X text 88 9 PORTAMENTO AND VIBRATO; -#X obj 62 300 mtof; -#X obj 62 325 sqrt; -#X obj 62 350 sqrt; -#X text 619 402 <-- midC; -#X text 607 444 <-- octave up; -#X msg 484 388 \; trigger 1 60; -#X msg 483 435 \; trigger 1 72; -#X text 584 488 <-- release; -#X text 590 506 is optional; -#X obj 27 416 *~; -#X obj 236 396 +~ 1; -#X graph graph1 0 -1 130 1 433 643 633 543; -#X array array62 131 float 1; -#A 0 0.970031 1 0.970031 0.881921 0.740952 0.555571 0.336891 0.0980184 --0.146729 -0.382682 -0.595698 -0.773009 -0.88 -0.9 -0.92 -0.92 -0.85773 --0.707109 -0.514106 -0.290288 -0.0490716 0.195086 0.427551 0.63439 -0.803205 0.86 0.88 0.88 0.88 0.84 0.82 0.471402 0.242986 6.63397e-06 --0.242974 -0.471391 -0.671554 -0.831465 -0.941541 -0.995184 -0.989178 --0.923883 -0.803213 -0.68 -0.42 -0.24 0.1 0.4 0.6 0.7071 0.857723 0.956937 -0.998795 0.980787 0.903994 0.773018 0.595708 0.382694 0.146742 -0.0980052 --0.336878 -0.55556 -0.7 -0.8 -0.88 -0.88 -0.88 -0.84 -0.82 -0.555582 --0.336903 -0.0980316 0.146716 0.38267 0.595687 0.773001 0.903983 0.980782 -0.998796 0.956945 0.857737 0.707119 0.514117 0.290301 0.0490849 -0.195073 --0.427539 -0.63438 -0.803197 -0.923873 -0.989174 -0.995187 -0.94155 --0.83148 -0.671573 -0.471414 -0.242999 -1.99019e-05 0.242961 0.471379 -0.671544 0.831458 0.88 0.9 0.9 0.88 0.803221 0.63441 0.08 -0.14 -0.28 --0.48 -0.64 -0.72 -0.857717 -0.956933 -0.998794 -0.98079 -0.904 -0.773026 --0.595719 -0.382706 -0.146755 0.097992 0.336866 0.555549 0.740934 0.881909 -0.970025 1 0.970038; -#X pop; -#X obj 236 342 tabosc4~ array62; -#X floatatom 236 286 3 0 0; -#X obj 236 313 / 6; -#X obj 236 370 *~; -#X floatatom 390 323 3 0 0; -#X text 235 421 since we'll multiply \,; -#X text 234 436 vibrato output should; -#X text 234 453 be centered at 1 \, not 0; -#X text 275 372 multiply by vib depth; -#X obj 390 350 / 6923; -#X text 28 35 Portamento can be treated as a special case of an ADSR -envelope \, with 100 percent sustain. Vibrato is properly computed -in units of pitch \, but it's also easy to add vibrato to the envelope--before -raising it to the fourth power \, so that it acts pseudo-logarithmically. -Rather than add to the ADSR output \, we multiply a signal which controls -relative frequency. The relative frequency change is one plus an oscillator. -; -#X text 61 417 apply vibrato; -#X text 65 445 fourth; -#X text 68 461 power; -#X text 96 529 waveform; -#X text 95 509 simple; -#X text 465 344 4/(exp(log(2)/1200)-1); -#X text 469 325 conversion factor is; -#X text 383 279 vibrato depth; -#X text 382 296 in cents; -#X text 233 245 vibrato speed; -#X text 232 262 in Hertz; -#X text 152 168 I made a table with 6 cycles of vibrato and made small -changes with the mouse to get a not-exactly-repeating vibrato \, and -thus have to divide vibrato frequency by 6 You can just use a sine -or triangle wave if you prefer.; -#X obj 27 375 adsr 0 100 200 100 300; -#X connect 0 0 8 0; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 4 0 5 0; -#X connect 4 0 5 1; -#X connect 5 0 13 0; -#X connect 6 0 15 0; -#X connect 8 0 9 0; -#X connect 8 1 6 0; -#X connect 9 0 50 0; -#X connect 11 0 12 0; -#X connect 12 0 2 0; -#X connect 13 0 11 0; -#X connect 15 0 16 0; -#X connect 16 0 17 0; -#X connect 17 0 50 1; -#X connect 24 0 4 0; -#X connect 24 0 4 1; -#X connect 25 0 24 1; -#X connect 27 0 30 0; -#X connect 28 0 29 0; -#X connect 29 0 27 0; -#X connect 30 0 25 0; -#X connect 31 0 36 0; -#X connect 36 0 30 1; -#X connect 50 0 24 0; diff --git a/pd/doc/3.audio.examples/71.adsr.sequenced.pd b/pd/doc/3.audio.examples/71.adsr.sequenced.pd deleted file mode 100644 index 26300054..00000000 --- a/pd/doc/3.audio.examples/71.adsr.sequenced.pd +++ /dev/null @@ -1,217 +0,0 @@ -#N canvas 32 15 950 613 12; -#X obj 33 220 r trigger; -#X floatatom 70 520 0 0 0; -#N canvas 159 26 584 307 output 0; -#X obj 390 189 t b; -#X obj 390 129 f; -#X obj 390 69 inlet; -#X text 397 32 mute; -#X obj 390 219 f; -#X msg 451 217 0; -#X msg 390 99 bang; -#X obj 390 159 moses 1; -#X obj 460 137 moses 1; -#X obj 100 178 dbtorms; -#X obj 460 107 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 390 249 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X restore 32 546 pd output; -#X msg 108 521 MUTE; -#X obj 33 438 *~; -#X obj 33 331 *~ 0.01; -#X obj 33 366 *~; -#X obj 33 396 *~; -#X obj 80 360 r pitch; -#X obj 80 410 mtof; -#X floatatom 80 385 4 0 0; -#X floatatom 57 272 4 0 0; -#X obj 57 247 r level; -#X floatatom 131 272 4 0 0; -#X obj 131 247 r attack; -#X floatatom 216 272 4 0 0; -#X obj 216 247 r decay; -#X floatatom 291 272 4 0 0; -#X floatatom 385 272 4 0 0; -#X obj 291 247 r sustain; -#X obj 385 247 r release; -#X obj 509 106 r note; -#X msg 510 195 \; trigger 1; -#X obj 634 185 del; -#X msg 634 210 \; trigger 0; -#X obj 9 167 qlist; -#X obj 8 6 r qlist; -#X msg 30 35 bang; -#X msg 30 60 rewind; -#X obj 37 89 r tempo; -#X floatatom 37 114 4 0 0; -#X msg 37 139 tempo \$1; -#X obj 509 156 t b f; -#X obj 564 157 s pitch; -#X obj 656 120 r duration; -#X floatatom 656 145 4 0 0; -#X floatatom 509 131 4 0 0; -#X obj 289 320 r trigger; -#X floatatom 315 376 4 0 0; -#X floatatom 387 406 4 0 0; -#X floatatom 477 406 4 0 0; -#X floatatom 563 406 4 0 0; -#X floatatom 659 406 4 0 0; -#X obj 315 351 r level2; -#X obj 387 381 r attack2; -#X obj 477 381 r decay2; -#X obj 563 381 r sustain2; -#X obj 659 381 r release2; -#X obj 80 435 tabosc4~ array1; -#X floatatom 239 366 4 0 0; -#X obj 33 482 vcf~; -#X floatatom 140 488 4 0 0; -#X obj 140 463 r q; -#X obj 33 306 adsr 0 0 0 0 0; -#X obj 289 444 adsr 0 0 0 0 0; -#X obj 315 401 / 69.23; -#X obj 239 391 mtof; -#X obj 239 416 sqrt; -#X obj 239 441 sqrt; -#X obj 197 336 r filter; -#X obj 240 494 *~; -#X obj 240 519 *~; -#X obj 289 469 +~ 1; -#X obj 239 466 *~; -#X text 139 215 ADSR for amplitude:; -#X text 402 300 ADSR for filter. Here \, I thought it better to make -the envelope modify a constant "filter pitch"--so the "filter" receive -gets the "mtof" treatment and the ADSR is an offset in halftones (thus -the "/ 69.23" as compared to the previous patch.); -#X text 141 5 USING QLIST TO MAKE SEQUENCES OF "NOTES"; -#N canvas -10 258 703 380 otherstuff 0; -#X obj 289 86 loadbang; -#X obj 418 85 loadbang; -#X graph graph2 0 -1 66 1 62 221 262 81; -#X array array1 67 float 1; -#A 0 0 0 0 0 0.714286 0.742857 0.757143 0.771429 0.778571 0.785714 -0.785714 0.785714 0.785714 0.790476 0.795238 0.614286 0.585714 0.442857 -0.271429 -0.128571 -0.142857 -0.157143 -0.171429 -0.642857 -0.528571 --0.614286 -0.685714 -0.828571 -0.828571 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.557143 0.571429 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; -#X pop; -#X msg 418 115 \; qlist read qlist2.txt; -#X msg 289 111 \; level 100 \; attack 20 \; decay 300 \; sustain 70 -\; release 300 \; duration 300 \; pitch 72 \; filter 38 \; level2 49 -\; attack2 19 \; decay2 300 \; sustain2 17 \; release2 700 \; q 3 \; -tempo 1; -#X connect 0 0 4 0; -#X connect 1 0 3 0; -#X restore 32 571 pd otherstuff; -#X text 82 34 <--start loop; -#X text 99 62 <--stop loop; -#X text 85 114 <--set tempo; -#X text 248 34 The qlist reads the file \, "qlist2.txt" \, which contains -four "note" messages and a message at the end that restarts the qlist -at the beginning. The "note" messages are translated into a pitch change -and triggers for the ADSRs:; -#X text 694 573 updated for Pd version 0.34; -#X text 155 573 <--loadbangs and table; -#X msg 468 518 \; qlist read qlist2.txt; -#X text 462 494 click to reload qlist2.txt; -#X text 149 521 <--output; -#X connect 0 0 53 0; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 4 0 50 0; -#X connect 5 0 6 0; -#X connect 5 0 6 1; -#X connect 6 0 7 0; -#X connect 6 0 7 1; -#X connect 7 0 4 0; -#X connect 8 0 10 0; -#X connect 9 0 48 0; -#X connect 10 0 9 0; -#X connect 11 0 53 1; -#X connect 12 0 11 0; -#X connect 13 0 53 2; -#X connect 14 0 13 0; -#X connect 15 0 53 3; -#X connect 16 0 15 0; -#X connect 17 0 53 4; -#X connect 18 0 53 5; -#X connect 19 0 17 0; -#X connect 20 0 18 0; -#X connect 21 0 36 0; -#X connect 23 0 24 0; -#X connect 26 0 25 0; -#X connect 27 0 25 0; -#X connect 28 0 25 0; -#X connect 29 0 30 0; -#X connect 30 0 31 0; -#X connect 31 0 25 0; -#X connect 32 0 23 0; -#X connect 32 0 22 0; -#X connect 32 1 33 0; -#X connect 34 0 35 0; -#X connect 35 0 23 1; -#X connect 36 0 32 0; -#X connect 37 0 54 0; -#X connect 38 0 55 0; -#X connect 39 0 54 2; -#X connect 40 0 54 3; -#X connect 41 0 54 4; -#X connect 42 0 54 5; -#X connect 43 0 38 0; -#X connect 44 0 39 0; -#X connect 45 0 40 0; -#X connect 46 0 41 0; -#X connect 47 0 42 0; -#X connect 48 0 4 1; -#X connect 49 0 56 0; -#X connect 50 0 2 0; -#X connect 51 0 50 2; -#X connect 52 0 51 0; -#X connect 53 0 5 0; -#X connect 54 0 62 0; -#X connect 55 0 54 1; -#X connect 56 0 57 0; -#X connect 57 0 58 0; -#X connect 58 0 63 0; -#X connect 59 0 49 0; -#X connect 60 0 61 0; -#X connect 60 0 61 1; -#X connect 61 0 50 1; -#X connect 62 0 63 1; -#X connect 63 0 60 0; -#X connect 63 0 60 1; diff --git a/pd/doc/3.audio.examples/72.execution.order.pd b/pd/doc/3.audio.examples/72.execution.order.pd deleted file mode 100644 index 2bea8e92..00000000 --- a/pd/doc/3.audio.examples/72.execution.order.pd +++ /dev/null @@ -1,127 +0,0 @@ -#N canvas 100 17 724 631 12; -#X floatatom 448 290 0 0 0; -#X obj 70 432 +~; -#X obj 91 401 vd~ delay1; -#X floatatom 108 559 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 18 152 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 197 104 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 16 129 audio; -#X text 93 110 show level; -#X obj 18 179 hip~ 5; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 70 585 pd output; -#X msg 145 559 MUTE; -#X text 184 558 <-- output amplitude; -#X text 86 9 ORDER OF EXECUTION OF DELWRITE~ AND DELREAD~/VD~; -#X text 43 35 If you're writing to and reading from a delay line \, -you have to get the write sorted before the read or else you'll never -get less than a block's delay. This patch compares a "wrong" flanger -with a "right" one:; -#X obj 69 299 noise~; -#X obj 91 375 line~; -#X obj 448 344 pack 0 100; -#X text 518 292 <-- delay in samples; -#X obj 92 505 *~; -#X obj 92 481 -~; -#X floatatom 175 505 1 0 0; -#X obj 293 297 noise~; -#X obj 423 398 line~; -#N canvas 0 0 600 400 delay-writer 0; -#X obj 96 107 inlet~; -#X obj 96 180 outlet~; -#X obj 116 144 delwrite~ delay2 1000; -#X connect 0 0 1 0; -#X connect 0 0 2 0; -#X restore 293 325 pd delay-writer; -#N canvas 0 0 280 330 delay-reader 0; -#X obj 96 107 inlet~; -#X obj 89 267 outlet~; -#X obj 112 163 inlet~; -#X obj 112 198 vd~ delay2; -#X obj 89 237 +~; -#X connect 0 0 4 0; -#X connect 2 0 3 0; -#X connect 3 0 4 1; -#X connect 4 0 1 0; -#X restore 293 427 pd delay-reader; -#X obj 70 533 +~; -#X text 194 505 <-- 0 to hear left-hand side \, 1 to hear right hand -side.; -#X text 46 105 All it took was to put the delread~ and vd~ objects -in subpatches. The audio connections between the subpatches force the -"reader" to be sorted after the "writer". DSP sorting in Pd follows -the hierarchy of windows.; -#X obj 447 318 / 44.1; -#X obj 82 329 delwrite~ delay1 1000; -#X text 450 596 updated for Pd version 0.34; -#X text 43 173 To hear the difference scroll the delay time between -0 and 100 samples. The patch at left doesn't let you get below 64 samples. -; -#X text 43 228 You can use the same strategy to avoid picking up 64-sample -delays in send~/receive~ and throw~/catch~ pairs.; -#X connect 0 0 23 0; -#X connect 1 0 14 1; -#X connect 1 0 20 0; -#X connect 2 0 1 1; -#X connect 3 0 4 1; -#X connect 4 0 3 0; -#X connect 5 0 4 2; -#X connect 9 0 1 0; -#X connect 9 0 24 0; -#X connect 10 0 2 0; -#X connect 11 0 10 0; -#X connect 11 0 17 0; -#X connect 13 0 20 1; -#X connect 14 0 13 0; -#X connect 15 0 13 1; -#X connect 16 0 18 0; -#X connect 17 0 19 1; -#X connect 18 0 19 0; -#X connect 19 0 14 0; -#X connect 20 0 4 0; -#X connect 23 0 11 0; diff --git a/pd/doc/3.audio.examples/73.control.blocksize.pd b/pd/doc/3.audio.examples/73.control.blocksize.pd deleted file mode 100644 index 05bad0d2..00000000 --- a/pd/doc/3.audio.examples/73.control.blocksize.pd +++ /dev/null @@ -1,111 +0,0 @@ -#N canvas 100 17 662 466 12; -#X floatatom 130 389 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 18 152 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 197 104 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 16 129 audio; -#X text 93 110 show level; -#X obj 18 179 hip~ 5; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 92 415 pd output; -#X msg 167 389 MUTE; -#X text 206 388 <-- output amplitude; -#X obj 51 203 noise~; -#N canvas 0 0 760 350 delay-writer 0; -#X obj 75 100 inlet~; -#X obj 79 250 outlet~; -#X obj 90 194 delwrite~ delay3 1000; -#X obj 379 97 block~ 1; -#X obj 145 131 delread~ delay3; -#X obj 144 159 *~ 0.99; -#X obj 79 164 +~; -#X obj 146 100 inlet; -#X text 84 22 Because of the feedback \, the delwrite~ has to go after -the delread~. So we set the blocksize to 1 to minimize the resulting -delay.; -#X connect 0 0 6 0; -#X connect 4 0 5 0; -#X connect 5 0 6 1; -#X connect 6 0 2 0; -#X connect 6 0 1 0; -#X connect 7 0 4 0; -#X restore 91 328 pd delay-writer; -#X text 401 435 updated for Pd version 0.34; -#X obj 77 285 *~; -#X obj 273 275 expr 1000/$f1; -#X obj 273 249 mtof; -#X msg 176 220 1; -#X msg 176 282 0; -#X obj 177 164 metro 500; -#X obj 273 195 random 60; -#X obj 177 135 loadbang; -#X obj 216 217 del 2; -#X obj 273 221 + 30; -#X obj 51 228 lop~ 1000; -#X text 86 9 CONTROLLING DELAY WITH BLOCK~; -#X text 75 52 In situations where a delay read feeds pack to a delay -write \, you can shorten the minimum delay by changing the block size. -Do this in a subpatch...; -#X text 238 328 <-- here is the delay loop; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 17 0; -#X connect 5 0 1 0; -#X connect 7 0 5 0; -#X connect 8 0 5 1; -#X connect 9 0 8 0; -#X connect 10 0 7 1; -#X connect 11 0 7 1; -#X connect 12 0 10 0; -#X connect 12 0 13 0; -#X connect 12 0 15 0; -#X connect 13 0 16 0; -#X connect 14 0 12 0; -#X connect 15 0 11 0; -#X connect 16 0 9 0; -#X connect 17 0 7 0; diff --git a/pd/doc/3.audio.examples/74.up.downsampling.pd b/pd/doc/3.audio.examples/74.up.downsampling.pd deleted file mode 100644 index cf50f9b9..00000000 --- a/pd/doc/3.audio.examples/74.up.downsampling.pd +++ /dev/null @@ -1,191 +0,0 @@ -#N canvas 32 25 1089 690 10; -#X obj 57 567 osc~ 412; -#X floatatom 58 543 5 0 0; -#X obj 122 595 tabwrite~ scope; -#X msg 122 571 bang; -#X msg 205 43 bang; -#X obj 42 191 tabwrite~ scope; -#X msg 54 165 bang; -#N canvas 316 181 600 400 simple 0; -#X obj 185 46 inlet; -#X obj 185 102 tabwrite~ scope; -#X obj 78 38 inlet~; -#X obj 78 258 outlet~; -#X obj 317 103 block~ 64 1 0.25; -#X connect 0 0 1 0; -#X connect 2 0 1 0; -#X connect 2 0 3 0; -#X restore 42 64 pd simple downsampling 4; -#X msg 451 42 bang; -#X obj 275 190 tabwrite~ scope; -#X msg 287 164 bang; -#X graph graph2 0 -1 511 1 297 629 897 489; -#X array scope 512 float 0; -#X pop; -#X msg 683 45 bang; -#X obj 520 193 tabwrite~ scope; -#X msg 532 167 bang; -#X msg 929 44 bang; -#X obj 753 192 tabwrite~ scope; -#X msg 765 166 bang; -#N canvas 165 168 600 400 simple 0; -#X obj 185 74 inlet; -#X obj 185 102 tabwrite~ scope; -#X obj 78 38 inlet~; -#X obj 78 258 outlet~; -#X text 130 38 zero-padding upsampling; -#X obj 317 103 block~ 64 1 4; -#X connect 0 0 1 0; -#X connect 2 0 1 0; -#X connect 2 0 3 0; -#X restore 520 66 pd simple upsampling 4; -#X obj 42 38 r~ sine; -#X obj 275 39 r~ sine; -#X obj 57 595 s~ sine; -#X obj 520 41 r~ sine; -#X obj 753 41 r~ sine; -#X obj 41 415 tabwrite~ scope; -#X msg 47 369 bang; -#X msg 804 265 bang; -#X obj 711 415 tabwrite~ scope; -#X msg 723 389 bang; -#X obj 41 262 r~ sine; -#X obj 711 264 r~ sine; -#X obj 152 416 tabwrite~ scope; -#X msg 158 370 bang; -#X text 43 431 zero-padded; -#N canvas 290 149 600 400 downsampling 0; -#X obj 78 38 inlet~; -#X obj 78 258 outlet~; -#X obj 152 258 outlet~ hold; -#X obj 317 103 block~ 64 1 0.25; -#X connect 0 0 1 0; -#X connect 0 0 2 0; -#X restore 41 288 pd downsampling 4 (mixed); -#N canvas 261 147 600 400 bad 0; -#X obj 185 81 inlet; -#X obj 185 102 tabwrite~ scope; -#X text 172 257 "lin" is for linear upsampling; -#X text 160 39 "lin" has no meaning when downsampling; -#X obj 317 103 block~ 64 2; -#X obj 78 258 outlet~; -#X obj 78 38 inlet~; -#X connect 0 0 1 0; -#X connect 6 0 1 0; -#X connect 6 0 5 0; -#X restore 711 288 pd bad overlap; -#X msg 1018 263 bang; -#X obj 841 415 tabwrite~ scope; -#X msg 853 389 bang; -#X obj 841 264 r~ sine; -#N canvas 121 72 600 400 bad 0; -#X obj 185 81 inlet; -#X obj 185 102 tabwrite~ scope; -#X obj 78 258 outlet~ lin; -#X obj 78 38 inlet~ lin; -#X text 167 38 "lin" is for linear upsampling; -#X text 166 259 "lin" has no meaning when downsampling; -#X obj 317 103 block~ 64 2 2; -#X connect 0 0 1 0; -#X connect 3 0 1 0; -#X connect 3 0 2 0; -#X restore 841 288 pd bad overlap (upsampled); -#X msg 458 267 bang; -#X obj 323 417 tabwrite~ scope; -#X msg 335 391 bang; -#X obj 323 266 r~ sine; -#X text 155 433 sample&hold; -#X msg 653 265 bang; -#X obj 511 416 tabwrite~ scope; -#X msg 523 390 bang; -#X obj 511 265 r~ sine; -#N canvas 249 128 600 400 downsampled 0; -#X obj 185 81 inlet; -#X obj 185 102 tabwrite~ scope; -#X obj 78 258 outlet~ lin; -#X obj 78 230 *~ 0.5; -#X obj 78 38 inlet~; -#X obj 317 103 block~ 128 2 0.25; -#X connect 0 0 1 0; -#X connect 3 0 2 0; -#X connect 4 0 1 0; -#X connect 4 0 3 0; -#X restore 511 289 pd downsampled overlap; -#N canvas 175 94 600 400 upsampled 0; -#X obj 185 81 inlet; -#X obj 185 102 tabwrite~ scope; -#X obj 78 258 outlet~ lin; -#X obj 78 38 inlet~ lin; -#X obj 78 230 *~ 0.5; -#X obj 317 103 block~ 256 2 2; -#X connect 0 0 1 0; -#X connect 3 0 1 0; -#X connect 3 0 4 0; -#X connect 4 0 2 0; -#X restore 323 290 pd upsampled overlap; -#N canvas 350 164 600 400 upsampling 0; -#X obj 185 81 inlet; -#X obj 185 102 tabwrite~ scope; -#X obj 78 38 inlet~ hold; -#X obj 78 258 outlet~; -#X text 160 39 "hold" is for sample&hold upsampling; -#X obj 317 103 block~ 64 1 16; -#X connect 0 0 1 0; -#X connect 2 0 1 0; -#X connect 2 0 3 0; -#X restore 753 65 pd upsampling 16 (sample&hold); -#N canvas 236 170 600 400 downsampling 0; -#X obj 185 81 inlet; -#X obj 185 102 tabwrite~ scope; -#X obj 78 258 outlet~ lin; -#X obj 78 38 inlet~ lin; -#X text 172 257 "lin" is for linear upsampling; -#X obj 320 102 block~ 64 1 0.125; -#X text 330 137 0.125 = 1/8 = 8*downsampling; -#X text 160 39 "lin" has (still !) no meaning when downsampling; -#X connect 0 0 1 0; -#X connect 3 0 1 0; -#X connect 3 0 2 0; -#X restore 275 63 pd downsampling 8 (linear); -#X text 718 314 a pd-bug !; -#X connect 0 0 2 0; -#X connect 0 0 21 0; -#X connect 1 0 0 0; -#X connect 3 0 2 0; -#X connect 4 0 7 1; -#X connect 6 0 5 0; -#X connect 7 0 5 0; -#X connect 8 0 53 1; -#X connect 10 0 9 0; -#X connect 12 0 18 1; -#X connect 14 0 13 0; -#X connect 15 0 52 1; -#X connect 17 0 16 0; -#X connect 18 0 13 0; -#X connect 19 0 7 0; -#X connect 20 0 53 0; -#X connect 22 0 18 0; -#X connect 23 0 52 0; -#X connect 25 0 24 0; -#X connect 26 0 35 1; -#X connect 28 0 27 0; -#X connect 29 0 34 0; -#X connect 30 0 35 0; -#X connect 32 0 31 0; -#X connect 34 0 24 0; -#X connect 34 1 31 0; -#X connect 35 0 27 0; -#X connect 36 0 40 1; -#X connect 38 0 37 0; -#X connect 39 0 40 0; -#X connect 40 0 37 0; -#X connect 41 0 51 1; -#X connect 43 0 42 0; -#X connect 44 0 51 0; -#X connect 46 0 50 1; -#X connect 48 0 47 0; -#X connect 49 0 50 0; -#X connect 50 0 47 0; -#X connect 51 0 42 0; -#X connect 52 0 16 0; -#X connect 53 0 9 0; diff --git a/pd/doc/3.audio.examples/A00.intro.pd b/pd/doc/3.audio.examples/A00.intro.pd new file mode 100644 index 00000000..69087781 --- /dev/null +++ b/pd/doc/3.audio.examples/A00.intro.pd @@ -0,0 +1,10 @@ +#N canvas 440 252 579 286 12; +#X text 87 6 INTRODUCTION TO THE PD AUDIO EXAMPLE PATCHES; +#X text 328 257 updated for Pd version 0.37; +#X text 34 45 This is the second of three tutorial series on Pd. This +one shows the time-domain audio processing features. (The first one +showed how to use Pd to do "control" computations \, and the third +is about frequency-domain techniques.); +#X text 33 125 These patches are accompanied by an ONLINE BOOK:; +#X text 100 158 http://www.crca.ucsd.edu/~msp/techniques.htm; +#X text 37 189 which develops the underlying theory.; diff --git a/pd/doc/3.audio.examples/A00.intro.txt b/pd/doc/3.audio.examples/A00.intro.txt new file mode 100644 index 00000000..d982eedd --- /dev/null +++ b/pd/doc/3.audio.examples/A00.intro.txt @@ -0,0 +1,9 @@ +This is the second of three tutorial series on Pd. This one shows the +time-domain audio processing features. (The first one showed how to use Pd to +do "control" computations, and the third is about frequency-domain techniques.) + +These patches are accompanied by an ONLINE BOOK: + + http://www.crca.ucsd.edu/~msp/techniques.htm + +which develops the underlying theory. diff --git a/pd/doc/3.audio.examples/A07.frequency.mod.pd b/pd/doc/3.audio.examples/A07.frequency.mod.pd index a7bab032..aedb1cc1 100644 --- a/pd/doc/3.audio.examples/A07.frequency.mod.pd +++ b/pd/doc/3.audio.examples/A07.frequency.mod.pd @@ -1,105 +1,54 @@ -#N canvas 52 144 760 640 12; -#X obj 256 180 *~; -#X floatatom 256 95 0 0 0; -#X floatatom 166 130 0 0 0; -#X obj 166 200 +~; -#X graph graph1 0 -1.02 440 1.02 527 170 727 40; +#N canvas 92 96 760 640 12; +#X obj 259 168 *~; +#X floatatom 259 83 0 0 0 0 - - -; +#X floatatom 169 118 0 0 0 0 - - -; +#X obj 169 188 +~; +#N canvas 0 0 450 300 graph1 0; #X array fm-output 441 float 0; -#X pop; -#X floatatom 204 300 0 0 100; -#N canvas 159 26 516 274 output 1; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 396 182 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 391 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 391 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 104 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 159 audio; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X restore 166 328 pd output; -#X msg 242 301 MUTE; -#X text 283 301 <-- output amplitude; -#X msg 242 248 bang; -#X text 284 248 <-- click to graph; -#X obj 242 272 tabwrite~ fm-output; -#X floatatom 278 150 0 0 0; -#X text 163 87 carrier; -#X text 162 105 frequency; -#X text 241 71 frequency; -#X text 242 54 modulation; +#X coords 0 1.02 440 -1.02 200 130 1; +#X restore 527 40 graph; +#X msg 244 228 bang; +#X text 286 228 <-- click to graph; +#X obj 244 252 tabwrite~ fm-output; +#X floatatom 281 138 0 0 0 0 - - -; +#X text 166 75 carrier; +#X text 165 93 frequency; +#X text 244 59 frequency; +#X text 245 42 modulation; #X text 33 8 FREQUENCY MODULATION ("FM") USING TWO OSCILLATORS; -#X obj 166 252 osc~; -#X text 50 234 "carrier"; -#X text 32 252 oscillator -->; -#X text 40 161 add modulator; -#X text 39 179 to carrier; -#X text 37 198 frequency -->; -#X text 317 162 index; -#X text 319 143 modulation; -#X text 477 601 updated for Pd version 0.34; -#X obj 256 120 osc~; -#X text 52 363 This shows the classical FM synthesis technique developed -by John Chowning. It's nothing but an oscillator with vibrato controlled -by another "modulation" oscillator. First \, to understand the patch -\, set carrier frequency to 400 or so \, modulation frequency between -5 and 10 \, and try modulation index values between 0 and 400 \, say. -You'll hear a sine wave with vibrato.; +#X obj 168 232 osc~; +#X text 52 214 "carrier"; +#X text 34 232 oscillator -->; +#X text 47 149 add modulator; +#X text 46 167 to carrier; +#X text 44 186 frequency -->; +#X text 320 150 index; +#X text 322 131 modulation; +#X obj 259 108 osc~; #X text 531 172 --- 0.01 seconds ----; -#X text 51 478 To get the FM sound \, set all three of carrier frequency +#X text 53 443 To get the FM sound \, set all three of carrier frequency \, modulation frequency \, and modulation index in the hundreds. Note that you get a timbral change as you sweep modulation index \, because this changes the amplitudes of the components of the output sound but not their frequencies.; -#X text 48 564 The component frequencies are equal to the carrier frequency -\, plus or minus multiples of the modulator frequency.; +#X obj 167 270 output~; +#X text 489 613 updated for Pd version 0.37; +#X text 54 332 This patch shows the classical FM synthesis technique +developed by John Chowning. It's nothing but an oscillator with vibrato +controlled by another "modulation" oscillator. First \, to understand +the patch \, set carrier frequency to 400 or so \, modulation frequency +between 5 and 10 \, and try modulation index values between 0 and 400 +\, say. You'll hear a sine wave with vibrato.; +#X text 55 526 The component frequencies are equal to the carrier frequency +\, plus or minus multiples of the modulator frequency. A more complete +discussion of FM occurs in part 5 of this series.; #X connect 0 0 3 1; -#X connect 1 0 27 0; +#X connect 1 0 22 0; #X connect 2 0 3 0; -#X connect 3 0 18 0; -#X connect 5 0 6 1; -#X connect 6 0 5 0; -#X connect 7 0 6 2; -#X connect 9 0 11 0; -#X connect 12 0 0 1; -#X connect 18 0 11 0; -#X connect 18 0 6 0; -#X connect 27 0 0 0; +#X connect 3 0 14 0; +#X connect 5 0 7 0; +#X connect 8 0 0 1; +#X connect 14 0 7 0; +#X connect 14 0 25 0; +#X connect 14 0 25 1; +#X connect 22 0 0 0; diff --git a/pd/doc/3.audio.examples/A08.phase.mod.pd b/pd/doc/3.audio.examples/A08.phase.mod.pd deleted file mode 100644 index 716ba6ab..00000000 --- a/pd/doc/3.audio.examples/A08.phase.mod.pd +++ /dev/null @@ -1,246 +0,0 @@ -#N canvas 36 68 722 738 12; -#X obj 216 145 *~; -#X floatatom 216 88 0 0 0; -#X obj 297 125 line~; -#X floatatom 128 108 0 0 0; -#X obj 128 222 cos~; -#X obj 128 178 +~; -#X floatatom 166 299 0 0 100; -#N canvas 159 26 495 270 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 159 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 128 326 pd output; -#X msg 204 299 MUTE; -#X obj 216 113 osc~ 0; -#X obj 297 99 pack 0 50; -#X floatatom 297 46 0 0 0; -#X obj 297 73 / 100; -#X text 271 8 modulation index; -#X text 271 23 in hundredths; -#X text 125 65 carrier; -#X text 124 83 frequency; -#X text 201 64 frequency; -#X text 202 47 modulation; -#X text 33 119 carrier; -#X text 33 134 phase -->; -#X text 6 162 phase; -#X text 5 177 modulation-->; -#X text 12 204 output; -#X text 11 221 waveform -->; -#X text 527 6 PHASE MODULATION; -#X text 417 703 updated for Pd version 0.34; -#X text 13 377 Most implementations of "FM" actually use phase \, not -frequency \, modulation \, because it extends in a more natural way -to "multi-operator FM" with three or more oscillators.; -#X text 15 437 To do phase modulation \, we split the "carrier oscillator" -into its phase calculation (phasor~) and its waveform lookup (cos~). -These together would be equivalent to an osc~ object \, but the "+~" -between them adds the modulating oscillator's output to the phase. -; -#X text 18 587 The units of the "modulation" index change--it is now -dimensionless and relative to the modulation frequency \, and "good" -values tend to be between 0 and 1 In this patch it's in hundredths. -; -#X text 19 658 We also have to use a line~ to smooth changes in the -modulation index \, which wasn't necessary in the previous patch.; -#X obj 128 135 phasor~; -#X obj 117 557 cos~; -#X obj 117 529 phasor~; -#X text 60 539 this:; -#X text 219 532 is the same; -#X text 220 551 as this:; -#X obj 335 544 osc~; -#X graph graph2 0 -1 440 1 509 330 709 190; -#X array phase-out 441 float 1; -#A 0 0.43245 0.433463 0.434452 0.435418 0.43636 0.43728 0.438178 0.439056 -0.439912 0.440749 0.441567 0.442366 0.443148 0.443912 0.444659 0.445391 -0.446107 0.446809 0.447497 0.448172 0.448834 0.449484 0.450122 0.450751 -0.451369 0.451978 0.452579 0.453172 0.453758 0.454338 0.454911 0.45548 -0.456045 0.456606 0.457164 0.457719 0.458274 0.458827 0.45938 0.459934 -0.460489 0.461046 0.461605 0.462168 0.462735 0.463306 0.463883 0.464466 -0.465056 0.465654 0.466259 0.466873 0.467497 0.468131 0.468776 0.469433 -0.470102 0.470783 0.471479 0.472188 0.472913 0.473653 0.474409 0.475182 -0.475973 0.476782 0.477611 0.478459 0.479327 0.480216 0.481127 0.48206 -0.483015 0.483994 0.484997 0.486024 0.487077 0.488156 0.48926 0.490392 -0.491552 0.49274 0.493957 0.495203 0.496479 0.497785 0.499123 0.500493 -0.501896 0.503332 0.504801 0.506304 0.507842 0.509415 0.511023 0.512667 -0.514348 0.516066 0.517821 0.519615 0.521447 0.523318 0.525228 0.527179 -0.52917 0.531202 0.533275 0.53539 0.537547 0.539747 0.541992 0.54428 -0.546613 0.548989 0.551411 0.553877 0.556389 0.558947 0.561551 0.564202 -0.5669 0.569645 0.572437 0.575278 0.578166 0.581104 0.58409 0.587125 -0.59021 0.593345 0.596529 0.599764 0.603051 0.606389 0.609778 0.613219 -0.61671 0.620254 0.62385 0.627497 0.631197 0.634949 0.638754 0.642612 -0.646522 0.650486 0.654503 0.658573 0.662696 0.666873 0.671104 -0.324611 --0.320273 -0.315881 -0.311434 -0.306931 -0.302375 -0.297764 -0.2931 --0.288381 -0.283608 -0.278781 -0.2739 -0.268964 -0.263975 -0.258931 --0.253833 -0.248682 -0.243476 -0.238217 -0.232904 -0.227537 -0.222116 --0.216642 -0.211115 -0.205534 -0.1999 -0.194211 -0.18847 -0.182675 --0.176829 -0.170929 -0.164978 -0.158975 -0.152919 -0.146813 -0.140655 --0.134446 -0.128186 -0.121875 -0.115514 -0.109103 -0.102642 -0.0961313 --0.0895714 -0.0829625 -0.0763049 -0.0695988 -0.0628447 -0.056041 -0.0491896 --0.0422913 -0.0353461 -0.0283546 -0.0213171 -0.0142339 -0.00710538 -6.80089e-05 0.00728586 0.0145478 0.0218535 0.0292025 0.0365944 0.0440286 -0.0515049 0.0590228 0.0665818 0.0741815 0.0818213 0.0895009 0.0972198 -0.104978 0.112776 0.120611 0.128484 0.136393 0.144339 0.15232 0.160337 -0.168388 0.176473 0.184592 0.192744 0.200929 0.209146 0.217393 0.225672 -0.233981 0.24232 0.250688 0.259084 0.267509 0.27596 0.284439 0.292944 -0.301475 0.310031 0.318611 0.327215 0.335842 0.344491 0.353162 0.361854 -0.370566 0.379298 0.38805 0.39682 0.405608 0.414413 0.423234 0.432072 -0.440924 0.449792 0.458673 0.467567 0.476474 0.485394 0.494324 0.503265 -0.512216 0.521176 0.530145 0.539121 0.548104 0.557094 0.566089 0.575089 -0.584094 0.593102 0.602113 0.611126 0.620141 0.629157 0.638173 0.647189 -0.656203 0.665215 0.674225 0.683232 0.692234 0.701231 0.710224 0.71921 -0.728189 0.737161 0.746124 0.755079 0.764024 0.772959 0.781884 0.790796 -0.799697 0.808584 0.817458 0.826318 0.835162 0.843992 0.852804 0.861601 -0.870379 0.879139 0.887879 0.8966 0.905301 0.913981 0.92264 0.931276 -0.93989 0.94848 0.957046 0.965588 0.974105 0.982595 0.99106 0.999497 -1.00791 1.01629 1.02464 1.03296 1.04126 1.04952 1.05775 1.06595 1.07412 -1.08225 1.09035 1.09841 1.10645 1.11444 1.1224 1.13033 1.13822 1.14607 -1.15388 1.16166 1.1694 1.17709 1.18475 1.19237 1.19995 1.20749 1.21498 -1.22244 1.22985 1.23722 1.24454 1.25182 1.25906 1.26625 1.2734 0.280502 -0.287559 0.29457 0.301536 0.308454 0.315325 0.32215 0.328926 0.335655 -0.342335 0.348967 0.35555 0.362084 0.368568 0.375003 0.381388 0.387722 -0.394004 0.400235 0.406415 0.412544 0.418621 0.424647 0.430621 0.436542 -0.442412 0.448228 0.453993 0.459704 0.465363 0.470969 0.476521 0.48202 -0.487466 0.492858 0.498196 0.503481 0.508712 0.513889 0.519011 0.524077 -0.52909 0.534049 0.538953 0.543804 0.5486 0.553342 0.55803 0.562664 -0.567243 0.571769 0.57624 0.580658 0.585021 0.589331 0.593587 0.597789 -0.601938 0.606033 0.610075 0.614064 0.617999 0.621879 0.625706 0.629481 -0.633203 0.636873 0.640491 0.644057 0.647571 0.651033 0.654445 0.657805 -0.661114 0.664372 0.66758 0.670739 0.673847 0.676905 0.679914 0.682875 -; -#X array cos-out 441 float 1; -#A 0 -0.911256 -0.913872 -0.916365 -0.918789 -0.921097 -0.923342 -0.925486 --0.927564 -0.92956 -0.931483 -0.93335 -0.935129 -0.936867 -0.938528 --0.940137 -0.941707 -0.943197 -0.944657 -0.946072 -0.947426 -0.948755 --0.95004 -0.951276 -0.952491 -0.953672 -0.954806 -0.955924 -0.957024 --0.958071 -0.959106 -0.960132 -0.961119 -0.962086 -0.963047 -0.963993 --0.964903 -0.965811 -0.966718 -0.967595 -0.968461 -0.969329 -0.970192 --0.971025 -0.971863 -0.972707 -0.973527 -0.974343 -0.975168 -0.975986 --0.976786 -0.977597 -0.978414 -0.979202 -0.980003 -0.980816 -0.981596 --0.982391 -0.983194 -0.983968 -0.984757 -0.985543 -0.98631 -0.987093 --0.987851 -0.98861 -0.98937 -0.990102 -0.990852 -0.991557 -0.992275 --0.99296 -0.993642 -0.994295 -0.994935 -0.995544 -0.996137 -0.996687 --0.997227 -0.997705 -0.998173 -0.998575 -0.998944 -0.999273 -0.999527 --0.999743 -0.999894 -0.999966 -0.999981 -0.999927 -0.999765 -0.999526 --0.999202 -0.998785 -0.99824 -0.997586 -0.996816 -0.995923 -0.994897 --0.99373 -0.992413 -0.990934 -0.989283 -0.987458 -0.985449 -0.983247 --0.980843 -0.978222 -0.975372 -0.972288 -0.968961 -0.965377 -0.96153 --0.95741 -0.952995 -0.948265 -0.943231 -0.937881 -0.932182 -0.926128 --0.919728 -0.912938 -0.905762 -0.898197 -0.890198 -0.881799 -0.87293 --0.863637 -0.853855 -0.843612 -0.832873 -0.821629 -0.809886 -0.797593 --0.784764 -0.771394 -0.757466 -0.742953 -0.727864 -0.712189 -0.695918 --0.679041 -0.661549 -0.643437 -0.624697 -0.605324 -0.585314 -0.564664 --0.543374 -0.521441 -0.498869 -0.475658 -0.451811 -0.427334 -0.402219 --0.376482 -0.350131 -0.323174 -0.295626 -0.267508 -0.238824 -0.2096 --0.179853 -0.149603 -0.118875 -0.0876953 -0.0560885 -0.0240874 0.00827867 -0.040974 0.0739643 0.107208 0.140666 0.174297 0.208056 0.241893 0.275757 -0.309603 0.343385 0.377036 0.410498 0.443712 0.476616 0.509148 0.541242 -0.572835 0.603858 0.634244 0.66391 0.692797 0.720837 0.747961 0.774084 -0.799131 0.823051 0.845758 0.867169 0.887248 0.90588 0.923037 0.938628 -0.952605 0.964885 0.975433 0.984153 0.991037 0.995988 0.998986 0.999997 -0.998938 0.995807 0.990576 0.983211 0.973668 0.961961 0.948075 0.932007 -0.913757 0.893328 0.87073 0.845995 0.81915 0.790227 0.759268 0.726324 -0.691452 0.654714 0.616181 0.57593 0.534037 0.490599 0.445716 0.399491 -0.352033 0.303459 0.253886 0.203441 0.152259 0.100478 0.0482368 -0.00432081 --0.057045 -0.109786 -0.162386 -0.214696 -0.266564 -0.317814 -0.368301 --0.417864 -0.466337 -0.513584 -0.559424 -0.603732 -0.646344 -0.687125 --0.725934 -0.762631 -0.797101 -0.829205 -0.858847 -0.8859 -0.91028 --0.931885 -0.950636 -0.966466 -0.97929 -0.989092 -0.995773 -0.999358 --0.999773 -0.997042 -0.991152 -0.982099 -0.969941 -0.954655 -0.936332 --0.915008 -0.890737 -0.863625 -0.833713 -0.801132 -0.765979 -0.728348 --0.688394 -0.646219 -0.601975 -0.555817 -0.507869 -0.45832 -0.407319 --0.355036 -0.301652 -0.247328 -0.192258 -0.136617 -0.0805873 -0.0243537 -0.0319027 0.0879985 0.143752 0.198986 0.253526 0.307194 0.359834 0.411262 -0.461345 0.509907 0.556823 0.601935 0.645131 0.686266 0.725245 0.761935 -0.796272 0.828125 0.857461 0.884158 0.9082 0.929508 0.948044 0.9638 -0.976698 0.986778 0.99402 0.998404 0.999981 0.998763 0.994751 0.988022 -0.978621 0.966582 0.95197 0.93487 0.915357 0.893512 0.869405 0.843139 -0.814817 0.784538 0.752408 0.718535 0.68303 0.646007 0.607581 0.567872 -0.526996 0.485074 0.442227 0.398573 0.354231 0.30932 0.263957 0.218256 -0.172326 0.126282 0.0802317 0.0342922 -0.0114471 -0.0568861 -0.101931 --0.146492 -0.190474 -0.233802 -0.276394 -0.318171 -0.359072 -0.399015 --0.437958 -0.475821 -0.512573 -0.548149 -0.582512 -0.615632 -0.647446 --0.677951 -0.707119 -0.734897 -0.761296 -0.786293 -0.80988 -0.83204 --0.852773 -0.872085 -0.88998 -0.906462 -0.921542 -0.935229 -0.94754 --0.95849 -0.968102 -0.976397 -0.9834 -0.989136 -0.993613 -0.996882 --0.998976 -0.99993 -0.999748 -0.998484 -0.996188 -0.99286 -0.988563 --0.983336 -0.977186 -0.970195 -0.962347 -0.953732 -0.944344 -0.934249 --0.923482 -0.912051 -0.900028 -0.887441 -0.874296 -0.860659 -0.846562 --0.832035 -0.817101 -0.801792 -0.786149 -0.770201 -0.753977 -0.737507 --0.720826 -0.703952 -0.686912 -0.669731 -0.652436 -0.635043 -0.617572 --0.600055 -0.582513 -0.564966 -0.547418 -0.529898 -0.512429 -0.495016 --0.477676 -0.460438 -0.443287 -0.426265 -0.409364; -#X pop; -#X obj 251 241 tabwrite~ phase-out; -#X obj 251 268 tabwrite~ cos-out; -#X msg 251 216 bang; -#X text 298 215 <-- graph them; -#X text 386 99 <-- change smoothly to avoid clicks; -#X connect 0 0 5 1; -#X connect 1 0 9 0; -#X connect 2 0 0 1; -#X connect 3 0 31 0; -#X connect 4 0 7 0; -#X connect 4 0 40 0; -#X connect 5 0 4 0; -#X connect 5 0 39 0; -#X connect 6 0 7 1; -#X connect 7 0 6 0; -#X connect 8 0 7 2; -#X connect 9 0 0 0; -#X connect 10 0 2 0; -#X connect 11 0 12 0; -#X connect 12 0 10 0; -#X connect 31 0 5 0; -#X connect 33 0 32 0; -#X connect 41 0 39 0; -#X connect 41 0 40 0; diff --git a/pd/doc/3.audio.examples/A08.review.pd b/pd/doc/3.audio.examples/A08.review.pd new file mode 100644 index 00000000..9b190a19 --- /dev/null +++ b/pd/doc/3.audio.examples/A08.review.pd @@ -0,0 +1,41 @@ +#N canvas 36 68 701 588 12; +#X text 444 542 updated for Pd version 0.34; +#X text 39 14 PART 1 REVIEW; +#X obj 66 131 tabwrite~; +#X obj 66 105 line~; +#X obj 54 298 +; +#X obj 66 79 +~; +#X obj 66 209 cos~; +#X obj 66 157 osc~; +#X obj 66 183 phasor~; +#X obj 54 324 pack; +#X obj 52 511 r; +#X obj 53 487 s; +#X obj 54 408 inlet; +#X obj 53 462 f; +#X obj 53 436 t; +#X obj 54 378 dbtorms; +#X obj 97 351 mtof; +#X obj 54 350 ftom; +#X obj 105 408 outlet; +#X obj 66 235 dac~; +#X text 26 52 So far we've seen these audio ("tilde") objects:; +#X text 123 104 -- ramp generator; +#X text 157 131 -- sampler (which we've only used for graphing so far) +; +#X text 111 157 -- a cosine wave oscillator; +#X text 139 183 -- phase generator for making your own oscillator; +#X text 112 209 -- cosine waveshape lookup; +#X text 112 236 -- audio output ("digital/analog converter" -- a misnomer) +; +#X text 31 266 ... and these "control" objects:; +#X text 145 349 -- frequency to pitch conversion; +#X text 126 378 -- decibel to amplitude conversion; +#X text 167 409 -- input and output to a subpatch; +#X text 90 437 ("trigger") -- message ordering and conversion; +#X text 93 462 ("float") -- store a (floating point) number; +#X text 90 488 ("send") -- wireless message sending; +#X text 91 513 ("receive") ... and receiving; +#X text 106 78 (etc.) -- arithmetic on audio signals; +#X text 92 296 (etc.) -- arithmetic; +#X text 99 323 -- combine two or more values in a single message; diff --git a/pd/doc/3.audio.examples/A09.review.pd b/pd/doc/3.audio.examples/A09.review.pd deleted file mode 100644 index 9b190a19..00000000 --- a/pd/doc/3.audio.examples/A09.review.pd +++ /dev/null @@ -1,41 +0,0 @@ -#N canvas 36 68 701 588 12; -#X text 444 542 updated for Pd version 0.34; -#X text 39 14 PART 1 REVIEW; -#X obj 66 131 tabwrite~; -#X obj 66 105 line~; -#X obj 54 298 +; -#X obj 66 79 +~; -#X obj 66 209 cos~; -#X obj 66 157 osc~; -#X obj 66 183 phasor~; -#X obj 54 324 pack; -#X obj 52 511 r; -#X obj 53 487 s; -#X obj 54 408 inlet; -#X obj 53 462 f; -#X obj 53 436 t; -#X obj 54 378 dbtorms; -#X obj 97 351 mtof; -#X obj 54 350 ftom; -#X obj 105 408 outlet; -#X obj 66 235 dac~; -#X text 26 52 So far we've seen these audio ("tilde") objects:; -#X text 123 104 -- ramp generator; -#X text 157 131 -- sampler (which we've only used for graphing so far) -; -#X text 111 157 -- a cosine wave oscillator; -#X text 139 183 -- phase generator for making your own oscillator; -#X text 112 209 -- cosine waveshape lookup; -#X text 112 236 -- audio output ("digital/analog converter" -- a misnomer) -; -#X text 31 266 ... and these "control" objects:; -#X text 145 349 -- frequency to pitch conversion; -#X text 126 378 -- decibel to amplitude conversion; -#X text 167 409 -- input and output to a subpatch; -#X text 90 437 ("trigger") -- message ordering and conversion; -#X text 93 462 ("float") -- store a (floating point) number; -#X text 90 488 ("send") -- wireless message sending; -#X text 91 513 ("receive") ... and receiving; -#X text 106 78 (etc.) -- arithmetic on audio signals; -#X text 92 296 (etc.) -- arithmetic; -#X text 99 323 -- combine two or more values in a single message; diff --git a/pd/doc/3.audio.examples/B05.tabread.FM.pd b/pd/doc/3.audio.examples/B05.tabread.FM.pd index ac2d9507..0dff773e 100644 --- a/pd/doc/3.audio.examples/B05.tabread.FM.pd +++ b/pd/doc/3.audio.examples/B05.tabread.FM.pd @@ -77,10 +77,8 @@ #X connect 27 0 21 0; #X restore 153 305 pd output; #X msg 229 278 MUTE; -#X text 521 439 updated for Pd version 0.34; #X floatatom 153 95 4 0 0 0 - - -; #X text 153 69 frequency; -#X text 33 8 MORE ON FREQUENCY MODULATION; #X floatatom 195 206 4 0 0 0 - - -; #X text 155 50 modulation; #X obj 152 157 *~; @@ -92,16 +90,18 @@ #X obj 152 237 osc~; #X obj 153 122 tabosc4~ pitchmod14; #X text 254 194 carrier; -#X text 47 356 This patch is like the original FM patch except in having -a settable wavetable for the modulation oscillator. Try changing the -waveform as well as the three familiar parameters.; +#X text 33 8 FREQUENCY MODULATION BY WAVETABLE; +#X text 47 356 This tabosc4~ controls the pitch of a sinusoidal oscillator +(osc~). Try changing the waveform as well as the three familiar parameters. +; +#X text 520 438 updated for Pd version 0.37; #X connect 1 0 2 1; #X connect 2 0 1 0; #X connect 3 0 2 2; -#X connect 5 0 17 0; -#X connect 8 0 14 1; -#X connect 10 0 14 0; -#X connect 13 0 10 1; -#X connect 14 0 16 0; -#X connect 16 0 2 0; -#X connect 17 0 10 0; +#X connect 4 0 15 0; +#X connect 6 0 12 1; +#X connect 8 0 12 0; +#X connect 11 0 8 1; +#X connect 12 0 14 0; +#X connect 14 0 2 0; +#X connect 15 0 8 0; diff --git a/pd/doc/3.audio.examples/D01.envelope.gen.pd b/pd/doc/3.audio.examples/D01.envelope.gen.pd index 61e7a6d7..cd58d50c 100644 --- a/pd/doc/3.audio.examples/D01.envelope.gen.pd +++ b/pd/doc/3.audio.examples/D01.envelope.gen.pd @@ -1,90 +1,50 @@ -#N canvas 173 105 609 433 12; -#X floatatom 96 358 0 0 100; -#N canvas 448 68 641 420 output 0; -#X obj 430 203 t b; -#X obj 430 143 f; -#X obj 430 83 inlet; -#X obj 430 233 f; -#X msg 541 225 0; -#X msg 430 113 bang; -#X obj 430 173 moses 1; -#X obj 496 151 moses 1; -#X obj 107 174 dbtorms; -#X obj 496 121 r master-lvl; -#X obj 107 56 r master-lvl; -#X obj 430 263 s master-lvl; -#X obj 36 202 inlet~; -#X obj 251 229 inlet; -#X obj 269 257 s master-lvl; -#X msg 119 85 set \$1; -#X obj 119 115 outlet; -#X msg 251 283 \; pd dsp 1; -#X obj 107 236 line~; -#X obj 36 258 *~; -#X obj 36 290 dac~; -#X obj 107 204 pack 0 50; -#X text 23 179 audio in; -#X text 2 313 out both channels; -#X obj 36 231 hip~ 1; -#X obj 541 194 t b; -#X connect 0 0 3 0; -#X connect 1 0 6 0; -#X connect 2 0 5 0; -#X connect 3 0 11 0; -#X connect 4 0 11 0; -#X connect 5 0 1 0; -#X connect 6 0 0 0; -#X connect 6 1 25 0; -#X connect 7 1 3 1; -#X connect 8 0 21 0; -#X connect 9 0 1 1; -#X connect 9 0 7 0; -#X connect 10 0 8 0; -#X connect 10 0 15 0; -#X connect 12 0 24 0; -#X connect 13 0 14 0; -#X connect 13 0 17 0; -#X connect 15 0 16 0; -#X connect 18 0 19 1; -#X connect 19 0 20 0; -#X connect 19 0 20 1; -#X connect 21 0 18 0; -#X connect 24 0 19 0; -#X connect 25 0 4 0; -#X restore 58 391 pd output; -#X msg 134 359 MUTE; -#X msg 247 180 bang; -#X msg 328 180 bang; -#X text 244 152 attack; -#X text 325 150 release; -#X obj 247 281 line~; -#X msg 328 254 0 500; -#X text 134 10 ENVELOPE GENERATORS; -#X obj 58 246 phasor~ 50; -#X obj 58 301 *~; -#X obj 58 328 wrap~; -#X msg 247 248 1 2500; -#X obj 58 275 -~ 0.5; -#X msg 179 247 10 200; -#X obj 247 221 del 200; -#X text 349 405 updated for Pd version 0.34; -#X text 39 35 This patch uses an envelope generator to control a sound. +#N canvas 173 105 567 576 12; +#X text 246 260 attack; +#X text 317 261 release; +#X obj 248 397 line~; +#X msg 318 355 0 500; +#X text 126 7 ENVELOPE GENERATORS; +#X obj 65 369 phasor~ 50; +#X obj 65 417 *~; +#X obj 65 465 wrap~; +#X msg 247 355 1 2500; +#X obj 65 393 -~ 0.5; +#X msg 182 331 10 200; +#X obj 247 331 del 200; +#X text 26 22 This patch uses an envelope generator to control a sound. When you hit "attack" two things happen. First \, the line~ object rises to 10 in 200 milliseconds. Then after a "delay" of the same 200 msec \, the second message sends the line~ back down to 1 over another 2500 msec. The "release" just ramps us down to zero at the end.; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 15 0; -#X connect 3 0 16 0; -#X connect 4 0 8 0; -#X connect 7 0 11 1; -#X connect 8 0 7 0; -#X connect 10 0 14 0; -#X connect 11 0 12 0; -#X connect 12 0 1 0; -#X connect 13 0 7 0; -#X connect 14 0 11 0; +#X obj 65 513 output~; +#X text 311 550 updated for Pd version 0.37; +#X obj 65 441 +~ 0.5; +#X obj 65 489 hip~ 5; +#X obj 247 280 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 318 281 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 257 308 stop; +#X text 28 121 You can hit the "attack" and/or "release" while something +is still going on from a previous attack or release \, and the envelope +generator does the ``right thing". In particular \, the release button +sends a "stop" to the "del" object \, in case it is still scheduled +to go off from a previous attack.; +#X text 27 218 The synthesis method is a form of waveshaping \, which +is the subject of a later chapter.; +#X connect 2 0 6 1; +#X connect 3 0 2 0; +#X connect 5 0 9 0; +#X connect 6 0 15 0; +#X connect 7 0 16 0; +#X connect 8 0 2 0; +#X connect 9 0 6 0; +#X connect 10 0 2 0; +#X connect 11 0 8 0; #X connect 15 0 7 0; #X connect 16 0 13 0; +#X connect 17 0 11 0; +#X connect 17 0 10 0; +#X connect 18 0 3 0; +#X connect 18 0 19 0; +#X connect 19 0 11 0; diff --git a/pd/doc/3.audio.examples/D02.adsr.pd b/pd/doc/3.audio.examples/D02.adsr.pd index 06fa21b7..c2a6a940 100644 --- a/pd/doc/3.audio.examples/D02.adsr.pd +++ b/pd/doc/3.audio.examples/D02.adsr.pd @@ -1,34 +1,42 @@ -#N canvas 141 83 672 516 12; -#X text 412 489 updated for Pd version 0.26; -#X graph graph1 0 -1.02 44100 1.02 395 235 595 105; +#N canvas 40 23 609 630 12; +#N canvas 0 0 450 300 graph1 0; #X array adsr-output 44100 float 0; -#X pop; -#X text 394 244 ------ 1 second ------; -#X obj 32 74 r trigger; -#X obj 32 148 tabwrite~ adsr-output; -#X obj 54 123 r graphit; -#X msg 31 176 bang; -#X text 75 177 <-- attack and delayed release; -#X obj 42 200 del 500; -#X text 146 283 <-- attack only; -#X msg 31 264 \; pd dsp 1 \; trigger 1 \; graphit bang; -#X text 147 360 <-- release only; -#X msg 30 334 \; pd dsp 1 \; trigger 0 \; graphit bang; -#X msg 42 225 \; trigger 0; -#X text 598 221 -1; -#X text 600 96 1; -#X text 35 24 This patch introduces a simple "adsr" abstraction we'll +#X coords 0 1.02 44100 -1.02 200 130 1; +#X restore 121 332 graph; +#X text 121 464 ------ 1 second ------; +#X obj 18 92 r trigger; +#X obj 34 168 tabwrite~ adsr-output; +#X obj 56 143 r graphit; +#X msg 261 89 bang; +#X text 305 90 <-- attack and delayed release; +#X obj 272 113 del 500; +#X text 376 196 <-- attack only; +#X msg 261 177 \; pd dsp 1 \; trigger 1 \; graphit bang; +#X text 377 273 <-- release only; +#X msg 260 247 \; pd dsp 1 \; trigger 0 \; graphit bang; +#X msg 272 138 \; trigger 0; +#X text 324 452 -1; +#X text 326 327 1; +#X text 12 27 This patch introduces a simple "adsr" abstraction we'll use frequently. You can click on the "adsr" object to see what's inside. ; -#X text 30 402 The active ingredient of the ADSR envelope generator +#X text 16 516 The active ingredient of the ADSR envelope generator is a single line~ which gets passed messages to make the attack and release behavior. You can retrigger the ADSR envelope generator all you wish without having to wait for attacks or releases to finish; #X text 104 5 ENVELOPE GENERATOR ABSTRACTION; -#X obj 32 100 adsr 1 100 200 50 300; -#X connect 3 0 19 0; -#X connect 5 0 4 0; -#X connect 6 0 10 0; -#X connect 6 0 8 0; -#X connect 8 0 13 0; -#X connect 19 0 4 0; +#X obj 18 118 adsr 1 100 200 50 300; +#X text 356 601 updated for Pd version 0.37; +#X obj 36 195 osc~ 440; +#X obj 17 220 *~; +#X obj 16 249 output~; +#X connect 2 0 18 0; +#X connect 4 0 3 0; +#X connect 5 0 9 0; +#X connect 5 0 7 0; +#X connect 7 0 12 0; +#X connect 18 0 3 0; +#X connect 18 0 21 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; diff --git a/pd/doc/3.audio.examples/D03.envelope.dB.pd b/pd/doc/3.audio.examples/D03.envelope.dB.pd index 8ec1d1ae..70711f8a 100644 --- a/pd/doc/3.audio.examples/D03.envelope.dB.pd +++ b/pd/doc/3.audio.examples/D03.envelope.dB.pd @@ -1,9 +1,6 @@ -#N canvas 112 44 674 673 12; +#N canvas 158 69 674 673 12; #X obj 32 80 r trigger; #X text 85 8 USING ADSR'S OUTPUT AS dB; -#X text 34 28 For natural sounding amplitude control \, you will want -to use the ADSR's output as log amplitude. In practice this is best -done using a lookup table:; #X obj 32 131 tabread4~ dbtorms; #N canvas 0 0 450 300 graph1 0; #X array dbtorms 123 float 1; @@ -39,10 +36,10 @@ done using a lookup table:; #X obj 141 227 dbtorms; #X obj 152 162 t f f; #X obj 97 259 tabwrite dbtorms; -#X floatatom 435 103 0 0 0; -#X floatatom 435 186 0 0 0; +#X floatatom 435 103 0 0 0 0 - - -; +#X floatatom 435 186 0 0 0 0 - - -; #X obj 435 157 tabread4 dbtorms; -#X floatatom 331 183 0 0 0; +#X floatatom 331 183 0 0 0 0 - - -; #X obj 331 154 dbtorms; #X text 35 12 bang to recalculate the table; #X text 268 62 check accuracy of reading table against; @@ -67,92 +64,37 @@ done using a lookup table:; #X connect 12 0 16 0; #X connect 14 0 13 0; #X connect 16 0 15 0; -#X restore 288 328 pd make-table; -#X text 258 299 here's the patch I used to make the table:; -#X obj 48 156 osc~ 440; +#X restore 266 351 pd make-table; +#X text 257 327 here's the patch I used to make the table:; +#X obj 53 157 osc~ 440; #X text 589 176 0; #X text 590 77 10; #X text 406 186 ------ 123 samples ------; -#X floatatom 61 204 0 0 0; -#N canvas 159 26 532 285 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X obj 425 153 t b; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X restore 32 232 pd output; -#X msg 108 205 MUTE; -#X text 149 204 <-- output amplitude; -#X text 112 276 <-- attack; -#X text 113 333 <-- release; -#X msg 32 319 \; pd dsp 1 \; trigger 0; +#X text 117 306 <-- attack; +#X text 116 362 <-- release; +#X msg 31 347 \; pd dsp 1 \; trigger 0; #X obj 32 182 *~; -#X msg 31 264 \; pd dsp 1 \; trigger 1; -#X text 29 431 Notice how the attack sounds different when you retrigger -than when you start from zero. This is because if you go from the steady -state you only rise 30 dB instead of 100 \, so it sounds slower.; +#X msg 30 292 \; pd dsp 1 \; trigger 1; #X obj 32 106 adsr 100 100 200 70 300; -#X text 29 381 The table is indexed from 1 to 120 so that 1 gives a +#X text 28 409 The table is indexed from 1 to 120 so that 1 gives a true zero out and 120 gives 10 (a 20 dB boost.) The extra 20 dB are for headroom.; -#X text 28 498 If this is a problem you have at least 2 ways of dealing -with it. The best might be to adjust the attack time inside the abstraction -using snapshot~ to find out where you're slewing from \, as demonstrated -in the next patch.; -#X text 406 631 updated for Pd version 0.35; -#X text 28 568 There's also a "real" dbtorms~ object... but it's almost +#X text 25 459 (There's also a "real" dbtorms~ object... but it's almost certainly much more compute-intensive than tabread4~ \, since it has -to call a library "exp" function.; -#X connect 0 0 21 0; -#X connect 3 0 18 0; -#X connect 7 0 18 1; -#X connect 11 0 12 1; -#X connect 12 0 11 0; -#X connect 13 0 12 2; -#X connect 18 0 12 0; -#X connect 21 0 3 0; +to call a library "exp" function.); +#X text 26 518 Notice how the attack sounds different when you retrigger +than when you start from zero. This is because if you go from the steady +state you only rise 30 dB instead of 100 \, so it sounds slower... +a slur effect. If you don't want this \, you might try increasing the +amplitude of retriggered notes in comparison to isolated ones.; +#X text 34 28 For more natural sounding amplitude control \, you can +use the ADSR's output as log amplitude. In practice this is best done +using a lookup table:; +#X obj 31 211 output~; +#X text 406 631 updated for Pd version 0.37; +#X connect 0 0 15 0; +#X connect 2 0 13 0; +#X connect 6 0 13 1; +#X connect 13 0 20 0; +#X connect 13 0 20 1; +#X connect 15 0 2 0; diff --git a/pd/doc/3.audio.examples/D04.envelope.pitch.pd b/pd/doc/3.audio.examples/D04.envelope.pitch.pd deleted file mode 100644 index 43fbe5bc..00000000 --- a/pd/doc/3.audio.examples/D04.envelope.pitch.pd +++ /dev/null @@ -1,209 +0,0 @@ -#N canvas 222 84 686 544 12; -#X obj 48 106 r trigger; -#X obj 48 154 tabread4~ dbtorms; -#X floatatom 86 232 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 48 258 pd output; -#X msg 124 232 MUTE; -#X text 166 231 <-- output amplitude; -#X text 141 298 <-- attack; -#X text 568 305 <-- release; -#X obj 48 208 *~; -#N canvas 151 343 812 522 make-table 0; -#X msg 82 49 bang; -#X obj 82 78 t b b; -#X obj 141 142 f; -#X obj 179 142 + 1; -#X msg 150 112 0; -#X obj 82 107 until; -#X obj 141 176 t f f; -#X floatatom 369 67 0 0 0; -#X floatatom 369 127 0 0 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 538 298 graph; -#X text 740 391 0; -#X text 742 291 10; -#X text 544 403 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 537 130 graph; -#X obj 283 102 mtof; -#X floatatom 282 127 0 0 0; -#X text 541 237 ------ 130 samples ------; -#X text 746 223 0; -#X text 748 123 12000; -#X obj 81 203 mtof; -#X obj 72 167 sel 129; -#X obj 80 229 tabwrite mtof; -#X obj 369 99 tabread4 mtof; -#X obj 71 418 moses 2; -#X msg 55 267 bang; -#X obj 55 296 t b b; -#X obj 126 357 f; -#X obj 164 357 + 1; -#X msg 148 329 0; -#X obj 55 325 until; -#X obj 47 385 sel 122; -#X msg 71 449 0; -#X obj 115 450 dbtorms; -#X obj 126 385 t f f; -#X obj 71 482 tabwrite dbtorms; -#X text 312 40 ... and test accuracy; -#X text 23 15 patch to recalculate the mtof table; -#X text 107 267 bang to recalculate dbtorms table; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 20 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 19 0; -#X connect 6 1 21 1; -#X connect 7 0 14 0; -#X connect 7 0 22 0; -#X connect 14 0 15 0; -#X connect 19 0 21 0; -#X connect 20 0 5 1; -#X connect 22 0 8 0; -#X connect 23 0 31 0; -#X connect 23 1 32 0; -#X connect 24 0 25 0; -#X connect 25 0 29 0; -#X connect 25 1 28 0; -#X connect 26 0 27 0; -#X connect 26 0 30 0; -#X connect 26 0 33 0; -#X connect 27 0 26 1; -#X connect 28 0 26 1; -#X connect 29 0 26 0; -#X connect 30 0 29 1; -#X connect 31 0 34 0; -#X connect 32 0 34 0; -#X connect 33 0 23 0; -#X connect 33 1 34 1; -#X restore 451 222 pd make-table; -#X text 35 6 PITCH ENVELOPES; -#X text 125 24 For pitch envelopes \, unlike amplitude envelopes \, -discontinuities are allowed and sometimes you would rather the envelope -generator actually jump to zero when it's triggered. The "adsr" object -does this for you if you send a negative trigger instead of a positive -one:; -#X obj 280 106 r trigger2; -#X obj 280 178 tabread4~ mtof; -#X obj 280 202 osc~; -#X msg 46 288 \; pd dsp 1 \; trigger 1 \; trigger2 1; -#X text 358 297 <-- attack; -#X msg 249 293 \; pd dsp 1 \; trigger 1 \; trigger2 -1; -#X msg 472 293 \; pd dsp 1 \; trigger 0 \; trigger2 0; -#X obj 280 154 +~ 69; -#X text 358 314 restarting; -#X text 363 331 pitch env; -#X text 37 377 We have added a new table \, mtof \, for converting -audio signals from pitch to frequency. Its range is 1-127 \, so you -want to add a base pitch in before you start reading from it.; -#X text 37 443 This is an extreme use of pitch enveloping. In a real -situation you might want an envelope controlling vibrato depth or the -like instead of straight pitch.; -#X obj 48 130 adsr 100 50 200 90 1000; -#X obj 280 130 adsr 20 200 100 100 1000; -#X text 413 497 updated for Pd version 0.37; -#X connect 0 0 24 0; -#X connect 1 0 8 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 8 0 3 0; -#X connect 12 0 25 0; -#X connect 13 0 14 0; -#X connect 14 0 8 1; -#X connect 19 0 13 0; -#X connect 24 0 1 0; -#X connect 25 0 19 0; diff --git a/pd/doc/3.audio.examples/D04.envelope.quartic.pd b/pd/doc/3.audio.examples/D04.envelope.quartic.pd new file mode 100644 index 00000000..5b440ebe --- /dev/null +++ b/pd/doc/3.audio.examples/D04.envelope.quartic.pd @@ -0,0 +1,81 @@ +#N canvas 130 66 646 584 12; +#X obj 21 345 osc~; +#X obj 21 370 *~; +#X obj 81 350 line~; +#X obj 21 320 line~; +#X obj 163 455 osc~; +#X obj 212 483 *~; +#X obj 234 366 line~; +#X obj 163 366 line~; +#X obj 163 313 sqrt; +#X obj 163 339 sqrt; +#X obj 234 313 sqrt; +#X obj 234 339 sqrt; +#X obj 163 398 *~; +#X obj 163 428 *~; +#X obj 234 398 *~; +#X obj 234 427 *~; +#X obj 163 288 unpack; +#X obj 234 288 unpack; +#X obj 21 295 r freq; +#X obj 81 326 r amp; +#X obj 163 263 r freq; +#X obj 234 263 r amp; +#X msg 340 277 \; amp 0 5000 \;; +#X msg 340 232 \; amp 1 5000 \;; +#X msg 492 278 \; amp 0 1000 \;; +#X msg 494 232 \; amp 1 1000 \;; +#X msg 337 357 \; freq 1760 5000 \;; +#X msg 338 404 \; freq 55 5000 \;; +#X msg 493 357 \; freq 1760 1000 \;; +#X msg 496 405 \; freq 55 1000 \;; +#X text 90 15 QUARTIC AND LINEAR ENVELOPES COMPARED; +#X obj 341 464 loadbang; +#X msg 341 492 \; amp 1 \; freq 1760; +#X text 22 265 LINEAR; +#X text 168 236 QUARTIC; +#X obj 21 397 output~; +#X obj 212 509 output~; +#X text 14 123 In the quartic example \, for both the amplitude and +the frequency \, we have to take the fourth root of the target value +(which we get by taking square root twice.) Then we raise the line~ +output to the fourth power by squaring twice (the *~ objects \, whose +left and right inlets are the same.) The cost is mostly that of the +four additional *~ objects.; +#X text 350 553 updated for Pd version 0.37; +#X text 19 39 This patch has two sine wave oscillators \, one with +linear envelopes \, the other with quartic ones which sound more uniform. +The message boxes sweep the amplitude and frequency up and down. You +can compare the two to see that quartic-shaped changes sound more uniform +than linear ones.; +#X connect 0 0 1 0; +#X connect 1 0 35 0; +#X connect 1 0 35 1; +#X connect 2 0 1 1; +#X connect 3 0 0 0; +#X connect 4 0 5 0; +#X connect 5 0 36 0; +#X connect 5 0 36 1; +#X connect 6 0 14 0; +#X connect 6 0 14 1; +#X connect 7 0 12 0; +#X connect 7 0 12 1; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 10 0 11 0; +#X connect 11 0 6 0; +#X connect 12 0 13 0; +#X connect 12 0 13 1; +#X connect 13 0 4 0; +#X connect 14 0 15 0; +#X connect 14 0 15 1; +#X connect 15 0 5 1; +#X connect 16 0 8 0; +#X connect 16 1 7 1; +#X connect 17 0 10 0; +#X connect 17 1 6 1; +#X connect 18 0 3 0; +#X connect 19 0 2 0; +#X connect 20 0 16 0; +#X connect 21 0 17 0; +#X connect 31 0 32 0; diff --git a/pd/doc/3.audio.examples/D05.envelope.pitch.pd b/pd/doc/3.audio.examples/D05.envelope.pitch.pd new file mode 100644 index 00000000..b91477aa --- /dev/null +++ b/pd/doc/3.audio.examples/D05.envelope.pitch.pd @@ -0,0 +1,153 @@ +#N canvas 222 84 686 544 12; +#X obj 48 106 r trigger; +#X obj 48 154 tabread4~ dbtorms; +#X text 144 313 <-- attack; +#X text 568 305 <-- release; +#X obj 48 208 *~; +#N canvas 151 343 812 522 make-table 0; +#X msg 82 49 bang; +#X obj 82 78 t b b; +#X obj 141 142 f; +#X obj 179 142 + 1; +#X msg 150 112 0; +#X obj 82 107 until; +#X obj 141 176 t f f; +#X floatatom 369 67 0 0 0 0 - - -; +#X floatatom 369 127 0 0 0 0 - - -; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 538 298 graph; +#X text 740 391 0; +#X text 742 291 10; +#X text 544 403 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 537 130 graph; +#X obj 283 102 mtof; +#X floatatom 282 127 0 0 0 0 - - -; +#X text 541 237 ------ 130 samples ------; +#X text 746 223 0; +#X text 748 123 12000; +#X obj 81 203 mtof; +#X obj 72 167 sel 129; +#X obj 80 229 tabwrite mtof; +#X obj 369 99 tabread4 mtof; +#X obj 71 418 moses 2; +#X msg 55 267 bang; +#X obj 55 296 t b b; +#X obj 126 357 f; +#X obj 164 357 + 1; +#X msg 148 329 0; +#X obj 55 325 until; +#X obj 47 385 sel 122; +#X msg 71 449 0; +#X obj 115 450 dbtorms; +#X obj 126 385 t f f; +#X obj 71 482 tabwrite dbtorms; +#X text 312 40 ... and test accuracy; +#X text 23 15 patch to recalculate the mtof table; +#X text 107 267 bang to recalculate dbtorms table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 20 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 19 0; +#X connect 6 1 21 1; +#X connect 7 0 14 0; +#X connect 7 0 22 0; +#X connect 14 0 15 0; +#X connect 19 0 21 0; +#X connect 20 0 5 1; +#X connect 22 0 8 0; +#X connect 23 0 31 0; +#X connect 23 1 32 0; +#X connect 24 0 25 0; +#X connect 25 0 29 0; +#X connect 25 1 28 0; +#X connect 26 0 27 0; +#X connect 26 0 30 0; +#X connect 26 0 33 0; +#X connect 27 0 26 1; +#X connect 28 0 26 1; +#X connect 29 0 26 0; +#X connect 30 0 29 1; +#X connect 31 0 34 0; +#X connect 32 0 34 0; +#X connect 33 0 23 0; +#X connect 33 1 34 1; +#X restore 451 222 pd make-table; +#X text 35 6 PITCH ENVELOPES; +#X text 125 24 For pitch envelopes \, unlike amplitude envelopes \, +discontinuities are allowed and sometimes you would rather the envelope +generator actually jump to zero when it's triggered. The "adsr" object +does this for you if you send a negative trigger instead of a positive +one:; +#X obj 280 106 r trigger2; +#X obj 280 178 tabread4~ mtof; +#X obj 280 202 osc~; +#X msg 46 299 \; pd dsp 1 \; trigger 1 \; trigger2 1; +#X text 358 297 <-- attack; +#X msg 249 293 \; pd dsp 1 \; trigger 1 \; trigger2 -1; +#X msg 472 293 \; pd dsp 1 \; trigger 0 \; trigger2 0; +#X obj 280 154 +~ 69; +#X text 358 314 restarting; +#X text 363 331 pitch env; +#X text 37 377 We have added a new table \, mtof \, for converting +audio signals from pitch to frequency. Its range is 1-127 \, so you +want to add a base pitch in before you start reading from it.; +#X text 37 443 This is an extreme use of pitch enveloping. In a real +situation you might want an envelope controlling vibrato depth or the +like instead of straight pitch.; +#X obj 48 130 adsr 100 50 200 90 1000; +#X obj 280 130 adsr 20 200 100 100 1000; +#X text 413 497 updated for Pd version 0.37; +#X obj 48 233 output~; +#X connect 0 0 20 0; +#X connect 1 0 4 0; +#X connect 4 0 23 0; +#X connect 4 0 23 1; +#X connect 8 0 21 0; +#X connect 9 0 10 0; +#X connect 10 0 4 1; +#X connect 15 0 9 0; +#X connect 20 0 1 0; +#X connect 21 0 15 0; diff --git a/pd/doc/3.audio.examples/D05.envelope.portamento.pd b/pd/doc/3.audio.examples/D05.envelope.portamento.pd deleted file mode 100644 index 6542e8b5..00000000 --- a/pd/doc/3.audio.examples/D05.envelope.portamento.pd +++ /dev/null @@ -1,148 +0,0 @@ -#N canvas 222 84 642 346 12; -#X floatatom 75 227 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 46 255 pd output; -#X msg 123 227 MUTE; -#X text 166 225 <-- output amplitude; -#X obj 46 173 tabread4~ mtof; -#X obj 46 197 osc~; -#N canvas 247 30 505 439 tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 129 49 graph; -#X text 331 142 0; -#X text 333 42 10; -#X text 127 157 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 136 226 graph; -#X text 128 336 ------ 130 samples ------; -#X text 340 318 0; -#X text 342 218 12000; -#X restore 490 225 pd tables; -#X text 35 6 PORTAMENTO; -#X obj 46 149 line~; -#X obj 46 101 r pitch; -#X msg 316 101 36; -#X msg 345 101 48; -#X msg 372 101 60; -#X msg 429 101 72; -#X msg 401 101 67; -#X msg 483 101 76; -#X msg 457 101 74; -#X obj 451 165 s pitch; -#X msg 514 101 84; -#X msg 544 101 96; -#X floatatom 143 125 0 0 0; -#X text 173 126 <-- change speed; -#X floatatom 451 139 0 0 0; -#X obj 46 125 pack 0 100; -#X obj 388 192 loadbang; -#X msg 387 214 \; pitch 72; -#X text 40 37 Portamento can be done using just line~ \, but you still -might want to sweep in pitch \, not frequency:; -#X text 363 293 updated for Pd version 0.35; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 5 0; -#X connect 5 0 1 0; -#X connect 8 0 4 0; -#X connect 9 0 23 0; -#X connect 10 0 22 0; -#X connect 11 0 22 0; -#X connect 12 0 22 0; -#X connect 13 0 22 0; -#X connect 14 0 22 0; -#X connect 15 0 22 0; -#X connect 16 0 22 0; -#X connect 18 0 22 0; -#X connect 19 0 22 0; -#X connect 20 0 23 1; -#X connect 22 0 17 0; -#X connect 23 0 8 0; -#X connect 24 0 25 0; diff --git a/pd/doc/3.audio.examples/D06.additive.pd b/pd/doc/3.audio.examples/D06.additive.pd deleted file mode 100644 index 5121e62f..00000000 --- a/pd/doc/3.audio.examples/D06.additive.pd +++ /dev/null @@ -1,92 +0,0 @@ -#N canvas 179 69 696 468 12; -#X floatatom 81 408 0 0 0 0 - - -; -#N canvas 159 26 534 281 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X obj 425 153 t b; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 26 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 5 0; -#X restore 43 435 pd output; -#X msg 119 408 MUTE; -#X text 153 407 <-- output amplitude; -#X obj 43 377 catch~ sum; -#X obj 381 288 s frequency; -#X floatatom 381 264 0 0 0 0 - - -; -#X floatatom 495 265 0 0 0 0 - - -; -#X obj 495 289 s duration; -#X msg 260 276 \; trigger bang; -#X obj 45 221 partial 0.67 0.56 0 1; -#X obj 45 245 partial 1 0.56 1 0.9; -#X obj 45 269 partial 1 0.92 0 0.65; -#X obj 45 294 partial 1.8 0.94 0 0.55; -#X floatatom 495 217 0 0 0 0 - - -; -#X obj 495 241 * 100; -#X obj 381 240 mtof; -#X floatatom 381 216 0 0 0 0 - - -; -#X text 87 15 ADDITIVE SYNTHESIS; -#X text 32 73 This patch demonstrates using an abstraction \, "partial" -\, to make a simple additive synthesis instrument.; -#X text 28 114 Partial takes as arguments an amplitude \, a relative -frequency \, a detuning frequency \, and a relative duration. You set -absolute duration and pitch using the controls below. Hit hte trigger -to make sound.; -#X text 460 435 updated for Pd version 0.26; -#X text 535 207 duration in tenths; -#X text 535 222 of a second; -#X text 419 215 pitch; -#X text 251 253 click to start; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 1 0; -#X connect 6 0 5 0; -#X connect 7 0 8 0; -#X connect 14 0 15 0; -#X connect 15 0 7 0; -#X connect 16 0 6 0; -#X connect 17 0 16 0; diff --git a/pd/doc/3.audio.examples/D06.envelope.portamento.pd b/pd/doc/3.audio.examples/D06.envelope.portamento.pd new file mode 100644 index 00000000..6542e8b5 --- /dev/null +++ b/pd/doc/3.audio.examples/D06.envelope.portamento.pd @@ -0,0 +1,148 @@ +#N canvas 222 84 642 346 12; +#X floatatom 75 227 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 46 255 pd output; +#X msg 123 227 MUTE; +#X text 166 225 <-- output amplitude; +#X obj 46 173 tabread4~ mtof; +#X obj 46 197 osc~; +#N canvas 247 30 505 439 tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 129 49 graph; +#X text 331 142 0; +#X text 333 42 10; +#X text 127 157 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 136 226 graph; +#X text 128 336 ------ 130 samples ------; +#X text 340 318 0; +#X text 342 218 12000; +#X restore 490 225 pd tables; +#X text 35 6 PORTAMENTO; +#X obj 46 149 line~; +#X obj 46 101 r pitch; +#X msg 316 101 36; +#X msg 345 101 48; +#X msg 372 101 60; +#X msg 429 101 72; +#X msg 401 101 67; +#X msg 483 101 76; +#X msg 457 101 74; +#X obj 451 165 s pitch; +#X msg 514 101 84; +#X msg 544 101 96; +#X floatatom 143 125 0 0 0; +#X text 173 126 <-- change speed; +#X floatatom 451 139 0 0 0; +#X obj 46 125 pack 0 100; +#X obj 388 192 loadbang; +#X msg 387 214 \; pitch 72; +#X text 40 37 Portamento can be done using just line~ \, but you still +might want to sweep in pitch \, not frequency:; +#X text 363 293 updated for Pd version 0.35; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 5 0; +#X connect 5 0 1 0; +#X connect 8 0 4 0; +#X connect 9 0 23 0; +#X connect 10 0 22 0; +#X connect 11 0 22 0; +#X connect 12 0 22 0; +#X connect 13 0 22 0; +#X connect 14 0 22 0; +#X connect 15 0 22 0; +#X connect 16 0 22 0; +#X connect 18 0 22 0; +#X connect 19 0 22 0; +#X connect 20 0 23 1; +#X connect 22 0 17 0; +#X connect 23 0 8 0; +#X connect 24 0 25 0; diff --git a/pd/doc/3.audio.examples/D07.additive.pd b/pd/doc/3.audio.examples/D07.additive.pd new file mode 100644 index 00000000..c35a47fe --- /dev/null +++ b/pd/doc/3.audio.examples/D07.additive.pd @@ -0,0 +1,50 @@ +#N canvas 9 13 684 547 12; +#X obj 37 449 catch~ sum; +#X obj 349 274 s frequency; +#X obj 463 274 s duration; +#X floatatom 463 224 0 0 0 0 - - -; +#X obj 463 249 * 100; +#X obj 349 249 mtof; +#X floatatom 349 224 0 0 0 0 - - -; +#X text 82 7 ADDITIVE SYNTHESIS; +#X text 501 214 duration in tenths; +#X text 503 230 of a second; +#X text 387 223 pitch; +#X text 433 518 updated for Pd version 0.37; +#X obj 37 488 output~; +#X text 26 83 Partial takes as arguments an amplitude \, a relative +frequency \, a detuning frequency \, and a relative duration. You set +absolute duration and pitch using the controls below. Hit the trigger +to make sound.; +#X obj 36 164 partial 1 1 0.56 0; +#X text 27 31 This patch demonstrates using an abstraction \, "partial" +\, to make a simple additive synthesis instrument originally from Jean-Claude +Risset.; +#X obj 349 169 loadbang; +#X msg 349 192 72; +#X msg 463 194 40; +#X obj 352 322 bng 25 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 385 324 <-- click to play a note; +#X obj 352 358 s trigger; +#X obj 36 189 partial 0.67 0.9 0.56 1; +#X obj 36 214 partial 1 0.65 0.92 0; +#X obj 36 239 partial 1.8 0.55 0.92 1.7; +#X obj 36 264 partial 2.67 0.325 1.19 0; +#X obj 36 289 partial 1.67 0.35 1.7 0; +#X obj 36 314 partial 1.46 0.25 2 0; +#X obj 36 339 partial 1.33 0.2 2.74 0; +#X obj 36 364 partial 1.33 0.15 3 0; +#X obj 36 389 partial 1 0.1 3.76 0; +#X obj 36 414 partial 1.33 0.075 4.07 0; +#X connect 0 0 12 0; +#X connect 0 0 12 1; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 5 0 1 0; +#X connect 6 0 5 0; +#X connect 16 0 17 0; +#X connect 16 0 18 0; +#X connect 17 0 6 0; +#X connect 18 0 3 0; +#X connect 19 0 21 0; diff --git a/pd/doc/3.audio.examples/D07.sampler.notes.pd b/pd/doc/3.audio.examples/D07.sampler.notes.pd deleted file mode 100644 index 9b08a10a..00000000 --- a/pd/doc/3.audio.examples/D07.sampler.notes.pd +++ /dev/null @@ -1,321 +0,0 @@ -#N canvas 12 0 1074 786 12; -#X msg 862 17 \; pd dsp 1; -#X msg 946 17 \; pd dsp 0; -#X text 887 53 ON; -#X text 965 53 OFF; -#X floatatom 64 512 0 0 0; -#N canvas 159 26 495 262 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 29 546 pd output; -#X msg 98 512 MUTE; -#X text 143 511 <-- output amplitude; -#X msg 253 7 bang; -#X obj 253 35 delay 5; -#X text 493 269 end of note; -#X obj 359 35 r note; -#N canvas 459 46 678 451 samples 0; -#X graph graph1 0 -1.02 176403 1.02 262 171 462 41; -#X array sample1 176403 float 0; -#X pop; -#X text 264 376 ------ 4 seconds ------; -#X graph graph1 0 -1.02 176403 1.02 262 356 462 226; -#X array sample2 176403 float 0; -#X pop; -#X restore 29 277 pd samples; -#N canvas 21 287 947 410 recorder 0; -#X obj 318 43 inlet; -#X obj 272 196 adc~ 1; -#X obj 272 224 hip~ 5; -#X obj 341 254 line~; -#X obj 272 253 *~; -#X msg 341 226 1; -#X obj 400 191 del 3990; -#X msg 377 226 0 10; -#X obj 272 304 tabwrite~ sample1; -#X obj 124 110 makefilename sample%1; -#X msg 124 139 set \$1 \, bang; -#X msg 446 162 stop; -#X msg 400 162 bang; -#X obj 557 182 loadbang; -#X obj 660 137 openpanel; -#X msg 660 109 bang; -#X text 702 108 <-- browse for samples; -#X text 628 233 v-- re-read original samples; -#X obj 318 72 route record stop reload browse; -#X obj 557 319 soundfiler; -#X msg 557 261 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav -sample2; -#X msg 660 164 read \$1 sample1; -#X obj 660 191 soundfiler; -#X connect 0 0 18 0; -#X connect 1 0 2 0; -#X connect 2 0 4 0; -#X connect 3 0 4 1; -#X connect 4 0 8 0; -#X connect 5 0 3 0; -#X connect 6 0 7 0; -#X connect 7 0 3 0; -#X connect 9 0 10 0; -#X connect 10 0 8 0; -#X connect 11 0 6 0; -#X connect 12 0 6 0; -#X connect 13 0 20 0; -#X connect 14 0 21 0; -#X connect 15 0 14 0; -#X connect 18 0 9 0; -#X connect 18 0 12 0; -#X connect 18 0 5 0; -#X connect 18 1 7 0; -#X connect 18 1 11 0; -#X connect 18 2 20 0; -#X connect 18 3 15 0; -#X connect 20 0 19 0; -#X connect 21 0 22 0; -#X restore 29 443 pd recorder; -#X msg 29 305 record 1; -#X msg 29 360 stop; -#N canvas 700 402 671 621 playback 0; -#X obj 37 79 line~; -#X obj 56 271 line~; -#X obj 37 302 *~; -#X obj 56 242 r cutoff; -#X obj 37 50 r phase; -#X obj 37 626 outlet~; -#X obj 37 598 hip~ 5; -#X obj 49 113 r sample-number; -#X obj 49 142 makefilename sample%d; -#X msg 49 170 set \$1; -#X obj 37 211 tabread4~ sample1; -#X obj 55 338 r envelope; -#X obj 55 396 dbtorms; -#X obj 55 367 unpack; -#X obj 55 425 sqrt; -#X obj 55 454 sqrt; -#X obj 55 482 line~; -#X obj 37 569 *~; -#X obj 55 511 *~; -#X obj 55 540 *~; -#X text 107 51 messages to the phase generating line~; -#X text 188 114 setting the sample number.; -#X text 238 143 compute the name; -#X text 110 171 and send a "set" message to the tabread4~.; -#X text 116 270 line~ for de-clicking; -#X text 156 341 The envelope generator. Rather than sending our message -straight to the line~ we unpack it in order to fool with the amplitude -field.; -#X text 126 397 convert amplitude to linear units.; -#X text 121 426 take the fourth root. This because we want to raies -the line~'s output to the 4th power afterward. This is an inexpensive -way to give the rise and decay a more natural sounding evolution than -just a straight line.; -#X text 94 514 square the output twice to get the fourth power.; -#X connect 0 0 10 0; -#X connect 1 0 2 1; -#X connect 2 0 17 0; -#X connect 3 0 1 0; -#X connect 4 0 0 0; -#X connect 6 0 5 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 10 0; -#X connect 10 0 2 0; -#X connect 11 0 13 0; -#X connect 12 0 14 0; -#X connect 13 0 12 0; -#X connect 13 1 16 1; -#X connect 14 0 15 0; -#X connect 15 0 16 0; -#X connect 16 0 18 0; -#X connect 16 0 18 1; -#X connect 17 0 6 0; -#X connect 18 0 19 0; -#X connect 18 0 19 1; -#X connect 19 0 17 1; -#X restore 29 480 pd playback; -#X msg 29 332 record 2; -#X text 641 25 ARGUMENTS FOR NOTES:; -#X text 662 53 pitch in halftones; -#X text 662 77 amplitude (dB); -#X text 662 125 sample number; -#X text 662 101 duration (msec); -#X text 662 149 start location (msec); -#X text 662 173 rise time (msec); -#X text 662 197 decay time (msec); -#X obj 359 62 unpack 0 0 0 0 0 0 0; -#X text 46 6 CHOCOLATE SAMPLER; -#X obj 517 168 f; -#X obj 452 142 f; -#X obj 383 142 f; -#X obj 346 142 f; -#X obj 314 142 f; -#X obj 220 142 f; -#X obj 220 169 mtof; -#X obj 220 197 / 261.62; -#X obj 220 224 * 4.41e+08; -#X obj 220 252 +; -#X obj 485 142 delay; -#X obj 314 312 pack 0 0 0 0 0; -#X obj 253 62 t b b b; -#X text 494 346 This starts the note \, sending to "receives" in the -playback subptach. The new receive "envelope" is an amplitude control -in parallel with the cutoff control. The "sample-number" switches the -tabread4~ between tables.; -#X msg 152 44 \; pd dsp 1 \; cutoff 0 5; -#X obj 383 197 + 1; -#X msg 552 467 60 100 10000 1 0 0 0; -#X obj 552 737 s note; -#X msg 517 196 \; envelope 0 \$1; -#X msg 671 691 62; -#X msg 706 691 64; -#X msg 637 691 60; -#X msg 608 691 55; -#X msg 739 691 72; -#X msg 576 691 48; -#X msg 638 734 60.5; -#X msg 552 494 60 90 10000 1 0 0 0; -#X msg 552 522 60 100 10000 2 0 0 0; -#X msg 552 550 60 100 10000 1 3000 0 0; -#X obj 383 169 * 44.1; -#X msg 552 605 60 100 100 1 0 0 0; -#X msg 552 632 60 100 100 1 0 0 1000; -#X msg 552 577 60 100 10000 1 0 1000 0; -#X msg 314 340 \; envelope 0 \, \$1 \$2 \; phase \$3 \, \$4 1e+07 \; -sample-number \$5 \; cutoff 1 5 \;; -#X text 108 315 <-- record; -#X msg 29 388 reload; -#X msg 29 415 browse; -#X text 6 109 transposition works; -#X text 6 133 by altering the phase; -#X text 6 181 The mtof and / 261; -#X text 6 205 calculate speed change; -#X text 6 229 considering 60 as unity.; -#X text 20 43 as before we; -#X text 11 64 mute and wait; -#X text 6 157 target ($4 below right.); -#X text 446 303 combine amplitude \, rise time \, start phase \, end -phase \, and sample number in one message; -#X text 16 594 This patch take the same principle as the previous one -\, but allows you to parametrize sample playback. Since we must wait -5 msec before starting the playback \, we store all the parameters -in "f" objects \, and recall them to construct the new note. Transposition -is done by altering the amount to play back in the (artificial) ten -thousand seconds (1e+07). The playback segment can be altered to start -in the middle of the sample instead of the beginning \, and you can -change the duration and rise and decay times.; -#X text 744 468 straight playback; -#X text 749 495 change amplitude; -#X text 752 523 change sample number; -#X text 755 550 change start location; -#X text 754 576 change rise time; -#X text 754 609 change duration; -#X text 755 633 ... and decay time; -#X text 688 736 microtones OK too.; -#X text 576 667 If you omit values they stay unchanged; -#X text 799 759 updated for Pd version 0.33; -#X text 548 426 Here are buttons to demonstrate the effect of varying -the parameters one by one.; -#X connect 4 0 5 1; -#X connect 5 0 4 0; -#X connect 6 0 5 2; -#X connect 8 0 9 0; -#X connect 8 0 42 0; -#X connect 9 0 40 0; -#X connect 11 0 26 0; -#X connect 14 0 13 0; -#X connect 15 0 13 0; -#X connect 16 0 5 0; -#X connect 17 0 13 0; -#X connect 26 0 33 1; -#X connect 26 0 8 0; -#X connect 26 1 32 1; -#X connect 26 2 38 1; -#X connect 26 3 31 1; -#X connect 26 4 30 1; -#X connect 26 5 29 1; -#X connect 26 6 28 1; -#X connect 28 0 46 0; -#X connect 29 0 39 1; -#X connect 30 0 57 0; -#X connect 31 0 39 4; -#X connect 32 0 39 0; -#X connect 33 0 34 0; -#X connect 34 0 35 0; -#X connect 35 0 36 0; -#X connect 36 0 37 0; -#X connect 37 0 39 3; -#X connect 38 0 28 0; -#X connect 39 0 61 0; -#X connect 40 0 32 0; -#X connect 40 1 33 0; -#X connect 40 2 29 0; -#X connect 40 2 30 0; -#X connect 40 2 31 0; -#X connect 40 2 38 0; -#X connect 43 0 39 2; -#X connect 43 0 37 1; -#X connect 44 0 45 0; -#X connect 47 0 45 0; -#X connect 48 0 45 0; -#X connect 49 0 45 0; -#X connect 50 0 45 0; -#X connect 51 0 45 0; -#X connect 52 0 45 0; -#X connect 53 0 45 0; -#X connect 54 0 45 0; -#X connect 55 0 45 0; -#X connect 56 0 45 0; -#X connect 57 0 43 0; -#X connect 58 0 45 0; -#X connect 59 0 45 0; -#X connect 60 0 45 0; -#X connect 63 0 13 0; -#X connect 64 0 13 0; diff --git a/pd/doc/3.audio.examples/D08.sampler.poly.pd b/pd/doc/3.audio.examples/D08.sampler.poly.pd deleted file mode 100644 index 3e6cdba9..00000000 --- a/pd/doc/3.audio.examples/D08.sampler.poly.pd +++ /dev/null @@ -1,229 +0,0 @@ -#N canvas 66 253 1119 674 12; -#X floatatom 582 562 0 0 0 0 - - -; -#N canvas 159 26 495 262 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 547 595 pd output; -#X msg 617 562 MUTE; -#X text 660 561 <-- output amplitude; -#N canvas 0 0 600 392 samples 0; -#N canvas 0 0 450 300 graph1 0; -#X array sample1 176403 float 0; -#X coords 0 1.02 176403 -1.02 200 130 1; -#X restore 262 41 graph; -#X text 282 385 ------ 4 seconds ------; -#N canvas 0 0 450 300 graph1 0; -#X array sample2 176403 float 0; -#X coords 0 1.02 176403 -1.02 200 130 1; -#X restore 262 226 graph; -#X restore 931 97 pd samples; -#N canvas 52 219 967 340 recorder 0; -#X obj 220 21 inlet; -#X obj 174 174 adc~ 1; -#X obj 174 202 hip~ 5; -#X obj 243 232 line~; -#X obj 174 231 *~; -#X msg 243 204 1; -#X obj 302 169 del 3990; -#X msg 279 204 0 10; -#X obj 174 282 tabwrite~ sample1; -#X obj 26 88 makefilename sample%1; -#X msg 26 117 set \$1 \, bang; -#X msg 348 140 stop; -#X msg 302 140 bang; -#X obj 220 50 route record stop reload browse; -#X obj 411 158 loadbang; -#X obj 514 113 openpanel; -#X msg 514 85 bang; -#X text 556 84 <-- browse for samples; -#X text 482 209 v-- re-read original samples; -#X obj 411 295 soundfiler; -#X msg 411 237 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav -sample2; -#X msg 514 140 read \$1 sample1; -#X obj 514 167 soundfiler; -#X connect 0 0 13 0; -#X connect 1 0 2 0; -#X connect 2 0 4 0; -#X connect 3 0 4 1; -#X connect 4 0 8 0; -#X connect 5 0 3 0; -#X connect 6 0 7 0; -#X connect 7 0 3 0; -#X connect 9 0 10 0; -#X connect 10 0 8 0; -#X connect 11 0 6 0; -#X connect 12 0 6 0; -#X connect 13 0 9 0; -#X connect 13 0 12 0; -#X connect 13 0 5 0; -#X connect 13 1 7 0; -#X connect 13 1 11 0; -#X connect 13 2 20 0; -#X connect 13 3 16 0; -#X connect 14 0 20 0; -#X connect 15 0 21 0; -#X connect 16 0 15 0; -#X connect 20 0 19 0; -#X connect 21 0 22 0; -#X restore 931 284 pd recorder; -#X msg 931 146 record 1; -#X msg 931 202 stop; -#X msg 931 174 record 2; -#X text 19 49 ARGUMENTS FOR NOTES:; -#X text 19 71 pitch in halftones; -#X text 19 95 amplitude (dB); -#X text 19 143 sample number; -#X text 19 119 duration (msec); -#X text 19 167 start location (msec); -#X text 19 191 rise time (msec); -#X text 19 215 decay time (msec); -#X msg 931 229 reload; -#X msg 931 257 browse; -#X text 47 10 POLYPHONIC SAMPLER; -#X obj 547 522 sampvoice; -#X obj 547 494 sampvoice; -#X obj 547 467 sampvoice; -#X obj 547 439 sampvoice; -#X obj 547 412 sampvoice; -#X obj 547 384 sampvoice; -#X obj 547 356 sampvoice; -#X obj 547 329 sampvoice; -#X obj 631 17 r note; -#X obj 631 44 unpack 0 0 0 0 0 0 0; -#X obj 604 76 t b f; -#X obj 544 109 f; -#X obj 580 109 + 1; -#X obj 552 146 mod 1e+06; -#X obj 544 175 makenote 64; -#X obj 544 203 poly 8 1; -#X obj 544 230 stripnote; -#X obj 617 272 pack 0 0 0 0 0 0 0 0; -#X obj 617 300 route 1 2 3 4 5 6 7 8; -#X text 929 124 record \, etc.; -#X text 206 142 increment mod 1e+06 to make fake pitch; -#X text 326 177 supply note-off message; -#X text 336 207 allocate sampler voice; -#X text 359 232 drop note off again; -#X obj 704 516 qlist; -#X obj 870 520 r comment; -#X text 732 445 sailors to untie him...; -#X text 735 395 Lashed to the mast of his boat \, Ulysses; -#X text 735 420 hears beautiful singing. He begs his; -#X text 19 271 Here we take the previous patch and make it polyphonic -\, with 8 voices. The single voice which we had before has been made -into an abstraction \, "sampvoice.pd" \, which we instantiate in 8 -copies. Earlier we used sends and receives to pass messages to "cutoff" -\, etc \, but here if we did that the copies of sampvoice would be -sending messages to each other \, so we combine the control and the -audio computation in the sampvoice abstraction without using send and -receive. Click on one to see how.; -#X text 20 421 The "poly" object essentially repeats pitch and velocity -pairs to its output \, but also sending a voice number from its left -outlet. To use it \, we unpack the 7 parameters \, calculate the voice -number \, repack the message as 8 parameters with voice number first -\, and use "route" to send it to one of the 8 voices.; -#X text 20 523 There's some bother because poly expects to track note -on and note off messages separately as they would come from a MIDI -keyboard. So we assign each note a unique fake "pitch" \, use makenote -to generate the note-off messages \, and run poly on the resulting -stream. We then discard both pitch and velocity (using the velocity -only to strip note-offs) and rebuild the original message adding the -voice number we just scored.; -#X text 854 639 updated for Pd version 0.33; -#X msg 704 486 read qlist-sampler.txt \, rewind \, tempo 1 \, bang -; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 6 0 5 0; -#X connect 7 0 5 0; -#X connect 8 0 5 0; -#X connect 17 0 5 0; -#X connect 18 0 5 0; -#X connect 20 0 1 0; -#X connect 21 0 20 0; -#X connect 22 0 21 0; -#X connect 23 0 22 0; -#X connect 24 0 23 0; -#X connect 25 0 24 0; -#X connect 26 0 25 0; -#X connect 27 0 26 0; -#X connect 28 0 29 0; -#X connect 29 0 30 0; -#X connect 29 1 37 2; -#X connect 29 2 34 2; -#X connect 29 2 37 3; -#X connect 29 3 37 4; -#X connect 29 4 37 5; -#X connect 29 5 37 6; -#X connect 29 6 37 7; -#X connect 30 0 31 0; -#X connect 30 1 37 1; -#X connect 31 0 32 0; -#X connect 31 0 34 0; -#X connect 32 0 33 0; -#X connect 33 0 31 1; -#X connect 34 0 35 0; -#X connect 34 1 35 1; -#X connect 35 0 36 0; -#X connect 35 2 36 1; -#X connect 36 0 37 0; -#X connect 37 0 38 0; -#X connect 38 0 27 1; -#X connect 38 1 26 1; -#X connect 38 2 25 1; -#X connect 38 3 24 1; -#X connect 38 4 23 1; -#X connect 38 5 22 1; -#X connect 38 6 21 1; -#X connect 38 7 20 1; -#X connect 53 0 44 0; diff --git a/pd/doc/3.audio.examples/D08.table.spectrum.pd b/pd/doc/3.audio.examples/D08.table.spectrum.pd new file mode 100644 index 00000000..d9257e6c --- /dev/null +++ b/pd/doc/3.audio.examples/D08.table.spectrum.pd @@ -0,0 +1,91 @@ +#N canvas 251 127 807 425 12; +#N canvas 0 0 450 300 graph3 0; +#X array spectrum-tab 127 float 1; +#A 0 48.5713 48.5713 48.5713 48.2142 48.2142 48.2142 48.2142 48.2142 +48.2142 48.2142 48.2142 48.2142 48.2142 48.5713 48.5713 48.9284 48.9284 +48.9284 48.9284 48.9284 48.9284 48.9284 48.5713 48.5713 48.5713 48.2142 +48.2142 47.4999 47.1427 46.4285 46.4285 46.0713 46.0713 46.0713 45.7142 +44.9999 44.6428 43.5713 43.2142 42.8571 42.4999 41.7856 38.2143 36.7857 +34.6429 31.7857 30.3572 29.6429 28.5715 27.8572 26.7858 25.3572 25.7144 +23.9287 23.9287 23.5715 23.5715 23.5715 23.5715 23.2144 23.2144 23.2144 +22.8573 22.8573 23.5715 23.9287 23.5715 26.0715 26.0715 48.5713 48.5713 +48.5713 48.2142 47.4999 46.7856 46.7856 17.143 16.4287 16.0716 16.4287 +14.643 13.5716 13.5716 40.7142 40.7142 40.7142 14.643 13.2145 12.8573 +12.5002 12.5002 24.2858 29.6429 30.7143 16.4287 10.7145 11.7859 10.7145 +24.2858 23.5715 17.143 13.9288 9.64309 6.78597 5.71455 5.71455 4.28599 +3.92885 3.92885 3.92885 1.42887 1.42887 1.42887 1.07174 1.07174 1.07174 +0.714596 0.714596 0.714596 0.714596 0.714596 1.07174 1.07174 1.07174 +1.07174 0.714286 0.357143; +#X coords 0 50 126 0 300 140 1; +#X restore 496 136 graph; +#N canvas 98 16 694 474 oscbank 0; +#X obj 36 53 spectrum-partial 1; +#X obj 36 79 spectrum-partial 2; +#X obj 36 105 spectrum-partial 3; +#X obj 36 131 spectrum-partial 4; +#X obj 36 157 spectrum-partial 5; +#X obj 36 183 spectrum-partial 6; +#X obj 36 209 spectrum-partial 7; +#X obj 36 235 spectrum-partial 8; +#X obj 36 261 spectrum-partial 9; +#X obj 36 287 spectrum-partial 10; +#X obj 216 53 spectrum-partial 11; +#X obj 122 382 loadbang; +#X obj 122 407 metro 30; +#X obj 122 433 s poll-table; +#X text 107 21 This is the bank of oscillators--open one to see:; +#X text 72 345 And here we send bangs to "poll-table" needed by the +abstraction.; +#X obj 216 79 spectrum-partial 12; +#X obj 216 105 spectrum-partial 13; +#X obj 216 131 spectrum-partial 14; +#X obj 216 157 spectrum-partial 15; +#X obj 216 183 spectrum-partial 16; +#X obj 216 209 spectrum-partial 17; +#X obj 216 235 spectrum-partial 18; +#X obj 215 261 spectrum-partial 19; +#X obj 215 287 spectrum-partial 20; +#X obj 395 53 spectrum-partial 21; +#X obj 395 78 spectrum-partial 22; +#X obj 395 104 spectrum-partial 23; +#X obj 395 130 spectrum-partial 24; +#X obj 395 156 spectrum-partial 25; +#X obj 395 182 spectrum-partial 26; +#X obj 395 207 spectrum-partial 27; +#X obj 396 234 spectrum-partial 28; +#X obj 395 260 spectrum-partial 29; +#X obj 395 287 spectrum-partial 30; +#X connect 11 0 12 0; +#X connect 12 0 13 0; +#X restore 17 251 pd oscbank; +#X obj 19 321 catch~ sum-bus; +#X obj 16 153 s pitch; +#X floatatom 16 125 4 0 0 0 - - -; +#X text 43 18 DRAWABLE SPECTRA; +#X floatatom 14 183 4 0 0 0 - - -; +#X obj 14 211 s whammybar; +#N canvas 0 0 650 341 table-setup 0; +#X obj 39 227 loadbang; +#X msg 39 261 \; spectrum-tab xlabel -5 0 12 24 36 48 60 72 84 96 108 +120; +#X text 82 60 comment; +#X connect 0 0 1 0; +#X restore 17 283 pd table-setup; +#X msg 596 65 \; spectrum-tab const 0; +#X text 26 42 In this array \, you can draw a spectral envelope that +will be synthesized by an oscillator bank. Each oscillator in the bank +computes its own frequency and uses it to look up amplitude from the +array.; +#X text 113 254 <-- the oscillator bank; +#X text 71 128 <-- pitch; +#X text 61 185 <-- left or right shift (normally 0); +#X text 157 318 <-- here we just collect the sum of all the partials +which are computed in "oscbank".; +#X text 662 44 CLEAR; +#X text 148 283 <-- make the number labels; +#X obj 19 358 output~; +#X text 556 389 Updated for Pd version 0.37; +#X connect 2 0 17 0; +#X connect 2 0 17 1; +#X connect 4 0 3 0; +#X connect 6 0 7 0; diff --git a/pd/doc/3.audio.examples/D09.shepard.tone.pd b/pd/doc/3.audio.examples/D09.shepard.tone.pd new file mode 100644 index 00000000..8cb66603 --- /dev/null +++ b/pd/doc/3.audio.examples/D09.shepard.tone.pd @@ -0,0 +1,108 @@ +#N canvas 124 20 599 828 12; +#X floatatom 169 520 0 0 0 0 - - -; +#X floatatom 169 446 0 0 0 0 - - -; +#X text 462 208 START; +#X floatatom 190 303 0 0 0 0 - - -; +#X obj 190 280 r incr; +#X obj 168 255 metro 50; +#X floatatom 168 373 5 0 0 0 - - -; +#X obj 168 394 s phase; +#X obj 168 350 +; +#X obj 169 469 s dropoff+; +#X obj 169 622 s interval+; +#X floatatom 169 599 0 0 0 0 - - -; +#X obj 169 543 s pitch+; +#X obj 169 423 r dropoff; +#X obj 169 497 r pitch; +#X obj 169 576 r interval; +#X obj 168 212 r metro; +#X obj 228 345 f; +#X obj 12 212 shepvoice 0; +#X floatatom 83 708 0 0 0 0 - - -; +#X obj 83 685 r rev; +#X obj 138 685 r revtime; +#X floatatom 138 708 0 0 0 0 - - -; +#X obj 228 368 mod 10000; +#X obj 168 327 f; +#X obj 73 742 rev2~; +#X obj 12 769 output~; +#X obj 168 235 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X msg 446 225 \; dropoff 10 \; pitch 60 \; interval 120 \; metro 1 +\; rev 84 \; revtime 87 \; incr -2 \; pd dsp 1; +#X text 27 7 SHEPARD TONE; +#X text 339 804 updated for Pd version 0.37; +#X obj 12 235 shepvoice 500; +#X obj 12 258 shepvoice 1000; +#X obj 12 281 shepvoice 1500; +#X obj 12 304 shepvoice 2000; +#X obj 12 327 shepvoice 2500; +#X obj 12 350 shepvoice 3000; +#X obj 12 373 shepvoice 3500; +#X obj 12 396 shepvoice 4000; +#X obj 12 419 shepvoice 4500; +#X obj 12 442 shepvoice 5000; +#X obj 12 465 shepvoice 5500; +#X obj 12 488 shepvoice 6000; +#X obj 12 511 shepvoice 6500; +#X obj 12 534 shepvoice 7000; +#X obj 12 557 shepvoice 7500; +#X obj 12 580 shepvoice 8000; +#X obj 12 603 shepvoice 8500; +#X obj 12 626 shepvoice 9000; +#X obj 12 649 shepvoice 9500; +#X text 25 31 This patch is a bank of 20 sinusoids \, arranged so that +their frequencies sweep upward or downward in parallel \, and their +amplitudes fade in and out so that each one is quiet when it wraps +around from one end to the other. The overall "phase" computed here +is added to each voice's relative phase (its creation argument). The +"incr" parameter controlls how fast the phase changes \, "dropoff" +the slope at which the amplitudes fall off at the ends \, "pitch" the +center pitch of the cluster \, "interval" the number of (tenths of +halftones) between successive voices \, and "rev" and "revtime" the +reverberator at bottom.; +#X connect 0 0 12 0; +#X connect 1 0 9 0; +#X connect 3 0 24 1; +#X connect 4 0 3 0; +#X connect 5 0 24 0; +#X connect 6 0 7 0; +#X connect 8 0 17 0; +#X connect 8 0 6 0; +#X connect 11 0 10 0; +#X connect 13 0 1 0; +#X connect 14 0 0 0; +#X connect 15 0 11 0; +#X connect 16 0 27 0; +#X connect 17 0 23 0; +#X connect 18 0 31 0; +#X connect 19 0 25 1; +#X connect 20 0 19 0; +#X connect 21 0 22 0; +#X connect 22 0 25 2; +#X connect 23 0 8 1; +#X connect 24 0 8 0; +#X connect 25 0 26 0; +#X connect 25 1 26 1; +#X connect 27 0 5 0; +#X connect 31 0 32 0; +#X connect 32 0 33 0; +#X connect 33 0 34 0; +#X connect 34 0 35 0; +#X connect 35 0 36 0; +#X connect 36 0 37 0; +#X connect 37 0 38 0; +#X connect 38 0 39 0; +#X connect 39 0 40 0; +#X connect 40 0 41 0; +#X connect 41 0 42 0; +#X connect 42 0 43 0; +#X connect 43 0 44 0; +#X connect 44 0 45 0; +#X connect 45 0 46 0; +#X connect 46 0 47 0; +#X connect 47 0 48 0; +#X connect 48 0 49 0; +#X connect 49 0 25 0; +#X connect 49 0 26 0; +#X connect 49 0 26 1; diff --git a/pd/doc/3.audio.examples/D09.table.spectrum.pd b/pd/doc/3.audio.examples/D09.table.spectrum.pd deleted file mode 100644 index 65ccccde..00000000 --- a/pd/doc/3.audio.examples/D09.table.spectrum.pd +++ /dev/null @@ -1,143 +0,0 @@ -#N canvas 227 120 801 403 12; -#X graph graph3 0 0 126 50 496 276 796 136; -#X array spectrum-tab 127 float 1; -#A 0 42.8571 42.5 43.2143 43.2143 43.2143 43.2143 43.2143 42.8571 42.8571 -42.8571 42.8571 42.8571 42.8571 42.5 42.5 42.5 42.5 42.5 42.5 42.5 -42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 42.5 -42.5 42.5 42.1429 42.1429 41.7857 41.0714 40.3571 39.6429 39.2857 38.2143 -37.5 37.1429 36.0714 35.3571 33.9286 33.2143 32.8571 31.4286 31.0714 -30.3571 28.9286 28.2143 27.5 26.4286 25.7143 23.9286 23.2143 21.7857 -21.0714 20.7143 20 19.6429 19.6429 23.2143 28.2143 31.4286 33.5714 -36.4286 37.8571 38.9286 43.9286 45.7143 47.8571 47.8571 47.8571 47.8571 -47.5 47.1429 43.2143 40.3571 36.4286 33.9286 32.1429 29.2857 18.2143 -16.7857 16.7857 17.5 19.6429 22.1429 28.2143 33.9286 33.9286 33.9286 -33.5714 22.5 18.5714 16.7857 4.64286 4.64286 18.2143 17.1429 8.92857 -4.28571 11.4286 10 7.5 6.42857 5.71429 5.35714 5 4.64286 4.28571 3.92857 -3.92857 3.57143 3.57143 2.85714 2.5 2.14286 1.78571 0.714286 0.357143 -; -#X pop; -#X floatatom 57 351 0 0 0; -#N canvas 159 26 526 286 output 0; -#X obj 345 163 t b; -#X obj 345 112 f; -#X obj 345 61 inlet; -#X text 351 30 mute; -#X obj 345 189 f; -#X msg 434 182 0; -#X msg 345 87 bang; -#X obj 345 138 moses 1; -#X obj 405 119 moses 1; -#X obj 85 151 dbtorms; -#X obj 405 94 r master-lvl; -#X obj 85 43 r master-lvl; -#X obj 345 214 s master-lvl; -#X obj 22 185 inlet~; -#X obj 203 42 inlet; -#X text 203 18 level; -#X obj 203 102 s master-lvl; -#X msg 98 67 set \$1; -#X obj 98 91 outlet; -#X msg 218 65 \; pd dsp 1; -#X obj 85 198 line~; -#X obj 22 216 *~; -#X obj 22 246 dac~; -#X obj 85 175 pack 0 50; -#X text 20 162 audio; -#X obj 434 155 t b; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 25 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 25 0 5 0; -#X restore 19 376 pd output; -#X msg 95 350 MUTE; -#N canvas 98 16 694 474 oscbank 0; -#X obj 36 53 spectrum-partial 1; -#X obj 36 79 spectrum-partial 2; -#X obj 36 105 spectrum-partial 3; -#X obj 36 131 spectrum-partial 4; -#X obj 36 157 spectrum-partial 5; -#X obj 36 183 spectrum-partial 6; -#X obj 36 209 spectrum-partial 7; -#X obj 36 235 spectrum-partial 8; -#X obj 36 261 spectrum-partial 9; -#X obj 36 287 spectrum-partial 10; -#X obj 216 53 spectrum-partial 11; -#X obj 122 382 loadbang; -#X obj 122 407 metro 30; -#X obj 122 433 s poll-table; -#X text 107 21 This is the bank of oscillators--open one to see:; -#X text 72 345 And here we send bangs to "poll-table" needed by the -abstraction.; -#X obj 216 79 spectrum-partial 12; -#X obj 216 105 spectrum-partial 13; -#X obj 216 131 spectrum-partial 14; -#X obj 216 157 spectrum-partial 15; -#X obj 216 183 spectrum-partial 16; -#X obj 216 209 spectrum-partial 17; -#X obj 216 235 spectrum-partial 18; -#X obj 215 261 spectrum-partial 19; -#X obj 215 287 spectrum-partial 20; -#X obj 395 53 spectrum-partial 21; -#X obj 395 78 spectrum-partial 22; -#X obj 395 104 spectrum-partial 23; -#X obj 395 130 spectrum-partial 24; -#X obj 395 156 spectrum-partial 25; -#X obj 395 182 spectrum-partial 26; -#X obj 395 207 spectrum-partial 27; -#X obj 396 234 spectrum-partial 28; -#X obj 395 260 spectrum-partial 29; -#X obj 395 287 spectrum-partial 30; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X restore 17 251 pd oscbank; -#X obj 19 321 catch~ sum-bus; -#X obj 16 153 s pitch; -#X floatatom 16 125 4 0 0; -#X text 43 18 DRAWABLE SPECTRA; -#X floatatom 14 183 4 0 0; -#X obj 14 211 s whammybar; -#N canvas 0 0 650 341 table-setup 0; -#X obj 39 227 loadbang; -#X msg 39 261 \; spectrum-tab xlabel -5 0 12 24 36 48 60 72 84 96 108 -120; -#X text 82 60 comment; -#X connect 0 0 1 0; -#X restore 17 283 pd table-setup; -#X msg 596 65 \; spectrum-tab const 0; -#X text 555 381 Updated for Pd version 0.34; -#X text 26 42 In this array \, you can draw a spectral envelope that -will be synthesized by an oscillator bank. Each oscillator in the bank -computes its own frequency and uses it to look up amplitude from the -array.; -#X text 113 254 <-- the oscillator bank; -#X text 71 128 <-- pitch; -#X text 61 185 <-- left or right shift (normally 0); -#X text 157 318 <-- here we just collect the sum of all the partials -which are computed in "oscbank".; -#X text 662 44 CLEAR; -#X text 148 283 <-- make the number labels; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 2 0; -#X connect 7 0 6 0; -#X connect 9 0 10 0; diff --git a/pd/doc/3.audio.examples/D10.risset.bell.pd b/pd/doc/3.audio.examples/D10.risset.bell.pd deleted file mode 100644 index 8e329eaa..00000000 --- a/pd/doc/3.audio.examples/D10.risset.bell.pd +++ /dev/null @@ -1,109 +0,0 @@ -#N canvas 375 37 484 454 12; -#X floatatom 129 403 0 0 0 0 - - -; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 159 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 105 428 pd output; -#X msg 154 403 MUTE; -#X text 195 402 <-- output amplitude; -#X obj 97 167 sinevoice 1 0.56 0 1; -#X obj 243 42 unpack 0 0 0; -#X floatatom 242 84 0 0 0 0 - - -; -#X obj 217 62 t b f; -#X floatatom 276 84 0 0 0 0 - - -; -#X floatatom 310 84 0 0 0 0 - - -; -#X obj 217 105 f; -#X msg 170 84 bang; -#X obj 217 127 pack 0 0 0; -#X msg 243 20 80 72 5000; -#X obj 97 189 sinevoice 0.67 0.56 1 0.9; -#X obj 97 211 sinevoice 1 0.92 0 0.65; -#X obj 97 233 sinevoice 1.8 0.92 1.7 0.55; -#X obj 97 255 sinevoice 2.67 1.19 0 0.325; -#X obj 97 277 sinevoice 1.67 1.7 0 0.35; -#X obj 97 299 sinevoice 1.46 2 0 0.25; -#X obj 97 321 sinevoice 1.33 2.74 0 0.2; -#X obj 97 343 sinevoice 1 3 0 0.15; -#X obj 97 365 sinevoice 1.33 4.07 0 0.075; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 14 0; -#X connect 4 1 14 1; -#X connect 5 0 7 0; -#X connect 5 1 8 0; -#X connect 5 2 9 0; -#X connect 6 0 10 1; -#X connect 7 0 10 0; -#X connect 7 1 6 0; -#X connect 8 0 12 1; -#X connect 9 0 12 2; -#X connect 10 0 12 0; -#X connect 11 0 10 0; -#X connect 12 0 4 1; -#X connect 13 0 5 0; -#X connect 14 0 15 0; -#X connect 14 1 15 1; -#X connect 15 0 16 0; -#X connect 15 1 16 1; -#X connect 16 0 17 0; -#X connect 16 1 17 1; -#X connect 17 0 18 0; -#X connect 17 1 18 1; -#X connect 18 0 19 0; -#X connect 18 1 19 1; -#X connect 19 0 20 0; -#X connect 19 1 20 1; -#X connect 20 0 21 0; -#X connect 20 1 21 1; -#X connect 21 0 22 0; -#X connect 21 1 22 1; -#X connect 22 0 1 0; diff --git a/pd/doc/3.audio.examples/D10.sampler.notes.pd b/pd/doc/3.audio.examples/D10.sampler.notes.pd new file mode 100644 index 00000000..6bfd1402 --- /dev/null +++ b/pd/doc/3.audio.examples/D10.sampler.notes.pd @@ -0,0 +1,263 @@ +#N canvas 12 0 1074 786 12; +#X msg 257 7 bang; +#X obj 257 35 delay 5; +#X text 497 269 end of note; +#X obj 363 35 r note; +#N canvas 459 46 678 451 samples 0; +#N canvas 0 0 450 300 graph1 0; +#X array sample1 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 262 41 graph; +#X text 264 376 ------ 4 seconds ------; +#N canvas 0 0 450 300 graph1 0; +#X array sample2 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 262 226 graph; +#X restore 33 277 pd samples; +#N canvas 21 287 947 410 recorder 0; +#X obj 318 43 inlet; +#X obj 272 196 adc~ 1; +#X obj 272 224 hip~ 5; +#X obj 341 254 line~; +#X obj 272 253 *~; +#X msg 341 226 1; +#X obj 400 191 del 3990; +#X msg 377 226 0 10; +#X obj 272 304 tabwrite~ sample1; +#X obj 124 110 makefilename sample%1; +#X msg 124 139 set \$1 \, bang; +#X msg 446 162 stop; +#X msg 400 162 bang; +#X obj 557 182 loadbang; +#X obj 660 137 openpanel; +#X msg 660 109 bang; +#X text 702 108 <-- browse for samples; +#X text 628 233 v-- re-read original samples; +#X obj 318 72 route record stop reload browse; +#X obj 557 319 soundfiler; +#X msg 557 261 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav +sample2; +#X msg 660 164 read \$1 sample1; +#X obj 660 191 soundfiler; +#X connect 0 0 18 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 8 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 7 0 3 0; +#X connect 9 0 10 0; +#X connect 10 0 8 0; +#X connect 11 0 6 0; +#X connect 12 0 6 0; +#X connect 13 0 20 0; +#X connect 14 0 21 0; +#X connect 15 0 14 0; +#X connect 18 0 9 0; +#X connect 18 0 12 0; +#X connect 18 0 5 0; +#X connect 18 1 7 0; +#X connect 18 1 11 0; +#X connect 18 2 20 0; +#X connect 18 3 15 0; +#X connect 20 0 19 0; +#X connect 21 0 22 0; +#X restore 33 443 pd recorder; +#X msg 33 305 record 1; +#X msg 33 360 stop; +#N canvas 359 226 666 626 playback 0; +#X obj 20 45 line~; +#X obj 39 237 line~; +#X obj 20 268 *~; +#X obj 39 208 r cutoff; +#X obj 20 16 r phase; +#X obj 20 592 outlet~; +#X obj 20 564 hip~ 5; +#X obj 32 79 r sample-number; +#X obj 32 108 makefilename sample%d; +#X msg 32 136 set \$1; +#X obj 20 177 tabread4~ sample1; +#X obj 38 304 r envelope; +#X obj 38 362 dbtorms; +#X obj 38 333 unpack; +#X obj 38 391 sqrt; +#X obj 38 420 sqrt; +#X obj 38 448 line~; +#X obj 20 535 *~; +#X obj 38 477 *~; +#X obj 38 506 *~; +#X text 90 17 messages to the phase generating line~; +#X text 171 80 setting the sample number.; +#X text 221 109 compute the name; +#X text 93 137 and send a "set" message to the tabread4~.; +#X text 99 236 line~ for de-clicking; +#X text 139 307 The envelope generator. Rather than sending our message +straight to the line~ we unpack it in order to fool with the amplitude +field.; +#X text 109 363 convert amplitude to linear units.; +#X text 104 392 take the fourth root. This because we want to raies +the line~'s output to the 4th power afterward. This is an inexpensive +way to give the rise and decay a more natural sounding evolution than +just a straight line.; +#X text 77 480 square the output twice to get the fourth power.; +#X connect 0 0 10 0; +#X connect 1 0 2 1; +#X connect 2 0 17 0; +#X connect 3 0 1 0; +#X connect 4 0 0 0; +#X connect 6 0 5 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 10 0; +#X connect 10 0 2 0; +#X connect 11 0 13 0; +#X connect 12 0 14 0; +#X connect 13 0 12 0; +#X connect 13 1 16 1; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 18 0; +#X connect 16 0 18 1; +#X connect 17 0 6 0; +#X connect 18 0 19 0; +#X connect 18 0 19 1; +#X connect 19 0 17 1; +#X restore 33 480 pd playback; +#X msg 33 332 record 2; +#X text 645 25 ARGUMENTS FOR NOTES:; +#X text 666 53 pitch in halftones; +#X text 666 77 amplitude (dB); +#X text 666 125 sample number; +#X text 666 101 duration (msec); +#X text 666 149 start location (msec); +#X text 666 173 rise time (msec); +#X text 666 197 decay time (msec); +#X obj 363 62 unpack 0 0 0 0 0 0 0; +#X text 50 6 CHOCOLATE SAMPLER; +#X obj 521 168 f; +#X obj 456 142 f; +#X obj 387 142 f; +#X obj 350 142 f; +#X obj 318 142 f; +#X obj 224 142 f; +#X obj 224 169 mtof; +#X obj 224 197 / 261.62; +#X obj 224 224 * 4.41e+08; +#X obj 224 252 +; +#X obj 489 142 delay; +#X obj 318 312 pack 0 0 0 0 0; +#X obj 257 62 t b b b; +#X text 498 346 This starts the note \, sending to "receives" in the +playback subptach. The new receive "envelope" is an amplitude control +in parallel with the cutoff control. The "sample-number" switches the +tabread4~ between tables.; +#X msg 156 44 \; pd dsp 1 \; cutoff 0 5; +#X obj 387 197 + 1; +#X msg 556 467 60 100 10000 1 0 0 0; +#X obj 556 737 s note; +#X msg 521 196 \; envelope 0 \$1; +#X msg 675 691 62; +#X msg 710 691 64; +#X msg 641 691 60; +#X msg 612 691 55; +#X msg 743 691 72; +#X msg 580 691 48; +#X msg 642 734 60.5; +#X msg 556 494 60 90 10000 1 0 0 0; +#X msg 556 522 60 100 10000 2 0 0 0; +#X msg 556 550 60 100 10000 1 3000 0 0; +#X obj 387 169 * 44.1; +#X msg 556 605 60 100 100 1 0 0 0; +#X msg 556 632 60 100 100 1 0 0 1000; +#X msg 556 577 60 100 10000 1 0 1000 0; +#X msg 318 340 \; envelope 0 \, \$1 \$2 \; phase \$3 \, \$4 1e+07 \; +sample-number \$5 \; cutoff 1 5 \;; +#X text 117 305 <-- record; +#X msg 33 388 reload; +#X msg 33 415 browse; +#X text 7 109 transposition works; +#X text 7 133 by altering the phase; +#X text 7 181 The mtof and / 261; +#X text 7 205 calculate speed change; +#X text 7 229 considering 60 as unity.; +#X text 24 43 as before we; +#X text 15 64 mute and wait; +#X text 7 157 target ($4 below right.); +#X text 450 303 combine amplitude \, rise time \, start phase \, end +phase \, and sample number in one message; +#X text 764 467 straight playback; +#X text 764 493 change amplitude; +#X text 767 521 change sample number; +#X text 769 550 change start location; +#X text 768 576 change rise time; +#X text 768 609 change duration; +#X text 769 633 ... and decay time; +#X text 692 736 microtones OK too.; +#X text 580 667 If you omit values they stay unchanged; +#X text 552 426 Here are buttons to demonstrate the effect of varying +the parameters one by one.; +#X obj 34 511 output~; +#X text 13 596 This patch take the same principle as the earlier "one-shot +sampler" \, but allows you to parametrize sample playback. Since we +must wait 5 msec before starting the playback \, we store all the parameters +in "f" objects \, and recall them to construct the new note. Transposition +is done by altering the amount to play back in the (artificial) ten +thousand seconds (1e+07). The playback segment can be altered to start +in the middle of the sample instead of the beginning \, and you can +change the duration and rise and decay times.; +#X text 823 763 updated for Pd version 0.37; +#X connect 0 0 1 0; +#X connect 0 0 34 0; +#X connect 1 0 32 0; +#X connect 3 0 18 0; +#X connect 6 0 5 0; +#X connect 7 0 5 0; +#X connect 8 0 76 0; +#X connect 8 0 76 1; +#X connect 9 0 5 0; +#X connect 18 0 25 1; +#X connect 18 0 0 0; +#X connect 18 1 24 1; +#X connect 18 2 30 1; +#X connect 18 3 23 1; +#X connect 18 4 22 1; +#X connect 18 5 21 1; +#X connect 18 6 20 1; +#X connect 20 0 38 0; +#X connect 21 0 31 1; +#X connect 22 0 49 0; +#X connect 23 0 31 4; +#X connect 24 0 31 0; +#X connect 25 0 26 0; +#X connect 26 0 27 0; +#X connect 27 0 28 0; +#X connect 28 0 29 0; +#X connect 29 0 31 3; +#X connect 30 0 20 0; +#X connect 31 0 53 0; +#X connect 32 0 24 0; +#X connect 32 1 25 0; +#X connect 32 2 21 0; +#X connect 32 2 22 0; +#X connect 32 2 23 0; +#X connect 32 2 30 0; +#X connect 35 0 31 2; +#X connect 35 0 29 1; +#X connect 36 0 37 0; +#X connect 39 0 37 0; +#X connect 40 0 37 0; +#X connect 41 0 37 0; +#X connect 42 0 37 0; +#X connect 43 0 37 0; +#X connect 44 0 37 0; +#X connect 45 0 37 0; +#X connect 46 0 37 0; +#X connect 47 0 37 0; +#X connect 48 0 37 0; +#X connect 49 0 35 0; +#X connect 50 0 37 0; +#X connect 51 0 37 0; +#X connect 52 0 37 0; +#X connect 55 0 5 0; +#X connect 56 0 5 0; diff --git a/pd/doc/3.audio.examples/D11.sampler.poly.pd b/pd/doc/3.audio.examples/D11.sampler.poly.pd new file mode 100644 index 00000000..60aa7377 --- /dev/null +++ b/pd/doc/3.audio.examples/D11.sampler.poly.pd @@ -0,0 +1,175 @@ +#N canvas 66 253 1119 674 12; +#N canvas 0 0 600 392 samples 0; +#N canvas 0 0 450 300 graph1 0; +#X array sample1 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 262 41 graph; +#X text 282 385 ------ 4 seconds ------; +#N canvas 0 0 450 300 graph1 0; +#X array sample2 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 262 226 graph; +#X restore 931 97 pd samples; +#N canvas 52 219 967 340 recorder 0; +#X obj 220 21 inlet; +#X obj 174 174 adc~ 1; +#X obj 174 202 hip~ 5; +#X obj 243 232 line~; +#X obj 174 231 *~; +#X msg 243 204 1; +#X obj 302 169 del 3990; +#X msg 279 204 0 10; +#X obj 174 282 tabwrite~ sample1; +#X obj 26 88 makefilename sample%1; +#X msg 26 117 set \$1 \, bang; +#X msg 348 140 stop; +#X msg 302 140 bang; +#X obj 220 50 route record stop reload browse; +#X obj 411 158 loadbang; +#X obj 514 113 openpanel; +#X msg 514 85 bang; +#X text 556 84 <-- browse for samples; +#X text 482 209 v-- re-read original samples; +#X obj 411 295 soundfiler; +#X msg 411 237 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav +sample2; +#X msg 514 140 read \$1 sample1; +#X obj 514 167 soundfiler; +#X connect 0 0 13 0; +#X connect 1 0 2 0; +#X connect 2 0 4 0; +#X connect 3 0 4 1; +#X connect 4 0 8 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 7 0 3 0; +#X connect 9 0 10 0; +#X connect 10 0 8 0; +#X connect 11 0 6 0; +#X connect 12 0 6 0; +#X connect 13 0 9 0; +#X connect 13 0 12 0; +#X connect 13 0 5 0; +#X connect 13 1 7 0; +#X connect 13 1 11 0; +#X connect 13 2 20 0; +#X connect 13 3 16 0; +#X connect 14 0 20 0; +#X connect 15 0 21 0; +#X connect 16 0 15 0; +#X connect 20 0 19 0; +#X connect 21 0 22 0; +#X restore 931 284 pd recorder; +#X msg 931 146 record 1; +#X msg 931 202 stop; +#X msg 931 174 record 2; +#X text 19 49 ARGUMENTS FOR NOTES:; +#X text 19 71 pitch in halftones; +#X text 19 95 amplitude (dB); +#X text 19 143 sample number; +#X text 19 119 duration (msec); +#X text 19 167 start location (msec); +#X text 19 191 rise time (msec); +#X text 19 215 decay time (msec); +#X msg 931 229 reload; +#X msg 931 257 browse; +#X text 47 10 POLYPHONIC SAMPLER; +#X obj 547 522 sampvoice; +#X obj 547 494 sampvoice; +#X obj 547 467 sampvoice; +#X obj 547 439 sampvoice; +#X obj 547 412 sampvoice; +#X obj 547 384 sampvoice; +#X obj 547 356 sampvoice; +#X obj 547 329 sampvoice; +#X obj 631 17 r note; +#X obj 631 44 unpack 0 0 0 0 0 0 0; +#X obj 604 76 t b f; +#X obj 544 109 f; +#X obj 580 109 + 1; +#X obj 552 146 mod 1e+06; +#X obj 544 175 makenote 64; +#X obj 544 203 poly 8 1; +#X obj 544 230 stripnote; +#X obj 617 272 pack 0 0 0 0 0 0 0 0; +#X obj 617 300 route 1 2 3 4 5 6 7 8; +#X text 929 124 record \, etc.; +#X text 335 203 allocate sampler voice; +#X text 361 228 drop note off again; +#X obj 704 516 qlist; +#X obj 870 520 r comment; +#X text 732 445 sailors to untie him...; +#X text 735 395 Lashed to the mast of his boat \, Ulysses; +#X text 735 420 hears beautiful singing. He begs his; +#X text 7 263 Here we take the previous patch and make it polyphonic +\, with 8 voices. The single voice which we had before has been made +into an abstraction \, "sampvoice.pd" \, which we instantiate in 8 +copies. Earlier we used sends and receives to pass messages to "cutoff" +\, etc \, but here if we did that the copies of sampvoice would be +sending messages to each other \, so we combine the control and the +audio computation in the sampvoice abstraction without using send and +receive. Click on one to see how.; +#X text 8 413 The "poly" object essentially repeats pitch and velocity +pairs to its output \, but also sending a voice number from its left +outlet. To use it \, we unpack the 7 parameters \, calculate the voice +number \, repack the message as 8 parameters with voice number first +\, and use "route" to send it to one of the 8 voices.; +#X text 8 515 There's some bother because poly expects to track note +on and note off messages separately as they would come from a MIDI +keyboard. So we assign each note a unique fake "pitch" \, use makenote +to generate the note-off messages \, and run poly on the resulting +stream. We then discard both pitch and velocity (using the velocity +only to strip note-offs) and rebuild the original message adding the +voice number we just scored.; +#X text 854 639 updated for Pd version 0.33; +#X msg 704 486 read qlist-sampler.txt \, rewind \, tempo 1 \, bang +; +#X obj 548 551 output~; +#X text 249 108 increment mod 1e+06 to make tag; +#X text 276 127 (acts like a MIDI pitch to; +#X text 277 146 identify the note to "poly"); +#X text 258 175 supply delayed note-off message; +#X connect 2 0 1 0; +#X connect 3 0 1 0; +#X connect 4 0 1 0; +#X connect 13 0 1 0; +#X connect 14 0 1 0; +#X connect 16 0 48 0; +#X connect 16 0 48 1; +#X connect 17 0 16 0; +#X connect 18 0 17 0; +#X connect 19 0 18 0; +#X connect 20 0 19 0; +#X connect 21 0 20 0; +#X connect 22 0 21 0; +#X connect 23 0 22 0; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 25 1 33 2; +#X connect 25 2 30 2; +#X connect 25 2 33 3; +#X connect 25 3 33 4; +#X connect 25 4 33 5; +#X connect 25 5 33 6; +#X connect 25 6 33 7; +#X connect 26 0 27 0; +#X connect 26 1 33 1; +#X connect 27 0 28 0; +#X connect 27 0 30 0; +#X connect 28 0 29 0; +#X connect 29 0 27 1; +#X connect 30 0 31 0; +#X connect 30 1 31 1; +#X connect 31 0 32 0; +#X connect 31 2 32 1; +#X connect 32 0 33 0; +#X connect 33 0 34 0; +#X connect 34 0 23 1; +#X connect 34 1 22 1; +#X connect 34 2 21 1; +#X connect 34 3 20 1; +#X connect 34 4 19 1; +#X connect 34 5 18 1; +#X connect 34 6 17 1; +#X connect 34 7 16 1; +#X connect 47 0 38 0; diff --git a/pd/doc/3.audio.examples/D11.shepard.tone.pd b/pd/doc/3.audio.examples/D11.shepard.tone.pd deleted file mode 100644 index 8be283ab..00000000 --- a/pd/doc/3.audio.examples/D11.shepard.tone.pd +++ /dev/null @@ -1,110 +0,0 @@ -#N canvas 19 0 594 599 12; -#X floatatom 107 202 0 0 0 0 - - -; -#X floatatom 11 202 0 0 0 0 - - -; -#X text 140 17 STOP; -#X text 20 3 START; -#X floatatom 78 358 0 0 0 0 - - -; -#X obj 78 337 r incr; -#X obj 65 310 metro 50; -#X floatatom 64 426 0 0 0 0 - - -; -#X obj 62 494 s phase; -#X obj 62 474 + 10000; -#X obj 64 406 +; -#X obj 11 222 s dropoff+; -#X obj 186 221 s interval+; -#X floatatom 186 201 0 0 0 0 - - -; -#X obj 107 222 s pitch+; -#X obj 11 182 r dropoff; -#X obj 107 182 r pitch; -#X obj 186 181 r interval; -#X floatatom 65 289 0 0 0 0 - - -; -#X obj 65 269 r metro; -#X obj 124 406 f; -#X obj 295 467 *~; -#X obj 295 15 shepvoice 0; -#X obj 315 441 line~; -#X obj 471 408 pack 0 100; -#X floatatom 471 367 0 0 0 0 - - -; -#X obj 471 347 r amp; -#X obj 295 519 dac~; -#X obj 471 387 dbtorms; -#X floatatom 372 464 0 0 0 0 - - -; -#X obj 372 444 r rev; -#X obj 420 440 r revtime; -#X floatatom 420 461 0 0 0 0 - - -; -#X obj 313 497 rev4~; -#X obj 124 426 mod 10000; -#X obj 295 36 shepvoice 500; -#X obj 295 56 shepvoice 1000; -#X obj 295 77 shepvoice 1500; -#X obj 295 97 shepvoice 2000; -#X obj 295 117 shepvoice 2500; -#X obj 295 138 shepvoice 3000; -#X obj 295 158 shepvoice 3500; -#X obj 295 179 shepvoice 4000; -#X obj 295 199 shepvoice 4500; -#X obj 295 219 shepvoice 5000; -#X obj 295 240 shepvoice 5500; -#X obj 295 260 shepvoice 6000; -#X obj 295 281 shepvoice 6500; -#X obj 295 301 shepvoice 7000; -#X obj 295 321 shepvoice 7500; -#X obj 295 342 shepvoice 8000; -#X obj 295 362 shepvoice 8500; -#X obj 295 385 shepvoice 9000; -#X obj 295 405 shepvoice 9500; -#X obj 65 380 f; -#X msg 140 35 \; amp 0 \;; -#X msg 6 18 \; dropoff 10 \; pitch 60 \; interval 120 \; metro 1 \; -rev 74 \; revtime 87 \; incr -2 \; pd dsp 1; -#X connect 0 0 14 0; -#X connect 1 0 11 0; -#X connect 4 0 54 1; -#X connect 5 0 4 0; -#X connect 6 0 54 0; -#X connect 7 0 9 0; -#X connect 9 0 8 0; -#X connect 10 0 20 0; -#X connect 10 0 7 0; -#X connect 13 0 12 0; -#X connect 15 0 1 0; -#X connect 16 0 0 0; -#X connect 17 0 13 0; -#X connect 18 0 6 0; -#X connect 19 0 18 0; -#X connect 20 0 34 0; -#X connect 21 0 27 0; -#X connect 21 0 33 0; -#X connect 22 0 35 0; -#X connect 23 0 21 1; -#X connect 24 0 23 0; -#X connect 25 0 28 0; -#X connect 26 0 25 0; -#X connect 28 0 24 0; -#X connect 29 0 33 1; -#X connect 30 0 29 0; -#X connect 31 0 32 0; -#X connect 32 0 33 2; -#X connect 33 0 27 0; -#X connect 33 1 27 1; -#X connect 34 0 10 1; -#X connect 35 0 36 0; -#X connect 36 0 37 0; -#X connect 37 0 38 0; -#X connect 38 0 39 0; -#X connect 39 0 40 0; -#X connect 40 0 41 0; -#X connect 41 0 42 0; -#X connect 42 0 43 0; -#X connect 43 0 44 0; -#X connect 44 0 45 0; -#X connect 45 0 46 0; -#X connect 46 0 47 0; -#X connect 47 0 48 0; -#X connect 48 0 49 0; -#X connect 49 0 50 0; -#X connect 50 0 51 0; -#X connect 51 0 52 0; -#X connect 52 0 53 0; -#X connect 53 0 21 0; -#X connect 54 0 10 0; diff --git a/pd/doc/3.audio.examples/D12.sampler.bis.pd b/pd/doc/3.audio.examples/D12.sampler.bis.pd new file mode 100644 index 00000000..cad81484 --- /dev/null +++ b/pd/doc/3.audio.examples/D12.sampler.bis.pd @@ -0,0 +1,203 @@ +#N canvas 104 78 1119 674 12; +#N canvas 0 0 600 392 samples 0; +#N canvas 0 0 450 300 graph1 0; +#X array sample1 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 262 41 graph; +#X text 282 385 ------ 4 seconds ------; +#N canvas 0 0 450 300 graph1 0; +#X array sample2 176403 float 0; +#X coords 0 1.02 176403 -1.02 200 130 1; +#X restore 262 226 graph; +#X restore 785 563 pd samples; +#N canvas 52 219 971 512 recorder 0; +#X obj 174 304 adc~ 1; +#X obj 174 332 hip~ 5; +#X obj 243 362 line~; +#X obj 174 361 *~; +#X msg 243 334 1; +#X obj 302 299 del 3990; +#X msg 279 334 0 10; +#X obj 174 412 tabwrite~ sample1; +#X obj 26 218 makefilename sample%1; +#X msg 26 247 set \$1 \, bang; +#X msg 348 270 stop; +#X msg 302 270 bang; +#X obj 220 180 route record stop reload browse; +#X obj 411 288 loadbang; +#X obj 514 243 openpanel; +#X msg 514 215 bang; +#X text 556 214 <-- browse for samples; +#X text 482 339 v-- re-read original samples; +#X obj 411 425 soundfiler; +#X msg 411 367 read ../sound/bell.aiff sample1 \, read ../sound/voice2.wav +sample2; +#X msg 514 270 read \$1 sample1; +#X obj 514 297 soundfiler; +#X msg 220 41 record 1; +#X msg 220 97 stop; +#X msg 220 69 record 2; +#X msg 220 124 reload; +#X msg 220 152 browse; +#X text 218 19 record \, etc.; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 3 1; +#X connect 3 0 7 0; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 10 0 5 0; +#X connect 11 0 5 0; +#X connect 12 0 8 0; +#X connect 12 0 11 0; +#X connect 12 0 4 0; +#X connect 12 1 6 0; +#X connect 12 1 10 0; +#X connect 12 2 19 0; +#X connect 12 3 15 0; +#X connect 13 0 19 0; +#X connect 14 0 20 0; +#X connect 15 0 14 0; +#X connect 19 0 18 0; +#X connect 20 0 21 0; +#X connect 22 0 12 0; +#X connect 23 0 12 0; +#X connect 24 0 12 0; +#X connect 25 0 12 0; +#X connect 26 0 12 0; +#X restore 785 586 pd recorder; +#X text 782 458 sample number; +#X obj 619 96 unpack 0 0 0 0 0 0 0; +#X obj 563 124 poly 8 1; +#X obj 654 270 route 1 2 3 4 5 6 7 8; +#X obj 558 487 output~; +#X obj 563 149 swap; +#X obj 563 196 route 0; +#X obj 563 173 pack; +#X obj 605 221 unpack; +#X obj 557 289 sampvoice2; +#X obj 563 221 pack; +#X text 933 411 amplitude; +#X text 932 435 pitch; +#X text 851 344 ARGUMENTS FOR:; +#X text 784 386 pitch; +#X text 784 410 amplitude; +#X text 784 434 duration; +#X text 13 4 POLY SAMPLER \, VERSION 2 FOR SEPARATE NOTE-ON/OFF MESSAGES +; +#X obj 619 71 r onoff; +#X text 932 368 ON/OFF TRANSITIONS:; +#X text 785 367 ENTIRE NOTES:; +#X text 932 390 tag; +#X text 782 485 sample onset; +#X text 782 511 rise time; +#X text 783 535 decay time; +#X text 929 460 (same other 4); +#X obj 836 159 f; +#X obj 872 159 + 1; +#X obj 836 185 mod 1e+06; +#X obj 654 245 pack 0 0 0 0 0 0 0; +#X obj 918 74 r note; +#X obj 918 100 unpack 0 0 0 0 0 0 0; +#X text 860 641 updated for Pd version 0.37; +#X obj 895 127 t b f; +#X obj 936 237 pack 0 0 0 0 0 0 0; +#X obj 889 285 s onoff; +#X obj 870 230 pipe; +#X obj 870 253 pack; +#X msg 103 528 \; onoff 1 90 60 1 0 0 100; +#X msg 323 528 \; onoff 1 0; +#X msg 104 570 \; onoff 2 90 48 1 0 0 100; +#X msg 324 570 \; onoff 2 0; +#X msg 104 627 \; note 51 90 1000 1 0 0 100; +#X obj 557 312 sampvoice2; +#X obj 557 336 sampvoice2; +#X obj 557 360 sampvoice2; +#X obj 557 383 sampvoice2; +#X obj 557 407 sampvoice2; +#X obj 557 430 sampvoice2; +#X obj 557 454 sampvoice2; +#X text 14 35 Here is a variation on the polyphonic sampler \, which +can take separate messages to start and stop notes (so that you can +attach it to a MIDI keyboard \, for example.) "Note" messages act as +before \, but in an intermediate step they are split onto note-on and +note-off messages \, sent to "onoff". You can alternatively send messages +straight to onoff if you don't know the duration in advance.; +#X text 12 150 Messages to "onoff" require a tag \, which is a number +shared between the note-on and note-off message so that we can track +down the voice to turn it off. If you're using MIDI input \, you can +just re-use the pitch as a tag.; +#X text 102 508 separate messages for not on and off:; +#X text 101 608 single messages to do both as before:; +#X text 10 221 Messages to "onoff" whose amplitude is zero are note-off +messages (the other parameters of note-off messages are ignored). The +"sampvoice2" abstraction is a modification of "sampvoice" which looks +at the amplitude field to decide whether to begin or end a note.; +#X text 10 301 To convert "note" messages to pairs of "onoff" messages +\, first a counter generates a tag. The the "pipe" object delays a +copy of the tag \, which the following "pack" object converts into +a note-off message (a pair of numbers \, the tag and a zero.); +#X text 9 382 Under "r onoff" \, the poly object allocates a voice +number \, putting it out paired with velocity. After swapping the two +and packing them into a single message \, the amplitude is checked +against zero by the "route 0" object \; if zero \, the "pack" confects +a 2-argument message (voice number and zero). Otherwise \, the "unpack" +retrieves the nonzero amplitude for a note-on message \, to which we +add all the other parameters and route to the appropriate voice.; +#X connect 3 0 4 0; +#X connect 3 1 31 1; +#X connect 3 1 4 1; +#X connect 3 2 31 2; +#X connect 3 3 31 3; +#X connect 3 4 31 4; +#X connect 3 5 31 5; +#X connect 3 6 31 6; +#X connect 4 0 7 0; +#X connect 4 2 7 1; +#X connect 5 0 11 1; +#X connect 5 1 45 1; +#X connect 5 2 46 1; +#X connect 5 3 47 1; +#X connect 5 4 48 1; +#X connect 5 5 49 1; +#X connect 5 6 50 1; +#X connect 5 7 51 1; +#X connect 7 0 9 0; +#X connect 7 1 9 1; +#X connect 8 0 12 0; +#X connect 8 1 10 0; +#X connect 9 0 8 0; +#X connect 10 1 31 0; +#X connect 11 0 45 0; +#X connect 12 0 5 0; +#X connect 20 0 3 0; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 28 1; +#X connect 30 0 38 0; +#X connect 30 0 36 0; +#X connect 31 0 5 0; +#X connect 32 0 33 0; +#X connect 33 0 35 0; +#X connect 33 1 36 1; +#X connect 33 2 38 1; +#X connect 33 3 36 3; +#X connect 33 4 36 4; +#X connect 33 5 36 5; +#X connect 33 6 36 6; +#X connect 35 0 28 0; +#X connect 35 1 36 2; +#X connect 36 0 37 0; +#X connect 38 0 39 0; +#X connect 39 0 37 0; +#X connect 45 0 46 0; +#X connect 46 0 47 0; +#X connect 47 0 48 0; +#X connect 48 0 49 0; +#X connect 49 0 50 0; +#X connect 50 0 51 0; +#X connect 51 0 6 0; +#X connect 51 0 6 1; diff --git a/pd/doc/3.audio.examples/E01.pulse.pd b/pd/doc/3.audio.examples/E01.pulse.pd deleted file mode 100644 index 8efe6390..00000000 --- a/pd/doc/3.audio.examples/E01.pulse.pd +++ /dev/null @@ -1,126 +0,0 @@ -#N canvas 15 126 821 582 12; -#X obj 285 163 line~; -#X floatatom 66 64 0 0 0; -#X obj 43 315 cos~; -#X graph graph1 0 -1.02 882 1.02 599 472 799 342; -#X array pulse-output 882 float 0; -#X pop; -#X floatatom 72 407 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 43 435 pd output; -#X msg 111 405 MUTE; -#X text 158 406 <-- output amplitude; -#X obj 66 91 phasor~ 0; -#X obj 285 139 pack 0 50; -#X floatatom 285 54 0 0 0; -#X text 63 43 frequency; -#X obj 66 115 -~ 0.5; -#X obj 66 207 *~; -#X obj 285 78 / 10; -#X obj 43 265 clip~ -0.5 0.5; -#X obj 43 371 hip~ 5; -#X graph graph1 0 -1.02 882 1.02 599 168 799 108; -#X array phase-output 882 float 0; -#X pop; -#X graph graph1 0 -1.02 882 1.02 599 335 799 205; -#X array clip-output 882 float 0; -#X pop; -#X text 280 34 bandwidth; -#X text 130 114 phase -1/2 to 1/2; -#X text 152 91 phase 0 to 1; -#X text 132 5 PULSE GENERATOR; -#X obj 32 234 tabwrite~ phase-output; -#X obj 32 346 tabwrite~ pulse-output; -#X text 116 372 high pass filter to cut DC; -#X msg 32 147 bang; -#X text 332 79 fix range; -#X text 337 100 force; -#X text 337 117 nonnegative; -#X text 339 164 smooth it; -#X text 327 187 add 1; -#X text 78 148 <-- click to graph; -#X text 96 209 increase amplitude; -#X text 177 264 clip back to range -1/2 to 1/2; -#X text 103 316 cosine wave lookup (-1/2 and 1/2 give -1); -#X text 24 470 This patch computes a pulse train \, with a "bandwidth" -control that essentually squeezes the pulses. If "bandwidth" is zero -you get a pure cosine wave \, and for larger values of the bandwidth -\, the cosine wave is squeezed to fill smaller portions of the waveform. -; -#X obj 285 188 +~ 1; -#X obj 32 292 tabwrite~ clip-output; -#X text 601 478 ---- 0.02 seconds ----; -#X obj 285 102 max 0; -#X text 544 551 updated for Pd version 0.34; -#X connect 0 0 37 0; -#X connect 1 0 8 0; -#X connect 2 0 16 0; -#X connect 2 0 24 0; -#X connect 4 0 5 1; -#X connect 5 0 4 0; -#X connect 6 0 5 2; -#X connect 8 0 12 0; -#X connect 9 0 0 0; -#X connect 10 0 14 0; -#X connect 12 0 13 0; -#X connect 13 0 15 0; -#X connect 13 0 23 0; -#X connect 14 0 40 0; -#X connect 15 0 2 0; -#X connect 15 0 38 0; -#X connect 16 0 5 0; -#X connect 26 0 23 0; -#X connect 26 0 24 0; -#X connect 26 0 38 0; -#X connect 37 0 13 1; -#X connect 40 0 9 0; diff --git a/pd/doc/3.audio.examples/E01.spectrum.pd b/pd/doc/3.audio.examples/E01.spectrum.pd new file mode 100644 index 00000000..6754bda1 --- /dev/null +++ b/pd/doc/3.audio.examples/E01.spectrum.pd @@ -0,0 +1,179 @@ +#N canvas 190 29 773 821 12; +#N canvas 0 0 450 300 graph1 0; +#X array E01-signal 882 float 0; +#X coords 0 5 882 -5 200 130 1; +#X restore 531 41 graph; +#X obj 40 304 hip~ 5; +#N canvas 0 0 450 300 graph1 0; +#X array E01-spectrum 128 float 0; +#X coords 0 4300 127 -40 257 130 1; +#X restore 485 226 graph; +#X text 134 243 <-- click to graph; +#N canvas 45 83 558 569 fft 0; +#X obj 19 62 inlet~; +#X obj 85 214 inlet; +#X obj 19 92 rfft~; +#X obj 19 125 *~; +#X obj 50 125 *~; +#X obj 19 155 sqrt~; +#X obj 85 248 tabwrite~ E01-spectrum; +#X obj 332 109 block~ 4096 1; +#X obj 19 181 biquad~ 0 0 0 0 1; +#X text 83 93 Fourier series; +#X text 88 146 magnitude; +#X text 86 131 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 62 signal to analyze; +#X text 182 166 delay two samples; +#X text 181 182 for better graphing; +#X obj 90 425 samplerate~; +#X obj 90 402 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 90 472 5 0 0 0 - - -; +#X obj 90 448 / 256; +#X obj 90 378 loadbang; +#X floatatom 90 541 5 0 0 0 - - -; +#X obj 98 494 s fundamental; +#X obj 90 517 ftom; +#X text 146 540 <-just out of curiosity \, here's the pitch; +#X text 14 319 At load time \, calculate a good choice of fundamental +frequency for showing spectra: the 16th bin in a 4096-point spectrum +\, so SR*16/4096 or SR/256.; +#X text 135 216 "bang" into this inlet to graph it; +#X connect 0 0 2 0; +#X connect 1 0 6 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 8 0; +#X connect 8 0 6 0; +#X connect 16 0 19 0; +#X connect 17 0 16 0; +#X connect 18 0 22 0; +#X connect 18 0 23 0; +#X connect 19 0 18 0; +#X connect 20 0 17 0; +#X connect 23 0 21 0; +#X restore 51 279 pd fft; +#X text 531 173 ---- 0.02 seconds ----; +#X obj 111 244 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 40 332 output~; +#X obj 111 279 tabwrite~ E01-signal; +#X text 523 800 updated for Pd version 0.37; +#X text 516 359 1; +#X text 550 359 2; +#X text 582 359 3; +#X text 614 359 4; +#X text 647 359 5; +#X text 677 359 6; +#X text 708 359 7; +#X text 484 359 0; +#X text 520 378 -- partial number --; +#X text 733 97 0; +#X obj 42 42 r fundamental; +#X obj 42 111 osc~; +#X obj 63 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 41 161 *~; +#X obj 85 111 osc~; +#X obj 106 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 84 161 *~; +#X obj 128 111 osc~; +#X obj 149 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 127 161 *~; +#X obj 128 88 * 2; +#X obj 171 111 osc~; +#X obj 192 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 170 161 *~; +#X obj 214 111 osc~; +#X obj 235 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 213 161 *~; +#X obj 257 111 osc~; +#X obj 278 136 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 256 161 *~; +#X obj 42 88 * 0; +#X obj 85 88 * 1; +#X obj 171 88 * 3; +#X obj 214 88 * 4; +#X obj 257 88 * 5; +#X text 303 136 <-- On/Off; +#X text 337 152 for each; +#X text 339 168 partial; +#X text 595 11 WAVEFORM; +#X text 578 204 SPECTRUM; +#X text 25 415 The next series of patches demonstrates various kinds +of modulation: AM \, waveshaping \, and FM. We will need a tool for +graphing spectra which is introduced here. In this patch the signal +to be analyzed is a simple sum of up to six partials of a fundamental +frequency (which is 172 Hz \, close to F below middle C \, if your +sample rate happens to be 44100 Hz. The fundamental is chosen to agree +with the analysis patch ("pd FFT") and is computed within it).; +#X text 25 546 The partials are numbered 0 through 5 \, where 0 means +DC \, or zero frequency \, 1 is the fundamental \, and so on. The toggle +switches allow you to turn them on and off separately. You have to +press the "click to graph" button to update the two graphs.; +#X text 745 344 0; +#X text 743 223 1; +#X text 744 282 0.5; +#X text 26 631 The upper graph is just the (time domain) waveform \, +about four periods long. The lower graph is the magnitude spectrum. +Its peaks are the magnitudes of the partials. Note that a DC signal +of amplitude one is considered a partial of magnitude 1 \, but the +other partials \, which have peak amplitudes of 1 (and RMS 0.707) \, +have peak magnitudes of only 0.5 in the spectrum.; +#X obj 41 222 *~ 1; +#X text 733 37 5; +#X text 734 157 -5; +#X text 81 221 sum; +#X text 96 5 GRAPHING SPECTRA OF AUDIO SIGNALS; +#X text 24 742 Here we're introducing a new feature: multiple signals +connected to a signal inlet (as in the "*~ 1") are added. This is the +most convenient way to sum the six partials.; +#X connect 1 0 7 0; +#X connect 1 0 7 1; +#X connect 6 0 4 1; +#X connect 6 0 8 0; +#X connect 20 0 40 0; +#X connect 20 0 41 0; +#X connect 20 0 30 0; +#X connect 20 0 42 0; +#X connect 20 0 43 0; +#X connect 20 0 44 0; +#X connect 21 0 23 0; +#X connect 22 0 23 1; +#X connect 23 0 56 0; +#X connect 24 0 26 0; +#X connect 25 0 26 1; +#X connect 26 0 56 0; +#X connect 27 0 29 0; +#X connect 28 0 29 1; +#X connect 29 0 56 0; +#X connect 30 0 27 0; +#X connect 31 0 33 0; +#X connect 32 0 33 1; +#X connect 33 0 56 0; +#X connect 34 0 36 0; +#X connect 35 0 36 1; +#X connect 36 0 56 0; +#X connect 37 0 39 0; +#X connect 38 0 39 1; +#X connect 39 0 56 0; +#X connect 40 0 21 0; +#X connect 41 0 24 0; +#X connect 42 0 31 0; +#X connect 43 0 34 0; +#X connect 44 0 37 0; +#X connect 56 0 4 0; +#X connect 56 0 1 0; +#X connect 56 0 8 0; diff --git a/pd/doc/3.audio.examples/E02.just.say.pd b/pd/doc/3.audio.examples/E02.just.say.pd deleted file mode 100644 index b82b4953..00000000 --- a/pd/doc/3.audio.examples/E02.just.say.pd +++ /dev/null @@ -1,152 +0,0 @@ -#N canvas 32 67 900 421 12; -#X obj 39 247 cos~; -#X graph graph1 0 -1.02 44100 1.02 452 206 652 76; -#X array env-output 44100 float 0; -#X pop; -#X floatatom 71 305 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 39 333 pd output; -#X msg 115 306 MUTE; -#X msg 162 93 bang; -#X text 203 93 <-- click to graph; -#X obj 39 168 -~ 0.5; -#X obj 39 192 *~; -#X obj 39 219 clip~ -0.5 0.5; -#X obj 39 274 hip~ 5; -#X obj 126 60 *~; -#X floatatom 205 142 0 0 0; -#X floatatom 205 168 0 0 0; -#X obj 126 27 phasor~ -4; -#X obj 126 191 +~ 0.5; -#X obj 162 117 tabwrite~ env-output; -#X text 451 211 --------- 1 second ---------; -#X floatatom 205 194 0 0 0; -#X obj 126 142 lop~ 130; -#N canvas 168 232 351 420 freq 0; -#X obj 180 176 t f f; -#X obj 181 202 *; -#X obj 60 320 line 0 30; -#X obj 90 132 t b b; -#X obj 90 107 metro 100; -#X obj 61 287 pack; -#X obj 60 376 outlet; -#X floatatom 89 82 0 0 0; -#X floatatom 54 243 0 0 0; -#X floatatom 94 248 0 0 0; -#X obj 60 348 pack 0 30; -#X obj 55 202 + 150; -#X obj 88 34 loadbang; -#X msg 89 58 1; -#X obj 56 175 random 300; -#X obj 181 226 + 100; -#X obj 179 152 random 35; -#X connect 0 0 1 0; -#X connect 0 1 1 1; -#X connect 1 0 15 0; -#X connect 2 0 10 0; -#X connect 3 0 14 0; -#X connect 3 1 16 0; -#X connect 4 0 3 0; -#X connect 5 0 2 0; -#X connect 7 0 4 0; -#X connect 8 0 5 0; -#X connect 9 0 5 1; -#X connect 10 0 6 0; -#X connect 11 0 8 0; -#X connect 12 0 13 0; -#X connect 13 0 7 0; -#X connect 14 0 11 0; -#X connect 15 0 4 1; -#X connect 15 0 9 0; -#X connect 16 0 0 0; -#X restore 38 94 pd freq; -#X obj 39 119 line~; -#X obj 39 144 phasor~; -#X text 225 19 negative frequency; -#X text 226 35 makes falling sawtooth; -#X text 155 59 square it to make a curve; -#X text 245 152 you can; -#X text 243 170 adjust these; -#X text 247 189 values; -#X text 334 250 We interrupt this series of patches to bring you an -important message from Nancy Reagan. If \, anywhere \, at any time -\, someone offers you an illicit drug \, just say one word in reply... -; -#X text 334 313 Now that I'm sure you've heard this important message -\, we can return to the essentially frivolous occupation of making -turn-of-the-millenium western art music.; -#X obj 126 165 *~ 6; -#X text 561 384 updated for Pd version 0.34; -#X text 156 305 <-- output; -#X connect 0 0 10 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 5 0 16 0; -#X connect 7 0 8 0; -#X connect 8 0 9 0; -#X connect 9 0 0 0; -#X connect 10 0 3 0; -#X connect 11 0 16 0; -#X connect 11 0 19 0; -#X connect 12 0 19 1; -#X connect 13 0 31 1; -#X connect 14 0 11 0; -#X connect 14 0 11 1; -#X connect 15 0 8 1; -#X connect 18 0 15 1; -#X connect 19 0 31 0; -#X connect 20 0 21 0; -#X connect 21 0 22 0; -#X connect 22 0 7 0; -#X connect 31 0 15 0; diff --git a/pd/doc/3.audio.examples/E02.ring.modulation.pd b/pd/doc/3.audio.examples/E02.ring.modulation.pd new file mode 100644 index 00000000..81004cf2 --- /dev/null +++ b/pd/doc/3.audio.examples/E02.ring.modulation.pd @@ -0,0 +1,197 @@ +#N canvas 269 43 755 746 12; +#N canvas 0 0 450 300 graph1 0; +#X array E02-signal 882 float 0; +#X coords 0 5 882 -5 200 130 1; +#X restore 501 66 graph; +#X obj 15 370 hip~ 5; +#N canvas 0 0 450 300 graph1 0; +#X array E02-spectrum 128 float 0; +#X coords 0 4300 127 -40 257 130 1; +#X restore 455 251 graph; +#N canvas 45 83 558 569 fft 0; +#X obj 19 61 inlet~; +#X obj 95 214 inlet; +#X obj 29 92 rfft~; +#X obj 29 125 *~; +#X obj 60 125 *~; +#X obj 29 155 sqrt~; +#X obj 332 109 block~ 4096 1; +#X obj 29 181 biquad~ 0 0 0 0 1; +#X text 93 93 Fourier series; +#X text 98 146 magnitude; +#X text 96 131 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 192 166 delay two samples; +#X text 191 182 for better graphing; +#X obj 16 425 samplerate~; +#X obj 16 402 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 16 472 5 0 0 0 - - -; +#X obj 16 448 / 256; +#X obj 16 378 loadbang; +#X floatatom 16 541 5 0 0 0 - - -; +#X obj 24 494 s fundamental; +#X obj 16 517 ftom; +#X text 14 319 At load time \, calculate a good choice of fundamental +frequency for showing spectra: the 16th bin in a 4096-point spectrum +\, so SR*16/4096 or SR/256.; +#X text 145 216 "bang" into this inlet to graph it; +#X floatatom 191 480 5 0 0 0 - - -; +#X obj 191 456 / 4096; +#X text 187 425 One bin is SR/4096:; +#X text 72 540 <-just out of curiosity \, here's the fundamental pitch +; +#X obj 191 502 s freq-step; +#X obj 95 248 tabwrite~ E02-spectrum; +#X obj 20 281 tabwrite~ E02-signal; +#X connect 0 0 2 0; +#X connect 0 0 31 0; +#X connect 1 0 30 0; +#X connect 1 0 31 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 30 0; +#X connect 15 0 18 0; +#X connect 15 0 26 0; +#X connect 16 0 15 0; +#X connect 17 0 21 0; +#X connect 17 0 22 0; +#X connect 18 0 17 0; +#X connect 19 0 16 0; +#X connect 22 0 20 0; +#X connect 25 0 29 0; +#X connect 26 0 25 0; +#X restore 23 343 pd fft; +#X text 501 198 ---- 0.02 seconds ----; +#X obj 84 344 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 15 398 output~; +#X text 501 720 updated for Pd version 0.37; +#X text 486 384 1; +#X text 520 384 2; +#X text 552 384 3; +#X text 584 384 4; +#X text 617 384 5; +#X text 647 384 6; +#X text 678 384 7; +#X text 454 384 0; +#X text 490 403 -- partial number --; +#X text 703 120 0; +#X obj 18 32 r fundamental; +#X obj 18 94 osc~; +#X obj 39 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 17 144 *~; +#X obj 61 94 osc~; +#X obj 82 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 60 144 *~; +#X obj 104 94 osc~; +#X obj 125 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X obj 103 144 *~; +#X obj 104 71 * 2; +#X obj 147 94 osc~; +#X obj 168 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 146 144 *~; +#X obj 190 94 osc~; +#X obj 211 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 189 144 *~; +#X obj 233 94 osc~; +#X obj 254 119 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 232 144 *~; +#X obj 18 71 * 0; +#X obj 61 71 * 1; +#X obj 147 71 * 3; +#X obj 190 71 * 4; +#X obj 233 71 * 5; +#X text 282 118 <-- On/Off; +#X text 565 46 WAVEFORM; +#X text 548 229 SPECTRUM; +#X text 715 367 0; +#X text 713 246 1; +#X text 714 305 0.5; +#X text 703 60 5; +#X text 704 180 -5; +#X obj 16 239 *~; +#X text 300 102 partials; +#X obj 154 270 osc~; +#X floatatom 154 210 3 0 200 0 - - -; +#X obj 154 239 *; +#X obj 187 239 r freq-step; +#X text 226 177 modulation; +#X text 222 192 frequency in; +#X text 185 209 <-- "steps" of f/16; +#X text 97 -1 RING MODULATION: multiplying a complex tone by a sinusoid +; +#X obj 84 299 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X text 107 343 <-- graph once; +#X obj 84 321 metro 500; +#X text 107 298 <-- graph repeatedly; +#X text 35 463 Now we ring modulate the signal by multiplying it by +another sinusoid. The modulation frequency is controlled in steps of +f/16 where "f" is the fundamental frequency \, giving roughly 11 Hz. +per step. Note that if the modulation frequency is set to zero we can't +predict the overall amplitude because it depends on what phase the +modulation oscillator happened to have at that moment.; +#X text 32 579 If you choose a multiple of the fundamental as a modulation +frequency (16 \, 32 \, 48 \, 64 \, ... "steps") the result is again +periodic at the original frequency. If you select a half-integer times +the fundamental (8 \, 24 \, 40 \, ... steps) the pitch drops by an +octave and you get only odd partials. For most other settings you'll +get an inharmonic complex of tones. These are sometimes heard as separate +pitches and other times they seem to fuse into a single timbre with +indeterminate pitch.; +#X connect 1 0 6 0; +#X connect 1 0 6 1; +#X connect 5 0 3 1; +#X connect 18 0 38 0; +#X connect 18 0 39 0; +#X connect 18 0 28 0; +#X connect 18 0 40 0; +#X connect 18 0 41 0; +#X connect 18 0 42 0; +#X connect 19 0 21 0; +#X connect 20 0 21 1; +#X connect 21 0 51 0; +#X connect 22 0 24 0; +#X connect 23 0 24 1; +#X connect 24 0 51 0; +#X connect 25 0 27 0; +#X connect 26 0 27 1; +#X connect 27 0 51 0; +#X connect 28 0 25 0; +#X connect 29 0 31 0; +#X connect 30 0 31 1; +#X connect 31 0 51 0; +#X connect 32 0 34 0; +#X connect 33 0 34 1; +#X connect 34 0 51 0; +#X connect 35 0 37 0; +#X connect 36 0 37 1; +#X connect 37 0 51 0; +#X connect 38 0 19 0; +#X connect 39 0 22 0; +#X connect 40 0 29 0; +#X connect 41 0 32 0; +#X connect 42 0 35 0; +#X connect 51 0 3 0; +#X connect 51 0 1 0; +#X connect 53 0 51 1; +#X connect 54 0 55 0; +#X connect 55 0 53 0; +#X connect 56 0 55 1; +#X connect 61 0 63 0; +#X connect 63 0 5 0; diff --git a/pd/doc/3.audio.examples/E03.octave.divider.pd b/pd/doc/3.audio.examples/E03.octave.divider.pd new file mode 100644 index 00000000..a0f77844 --- /dev/null +++ b/pd/doc/3.audio.examples/E03.octave.divider.pd @@ -0,0 +1,137 @@ +#N canvas 129 17 793 665 12; +#X obj 477 135 loadbang; +#X obj 32 286 hip~ 5; +#X obj 477 53 adc~ 1; +#X obj 477 190 soundfiler; +#X obj 32 313 output~; +#X text 544 646 updated for Pd version 0.37; +#X obj 478 100 tabwrite~ E03-table; +#X msg 477 162 read ../sound/voice.wav E03-table; +#X obj 117 64 fiddle~ 2048; +#X obj 118 95 unpack; +#X obj 111 199 osc~; +#X obj 118 119 moses 1; +#X obj 77 199 *~; +#X obj 145 147 mtof; +#X obj 145 170 *; +#X msg 194 125 0.5; +#X floatatom 194 154 3 0 0 0 - - -; +#X msg 232 125 15; +#N canvas 0 0 446 202 /SUBPATCH/ 0; +#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 100 20 inlet~; +#X obj 99 87 *~; +#X obj 98 159 outlet~; +#X text 381 181 corner; +#X connect 0 0 2 1; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X coords 0 0 100 100 40 18 1; +#X restore 78 248 pd; +#N canvas 0 0 446 202 /SUBPATCH/ 0; +#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 100 20 inlet~; +#X obj 99 87 *~; +#X obj 98 159 outlet~; +#X text 381 181 corner; +#X connect 0 0 2 1; +#X connect 1 0 2 0; +#X connect 2 0 3 0; +#X coords 0 0 100 100 40 18 1; +#X restore 32 248 pd; +#X obj 78 222 *~ 2; +#X obj 194 100 loadbang; +#N canvas 414 195 613 302 looper 0; +#N canvas 0 0 450 300 graph1 0; +#X array E03-table 44103 float 0; +#X coords 0 1.02 44103 -1.02 200 130 1; +#X restore 349 22 graph; +#X text 347 161 ---- 44103 samples ----; +#X obj 35 77 +~ 1; +#X obj 35 25 phasor~ 1; +#X obj 35 50 *~ 44100; +#X obj 35 106 tabread4~ E03-table; +#X obj 35 132 outlet~; +#X text 46 238 one-second sample reader loop. You can replace this +with an adc~ if you want to go live.; +#X connect 2 0 5 0; +#X connect 3 0 4 0; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X restore 31 30 pd looper; +#X text 561 141 re-read original sample; +#X obj 489 77 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 300 203 758 306 delay 0; +#X obj 15 222 outlet~; +#X obj 14 21 inlet~; +#X obj 15 102 loadbang; +#X obj 14 49 delwrite~ E03-del 40; +#X obj 15 195 delread~ E03-del; +#X obj 15 152 expr 1000*1024/$f1; +#X obj 15 128 samplerate~; +#X text 208 47 write to delay line which has enough memory to hold +40 msec; +#X text 125 128 get sample rate at load time; +#X text 185 152 divide 1024 by sample rate to give time in seconds +\; multiply by 1000 to convert to milliseconds.; +#X text 168 197 read from the delay line at the calculater delay; +#X text 317 268 1024-sample delay; +#X connect 1 0 3 0; +#X connect 2 0 6 0; +#X connect 4 0 0 0; +#X connect 5 0 4 0; +#X connect 6 0 5 0; +#X restore 31 71 pd delay; +#X text 242 4 OCTAVE DIVIDING VIA RING MODULATION; +#X text 508 75 <-- record a sample; +#X text 265 125 <-- choose an effect; +#X text 157 231 on/off for original; +#X text 128 247 <--and processed sounds; +#X text 196 274 This patch demonstrates using ring modulation to alias +a sound down one octave. The ring modulation itself ("osc~" and multiplier) +is easy. (We step it up by a factor of 2 to balance the original better.) +; +#X text 198 340 Harder is getting the fundamental frequency of the +original sound. We do this with the complicated "fiddle~" object \, +which puts out a stream of analysis data for an incoming signal. The +"2048" argument specifies the analysis window size. The analysis is +most closely aligned with what the sound was doing at the middle of +the window \, i.e. \, 1024 samples ago. The "pd delay" window delays +the signal itself 1024 samples so it will be as tightly synchronized +with the analysis data as possible. (If you're doing this on a real-time +input \, you might drop the delay and settle for less perfect synchronization.) +; +#X text 198 512 About fiddle~ \, suffice it to say that the third outlet +contains (pitch \, amplitude) pairs. We unpack the pitch and strip +out any zeros (when fiddle~ fails to find a pitch it outputs zero but +we'd rather stick with the most recent good one). This is converted +from MIDI to Hertz \, and multiplied by 1/2 to control the modulation +oscillator. (You can also try large-ish integers which leave the pitch +intact but introduce funny formants.); +#X connect 0 0 7 0; +#X connect 1 0 4 0; +#X connect 1 0 4 1; +#X connect 2 0 6 0; +#X connect 7 0 3 0; +#X connect 8 2 9 0; +#X connect 9 0 11 0; +#X connect 10 0 12 1; +#X connect 11 1 13 0; +#X connect 12 0 20 0; +#X connect 13 0 14 0; +#X connect 14 0 10 0; +#X connect 15 0 16 0; +#X connect 16 0 14 1; +#X connect 17 0 16 0; +#X connect 18 0 1 0; +#X connect 19 0 1 0; +#X connect 20 0 18 0; +#X connect 21 0 15 0; +#X connect 22 0 8 0; +#X connect 22 0 25 0; +#X connect 24 0 6 0; +#X connect 25 0 19 0; +#X connect 25 0 12 0; diff --git a/pd/doc/3.audio.examples/E03.pulse.spectrum.pd b/pd/doc/3.audio.examples/E03.pulse.spectrum.pd deleted file mode 100644 index 49d21cbd..00000000 --- a/pd/doc/3.audio.examples/E03.pulse.spectrum.pd +++ /dev/null @@ -1,136 +0,0 @@ -#N canvas 15 126 887 588 12; -#X obj 189 166 line~; -#X obj 42 187 cos~; -#X graph graph1 0 -1.02 882 1.02 633 508 833 378; -#X array pulse-output 882 float 0; -#X pop; -#X floatatom 71 317 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 42 345 pd output; -#X msg 118 319 MUTE; -#X obj 189 142 pack 0 50; -#X floatatom 189 41 0 0 0; -#X text 598 545 updated for Pd version 0.26; -#X obj 43 114 -~ 0.5; -#X obj 43 140 *~; -#X obj 189 67 / 10; -#X obj 189 91 moses 0; -#X msg 189 115 0; -#X obj 42 163 clip~ -0.5 0.5; -#X obj 42 289 hip~ 5; -#X graph graph1 0 0 128 500 503 285 759 155; -#X array spectrum 128 float 0; -#X pop; -#X text 184 23 bandwidth; -#X obj 115 267 tabwrite~ pulse-output; -#X msg 105 229 bang; -#X text 143 226 <-- click to graph; -#X obj 189 191 +~ 1; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 53 267 pd fft; -#X obj 43 90 phasor~ 172.266; -#X obj 42 211 +~ 1; -#X text 63 1 PULSE SPECTRUM MEASUREMENT; -#X text 16 377 Here is a measured amplitude spectrum for the pulse -train. Nutice that \, other than a smallish spillover \, the energy -sits in one "lobe" whose changing width justifies our calling the squeeze -factor the "bandwidth."; -#X text 16 442 The spectrum is in units of amplitude. THe sidelobes -\, although they look small \, are actually only about 34 dB down. -You can design more complicated pulse trains \, little Blackman window -functions \, which control the sidelobes much better.; -#X text 17 518 The spectrum measurement is done in the "pd fft" subwindow -\, but see the "FFT examples" for information about that.; -#X text 501 291 0; -#X text 749 288 5512; -#X text 633 511 ---- 0.02 seconds ----; -#X text 160 319 <-- output; -#X connect 0 0 21 0; -#X connect 1 0 24 0; -#X connect 3 0 4 1; -#X connect 4 0 3 0; -#X connect 5 0 4 2; -#X connect 6 0 0 0; -#X connect 7 0 11 0; -#X connect 9 0 10 0; -#X connect 10 0 14 0; -#X connect 11 0 12 0; -#X connect 12 0 13 0; -#X connect 12 1 6 0; -#X connect 13 0 6 0; -#X connect 14 0 1 0; -#X connect 15 0 4 0; -#X connect 19 0 18 0; -#X connect 19 0 22 1; -#X connect 21 0 10 1; -#X connect 23 0 9 0; -#X connect 24 0 22 0; -#X connect 24 0 15 0; -#X connect 24 0 18 0; diff --git a/pd/doc/3.audio.examples/E04.difference.tone.pd b/pd/doc/3.audio.examples/E04.difference.tone.pd new file mode 100644 index 00000000..7272222b --- /dev/null +++ b/pd/doc/3.audio.examples/E04.difference.tone.pd @@ -0,0 +1,45 @@ +#N canvas 266 135 637 523 12; +#X obj 19 128 +~; +#X obj 18 209 output~; +#X text 141 3 NONLINEAR DISTORTION AND DIFFERENCE TONES; +#X obj 154 171 / 100; +#X floatatom 154 151 5 0 500 0 - - -; +#X obj 18 181 clip~ -1 1; +#X floatatom 42 81 5 0 0 0 - - -; +#X obj 42 103 osc~ 200; +#X obj 18 155 *~; +#X obj 42 35 loadbang; +#X msg 154 127 50; +#X obj 154 103 loadbang; +#X text 385 494 updated for Pd version 0.37; +#X text 94 80 <-- frequency of second tone; +#X text 209 151 <-- before clipping; +#X text 234 134 amplitude of sum; +#X obj 18 9 osc~ 300; +#X msg 42 58 225; +#X text 99 226 This patch demonstrates how nonlinear distortion (also +known as "waveshaping") can create difference tones from a pair of +sinusoids. The sinusoids are initially tuned to 225 and 300 Hz \, a +musical fourth \, and have amplitude of 50 percent (0.5) so that the +sum is always less than 1 in absolute value. At these settings the +"clip~" object passes its input through unchanged.; +#X text 100 344 If the amplitude rises above 50 percent \, the clip~ +object starts altering the signal nonlinearly \, and the result is +no longer as if the two sinusoids had been processed separately. Instead +\, they "intermodulate" \, finding a common subharmonic if one exists. +At 300 and 225 Hz \, the subharmonic is at 75 \, two octaves below +the upper tone and a twelveth below the lower one. Change the frequency +of the second tone and you will hear a variety of effects.; +#X connect 0 0 8 0; +#X connect 3 0 8 1; +#X connect 4 0 3 0; +#X connect 5 0 1 0; +#X connect 5 0 1 1; +#X connect 6 0 7 0; +#X connect 7 0 0 1; +#X connect 8 0 5 0; +#X connect 9 0 17 0; +#X connect 10 0 4 0; +#X connect 11 0 10 0; +#X connect 16 0 0 0; +#X connect 17 0 6 0; diff --git a/pd/doc/3.audio.examples/E04.more.pulses.pd b/pd/doc/3.audio.examples/E04.more.pulses.pd deleted file mode 100644 index 1aa97555..00000000 --- a/pd/doc/3.audio.examples/E04.more.pulses.pd +++ /dev/null @@ -1,138 +0,0 @@ -#N canvas 15 126 902 581 12; -#X obj 220 171 line~; -#X msg 350 15 \; pd dsp 1; -#X msg 434 16 \; pd dsp 0; -#X text 371 46 ON; -#X text 451 47 OFF; -#X floatatom 68 303 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 39 331 pd output; -#X msg 106 303 MUTE; -#X text 150 302 <-- output amplitude; -#X obj 220 147 pack 0 50; -#X floatatom 220 46 0 0 0; -#X text 640 544 updated for Pd version 0.26; -#X obj 70 108 *~; -#X obj 220 72 / 10; -#X obj 220 96 moses 0; -#X msg 220 120 0; -#X obj 39 275 hip~ 5; -#X graph graph1 0 0 128 300 620 491 876 361; -#X array spectrum 128 float 0; -#X pop; -#X text 215 28 bandwidth; -#X msg 135 235 bang; -#X text 177 234 <-- click to graph; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 68 237 pd fft; -#X text 618 497 0; -#X text 851 492 5512; -#X obj 78 141 *~; -#X obj 18 141 sig~ 1; -#X obj 39 194 /~; -#X obj 54 168 +~; -#X obj 70 79 osc~ 86.1328; -#X text 103 107 call this X; -#X text 111 141 X^2; -#X text 84 171 1+X^2; -#X text 71 196 1/(1+X^2); -#X text 10 357 This is the form of pulse train used in the Phase Aligned -Formant (PAF) algorithm. It has the neat property that its amplitude -spectrum drops off as a perfectly exponential function of frequency. -This algorithm is protected by French and US patents. contact Vincent -Puig to learn what restrictions may apply.; -#X text 11 457 On the other hand \, there are rumors that exp(-X*X) -actually sounds better than 1/(1+X*X). To compute exp(-X*X) efficiently -you will want to employ tabread4~ with a stored bell curve. I don't -want to know you're doing this. However \, the first Pd user who e-mails -me the correct formula for the output spectrum wins a free CO2 fire -extinguisher.; -#X text 28 4 ANOTHER PULSE WIDTH MOD ALGORITHM; -#X connect 0 0 12 1; -#X connect 5 0 6 1; -#X connect 6 0 5 0; -#X connect 7 0 6 2; -#X connect 9 0 0 0; -#X connect 10 0 13 0; -#X connect 12 0 24 0; -#X connect 12 0 24 1; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 14 1 9 0; -#X connect 15 0 9 0; -#X connect 16 0 6 0; -#X connect 19 0 21 1; -#X connect 24 0 27 1; -#X connect 25 0 26 0; -#X connect 25 0 27 0; -#X connect 26 0 16 0; -#X connect 26 0 21 0; -#X connect 27 0 26 1; -#X connect 28 0 12 0; diff --git a/pd/doc/3.audio.examples/E05.chebychev.pd b/pd/doc/3.audio.examples/E05.chebychev.pd new file mode 100644 index 00000000..90c628db --- /dev/null +++ b/pd/doc/3.audio.examples/E05.chebychev.pd @@ -0,0 +1,257 @@ +#N canvas 224 60 657 571 12; +#X obj 23 269 output~; +#X obj 45 74 / 100; +#X floatatom 45 54 5 0 100 0 - - -; +#X obj 23 144 *~; +#X text 403 539 updated for Pd version 0.37; +#X obj 22 29 osc~ 220; +#X obj 45 97 pack 0 50; +#X obj 45 121 line~; +#X text 97 54 <-- index in; +#X text 117 68 hundredths; +#X obj 23 169 *~ 128; +#X obj 23 217 tabread4~ E05-tab; +#N canvas 0 0 450 300 graph1 0; +#X array E05-tab 259 float 1; +#A 0 -1.20148 -1 -0.810724 -0.63326 -0.467216 -0.31221 -0.167866 -0.0338144 +0.0903053 0.204849 0.310166 0.406597 0.494477 0.574137 0.645895 0.71007 +0.766969 0.816895 0.860145 0.897008 0.927771 0.952708 0.972093 0.98619 +0.995261 0.999557 0.999329 0.994816 0.986257 0.97388 0.957912 0.938572 +0.916074 0.890625 0.86243 0.831684 0.798582 0.76331 0.726049 0.686977 +0.646266 0.60408 0.560583 0.515931 0.470276 0.423765 0.37654 0.328738 +0.280493 0.231934 0.183183 0.13436 0.0855808 0.0369554 -0.01141 -0.0594134 +-0.106956 -0.153946 -0.200292 -0.245909 -0.290715 -0.334633 -0.377589 +-0.419512 -0.460337 -0.5 -0.538443 -0.57561 -0.611449 -0.645912 -0.678953 +-0.710532 -0.740609 -0.76915 -0.796122 -0.821497 -0.845248 -0.867354 +-0.887794 -0.906551 -0.923612 -0.938965 -0.952601 -0.964516 -0.974704 +-0.983167 -0.989906 -0.994925 -0.99823 -0.999832 -0.999741 -0.997972 +-0.994539 -0.98946 -0.982757 -0.97445 -0.964564 -0.953125 -0.94016 +-0.925699 -0.909772 -0.892414 -0.873658 -0.85354 -0.832098 -0.809372 +-0.785401 -0.760228 -0.733895 -0.706446 -0.677928 -0.648387 -0.61787 +-0.586426 -0.554105 -0.520957 -0.487033 -0.452386 -0.417069 -0.381135 +-0.344638 -0.307632 -0.270174 -0.232319 -0.194122 -0.15564 -0.11693 +-0.0780487 -0.039053 0 0.039053 0.0780487 0.11693 0.15564 0.194122 +0.232319 0.270174 0.307632 0.344638 0.381135 0.417069 0.452386 0.487033 +0.520957 0.554105 0.586426 0.61787 0.648387 0.677928 0.706446 0.733895 +0.760228 0.785401 0.809372 0.832098 0.85354 0.873658 0.892414 0.909772 +0.925699 0.94016 0.953125 0.964564 0.97445 0.982757 0.98946 0.994539 +0.997972 0.999741 0.999832 0.99823 0.994925 0.989906 0.983167 0.974704 +0.964516 0.952601 0.938965 0.923612 0.906551 0.887794 0.867354 0.845248 +0.821497 0.796122 0.76915 0.740609 0.710532 0.678953 0.645912 0.611449 +0.57561 0.538443 0.5 0.460337 0.419512 0.377589 0.334633 0.290715 0.245909 +0.200292 0.153946 0.106956 0.0594134 0.01141 -0.0369554 -0.0855808 +-0.13436 -0.183183 -0.231934 -0.280493 -0.328738 -0.37654 -0.423765 +-0.470276 -0.515931 -0.560583 -0.60408 -0.646266 -0.686977 -0.726049 +-0.76331 -0.798582 -0.831684 -0.86243 -0.890625 -0.916074 -0.938572 +-0.957912 -0.97388 -0.986257 -0.994816 -0.999329 -0.999557 -0.995261 +-0.98619 -0.972093 -0.952708 -0.927771 -0.897008 -0.860145 -0.816895 +-0.766969 -0.71007 -0.645895 -0.574137 -0.494477 -0.406597 -0.310166 +-0.204849 -0.0903053 0.0338144 0.167866 0.31221 0.467216 0.63326 0.810724 +1 1.20148; +#X coords 0 1 258 -1 200 140 1; +#X restore 262 46 graph; +#X text 497 28 subpatch to; +#N canvas 113 0 849 700 make-table 0; +#X obj 141 304 t b b; +#X obj 213 329 f; +#X obj 251 329 + 1; +#X msg 235 306 0; +#X obj 141 327 until; +#X obj 213 359 t f f; +#X obj 114 436 tabwrite E05-tab; +#X obj 140 355 sel 258; +#X text 203 172 normalize from -1 to 1; +#X obj 141 285 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 88 386 expr ($f1-129)/128; +#X obj 141 262 inlet; +#X obj 171 534 t b b; +#X obj 243 559 f; +#X obj 281 559 + 1; +#X msg 265 536 0; +#X obj 171 557 until; +#X obj 243 589 t f f; +#X obj 144 666 tabwrite E05-tab; +#X obj 170 585 sel 258; +#X obj 171 515 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 118 616 expr ($f1-129)/128; +#X obj 171 492 inlet; +#X obj 444 228 t b b; +#X obj 516 253 f; +#X obj 554 253 + 1; +#X msg 538 230 0; +#X obj 444 251 until; +#X obj 516 283 t f f; +#X obj 417 360 tabwrite E05-tab; +#X obj 443 279 sel 258; +#X obj 391 334 expr 16*$f1*$f1*$f1*$f1*$f1-20*$f1*$f1*$f1+5*$f1; +#X obj 444 209 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 391 310 expr ($f1-129)/128; +#X obj 444 186 inlet; +#X obj 504 476 t b b; +#X obj 576 501 f; +#X obj 614 501 + 1; +#X msg 598 478 0; +#X obj 504 499 until; +#X obj 576 531 t f f; +#X obj 477 624 tabwrite E05-tab; +#X obj 503 527 sel 258; +#X obj 504 457 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 448 558 expr ($f1-129)/128; +#X obj 504 434 inlet; +#X obj 88 410 expr 4*$f1*$f1*$f1-3*$f1; +#X obj 118 640 expr 8*$f1*$f1*$f1*$f1-8*$f1*$f1+1; +#X obj 448 582 expr 32*$f1*$f1*$f1*$f1*$f1*$f1 -48*$f1*$f1*$f1*$f1+18*$f1*$f1-1 +; +#X text 641 622 6th C.P. and basta.; +#X obj 83 92 t b b; +#X obj 155 117 f; +#X obj 193 117 + 1; +#X msg 177 94 0; +#X obj 83 115 until; +#X obj 155 147 t f f; +#X obj 56 224 tabwrite E05-tab; +#X obj 82 143 sel 258; +#X obj 83 73 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 30 174 expr ($f1-129)/128; +#X obj 83 50 inlet; +#X obj 30 198 expr 2*$f1*$f1-1; +#X text 203 198 2nd C.P.; +#X text 309 410 3rd C.P.; +#X text 331 660 4th C.P.; +#X text 613 357 5th C.P.; +#X text 259 51 This patch computes Chebychev polynomials and stores +them in a wavetable for use later.; +#X connect 0 0 4 0; +#X connect 0 1 3 0; +#X connect 1 0 2 0; +#X connect 1 0 5 0; +#X connect 1 0 7 0; +#X connect 2 0 1 1; +#X connect 3 0 1 1; +#X connect 4 0 1 0; +#X connect 5 0 10 0; +#X connect 5 1 6 1; +#X connect 7 0 4 1; +#X connect 9 0 0 0; +#X connect 10 0 46 0; +#X connect 11 0 9 0; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 13 0 19 0; +#X connect 14 0 13 1; +#X connect 15 0 13 1; +#X connect 16 0 13 0; +#X connect 17 0 21 0; +#X connect 17 1 18 1; +#X connect 19 0 16 1; +#X connect 20 0 12 0; +#X connect 21 0 47 0; +#X connect 22 0 20 0; +#X connect 23 0 27 0; +#X connect 23 1 26 0; +#X connect 24 0 25 0; +#X connect 24 0 28 0; +#X connect 24 0 30 0; +#X connect 25 0 24 1; +#X connect 26 0 24 1; +#X connect 27 0 24 0; +#X connect 28 0 33 0; +#X connect 28 1 29 1; +#X connect 30 0 27 1; +#X connect 31 0 29 0; +#X connect 32 0 23 0; +#X connect 33 0 31 0; +#X connect 34 0 32 0; +#X connect 35 0 39 0; +#X connect 35 1 38 0; +#X connect 36 0 37 0; +#X connect 36 0 40 0; +#X connect 36 0 42 0; +#X connect 37 0 36 1; +#X connect 38 0 36 1; +#X connect 39 0 36 0; +#X connect 40 0 44 0; +#X connect 40 1 41 1; +#X connect 42 0 39 1; +#X connect 43 0 35 0; +#X connect 44 0 48 0; +#X connect 45 0 43 0; +#X connect 46 0 6 0; +#X connect 47 0 18 0; +#X connect 48 0 41 0; +#X connect 50 0 54 0; +#X connect 50 1 53 0; +#X connect 51 0 52 0; +#X connect 51 0 55 0; +#X connect 51 0 57 0; +#X connect 52 0 51 1; +#X connect 53 0 51 1; +#X connect 54 0 51 0; +#X connect 55 0 59 0; +#X connect 55 1 56 1; +#X connect 57 0 54 1; +#X connect 58 0 50 0; +#X connect 59 0 61 0; +#X connect 60 0 58 0; +#X connect 61 0 56 0; +#X restore 489 146 pd make-table; +#X obj 489 126 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 517 126 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 545 126 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 573 126 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 600 126 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 497 45 calculate; +#X text 495 64 Chebychev; +#X text 496 83 polynomials; +#X text 490 107 2; +#X text 517 107 3; +#X text 546 107 4; +#X text 572 108 5; +#X text 601 107 6; +#X text 134 2 waveshaping with Chebychev polynomials; +#X obj 23 193 +~ 129; +#X obj 23 242 hip~ 5; +#X text 107 256 This patch demonstrates using Chebychev polynomials +(of the first kind) to generate pure harmonics using waveshaping. The +pure harmonic only comes out when the index is one (top of the scale). +Smaller indices will give various mixes of harmonics. The table initially +holds the fifth Chebychev polynomial \, so you can get the fifth harmonic. +; +#X text 106 355 There is an audible "rolling" sound as the index changes +for the higher degree polynomials \, because the amplitudes of the +lower partials can rise and fall several times apiece as the index +rises from zero to one.; +#X text 105 422 Indices greater than one will try to read values outside +the table (which would be clipped appropriately). Anyway \, the polynomials +increase rapidly in value outside the interval from -1 to 1 that we +are using here.; +#X text 106 491 When you get tired of Chebychef polynomials you can +draw your own functions by hand and/or try other formulas.; +#X connect 1 0 6 0; +#X connect 2 0 1 0; +#X connect 3 0 10 0; +#X connect 5 0 3 0; +#X connect 6 0 7 0; +#X connect 7 0 3 1; +#X connect 10 0 29 0; +#X connect 11 0 30 0; +#X connect 15 0 14 0; +#X connect 16 0 14 1; +#X connect 17 0 14 2; +#X connect 18 0 14 3; +#X connect 19 0 14 4; +#X connect 29 0 11 0; +#X connect 30 0 0 0; +#X connect 30 0 0 1; diff --git a/pd/doc/3.audio.examples/E05.pulse.width.mod.pd b/pd/doc/3.audio.examples/E05.pulse.width.mod.pd deleted file mode 100644 index 214d250a..00000000 --- a/pd/doc/3.audio.examples/E05.pulse.width.mod.pd +++ /dev/null @@ -1,98 +0,0 @@ -#N canvas 27 355 931 532 12; -#X floatatom 86 104 0 0 0; -#X graph graph1 0 -1.02 882 1.02 669 456 869 326; -#X array difference-output 882 float 0; -#X pop; -#X floatatom 123 324 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 86 351 pd output; -#X msg 162 324 MUTE; -#X obj 86 137 phasor~ 0; -#X text 83 86 frequency; -#X graph graph1 0 -1.02 882 1.02 668 179 868 49; -#X array phasor1-output 882 float 0; -#X pop; -#X msg 191 77 bang; -#X text 231 76 <-- click to graph; -#X text 57 9 CLASSICAL PULSE WIDTH MODULATION; -#X obj 102 196 phasor~ 0; -#X obj 102 172 + 0.2; -#X obj 86 246 -~; -#X graph graph1 0 -1.02 882 1.02 668 316 868 186; -#X array phasor2-output 882 float 0; -#X pop; -#X obj 191 164 tabwrite~ phasor1-output; -#X obj 191 222 tabwrite~ phasor2-output; -#X obj 191 276 tabwrite~ difference-output; -#X text 12 386 This patch demonstrates pulse width modulation \, which -is accomplished simply by subtracting two sawtooth waves at a varying -phase difference. Here their frequencies are set to differ by 1/5 Hz. -so that the relative phase wanders continuously.; -#X text 669 459 ---- 0.02 seconds ----; -#X text 665 498 updated for Pd version 0.34; -#X text 203 325 <-- output; -#X connect 0 0 5 0; -#X connect 0 0 12 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 5 0 13 0; -#X connect 5 0 15 0; -#X connect 8 0 15 0; -#X connect 8 0 16 0; -#X connect 8 0 17 0; -#X connect 11 0 13 1; -#X connect 11 0 16 0; -#X connect 12 0 11 0; -#X connect 13 0 17 0; -#X connect 13 0 3 0; diff --git a/pd/doc/3.audio.examples/E06.exponential.pd b/pd/doc/3.audio.examples/E06.exponential.pd new file mode 100644 index 00000000..02fe058b --- /dev/null +++ b/pd/doc/3.audio.examples/E06.exponential.pd @@ -0,0 +1,335 @@ +#N canvas 88 112 754 729 12; +#N canvas 0 0 450 300 graph1 0; +#X array E06-signal 882 float 0; +#X coords 0 1.02 882 -1.02 200 130 1; +#X restore 509 46 graph; +#X obj 14 265 hip~ 5; +#N canvas 0 0 450 300 graph1 0; +#X array E06-spectrum 128 float 0; +#X coords 0 4300 127 -40 257 130 1; +#X restore 463 222 graph; +#N canvas 45 83 558 569 fft 0; +#X obj 19 61 inlet~; +#X obj 208 212 inlet; +#X obj 29 92 rfft~; +#X obj 29 125 *~; +#X obj 60 125 *~; +#X obj 29 155 sqrt~; +#X obj 332 109 block~ 4096 1; +#X obj 29 181 biquad~ 0 0 0 0 1; +#X text 93 93 Fourier series; +#X text 98 146 magnitude; +#X text 96 131 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 193 164 delay two samples; +#X text 191 182 for better graphing; +#X obj 16 425 samplerate~; +#X obj 16 402 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 16 472 5 0 0 0 - - -; +#X obj 16 448 / 256; +#X obj 16 378 loadbang; +#X floatatom 16 541 5 0 0 0 - - -; +#X obj 24 494 s fundamental; +#X obj 16 517 ftom; +#X text 14 319 At load time \, calculate a good choice of fundamental +frequency for showing spectra: the 16th bin in a 4096-point spectrum +\, so SR*16/4096 or SR/256.; +#X floatatom 191 480 5 0 0 0 - - -; +#X obj 191 456 / 4096; +#X text 187 425 One bin is SR/4096:; +#X obj 191 502 s freq-step; +#X obj 208 295 tabwrite~ E06-spectrum; +#X obj 19 295 tabwrite~ E06-signal; +#X text 71 540 <-fundamental pitch; +#X obj 220 257 metro 500; +#X obj 220 234 inlet; +#X text 273 232 toggle to graph repeatedly; +#X text 262 212 bang to graph once; +#X connect 0 0 2 0; +#X connect 0 0 29 0; +#X connect 1 0 28 0; +#X connect 1 0 29 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 28 0; +#X connect 15 0 18 0; +#X connect 15 0 25 0; +#X connect 16 0 15 0; +#X connect 17 0 21 0; +#X connect 17 0 22 0; +#X connect 18 0 17 0; +#X connect 19 0 16 0; +#X connect 22 0 20 0; +#X connect 24 0 27 0; +#X connect 25 0 24 0; +#X connect 31 0 28 0; +#X connect 31 0 29 0; +#X connect 32 0 31 0; +#X restore 22 238 pd fft; +#X text 509 178 ---- 0.02 seconds ----; +#X obj 82 217 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 14 293 output~; +#X text 499 708 updated for Pd version 0.37; +#X text 494 355 1; +#X text 528 355 2; +#X text 560 355 3; +#X text 592 355 4; +#X text 625 355 5; +#X text 655 355 6; +#X text 686 355 7; +#X text 462 355 0; +#X text 496 372 -- partial number --; +#X text 711 100 0; +#X obj 12 30 r fundamental; +#X obj 12 57 osc~; +#X text 573 26 WAVEFORM; +#X text 557 204 SPECTRUM; +#X text 723 338 0; +#X text 721 217 1; +#X text 722 276 0.5; +#X obj 82 238 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#N canvas 0 0 450 300 graph1 0; +#X array E06-tab 1003 float 1; +#A 0 1.01005 1 0.99005 0.980199 0.970446 0.960789 0.951229 0.941765 +0.932394 0.923116 0.913931 0.904837 0.895834 0.88692 0.878095 0.869358 +0.860708 0.852144 0.843665 0.83527 0.826959 0.818731 0.810584 0.802519 +0.794534 0.786628 0.778801 0.771052 0.76338 0.755784 0.748264 0.740818 +0.733447 0.726149 0.718924 0.71177 0.704688 0.697676 0.690734 0.683861 +0.677057 0.67032 0.66365 0.657047 0.650509 0.644036 0.637628 0.631284 +0.625002 0.618783 0.612626 0.606531 0.600496 0.594521 0.588605 0.582748 +0.57695 0.571209 0.565525 0.559898 0.554327 0.548812 0.543351 0.537944 +0.532592 0.527292 0.522046 0.516851 0.511709 0.506617 0.501576 0.496585 +0.491644 0.486752 0.481909 0.477114 0.472367 0.467666 0.463013 0.458406 +0.453845 0.449329 0.444858 0.440432 0.436049 0.431711 0.427415 0.423162 +0.418952 0.414783 0.410656 0.40657 0.402524 0.398519 0.394554 0.390628 +0.386741 0.382893 0.379083 0.375311 0.371577 0.367879 0.364219 0.360595 +0.357007 0.353455 0.349938 0.346456 0.343008 0.339595 0.336216 0.332871 +0.329559 0.32628 0.323033 0.319819 0.316637 0.313486 0.310367 0.307279 +0.304221 0.301194 0.298197 0.29523 0.292293 0.289384 0.286505 0.283654 +0.280832 0.278037 0.275271 0.272532 0.26982 0.267135 0.264477 0.261846 +0.25924 0.256661 0.254107 0.251579 0.249075 0.246597 0.244143 0.241714 +0.239309 0.236928 0.23457 0.232236 0.229925 0.227638 0.225373 0.22313 +0.22091 0.218712 0.216536 0.214381 0.212248 0.210136 0.208045 0.205975 +0.203926 0.201897 0.199888 0.197899 0.19593 0.19398 0.19205 0.190139 +0.188247 0.186374 0.18452 0.182684 0.180866 0.179066 0.177284 0.17552 +0.173774 0.172045 0.170333 0.168638 0.16696 0.165299 0.163654 0.162026 +0.160414 0.158817 0.157237 0.155673 0.154124 0.15259 0.151072 0.149569 +0.14808 0.146607 0.145148 0.143704 0.142274 0.140858 0.139457 0.138069 +0.136695 0.135335 0.133989 0.132655 0.131336 0.130029 0.128735 0.127454 +0.126186 0.12493 0.123687 0.122456 0.121238 0.120032 0.118837 0.117655 +0.116484 0.115325 0.114178 0.113042 0.111917 0.110803 0.109701 0.108609 +0.107528 0.106459 0.105399 0.10435 0.103312 0.102284 0.101266 0.100259 +0.0992613 0.0982736 0.0972958 0.0963276 0.0953692 0.0944202 0.0934807 +0.0925506 0.0916297 0.0907179 0.0898153 0.0889216 0.0880368 0.0871608 +0.0862936 0.085435 0.0845849 0.0837432 0.08291 0.082085 0.0812682 0.0804596 +0.079659 0.0788664 0.0780817 0.0773047 0.0765356 0.075774 0.07502 0.0742736 +0.0735345 0.0728029 0.0720785 0.0713613 0.0706512 0.0699482 0.0692522 +0.0685631 0.0678809 0.0672055 0.0665368 0.0658748 0.0652193 0.0645703 +0.0639279 0.0632918 0.062662 0.0620385 0.0614212 0.0608101 0.060205 +0.0596059 0.0590129 0.0584257 0.0578443 0.0572688 0.0566989 0.0561348 +0.0555762 0.0550232 0.0544757 0.0539337 0.053397 0.0528657 0.0523397 +0.0518189 0.0513033 0.0507928 0.0502874 0.0497871 0.0492917 0.0488012 +0.0483156 0.0478349 0.0473589 0.0468877 0.0464212 0.0459593 0.045502 +0.0450492 0.044601 0.0441572 0.0437178 0.0432828 0.0428521 0.0424257 +0.0420036 0.0415857 0.0411719 0.0407622 0.0403566 0.0399551 0.0395575 +0.0391639 0.0387742 0.0383884 0.0380064 0.0376283 0.0372538 0.0368832 +0.0365162 0.0361528 0.0357931 0.035437 0.0350844 0.0347353 0.0343896 +0.0340475 0.0337087 0.0333733 0.0330412 0.0327124 0.0323869 0.0320647 +0.0317456 0.0314298 0.031117 0.0308074 0.0305009 0.0301974 0.0298969 +0.0295994 0.0293049 0.0290133 0.0287246 0.0284388 0.0281559 0.0278757 +0.0275983 0.0273237 0.0270518 0.0267827 0.0265162 0.0262523 0.0259911 +0.0257325 0.0254765 0.025223 0.024972 0.0247235 0.0244775 0.024234 +0.0239928 0.0237541 0.0235177 0.0232837 0.0230521 0.0228227 0.0225956 +0.0223708 0.0221482 0.0219278 0.0217096 0.0214936 0.0212797 0.021068 +0.0208584 0.0206508 0.0204453 0.0202419 0.0200405 0.0198411 0.0196437 +0.0194482 0.0192547 0.0190631 0.0188734 0.0186856 0.0184997 0.0183156 +0.0181334 0.017953 0.0177743 0.0175975 0.0174224 0.017249 0.0170774 +0.0169075 0.0167392 0.0165727 0.0164078 0.0162445 0.0160829 0.0159229 +0.0157644 0.0156076 0.0154523 0.0152985 0.0151463 0.0149956 0.0148464 +0.0146986 0.0145524 0.0144076 0.0142642 0.0141223 0.0139818 0.0138427 +0.0137049 0.0135686 0.0134336 0.0132999 0.0131675 0.0130365 0.0129068 +0.0127784 0.0126512 0.0125254 0.0124007 0.0122773 0.0121552 0.0120342 +0.0119145 0.0117959 0.0116786 0.0115624 0.0114473 0.0113334 0.0112206 +0.011109 0.0109985 0.010889 0.0107807 0.0106734 0.0105672 0.0104621 +0.010358 0.0102549 0.0101529 0.0100518 0.00995182 0.0098528 0.00975476 +0.0096577 0.0095616 0.00946646 0.00937227 0.00927902 0.00918669 0.00909528 +0.00900478 0.00891518 0.00882647 0.00873865 0.0086517 0.00856561 0.00848038 +0.008396 0.00831246 0.00822975 0.00814786 0.00806679 0.00798652 0.00790705 +0.00782838 0.00775048 0.00767337 0.00759701 0.00752142 0.00744658 0.00737249 +0.00729913 0.0072265 0.0071546 0.00708341 0.00701293 0.00694315 0.00687406 +0.00680567 0.00673795 0.0066709 0.00660453 0.00653881 0.00647375 0.00640933 +0.00634556 0.00628242 0.00621991 0.00615802 0.00609675 0.00603608 0.00597602 +0.00591656 0.00585769 0.0057994 0.0057417 0.00568457 0.00562801 0.00557201 +0.00551657 0.00546167 0.00540733 0.00535353 0.00530026 0.00524752 0.0051953 +0.00514361 0.00509243 0.00504176 0.00499159 0.00494193 0.00489275 0.00484407 +0.00479587 0.00474815 0.00470091 0.00465413 0.00460782 0.00456197 0.00451658 +0.00447164 0.00442715 0.0043831 0.00433948 0.00429631 0.00425356 0.00421123 +0.00416933 0.00412785 0.00408677 0.00404611 0.00400585 0.00396599 0.00392653 +0.00388746 0.00384878 0.00381048 0.00377257 0.00373503 0.00369786 0.00366107 +0.00362464 0.00358857 0.00355287 0.00351752 0.00348252 0.00344786 0.00341356 +0.00337959 0.00334597 0.00331267 0.00327971 0.00324708 0.00321477 0.00318278 +0.00315111 0.00311976 0.00308871 0.00305798 0.00302755 0.00299743 0.0029676 +0.00293808 0.00290884 0.0028799 0.00285124 0.00282287 0.00279478 0.00276698 +0.00273944 0.00271219 0.0026852 0.00265848 0.00263203 0.00260584 0.00257991 +0.00255424 0.00252883 0.00250366 0.00247875 0.00245409 0.00242967 0.00240549 +0.00238156 0.00235786 0.0023344 0.00231117 0.00228818 0.00226541 0.00224287 +0.00222055 0.00219846 0.00217658 0.00215492 0.00213348 0.00211225 0.00209124 +0.00207043 0.00204983 0.00202943 0.00200924 0.00198925 0.00196945 0.00194986 +0.00193045 0.00191125 0.00189223 0.0018734 0.00185476 0.0018363 0.00181803 +0.00179994 0.00178203 0.0017643 0.00174675 0.00172937 0.00171216 0.00169512 +0.00167826 0.00166156 0.00164502 0.00162866 0.00161245 0.00159641 0.00158052 +0.0015648 0.00154923 0.00153381 0.00151855 0.00150344 0.00148848 0.00147367 +0.00145901 0.00144449 0.00143012 0.00141589 0.0014018 0.00138785 0.00137404 +0.00136037 0.00134683 0.00133343 0.00132016 0.00130703 0.00129402 0.00128115 +0.0012684 0.00125578 0.00124328 0.00123091 0.00121866 0.00120654 0.00119453 +0.00118265 0.00117088 0.00115923 0.00114769 0.00113627 0.00112497 0.00111377 +0.00110269 0.00109172 0.00108086 0.0010701 0.00105946 0.00104891 0.00103848 +0.00102814 0.00101791 0.00100779 0.000997758 0.00098783 0.000978001 +0.00096827 0.000958635 0.000949097 0.000939653 0.000930303 0.000921047 +0.000911882 0.000902808 0.000893825 0.000884932 0.000876127 0.000867409 +0.000858778 0.000850233 0.000841773 0.000833397 0.000825105 0.000816895 +0.000808767 0.000800719 0.000792752 0.000784864 0.000777055 0.000769323 +0.000761668 0.000754089 0.000746586 0.000739157 0.000731803 0.000724521 +0.000717312 0.000710174 0.000703108 0.000696112 0.000689185 0.000682328 +0.000675539 0.000668817 0.000662162 0.000655574 0.00064905 0.000642592 +0.000636198 0.000629868 0.000623601 0.000617396 0.000611253 0.000605171 +0.000599149 0.000593188 0.000587285 0.000581442 0.000575656 0.000569928 +0.000564257 0.000558643 0.000553084 0.000547581 0.000542133 0.000536738 +0.000531398 0.00052611 0.000520875 0.000515692 0.000510561 0.000505481 +0.000500451 0.000495472 0.000490542 0.000485661 0.000480829 0.000476044 +0.000471307 0.000466618 0.000461975 0.000457378 0.000452827 0.000448321 +0.000443861 0.000439444 0.000435072 0.000430743 0.000426456 0.000422213 +0.000418012 0.000413853 0.000409735 0.000405658 0.000401622 0.000397626 +0.000393669 0.000389752 0.000385874 0.000382034 0.000378233 0.00037447 +0.000370744 0.000367055 0.000363402 0.000359786 0.000356206 0.000352662 +0.000349153 0.000345679 0.000342239 0.000338834 0.000335463 0.000332125 +0.00032882 0.000325548 0.000322309 0.000319102 0.000315927 0.000312783 +0.000309671 0.00030659 0.000303539 0.000300519 0.000297529 0.000294568 +0.000291637 0.000288735 0.000285862 0.000283018 0.000280202 0.000277414 +0.000274654 0.000271921 0.000269215 0.000266536 0.000263884 0.000261259 +0.000258659 0.000256085 0.000253537 0.000251014 0.000248517 0.000246044 +0.000243596 0.000241172 0.000238772 0.000236396 0.000234044 0.000231716 +0.00022941 0.000227127 0.000224867 0.00022263 0.000220415 0.000218221 +0.00021605 0.0002139 0.000211772 0.000209665 0.000207579 0.000205513 +0.000203468 0.000201444 0.000199439 0.000197455 0.00019549 0.000193545 +0.000191619 0.000189713 0.000187825 0.000185956 0.000184106 0.000182274 +0.00018046 0.000178665 0.000176887 0.000175127 0.000173384 0.000171659 +0.000169951 0.00016826 0.000166586 0.000164928 0.000163287 0.000161663 +0.000160054 0.000158461 0.000156885 0.000155324 0.000153778 0.000152248 +0.000150733 0.000149233 0.000147748 0.000146278 0.000144823 0.000143382 +0.000141955 0.000140543 0.000139144 0.00013776 0.000136389 0.000135032 +0.000133688 0.000132358 0.000131041 0.000129737 0.000128446 0.000127168 +0.000125903 0.00012465 0.00012341 0.000122182 0.000120966 0.000119763 +0.000118571 0.000117391 0.000116223 0.000115067 0.000113922 0.000112788 +0.000111666 0.000110555 0.000109455 0.000108366 0.000107287 0.00010622 +0.000105163 0.000104117 0.00010308 0.000102055 0.000101039 0.000100034 +9.90387e-05 9.80533e-05 9.70776e-05 9.61117e-05 9.51553e-05 9.42085e-05 +9.32711e-05 9.23431e-05 9.14242e-05 9.05145e-05 8.96139e-05 8.87222e-05 +8.78394e-05 8.69654e-05 8.61001e-05 8.52434e-05 8.43952e-05 8.35554e-05 +8.27241e-05 8.1901e-05 8.1086e-05 8.02792e-05 7.94804e-05 7.86896e-05 +7.79066e-05 7.71314e-05 7.6364e-05 7.56041e-05 7.48518e-05 7.4107e-05 +7.33696e-05 7.26396e-05 7.19169e-05 7.12012e-05 7.04928e-05 6.97914e-05 +6.9097e-05 6.84094e-05 6.77287e-05 6.70548e-05 6.63876e-05 6.5727e-05 +6.5073e-05 6.44256e-05 6.37845e-05 6.31498e-05 6.25215e-05 6.18994e-05 +6.12835e-05 6.06737e-05 6.007e-05 5.94723e-05 5.88805e-05 5.82947e-05 +5.77146e-05 5.71403e-05 5.65718e-05 5.60089e-05 5.54516e-05 5.48998e-05 +5.43536e-05 5.38128e-05 5.32773e-05 5.27472e-05 5.22224e-05 5.17027e-05 +5.11883e-05 5.06789e-05 5.01747e-05 4.96754e-05 4.91812e-05 4.86918e-05 +4.82073e-05 4.77276e-05 4.72527e-05 4.67826e-05 4.63171e-05; +#A 1000 0 0 0; +#X coords 0 1 1002 0 180 100 1; +#X restore 254 118 graph; +#N canvas 140 79 589 249 make-table 0; +#X obj 164 81 t b b; +#X obj 236 106 f; +#X obj 274 106 + 1; +#X msg 258 83 0; +#X obj 164 104 until; +#X obj 236 136 t f f; +#X obj 164 62 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 104 164 expr exp(-($f1-1)/100); +#X obj 163 132 sel 999; +#X text 35 10 This patch computes a decaying exponential function \, +100 points per unit.; +#X obj 137 196 tabwrite E06-tab; +#X connect 0 0 4 0; +#X connect 0 1 3 0; +#X connect 1 0 2 0; +#X connect 1 0 5 0; +#X connect 1 0 8 0; +#X connect 2 0 1 1; +#X connect 3 0 1 1; +#X connect 4 0 1 0; +#X connect 5 0 7 0; +#X connect 5 1 10 1; +#X connect 6 0 0 0; +#X connect 7 0 10 0; +#X connect 8 0 4 1; +#X restore 302 258 pd make-table; +#X text 251 95 waveshaping function; +#X text 438 210 0; +#X text 437 114 1; +#X obj 12 168 +~ 1; +#X obj 12 146 *~ 100; +#X obj 12 83 +~ 1; +#X floatatom 68 53 5 0 200 0 - - -; +#X obj 68 96 pack 0 50; +#X obj 68 120 line~; +#X text 157 69 tenths; +#X obj 68 73 / 10; +#X obj 12 124 *~; +#X obj 13 190 tabread4~ E06-tab; +#X text 711 40 1; +#X text 712 160 -1; +#X text 103 237 <-- repeatedly; +#X text 104 217 <-- graph once; +#X text 121 0 Waveshaping using an exponential function; +#X text 120 53 <--index in; +#X text 250 218 0; +#X text 417 220 10; +#X text 14 652 When the index of modulation exceeds 5 we scan past +the right hand border of the table (the thousandth point \, corresponding +to exp(-10). This isn't a problem because the values are all close +to zero there.; +#X text 14 555 Table lookup is prepared as follows. First add one to +the sinusoid and adjust its amplitude according to index \; it ranges +from 0 to 2*index. Then adjust for the table's input scale (100 points +per unit \, so multiply by 100) and add one to skip the interpolation +point at the beginning of the table.; +#X text 13 398 Here we use an exponential function as a waveshaping +transfer function. The theory is shown in detail in the accompanying +book \, but in short \, we adjust the sinusoid so that \, as the index +increases \, we scan starting from the left of the transfer function +(previously the reading location grew from the center). The table contains +exp(-x) with x varying from 0 to 10 When the index is zero \, the output +is the constant 1 and the spectrum holds only DC. As the index grows +\, the output is a sequence of steadily narrower pulses \, whose spectrum +gets progressively fatter.; +#X connect 1 0 6 0; +#X connect 1 0 6 1; +#X connect 5 0 3 1; +#X connect 18 0 19 0; +#X connect 19 0 33 0; +#X connect 25 0 3 2; +#X connect 31 0 40 0; +#X connect 32 0 31 0; +#X connect 33 0 39 0; +#X connect 34 0 38 0; +#X connect 35 0 36 0; +#X connect 36 0 39 1; +#X connect 38 0 35 0; +#X connect 39 0 32 0; +#X connect 40 0 3 0; +#X connect 40 0 1 0; diff --git a/pd/doc/3.audio.examples/E06.stereo.pd b/pd/doc/3.audio.examples/E06.stereo.pd deleted file mode 100644 index 1c417df5..00000000 --- a/pd/doc/3.audio.examples/E06.stereo.pd +++ /dev/null @@ -1,87 +0,0 @@ -#N canvas 27 355 553 341 12; -#X floatatom 59 63; -#X msg 340 12 \; pd dsp 1; -#X msg 407 12 \; pd dsp 0; -#X text 361 45 ON; -#X text 424 43 OFF; -#X floatatom 123 196; -#N canvas 159 26 618 383 output 0; -#X obj 393 156 t b; -#X obj 393 106 f; -#X obj 393 56 inlet; -#X text 399 25 mute; -#X obj 393 181 f; -#X msg 480 174 0; -#X msg 393 81 bang; -#X obj 393 131 moses 1; -#X obj 480 149 t b f; -#X obj 452 113 moses 1; -#X obj 138 144 dbtorms; -#X obj 452 88 r master-lvl; -#X obj 138 38 r master-lvl; -#X obj 393 206 s master-lvl; -#X obj 22 181 inlet~; -#X obj 254 37 inlet; -#X text 254 14 level; -#X obj 254 96 s master-lvl; -#X msg 151 61 set \$1; -#X obj 151 85 outlet; -#X msg 269 60 \; pd dsp 1; -#X obj 138 190 line~; -#X obj 22 212 *~; -#X obj 138 167 pack 0 50; -#X text 34 159 audio; -#X text 148 106 show level; -#X obj 73 182 inlet~; -#X obj 73 213 *~; -#X obj 22 241 dac~ 1; -#X obj 73 241 dac~ 2; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 23 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 21 0 27 1; -#X connect 22 0 28 0; -#X connect 23 0 21 0; -#X connect 26 0 27 0; -#X connect 27 0 29 0; -#X restore 61 224 pd output; -#X msg 152 196 MUTE; -#X text 186 195 <-- output amplitude; -#X obj 59 111 phasor~ 0; -#X text 56 45 frequency; -#X text 331 323 updated for Pd version 0.26; -#X text 57 9 CLASSICAL PULSE WIDTH MODULATION; -#X obj 131 110 phasor~ 0; -#X obj 59 134 -~ 0.5; -#X obj 131 85 + 0.5; -#X obj 131 135 -~ 0.5; -#X obj 131 160 *~ -1; -#X text 34 262 Here's what happens if you take the previous patch but \, instead of subtracting the two sawtooth waves \, we put them in two speakers with opposite phase.; -#X connect 0 0 9 0; -#X connect 0 0 15 0; -#X connect 5 0 6 2; -#X connect 6 0 5 0; -#X connect 7 0 6 3; -#X connect 9 0 14 0; -#X connect 13 0 16 0; -#X connect 14 0 6 0; -#X connect 15 0 13 0; -#X connect 16 0 17 0; -#X connect 17 0 6 1; diff --git a/pd/doc/3.audio.examples/E07.envelope.mod.pd b/pd/doc/3.audio.examples/E07.envelope.mod.pd deleted file mode 100644 index 52551163..00000000 --- a/pd/doc/3.audio.examples/E07.envelope.mod.pd +++ /dev/null @@ -1,148 +0,0 @@ -#N canvas 75 15 1014 733 12; -#X graph graph1 0 -1.02 44100 1.02 764 446 964 316; -#X array cos-output 44100 float 0; -#X pop; -#X graph graph1 0 -1.02 44103 1.02 761 148 961 18; -#X array sample-table 44103 float 0; -#X pop; -#X obj 593 579 loadbang; -#X floatatom 96 489 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 67 517 pd output; -#X msg 133 490 MUTE; -#X text 176 490 <-- output amplitude; -#X obj 67 460 hip~ 5; -#X obj 47 408 tabread4~ sample-table; -#X floatatom 46 50 0 0 0; -#X text 85 49 <-- frequency (Hz.); -#X floatatom 97 358 0 0 0; -#X obj 97 385 * 441; -#X obj 47 358 *~ 0; -#X obj 47 383 +~ 1; -#X text 271 274 <-- click to display output; -#X msg 229 275 bang; -#X text 136 357 <-- chunk size (100ths of a second); -#X obj 588 471 adc~ 1; -#X obj 588 495 hip~ 5; -#X obj 588 545 tabwrite~ sample-table; -#X msg 603 518 bang; -#X text 635 518 <-- click here to record your own sample; -#X text 704 583 v-- re-read the original sample; -#X text 40 9 ENVELOPING YOUR LOOPING SAMPLER; -#X obj 88 101 -~ 0.5; -#X obj 88 259 clip~ -0.5 0.5; -#X obj 88 237 *~ 1; -#X graph graph1 0 -1.02 44100 1.02 763 311 963 181; -#X array cos-input 44100 float 0; -#X pop; -#X obj 229 303 tabwrite~ cos-input; -#X obj 88 284 cos~; -#X obj 88 126 wrap~; -#X obj 88 155 -~ 0.5; -#X obj 88 332 *~ -0.5; -#X obj 88 307 -~ 1; -#X obj 229 329 tabwrite~ cos-output; -#X floatatom 119 187 0 0 0; -#X obj 67 433 *~; -#X text 157 98 subtracting 0.5 and wrapping produces a sawtooth wave -180 degrees out of phase from the original.; -#X text 153 150 as before we subtract 1/2 again to center the sawtooth -from -1/2 to 1/2.; -#X text 153 188 <-- sharpness (at least 1); -#X msg 593 608 read ../sound/voice.wav sample-table; -#X obj 593 633 soundfiler; -#X text 776 150 -- 44103 samples ---; -#X text 767 447 ----- 1 second ------; -#X obj 119 211 max 1; -#X obj 46 77 phasor~; -#X text 24 560 Here we apply an amplitude envelope to protect against -discontinuities at the loop point. The envelope is based on the pulse -width modulation example \, except that the widening is applied to -the "1" part of the pulse \, not the "0" part.; -#X text 23 647 To see the envelope \, put the phasor on 2 Hz \, select -"sharpness" values between 1 and 3 \, and look at "cos-input" and "cos-output." -You should both see and hear the effect of the "sharpness" parameter. -; -#X text 734 688 updated for Pd version 0.34; -#X connect 2 0 41 0; -#X connect 3 0 4 1; -#X connect 4 0 3 0; -#X connect 5 0 4 2; -#X connect 7 0 4 0; -#X connect 8 0 37 0; -#X connect 9 0 46 0; -#X connect 11 0 12 0; -#X connect 12 0 13 1; -#X connect 13 0 14 0; -#X connect 14 0 8 0; -#X connect 16 0 29 0; -#X connect 16 0 35 0; -#X connect 18 0 19 0; -#X connect 19 0 20 0; -#X connect 21 0 20 0; -#X connect 25 0 31 0; -#X connect 26 0 30 0; -#X connect 26 0 29 0; -#X connect 27 0 26 0; -#X connect 30 0 34 0; -#X connect 31 0 32 0; -#X connect 32 0 27 0; -#X connect 33 0 35 0; -#X connect 33 0 37 1; -#X connect 34 0 33 0; -#X connect 36 0 45 0; -#X connect 37 0 7 0; -#X connect 41 0 42 0; -#X connect 45 0 27 1; -#X connect 46 0 13 0; -#X connect 46 0 25 0; diff --git a/pd/doc/3.audio.examples/E07.evenodd.pd b/pd/doc/3.audio.examples/E07.evenodd.pd new file mode 100644 index 00000000..9715e1ea --- /dev/null +++ b/pd/doc/3.audio.examples/E07.evenodd.pd @@ -0,0 +1,109 @@ +#N canvas 187 149 784 591 12; +#X obj 230 101 f; +#X obj 264 77 + 1; +#X obj 264 101 mod 11; +#N canvas 0 0 450 300 graph1 0; +#X array E07 11 float 0; +#X coords 0 96 11 36 100 160 1; +#X restore 528 15 graph; +#X floatatom 320 53 0 10 999 0 - - -; +#X obj 230 173 mtof; +#X msg 26 92 1; +#X obj 27 217 *~; +#X obj 27 267 cos~; +#X obj 27 292 hip~ 5; +#X obj 27 244 +~ 0.1; +#X floatatom 61 144 0 0 0 0 - - -; +#X floatatom 166 145 0 0 200 0 - - -; +#X floatatom 96 144 0 0 999 0 - - -; +#X floatatom 131 144 0 0 999 0 - - -; +#X msg 112 267 0; +#X msg 112 245 0.1; +#X msg 112 289 0.25; +#X text 68 108 ADSR controls; +#X text 106 125 A; +#X text 141 125 D; +#X text 176 125 S; +#X floatatom 320 77 0 1 11 0 - - -; +#X text 354 79 <--increment; +#X text 355 56 <--msec; +#X obj 26 193 *~ 0.01; +#X obj 230 29 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 27 321 output~; +#X text 527 562 updated for Pd version 0.37; +#X obj 26 170 adsr 70 10 90 50 500; +#X obj 230 150 +; +#X floatatom 265 150 0 -48 120 0 - - -; +#X text 299 152 <--transpose; +#N canvas 0 0 538 208 make-table 0; +#X obj 38 71 loadbang; +#X text 16 11 This patch loads a sequence of pitches into array1. The +values are floating-point \, so we could use microtones (60.5 \, for +example) if we wish.; +#X msg 38 99 \; array1 0 55 56 57 55 57 61 55 61 63 57 63 \; array1 +yticks 36 12 1 \; array1 ylabel 12 36 48 60 72 84 96; +#X connect 0 0 2 0; +#X restore 527 195 pd make-table; +#X obj 176 50 sel 0; +#X msg 26 69 0; +#X text 48 125 level; +#X obj 230 53 metro 130; +#X obj 60 217 osc~; +#X text 111 225 symmetry; +#X text 157 265 even; +#X text 165 288 odd; +#X text 147 244 mixed; +#X obj 230 126 tabread E07; +#X text 253 26 <--ON/OFF; +#X text 238 232 This patch uses a stepping sequencer to control a waveshaping +instrument. A metronome (metro 130) drives a counter (f \, +1 \, and +mod 11) which counts repeatedly through 11 values which are read from +the stored table (tabread E07). The values may be read in sequence +\, by twos or threes \, etc. \, according to the "increment" parameter. +; +#X text 239 328 The metronome also triggers an ADSR envelope \, whose +parameters may also be changed using the "level" \, "A" \, "D" \, and +"S" controls.; +#X text 142 5 SEQUENCED WAVESHAPING SYNTHESIZER; +#X text 240 380 The synthesis (osc~ \, *~ \, +~ 0.1 \, cos~) is a very +simple application of the waveshaping technique. The oscillator (whose +amplitude depends on the ADSR generator) is used as an index into the +"cos~" wavetable. An additional offset ("symmetry") controls how the +oscillator's waveform is centered on the wavetable. If the offset is +zero \, the oscillator reads into the (even) cosine function (producing +only even harmonics). If the offset is 0.25 \, we read 1/4 wave into +the cosine function: the result is an odd function and we get odd harmonics. +Between the two we get mixtures of even and odd.; +#X connect 0 0 1 0; +#X connect 0 0 43 0; +#X connect 1 0 2 0; +#X connect 2 0 0 1; +#X connect 4 0 37 1; +#X connect 5 0 38 0; +#X connect 6 0 29 0; +#X connect 7 0 10 0; +#X connect 8 0 9 0; +#X connect 9 0 27 0; +#X connect 9 0 27 1; +#X connect 10 0 8 0; +#X connect 11 0 29 1; +#X connect 12 0 29 4; +#X connect 13 0 29 2; +#X connect 14 0 29 3; +#X connect 15 0 10 1; +#X connect 16 0 10 1; +#X connect 17 0 10 1; +#X connect 22 0 1 1; +#X connect 25 0 7 0; +#X connect 26 0 34 0; +#X connect 26 0 37 0; +#X connect 29 0 25 0; +#X connect 30 0 5 0; +#X connect 31 0 30 1; +#X connect 34 0 35 0; +#X connect 35 0 29 0; +#X connect 37 0 0 0; +#X connect 37 0 6 0; +#X connect 38 0 7 1; +#X connect 43 0 30 0; diff --git a/pd/doc/3.audio.examples/E08.even.odd.pd b/pd/doc/3.audio.examples/E08.even.odd.pd deleted file mode 100644 index bfa950a9..00000000 --- a/pd/doc/3.audio.examples/E08.even.odd.pd +++ /dev/null @@ -1,116 +0,0 @@ -#N canvas 213 27 840 639 12; -#X floatatom 45 74 0 0 0; -#X obj 99 164 wrap~; -#X graph graph1 0 -1.02 882 1.02 624 153 824 23; -#X array phasor-output 882 float 0; -#X pop; -#X obj 45 102 phasor~ 0; -#X text 81 73 frequency; -#X obj 45 130 -~ 0.5; -#X obj 99 192 -~ 0.5; -#X obj 36 244 -~; -#X obj 98 244 +~; -#X graph graph1 0 -1.02 882 1.02 625 288 825 158; -#X array wrap-output 882 float 0; -#X pop; -#X graph graph1 0 -1.02 882 1.02 626 423 826 293; -#X array sum 882 float 0; -#X pop; -#X graph graph1 0 -1.02 882 1.02 626 563 826 433; -#X array difference 882 float 0; -#X pop; -#X obj 172 166 tabwrite~ phasor-output; -#X obj 172 218 tabwrite~ wrap-output; -#X obj 172 282 tabwrite~ sum; -#X obj 172 327 tabwrite~ difference; -#X msg 172 120 bang; -#X text 106 13 BUCHLA'S METHOD; -#X floatatom 119 369 0 0 0; -#N canvas 159 26 618 383 output 0; -#X obj 393 156 t b; -#X obj 393 106 f; -#X obj 393 56 inlet; -#X text 399 25 mute; -#X obj 393 181 f; -#X msg 480 174 0; -#X msg 393 81 bang; -#X obj 393 131 moses 1; -#X obj 480 149 t b f; -#X obj 452 113 moses 1; -#X obj 138 144 dbtorms; -#X obj 452 88 r master-lvl; -#X obj 138 38 r master-lvl; -#X obj 393 206 s master-lvl; -#X obj 22 181 inlet~; -#X obj 254 37 inlet; -#X text 254 14 level; -#X obj 254 96 s master-lvl; -#X msg 151 61 set \$1; -#X obj 151 85 outlet; -#X msg 269 60 \; pd dsp 1; -#X obj 138 190 line~; -#X obj 22 212 *~; -#X obj 138 167 pack 0 50; -#X text 34 159 audio; -#X text 148 106 show level; -#X obj 73 182 inlet~; -#X obj 73 213 *~; -#X obj 22 241 dac~ 1; -#X obj 73 241 dac~ 2; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 23 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 21 0 27 1; -#X connect 22 0 28 0; -#X connect 23 0 21 0; -#X connect 26 0 27 0; -#X connect 27 0 29 0; -#X restore 81 392 pd output; -#X msg 156 369 MUTE; -#X text 13 430 A patch to split a sawtooth into even and odd harmonics -ala Buchla. The wrap~ object folds its input into the interval [0 \, -1) so taht \, for instance \, subtracting 1/5 from a phasor and wrapping -it gives another phasor a half cycle out of phase frmo the original. -Adding and subtracting the two give the results shown and heard. (Listen -to the two outputs separately \, then together.); -#X text 631 567 ---- 0.02 seconds ----; -#X text 577 613 updated for Pd version 0.34; -#X text 193 369 <-- output; -#X connect 0 0 3 0; -#X connect 1 0 6 0; -#X connect 3 0 5 0; -#X connect 5 0 1 0; -#X connect 5 0 12 0; -#X connect 5 0 8 0; -#X connect 5 0 7 0; -#X connect 6 0 13 0; -#X connect 6 0 8 1; -#X connect 6 0 7 1; -#X connect 7 0 15 0; -#X connect 7 0 19 0; -#X connect 8 0 14 0; -#X connect 8 0 19 1; -#X connect 16 0 13 0; -#X connect 16 0 14 0; -#X connect 16 0 15 0; -#X connect 16 0 12 0; -#X connect 18 0 19 2; -#X connect 19 0 18 0; -#X connect 20 0 19 3; diff --git a/pd/doc/3.audio.examples/E08.phase.mod.pd b/pd/doc/3.audio.examples/E08.phase.mod.pd new file mode 100644 index 00000000..53a6e052 --- /dev/null +++ b/pd/doc/3.audio.examples/E08.phase.mod.pd @@ -0,0 +1,196 @@ +#N canvas 36 68 722 738 12; +#X obj 224 164 *~; +#X floatatom 224 107 0 0 0 0 - - -; +#X obj 312 144 line~; +#X floatatom 128 121 0 0 0 0 - - -; +#X obj 128 235 cos~; +#X obj 128 191 +~; +#X obj 224 132 osc~ 0; +#X obj 312 118 pack 0 50; +#X floatatom 312 65 0 0 0 0 - - -; +#X obj 312 92 / 100; +#X text 286 27 modulation index; +#X text 286 42 in hundredths; +#X text 125 78 carrier; +#X text 124 96 frequency; +#X text 209 83 frequency; +#X text 210 66 modulation; +#X text 33 132 carrier; +#X text 33 147 phase -->; +#X text 6 175 phase; +#X text 5 190 modulation-->; +#X text 12 217 output; +#X text 11 234 waveform -->; +#X text 129 1 PHASE MODULATION; +#X text 16 378 Most implementations of "FM" actually use phase \, not +frequency \, modulation \, because it extends in a more natural way +to "multi-operator FM" with three or more oscillators.; +#X text 16 434 To do phase modulation \, we split the "carrier oscillator" +into its phase calculation (phasor~) and its waveform lookup (cos~). +These together would be equivalent to an osc~ object \, but the "+~" +between them adds the modulating oscillator's output to the phase. +; +#X text 20 652 We also have to use a line~ to smooth changes in the +modulation index \, which wasn't necessary in the previous patch.; +#X obj 128 148 phasor~; +#X obj 117 557 cos~; +#X obj 117 529 phasor~; +#X text 60 539 this:; +#X text 219 532 is the same; +#X text 220 551 as this:; +#X obj 335 544 osc~; +#N canvas 0 0 450 300 graph2 0; +#X array phase-out 441 float 1; +#A 0 0.43245 0.433463 0.434452 0.435418 0.43636 0.43728 0.438178 0.439056 +0.439912 0.440749 0.441567 0.442366 0.443148 0.443912 0.444659 0.445391 +0.446107 0.446809 0.447497 0.448172 0.448834 0.449484 0.450122 0.450751 +0.451369 0.451978 0.452579 0.453172 0.453758 0.454338 0.454911 0.45548 +0.456045 0.456606 0.457164 0.457719 0.458274 0.458827 0.45938 0.459934 +0.460489 0.461046 0.461605 0.462168 0.462735 0.463306 0.463883 0.464466 +0.465056 0.465654 0.466259 0.466873 0.467497 0.468131 0.468776 0.469433 +0.470102 0.470783 0.471479 0.472188 0.472913 0.473653 0.474409 0.475182 +0.475973 0.476782 0.477611 0.478459 0.479327 0.480216 0.481127 0.48206 +0.483015 0.483994 0.484997 0.486024 0.487077 0.488156 0.48926 0.490392 +0.491552 0.49274 0.493957 0.495203 0.496479 0.497785 0.499123 0.500493 +0.501896 0.503332 0.504801 0.506304 0.507842 0.509415 0.511023 0.512667 +0.514348 0.516066 0.517821 0.519615 0.521447 0.523318 0.525228 0.527179 +0.52917 0.531202 0.533275 0.53539 0.537547 0.539747 0.541992 0.54428 +0.546613 0.548989 0.551411 0.553877 0.556389 0.558947 0.561551 0.564202 +0.5669 0.569645 0.572437 0.575278 0.578166 0.581104 0.58409 0.587125 +0.59021 0.593345 0.596529 0.599764 0.603051 0.606389 0.609778 0.613219 +0.61671 0.620254 0.62385 0.627497 0.631197 0.634949 0.638754 0.642612 +0.646522 0.650486 0.654503 0.658573 0.662696 0.666873 0.671104 -0.324611 +-0.320273 -0.315881 -0.311434 -0.306931 -0.302375 -0.297764 -0.2931 +-0.288381 -0.283608 -0.278781 -0.2739 -0.268964 -0.263975 -0.258931 +-0.253833 -0.248682 -0.243476 -0.238217 -0.232904 -0.227537 -0.222116 +-0.216642 -0.211115 -0.205534 -0.1999 -0.194211 -0.18847 -0.182675 +-0.176829 -0.170929 -0.164978 -0.158975 -0.152919 -0.146813 -0.140655 +-0.134446 -0.128186 -0.121875 -0.115514 -0.109103 -0.102642 -0.0961313 +-0.0895714 -0.0829625 -0.0763049 -0.0695988 -0.0628447 -0.056041 -0.0491896 +-0.0422913 -0.0353461 -0.0283546 -0.0213171 -0.0142339 -0.00710538 +6.80089e-05 0.00728586 0.0145478 0.0218535 0.0292025 0.0365944 0.0440286 +0.0515049 0.0590228 0.0665818 0.0741815 0.0818213 0.0895009 0.0972198 +0.104978 0.112776 0.120611 0.128484 0.136393 0.144339 0.15232 0.160337 +0.168388 0.176473 0.184592 0.192744 0.200929 0.209146 0.217393 0.225672 +0.233981 0.24232 0.250688 0.259084 0.267509 0.27596 0.284439 0.292944 +0.301475 0.310031 0.318611 0.327215 0.335842 0.344491 0.353162 0.361854 +0.370566 0.379298 0.38805 0.39682 0.405608 0.414413 0.423234 0.432072 +0.440924 0.449792 0.458673 0.467567 0.476474 0.485394 0.494324 0.503265 +0.512216 0.521176 0.530145 0.539121 0.548104 0.557094 0.566089 0.575089 +0.584094 0.593102 0.602113 0.611126 0.620141 0.629157 0.638173 0.647189 +0.656203 0.665215 0.674225 0.683232 0.692234 0.701231 0.710224 0.71921 +0.728189 0.737161 0.746124 0.755079 0.764024 0.772959 0.781884 0.790796 +0.799697 0.808584 0.817458 0.826318 0.835162 0.843992 0.852804 0.861601 +0.870379 0.879139 0.887879 0.8966 0.905301 0.913981 0.92264 0.931276 +0.93989 0.94848 0.957046 0.965588 0.974105 0.982595 0.99106 0.999497 +1.00791 1.01629 1.02464 1.03296 1.04126 1.04952 1.05775 1.06595 1.07412 +1.08225 1.09035 1.09841 1.10645 1.11444 1.1224 1.13033 1.13822 1.14607 +1.15388 1.16166 1.1694 1.17709 1.18475 1.19237 1.19995 1.20749 1.21498 +1.22244 1.22985 1.23722 1.24454 1.25182 1.25906 1.26625 1.2734 0.280502 +0.287559 0.29457 0.301536 0.308454 0.315325 0.32215 0.328926 0.335655 +0.342335 0.348967 0.35555 0.362084 0.368568 0.375003 0.381388 0.387722 +0.394004 0.400235 0.406415 0.412544 0.418621 0.424647 0.430621 0.436542 +0.442412 0.448228 0.453993 0.459704 0.465363 0.470969 0.476521 0.48202 +0.487466 0.492858 0.498196 0.503481 0.508712 0.513889 0.519011 0.524077 +0.52909 0.534049 0.538953 0.543804 0.5486 0.553342 0.55803 0.562664 +0.567243 0.571769 0.57624 0.580658 0.585021 0.589331 0.593587 0.597789 +0.601938 0.606033 0.610075 0.614064 0.617999 0.621879 0.625706 0.629481 +0.633203 0.636873 0.640491 0.644057 0.647571 0.651033 0.654445 0.657805 +0.661114 0.664372 0.66758 0.670739 0.673847 0.676905 0.679914 0.682875 +; +#X array cos-out 441 float 1; +#A 0 -0.911256 -0.913872 -0.916365 -0.918789 -0.921097 -0.923342 -0.925486 +-0.927564 -0.92956 -0.931483 -0.93335 -0.935129 -0.936867 -0.938528 +-0.940137 -0.941707 -0.943197 -0.944657 -0.946072 -0.947426 -0.948755 +-0.95004 -0.951276 -0.952491 -0.953672 -0.954806 -0.955924 -0.957024 +-0.958071 -0.959106 -0.960132 -0.961119 -0.962086 -0.963047 -0.963993 +-0.964903 -0.965811 -0.966718 -0.967595 -0.968461 -0.969329 -0.970192 +-0.971025 -0.971863 -0.972707 -0.973527 -0.974343 -0.975168 -0.975986 +-0.976786 -0.977597 -0.978414 -0.979202 -0.980003 -0.980816 -0.981596 +-0.982391 -0.983194 -0.983968 -0.984757 -0.985543 -0.98631 -0.987093 +-0.987851 -0.98861 -0.98937 -0.990102 -0.990852 -0.991557 -0.992275 +-0.99296 -0.993642 -0.994295 -0.994935 -0.995544 -0.996137 -0.996687 +-0.997227 -0.997705 -0.998173 -0.998575 -0.998944 -0.999273 -0.999527 +-0.999743 -0.999894 -0.999966 -0.999981 -0.999927 -0.999765 -0.999526 +-0.999202 -0.998785 -0.99824 -0.997586 -0.996816 -0.995923 -0.994897 +-0.99373 -0.992413 -0.990934 -0.989283 -0.987458 -0.985449 -0.983247 +-0.980843 -0.978222 -0.975372 -0.972288 -0.968961 -0.965377 -0.96153 +-0.95741 -0.952995 -0.948265 -0.943231 -0.937881 -0.932182 -0.926128 +-0.919728 -0.912938 -0.905762 -0.898197 -0.890198 -0.881799 -0.87293 +-0.863637 -0.853855 -0.843612 -0.832873 -0.821629 -0.809886 -0.797593 +-0.784764 -0.771394 -0.757466 -0.742953 -0.727864 -0.712189 -0.695918 +-0.679041 -0.661549 -0.643437 -0.624697 -0.605324 -0.585314 -0.564664 +-0.543374 -0.521441 -0.498869 -0.475658 -0.451811 -0.427334 -0.402219 +-0.376482 -0.350131 -0.323174 -0.295626 -0.267508 -0.238824 -0.2096 +-0.179853 -0.149603 -0.118875 -0.0876953 -0.0560885 -0.0240874 0.00827867 +0.040974 0.0739643 0.107208 0.140666 0.174297 0.208056 0.241893 0.275757 +0.309603 0.343385 0.377036 0.410498 0.443712 0.476616 0.509148 0.541242 +0.572835 0.603858 0.634244 0.66391 0.692797 0.720837 0.747961 0.774084 +0.799131 0.823051 0.845758 0.867169 0.887248 0.90588 0.923037 0.938628 +0.952605 0.964885 0.975433 0.984153 0.991037 0.995988 0.998986 0.999997 +0.998938 0.995807 0.990576 0.983211 0.973668 0.961961 0.948075 0.932007 +0.913757 0.893328 0.87073 0.845995 0.81915 0.790227 0.759268 0.726324 +0.691452 0.654714 0.616181 0.57593 0.534037 0.490599 0.445716 0.399491 +0.352033 0.303459 0.253886 0.203441 0.152259 0.100478 0.0482368 -0.00432081 +-0.057045 -0.109786 -0.162386 -0.214696 -0.266564 -0.317814 -0.368301 +-0.417864 -0.466337 -0.513584 -0.559424 -0.603732 -0.646344 -0.687125 +-0.725934 -0.762631 -0.797101 -0.829205 -0.858847 -0.8859 -0.91028 +-0.931885 -0.950636 -0.966466 -0.97929 -0.989092 -0.995773 -0.999358 +-0.999773 -0.997042 -0.991152 -0.982099 -0.969941 -0.954655 -0.936332 +-0.915008 -0.890737 -0.863625 -0.833713 -0.801132 -0.765979 -0.728348 +-0.688394 -0.646219 -0.601975 -0.555817 -0.507869 -0.45832 -0.407319 +-0.355036 -0.301652 -0.247328 -0.192258 -0.136617 -0.0805873 -0.0243537 +0.0319027 0.0879985 0.143752 0.198986 0.253526 0.307194 0.359834 0.411262 +0.461345 0.509907 0.556823 0.601935 0.645131 0.686266 0.725245 0.761935 +0.796272 0.828125 0.857461 0.884158 0.9082 0.929508 0.948044 0.9638 +0.976698 0.986778 0.99402 0.998404 0.999981 0.998763 0.994751 0.988022 +0.978621 0.966582 0.95197 0.93487 0.915357 0.893512 0.869405 0.843139 +0.814817 0.784538 0.752408 0.718535 0.68303 0.646007 0.607581 0.567872 +0.526996 0.485074 0.442227 0.398573 0.354231 0.30932 0.263957 0.218256 +0.172326 0.126282 0.0802317 0.0342922 -0.0114471 -0.0568861 -0.101931 +-0.146492 -0.190474 -0.233802 -0.276394 -0.318171 -0.359072 -0.399015 +-0.437958 -0.475821 -0.512573 -0.548149 -0.582512 -0.615632 -0.647446 +-0.677951 -0.707119 -0.734897 -0.761296 -0.786293 -0.80988 -0.83204 +-0.852773 -0.872085 -0.88998 -0.906462 -0.921542 -0.935229 -0.94754 +-0.95849 -0.968102 -0.976397 -0.9834 -0.989136 -0.993613 -0.996882 +-0.998976 -0.99993 -0.999748 -0.998484 -0.996188 -0.99286 -0.988563 +-0.983336 -0.977186 -0.970195 -0.962347 -0.953732 -0.944344 -0.934249 +-0.923482 -0.912051 -0.900028 -0.887441 -0.874296 -0.860659 -0.846562 +-0.832035 -0.817101 -0.801792 -0.786149 -0.770201 -0.753977 -0.737507 +-0.720826 -0.703952 -0.686912 -0.669731 -0.652436 -0.635043 -0.617572 +-0.600055 -0.582513 -0.564966 -0.547418 -0.529898 -0.512429 -0.495016 +-0.477676 -0.460438 -0.443287 -0.426265 -0.409364; +#X coords 0 1 440 -1 200 140 1; +#X restore 509 190 graph; +#X obj 213 246 tabwrite~ phase-out; +#X obj 213 273 tabwrite~ cos-out; +#X msg 213 221 bang; +#X text 260 220 <-- graph them; +#X obj 126 296 output~; +#X obj 127 270 hip~; +#X text 408 98 ramped to avoid; +#X text 407 114 clicks.); +#X text 407 82 (the index is; +#X text 435 704 updated for Pd version 0.37; +#X text 21 588 The "modulation" index \, which in true FM is in units +of Hertz \, is dimensionless for phase moduation. "Good" values tend +to be between 0 and 1... in this patch the index is in hundredths. +; +#X connect 0 0 5 1; +#X connect 1 0 6 0; +#X connect 2 0 0 1; +#X connect 3 0 26 0; +#X connect 4 0 35 0; +#X connect 4 0 39 0; +#X connect 5 0 4 0; +#X connect 5 0 34 0; +#X connect 6 0 0 0; +#X connect 7 0 2 0; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 26 0 5 0; +#X connect 28 0 27 0; +#X connect 36 0 34 0; +#X connect 36 0 35 0; +#X connect 39 0 38 0; +#X connect 39 0 38 1; diff --git a/pd/doc/3.audio.examples/E09.FM.spectrum.pd b/pd/doc/3.audio.examples/E09.FM.spectrum.pd new file mode 100644 index 00000000..21094b41 --- /dev/null +++ b/pd/doc/3.audio.examples/E09.FM.spectrum.pd @@ -0,0 +1,139 @@ +#N canvas 127 136 697 536 12; +#X obj 94 188 *~; +#X obj 136 188 line~; +#X obj 18 179 cos~; +#X obj 18 154 +~; +#X obj 136 165 pack 0 50; +#X floatatom 136 117 0 0 0 0 - - -; +#X obj 136 141 / 100; +#X obj 18 129 phasor~; +#X obj 18 284 output~; +#X obj 17 253 hip~; +#X text 442 513 updated for Pd version 0.37; +#N canvas 122 211 558 609 fft 1; +#X obj 19 61 inlet~; +#X obj 208 212 inlet; +#X obj 29 92 rfft~; +#X obj 29 125 *~; +#X obj 60 125 *~; +#X obj 29 155 sqrt~; +#X obj 332 109 block~ 4096 1; +#X obj 29 181 biquad~ 0 0 0 0 1; +#X text 93 93 Fourier series; +#X text 98 146 magnitude; +#X text 96 131 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 193 164 delay two samples; +#X text 191 182 for better graphing; +#X obj 19 459 samplerate~; +#X obj 19 436 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 19 506 5 0 0 0 - - -; +#X obj 19 482 / 256; +#X obj 19 412 loadbang; +#X obj 75 528 s fundamental; +#X text 17 359 At load time \, calculate a good choice of fundamental +frequency for showing spectra: the 16th bin in a 4096-point spectrum +\, so SR*16/4096 or SR/256.; +#X obj 231 259 metro 500; +#X obj 231 236 inlet; +#X text 284 234 toggle to graph repeatedly; +#X text 262 212 bang to graph once; +#X obj 19 295 tabwrite~ E09-signal; +#X obj 231 298 tabwrite~ E09-spectrum; +#X obj 19 528 t b f; +#X msg 19 551 \; cm 6; +#X text 25 585 set carrier multiplier after fundamental; +#X obj 29 205 /~ 4096; +#X msg 209 322 \; pd dsp 1; +#X connect 0 0 2 0; +#X connect 0 0 26 0; +#X connect 1 0 26 0; +#X connect 1 0 27 0; +#X connect 1 0 32 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 31 0; +#X connect 15 0 18 0; +#X connect 16 0 15 0; +#X connect 17 0 28 0; +#X connect 18 0 17 0; +#X connect 19 0 16 0; +#X connect 22 0 26 0; +#X connect 22 0 27 0; +#X connect 23 0 22 0; +#X connect 23 0 32 0; +#X connect 28 0 29 0; +#X connect 28 1 20 0; +#X connect 31 0 27 0; +#X restore 62 243 pd fft; +#X obj 122 222 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 122 243 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X text 143 242 <-- repeatedly; +#X text 144 222 <-- graph once; +#N canvas 0 0 450 300 graph1 0; +#X array E09-signal 882 float 0; +#X coords 0 1.02 882 -1.02 200 80 1; +#X restore 433 28 graph; +#N canvas 0 0 450 300 graph1 0; +#X array E09-spectrum 259 float 0; +#X coords 0 0.51 258 -0.008 259 130 1; +#X restore 403 175 graph; +#X text 442 114 ---- 0.02 seconds ----; +#X text 433 306 2; +#X text 464 306 4; +#X text 403 306 0; +#X text 441 321 -- partial number --; +#X text 497 8 WAVEFORM; +#X text 497 157 SPECTRUM; +#X text 663 291 0; +#X text 664 173 0.5; +#X obj 93 117 osc~; +#X obj 93 86 r fundamental; +#X text 171 117 index (x100); +#X text 496 306 6; +#X text 529 306 8; +#X text 557 306 10; +#X text 589 306 12; +#X text 621 306 14; +#X text 43 3 SPECTRUM OF TWO-OPERATOR PHASE MODULATION; +#X floatatom 18 58 3 0 15 0 - - -; +#X obj 18 105 *; +#X obj 18 33 r cm; +#X text 52 57 carrier harmonic #; +#X text 71 367 This patch measures the spectrum of two-operator phase +modulation. The carrier frequency is initially six times the modulation +frequency \, but you can change it with the "carrier harmonic #" control. +Changing the index changes the relative strengths of the harmonics. +Past a certain index (which depends on the carrier frequency) the lower +sidebands begin to reflect about the left edge of the spectrum \, causing +complicated interference effects.; +#X connect 0 0 3 1; +#X connect 1 0 0 1; +#X connect 2 0 9 0; +#X connect 2 0 11 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 4 0; +#X connect 7 0 3 0; +#X connect 9 0 8 0; +#X connect 9 0 8 1; +#X connect 12 0 11 1; +#X connect 13 0 11 2; +#X connect 27 0 0 0; +#X connect 28 0 27 0; +#X connect 28 0 37 1; +#X connect 36 0 37 0; +#X connect 37 0 7 0; +#X connect 38 0 36 0; diff --git a/pd/doc/3.audio.examples/E09.bandlimited.pd b/pd/doc/3.audio.examples/E09.bandlimited.pd deleted file mode 100644 index f49bcb68..00000000 --- a/pd/doc/3.audio.examples/E09.bandlimited.pd +++ /dev/null @@ -1,166 +0,0 @@ -#N canvas 21 90 540 752 12; -#X floatatom 183 91; -#X obj 183 115 mtof; -#X floatatom 340 183; -#X obj 164 431 -~; -#N canvas 391 51 561 806 tables 1; -#X graph graph1 0 -1 1002 1 99 322 499 22; -#X array array1 1002 float; -#X pop; -#X graph graph1 0 -1 882 1 96 684 496 384; -#X array array2 882 float; -#X pop; -#X text 138 326 ---------------- 1002 samples ---------------; -#X text 150 693 ---------------- 0.02 sec ---------------; -#X restore 33 201 pd tables; -#N canvas 104 390 728 408 make-table 0; -#X obj 469 146 cos~; -#X obj 303 146 cos~; -#X obj 255 141 cos~; -#X msg 199 210 bang; -#X obj 255 229 tabwrite~ array1; -#X text 366 79 period is 2000 samples \, twice the table length; -#X msg 94 94 \; pd dsp 1; -#X text 118 286 this network puts a half cycle of a band-limited square wave into the table "array1."; -#X text 114 335 logically the half-cycle is in samples 1 through 1000 \; samples 0 and 1001 are provided so that the 4-point interpolation will work everywhere.; -#X text 401 57 back the phase up one sample; -#X msg 336 56 -0.0005; -#X obj 171 16 loadbang; -#X obj 303 120 *~ 3; -#X obj 468 122 *~ 5; -#X obj 303 171 *~ 0.33333; -#X obj 468 172 *~ -0.2; -#X obj 255 169 *~ -1; -#X msg 171 38 bang; -#X obj 254 80 phasor~ 22.05; -#X obj 255 202 *~ 0.57692; -#X connect 0 0 15 0; -#X connect 1 0 14 0; -#X connect 2 0 16 0; -#X connect 3 0 4 0; -#X connect 10 0 18 1; -#X connect 11 0 17 0; -#X connect 12 0 1 0; -#X connect 13 0 0 0; -#X connect 14 0 19 0; -#X connect 15 0 19 0; -#X connect 16 0 19 0; -#X connect 17 0 10 0; -#X connect 17 0 6 0; -#X connect 17 0 3 0; -#X connect 18 0 2 0; -#X connect 18 0 12 0; -#X connect 18 0 13 0; -#X connect 19 0 4 0; -#X restore 34 224 pd make-table; -#X obj 183 163 sig~; -#X obj 341 283 /~; -#X obj 357 256 clip~ 1 999999; -#X obj 183 218 phasor~; -#X obj 196 301 *~; -#X obj 196 325 clip~ -0.5 0.5; -#X floatatom 183 139; -#X obj 196 397 tabread4~ array1; -#X floatatom 340 135; -#X obj 340 206 * 0.33333; -#X obj 340 159 mtof; -#X text 374 110 band limit (MIDI units); -#X text 220 78 pitch; -#X obj 340 87 loadbang; -#X msg 340 111 130; -#X obj 340 230 sig~; -#X text 246 139 frequency; -#X obj 196 349 *~ 1000; -#X obj 196 373 +~ 501; -#X obj 183 242 -~ 0.5; -#X floatatom 206 441; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 177 469 pd output; -#X msg 235 441 MUTE; -#X text 276 440 <-- output amplitude; -#X text 27 503 Patch to make an approximately band-limited sawtooth. This is useful if you intend to use sawtooth generators above about 200 Hz. \, perhaps to use any of the techniques shown in the previous four patches.; -#X text 28 562 We generate a perfect square wave at Nyquist/6 \; this will have partials 1 \, 3 \, and 5 \, but the Nyquist frequency at partial 6 will cut off the rest of the partials. This is stored in array1 using the "make-table" subpatch.; -#X text 64 34 BAND-LIMITED SAWTOOTH GENERATOR; -#X obj 43 459 tabwrite~ array2; -#X msg 44 435 bang; -#X text 28 632 Now any time we wish to make a discontinuity in the output signal \, we make it look exactly like the bandlimited square wave looks. We do this by reading through the table we recorded \, carefully adding a "digital" \, non-band-limited \, sawtooth to "array1" so that the discontinuities in the two cancel out and what you have left is the transition in the table.; -#X text 338 737 updated for Pd version 0.26; -#X text 41 409 graph output; -#X connect 0 0 1 0; -#X connect 1 0 12 0; -#X connect 2 0 15 0; -#X connect 3 0 27 0; -#X connect 3 0 33 0; -#X connect 6 0 8 0; -#X connect 6 0 9 0; -#X connect 7 0 10 1; -#X connect 8 0 7 1; -#X connect 9 0 25 0; -#X connect 10 0 11 0; -#X connect 11 0 23 0; -#X connect 12 0 6 0; -#X connect 13 0 3 0; -#X connect 14 0 16 0; -#X connect 15 0 21 0; -#X connect 16 0 2 0; -#X connect 19 0 20 0; -#X connect 20 0 14 0; -#X connect 21 0 7 0; -#X connect 23 0 24 0; -#X connect 24 0 13 0; -#X connect 25 0 10 0; -#X connect 25 0 3 1; -#X connect 26 0 27 1; -#X connect 27 0 26 0; -#X connect 28 0 27 2; -#X connect 34 0 33 0; diff --git a/pd/doc/3.audio.examples/E10.complex.FM.pd b/pd/doc/3.audio.examples/E10.complex.FM.pd new file mode 100644 index 00000000..094d68ed --- /dev/null +++ b/pd/doc/3.audio.examples/E10.complex.FM.pd @@ -0,0 +1,156 @@ +#N canvas 165 123 695 505 12; +#X obj 94 247 *~; +#X obj 109 223 line~; +#X obj 18 179 cos~; +#X obj 18 154 +~; +#X obj 109 200 pack 0 50; +#X floatatom 109 152 0 0 300 0 - - -; +#X obj 109 176 / 100; +#X obj 18 129 phasor~; +#X obj 20 340 output~; +#X obj 19 309 hip~; +#X text 437 472 updated for Pd version 0.37; +#N canvas 62 299 558 609 fft 0; +#X obj 19 61 inlet~; +#X obj 208 212 inlet; +#X obj 29 92 rfft~; +#X obj 29 125 *~; +#X obj 60 125 *~; +#X obj 29 155 sqrt~; +#X obj 332 109 block~ 4096 1; +#X obj 29 181 biquad~ 0 0 0 0 1; +#X text 93 93 Fourier series; +#X text 98 146 magnitude; +#X text 96 131 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 193 164 delay two samples; +#X text 191 182 for better graphing; +#X obj 16 425 samplerate~; +#X obj 16 402 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X floatatom 16 472 5 0 0 0 - - -; +#X obj 16 448 / 256; +#X obj 16 378 loadbang; +#X obj 72 494 s fundamental; +#X text 14 319 At load time \, calculate a good choice of fundamental +frequency for showing spectra: the 16th bin in a 4096-point spectrum +\, so SR*16/4096 or SR/256.; +#X obj 220 257 metro 500; +#X obj 220 234 inlet; +#X text 273 232 toggle to graph repeatedly; +#X text 262 212 bang to graph once; +#X obj 16 494 t b f; +#X obj 19 295 tabwrite~ E10-signal; +#X obj 208 295 tabwrite~ E10-spectrum; +#X text 72 536 set carrier multiplier and modulation multipliers after +fundamental; +#X msg 16 516 \; cm 8 \; m1 2 \; m2 3; +#X connect 0 0 2 0; +#X connect 0 0 27 0; +#X connect 1 0 27 0; +#X connect 1 0 28 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 28 0; +#X connect 15 0 18 0; +#X connect 16 0 15 0; +#X connect 17 0 26 0; +#X connect 18 0 17 0; +#X connect 19 0 16 0; +#X connect 22 0 27 0; +#X connect 22 0 28 0; +#X connect 23 0 22 0; +#X connect 26 0 30 0; +#X connect 26 1 20 0; +#X restore 65 311 pd fft; +#X obj 125 290 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 125 311 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X text 146 310 <-- repeatedly; +#X text 147 290 <-- graph once; +#N canvas 0 0 450 300 graph1 0; +#X array E10-spectrum 259 float 0; +#X coords 0 2100 258 -20 259 130 1; +#X restore 396 122 graph; +#X text 426 253 2; +#X text 457 253 4; +#X text 396 253 0; +#X text 434 268 -- partial number --; +#X text 490 104 SPECTRUM; +#X text 656 238 0; +#X text 657 120 0.5; +#X obj 93 128 osc~; +#X obj 267 79 r fundamental; +#X text 489 253 6; +#X text 522 253 8; +#X text 550 253 10; +#X text 582 253 12; +#X text 614 253 14; +#X floatatom 18 58 3 0 15 0 - - -; +#X obj 18 105 *; +#X obj 18 33 r cm; +#X text 43 3 SPECTRUM OF COMPLEX PHASE MODULATION; +#X text 23 73 carrier; +#X obj 93 107 *; +#X floatatom 93 60 3 0 15 0 - - -; +#X text 99 74 mod 1; +#X obj 93 35 r m1; +#X text 138 154 index1; +#X obj 197 249 *~; +#X obj 212 225 line~; +#X obj 212 202 pack 0 50; +#X floatatom 212 154 0 0 300 0 - - -; +#X obj 212 178 / 100; +#X obj 196 130 osc~; +#X obj 196 109 *; +#X floatatom 196 62 3 0 15 0 - - -; +#X text 202 76 mod 2; +#X text 246 154 index2; +#X obj 196 37 r m2; +#X text 126 349 Now we introduce a second modulator oscillator. The +carrier is on the 8th harmonic and the two modulators are at 2 and +3 times the fundamental. When either index of modulation is zero \, +changing the other index gives the familiar 2-operator FM result. But +if index2 is nonzero (try around 10 \, for example) then sliding index1 +upward from 0 introduces sidebands around each of the sidebands.; +#X connect 0 0 3 1; +#X connect 1 0 0 1; +#X connect 2 0 9 0; +#X connect 2 0 11 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 4 0; +#X connect 7 0 3 0; +#X connect 9 0 8 0; +#X connect 9 0 8 1; +#X connect 12 0 11 1; +#X connect 13 0 11 2; +#X connect 24 0 0 0; +#X connect 25 0 32 1; +#X connect 25 0 36 1; +#X connect 25 0 47 1; +#X connect 31 0 32 0; +#X connect 32 0 7 0; +#X connect 33 0 31 0; +#X connect 36 0 24 0; +#X connect 37 0 36 0; +#X connect 39 0 37 0; +#X connect 41 0 3 1; +#X connect 42 0 41 1; +#X connect 43 0 42 0; +#X connect 44 0 45 0; +#X connect 45 0 43 0; +#X connect 46 0 41 0; +#X connect 47 0 46 0; +#X connect 48 0 47 0; +#X connect 51 0 48 0; diff --git a/pd/doc/3.audio.examples/F01.PART7.filters.pd b/pd/doc/3.audio.examples/F01.PART7.filters.pd deleted file mode 100644 index 4a64a0b5..00000000 --- a/pd/doc/3.audio.examples/F01.PART7.filters.pd +++ /dev/null @@ -1,72 +0,0 @@ -#N canvas 124 28 964 549 12; -#X floatatom 20 391; -#X floatatom 297 394; -#X floatatom 210 394; -#X graph graph1 0 -1 400 1 544 335 944 35; -#X array orig 400 float; -#X array lop 400 float; -#X array hip 400 float; -#X array bp 400 float; -#X pop; -#X obj 334 457 r metro; -#X obj 180 322 hip~ 100; -#X obj 105 320 lop~ 100; -#X obj 273 322 bp~ 100 10; -#X floatatom 255 245; -#X floatatom 338 295; -#X floatatom 118 393; -#X text 9 11 Filters; -#X msg 87 130 \; pd dsp 1 \; metro bang; -#X msg 191 135 \; pd dsp 0; -#X text 15 417 Original; -#X text 122 417 Low pass; -#X text 210 417 High pass; -#X text 298 416 Band pass; -#X obj 14 517 tabwrite~ orig; -#X obj 309 520 tabwrite~ bp; -#X obj 213 520 tabwrite~ hip; -#X obj 116 519 tabwrite~ lop; -#X text 97 110 start; -#X text 193 111 stop; -#X floatatom 14 235; -#X obj 14 261 osc~ 440; -#X text 51 236 <-- change frequency; -#X text 294 247 <-- center/rolloff frequency; -#X text 374 297 <-- Q; -#X text 548 341 This graph holds 4 arrays for the input and three filter outputs.; -#X text 375 389 RMS amplitudes of the original signal and the three filter outputs; -#X text 746 536 updated for Pd version 0.26; -#X obj 334 482 metro 1000; -#X text 29 33 Pd provides low \, high \, and band pass filters \, as shown here. By changing the test frequency \, the filter frequency \, and the "Q" value \, you can see how these filters affect the amplitude and phase of incoming signals; -#X obj 20 366 env~ 4096; -#X obj 118 368 env~ 4096; -#X obj 210 369 env~ 4096; -#X obj 297 369 env~ 4096; -#X obj 91 213 print~; -#X text 456 434 Notice how the phase of the graphed sinusoids slips back and forth... this is because graphing always starts on the nearest 64-sample boundary to the time the metronome fires. If you run at 48K the slippage disappears \, because then the metronome fires every 48K samples \, which is a multiple of 64; -#X connect 4 0 32 0; -#X connect 5 0 20 0; -#X connect 5 0 36 0; -#X connect 6 0 21 0; -#X connect 6 0 35 0; -#X connect 7 0 19 0; -#X connect 7 0 37 0; -#X connect 8 0 6 1; -#X connect 8 0 5 1; -#X connect 8 0 7 1; -#X connect 9 0 7 2; -#X connect 24 0 25 0; -#X connect 25 0 18 0; -#X connect 25 0 6 0; -#X connect 25 0 5 0; -#X connect 25 0 7 0; -#X connect 25 0 34 0; -#X connect 25 0 38 0; -#X connect 32 0 18 0; -#X connect 32 0 21 0; -#X connect 32 0 20 0; -#X connect 32 0 19 0; -#X connect 34 0 0 0; -#X connect 35 0 10 0; -#X connect 36 0 2 0; -#X connect 37 0 1 0; diff --git a/pd/doc/3.audio.examples/F01.pulse.pd b/pd/doc/3.audio.examples/F01.pulse.pd new file mode 100644 index 00000000..5ef7e862 --- /dev/null +++ b/pd/doc/3.audio.examples/F01.pulse.pd @@ -0,0 +1,82 @@ +#N canvas 15 126 835 625 12; +#X obj 272 163 line~; +#X floatatom 53 64 0 0 0 0 - - -; +#X obj 30 315 cos~; +#N canvas 0 0 450 300 graph1 0; +#X array pulse-output 882 float 0; +#X coords 0 1.02 882 -1.02 200 130 1; +#X restore 583 409 graph; +#X obj 53 91 phasor~ 0; +#X obj 272 139 pack 0 50; +#X floatatom 272 90 0 0 100 0 - - -; +#X text 50 43 frequency; +#X obj 53 115 -~ 0.5; +#X obj 53 207 *~; +#X obj 272 114 / 10; +#X obj 30 265 clip~ -0.5 0.5; +#X obj 30 418 hip~ 5; +#N canvas 0 0 450 300 graph1 0; +#X array phase-output 882 float 0; +#X coords 0 1.02 882 -1.02 200 60 1; +#X restore 583 150 graph; +#N canvas 0 0 450 300 graph1 0; +#X array clip-output 882 float 0; +#X coords 0 1.02 882 -1.02 200 130 1; +#X restore 583 272 graph; +#X text 113 114 phase -1/2 to 1/2; +#X text 139 91 phase 0 to 1; +#X text 119 5 PULSE GENERATOR; +#X obj 19 234 tabwrite~ phase-output; +#X obj 19 393 tabwrite~ pulse-output; +#X text 103 419 high pass filter to cut DC; +#X text 319 115 fix range; +#X text 326 164 smooth it; +#X text 314 187 add 1; +#X text 41 148 <-- click to graph; +#X text 83 209 increase amplitude; +#X text 164 264 clip back to range -1/2 to 1/2; +#X text 90 316 cosine wave lookup (-1/2 and 1/2 give -1); +#X obj 272 188 +~ 1; +#X obj 19 292 tabwrite~ clip-output; +#X text 585 539 ---- 0.02 seconds ----; +#X obj 19 148 bng 20 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 30 446 output~; +#X obj 30 338 +~ 1; +#X obj 30 361 *~ 0.5; +#X text 574 589 updated for Pd version 0.37; +#X text 88 337 add one (range now from 0 to 2); +#X text 96 360 ...and now from 0 to 1; +#X text 20 531 This patch computes a pulse train \, with an "index" +control that essentually squeezes the pulses. If "bandwidth" is zero +you get a pure cosine wave \, and for larger values of the bandwidth +\, the cosine wave is squeezed to fill smaller portions of the waveform. +; +#X text 269 71 index; +#X text 790 142 0.5; +#X text 787 198 -0.5; +#X text 785 264 1; +#X text 787 390 -1; +#X text 785 405 1; +#X text 786 528 -1; +#X connect 0 0 28 0; +#X connect 1 0 4 0; +#X connect 2 0 33 0; +#X connect 4 0 8 0; +#X connect 5 0 0 0; +#X connect 6 0 10 0; +#X connect 8 0 9 0; +#X connect 9 0 11 0; +#X connect 9 0 18 0; +#X connect 10 0 5 0; +#X connect 11 0 2 0; +#X connect 11 0 29 0; +#X connect 12 0 32 0; +#X connect 12 0 32 1; +#X connect 28 0 9 1; +#X connect 31 0 18 0; +#X connect 31 0 29 0; +#X connect 31 0 19 0; +#X connect 33 0 34 0; +#X connect 34 0 19 0; +#X connect 34 0 12 0; diff --git a/pd/doc/3.audio.examples/F02.bandpass.pd b/pd/doc/3.audio.examples/F02.bandpass.pd deleted file mode 100644 index 0ce9cc47..00000000 --- a/pd/doc/3.audio.examples/F02.bandpass.pd +++ /dev/null @@ -1,146 +0,0 @@ -#N canvas 58 17 943 765 12; -#X floatatom 91 731 0 0 0; -#X graph graph1 0 -1 155947 1 624 401 824 251; -#X array array1 155948 float 0; -#X pop; -#X floatatom 247 705 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 406 192 t b; -#X obj 406 132 f; -#X obj 406 72 inlet; -#X text 413 35 mute; -#X obj 406 222 f; -#X msg 510 214 0; -#X msg 406 102 bang; -#X obj 406 162 moses 1; -#X obj 510 184 t b f; -#X obj 476 140 moses 1; -#X obj 100 178 dbtorms; -#X obj 476 110 r master-lvl; -#X obj 100 50 r master-lvl; -#X obj 406 252 s master-lvl; -#X obj 26 217 inlet~; -#X obj 239 49 inlet; -#X text 239 22 level; -#X obj 239 120 s master-lvl; -#X msg 115 78 set \$1; -#X obj 115 107 outlet; -#X msg 257 77 \; pd dsp 1; -#X obj 100 233 line~; -#X obj 26 254 *~; -#X obj 26 289 dac~; -#X obj 100 205 pack 0 50; -#X text 24 190 audio; -#X text 112 132 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 210 740 pd output; -#X msg 280 707 MUTE; -#X text 320 706 <-- output amplitude; -#X obj 206 654 hip~ 5; -#X obj 31 545 tabread4~ array1; -#X obj 31 340 r totsamps; -#X obj 31 430 /; -#X obj 206 625 bp~; -#X obj 206 596 bp~; -#X obj 216 463 mtof; -#X floatatom 216 491 0 0 0; -#X floatatom 319 570 0 0 0; -#X obj 319 541 r q; -#X floatatom 216 434 0 0 0; -#X msg 227 550 \; p set \$1; -#X obj 216 406 r p; -#X obj 90 647 env~ 4096; -#X obj 31 487 *~ 0; -#X obj 31 458 phasor~ 0; -#X obj 31 516 +~ 1; -#X obj 227 521 ftom; -#X msg 826 49 \; pd dsp 0; -#X obj 90 674 + 0.5; -#X obj 91 702 int; -#X msg 31 400 44100; -#X obj 31 368 t b f; -#X text 648 14 START; -#X text 845 19 STOP; -#X text 88 11 BANDPASS FILTERS; -#X text 12 41 In this example we use two cascaded bandpass filters -to troll for partials in Jonathan Harvey's famous bell sample.; -#X obj 78 487 r totsamps; -#X text 14 82 Note that filters can give unexpected level changes. -The bp~ object is designed to have roughly unit gain at teh pass band -\, so the higher you set "Q" the more amplitude is lost. YOu can correct -for this by pushing the output amplitude \, but be sure to remember -to reset the output amplitude before you reduce Q again. I set the -Q to 100 and the output amplitude to 110 or 120 (with the room gain -way down.) Then holding the shift key \, slowly drag the center pitch -upward listening for modes.; -#X text 16 233 You can hear partials around 48 \, 51.3 \, 55 (faint!) -\, 57 (fainter!) \, 60 \, two beating partials around 65 \, 67 \, 69 -\, 70.9 \, 71.75 \, 72.6 \, 74 \, 74.65 \, 75.6 \, 77 \, 81.2 \, 84.6 -\, 86.5 \, and probably many more. There's also one down at 36 \, but -it's easier to see it on the meter than hear it.; -#X text 271 436 <-- center pitch; -#X text 281 450 (shift-drag to fine tune); -#X text 292 492 <-- center frequency; -#X text 359 570 <-- Q (filter selectivity); -#X obj 683 453 r readfile; -#X obj 683 530 soundfiler; -#X msg 683 503 read -resize \$1 array1; -#X obj 683 478 symbol; -#X msg 553 48 \; readfile ../sound/bell.aiff \; totsamps 143718 \; -p 69 \; q 0 \; pd dsp 1; -#X text 681 739 updated for Pd version 0.33; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 6 0 3 0; -#X connect 7 0 11 0; -#X connect 8 0 28 0; -#X connect 9 0 21 0; -#X connect 10 0 6 0; -#X connect 10 0 19 0; -#X connect 11 0 10 0; -#X connect 12 0 13 0; -#X connect 13 0 11 1; -#X connect 13 0 10 1; -#X connect 13 0 23 0; -#X connect 14 0 11 2; -#X connect 14 0 10 2; -#X connect 15 0 14 0; -#X connect 16 0 12 0; -#X connect 18 0 16 0; -#X connect 19 0 25 0; -#X connect 20 0 22 0; -#X connect 21 0 20 0; -#X connect 22 0 7 0; -#X connect 23 0 17 0; -#X connect 25 0 26 0; -#X connect 26 0 0 0; -#X connect 27 0 9 0; -#X connect 28 0 27 0; -#X connect 28 1 9 1; -#X connect 33 0 20 1; -#X connect 40 0 43 0; -#X connect 42 0 41 0; -#X connect 43 0 42 0; diff --git a/pd/doc/3.audio.examples/F02.just.say.pd b/pd/doc/3.audio.examples/F02.just.say.pd new file mode 100644 index 00000000..b82b4953 --- /dev/null +++ b/pd/doc/3.audio.examples/F02.just.say.pd @@ -0,0 +1,152 @@ +#N canvas 32 67 900 421 12; +#X obj 39 247 cos~; +#X graph graph1 0 -1.02 44100 1.02 452 206 652 76; +#X array env-output 44100 float 0; +#X pop; +#X floatatom 71 305 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 39 333 pd output; +#X msg 115 306 MUTE; +#X msg 162 93 bang; +#X text 203 93 <-- click to graph; +#X obj 39 168 -~ 0.5; +#X obj 39 192 *~; +#X obj 39 219 clip~ -0.5 0.5; +#X obj 39 274 hip~ 5; +#X obj 126 60 *~; +#X floatatom 205 142 0 0 0; +#X floatatom 205 168 0 0 0; +#X obj 126 27 phasor~ -4; +#X obj 126 191 +~ 0.5; +#X obj 162 117 tabwrite~ env-output; +#X text 451 211 --------- 1 second ---------; +#X floatatom 205 194 0 0 0; +#X obj 126 142 lop~ 130; +#N canvas 168 232 351 420 freq 0; +#X obj 180 176 t f f; +#X obj 181 202 *; +#X obj 60 320 line 0 30; +#X obj 90 132 t b b; +#X obj 90 107 metro 100; +#X obj 61 287 pack; +#X obj 60 376 outlet; +#X floatatom 89 82 0 0 0; +#X floatatom 54 243 0 0 0; +#X floatatom 94 248 0 0 0; +#X obj 60 348 pack 0 30; +#X obj 55 202 + 150; +#X obj 88 34 loadbang; +#X msg 89 58 1; +#X obj 56 175 random 300; +#X obj 181 226 + 100; +#X obj 179 152 random 35; +#X connect 0 0 1 0; +#X connect 0 1 1 1; +#X connect 1 0 15 0; +#X connect 2 0 10 0; +#X connect 3 0 14 0; +#X connect 3 1 16 0; +#X connect 4 0 3 0; +#X connect 5 0 2 0; +#X connect 7 0 4 0; +#X connect 8 0 5 0; +#X connect 9 0 5 1; +#X connect 10 0 6 0; +#X connect 11 0 8 0; +#X connect 12 0 13 0; +#X connect 13 0 7 0; +#X connect 14 0 11 0; +#X connect 15 0 4 1; +#X connect 15 0 9 0; +#X connect 16 0 0 0; +#X restore 38 94 pd freq; +#X obj 39 119 line~; +#X obj 39 144 phasor~; +#X text 225 19 negative frequency; +#X text 226 35 makes falling sawtooth; +#X text 155 59 square it to make a curve; +#X text 245 152 you can; +#X text 243 170 adjust these; +#X text 247 189 values; +#X text 334 250 We interrupt this series of patches to bring you an +important message from Nancy Reagan. If \, anywhere \, at any time +\, someone offers you an illicit drug \, just say one word in reply... +; +#X text 334 313 Now that I'm sure you've heard this important message +\, we can return to the essentially frivolous occupation of making +turn-of-the-millenium western art music.; +#X obj 126 165 *~ 6; +#X text 561 384 updated for Pd version 0.34; +#X text 156 305 <-- output; +#X connect 0 0 10 0; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 5 0 16 0; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 0 0; +#X connect 10 0 3 0; +#X connect 11 0 16 0; +#X connect 11 0 19 0; +#X connect 12 0 19 1; +#X connect 13 0 31 1; +#X connect 14 0 11 0; +#X connect 14 0 11 1; +#X connect 15 0 8 1; +#X connect 18 0 15 1; +#X connect 19 0 31 0; +#X connect 20 0 21 0; +#X connect 21 0 22 0; +#X connect 22 0 7 0; +#X connect 31 0 15 0; diff --git a/pd/doc/3.audio.examples/F03.filter.sweep.pd b/pd/doc/3.audio.examples/F03.filter.sweep.pd deleted file mode 100644 index 0d478275..00000000 --- a/pd/doc/3.audio.examples/F03.filter.sweep.pd +++ /dev/null @@ -1,173 +0,0 @@ -#N canvas 194 58 693 586 12; -#X text 437 559 updated for Pd version 0.26; -#X floatatom 70 539 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 41 567 pd output; -#X msg 99 539 MUTE; -#X text 138 538 <-- output amplitude; -#X obj 41 212 line~; -#X floatatom 41 164 0 0 0; -#X obj 41 188 pack 0 100; -#X obj 528 110 loadbang; -#X text 35 6 SWEEPING FILTERS; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 302 48 graph; -#X text 504 141 0; -#X text 506 41 10; -#X text 321 151 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 309 225 graph; -#X text 319 333 ------ 130 samples ------; -#X text 518 318 0; -#X text 520 218 12000; -#X restore 461 256 pd conversion-tables; -#X obj 41 260 phasor~; -#X obj 41 236 tabread4~ mtof; -#X obj 174 384 +~; -#X obj 190 361 line~; -#X obj 190 337 pack 0 100; -#X floatatom 190 313 0 0 0; -#X floatatom 174 164 0 0 0; -#X floatatom 197 238 0 0 0; -#X obj 41 140 r pitch; -#X obj 197 214 r depth; -#X obj 174 140 r speed; -#X obj 190 289 r offset; -#X obj 121 465 r q; -#X floatatom 121 489 0 0 0; -#X obj 41 484 vcf~; -#X obj 41 508 hip~ 5; -#X obj 174 263 *~ 0; -#X obj 174 188 phasor~ 0; -#X obj 174 408 tabread4~ mtof; -#X msg 528 134 \; pitch 48 \; speed -2 \; depth 27 \; offset 56 \; -q 2; -#X text 160 490 <-- Q (selectivity); -#X text 51 277 sawtooth; -#X text 50 291 oscillator; -#X text 228 167 <-- sweep speed; -#X text 265 189 LFO for sweep; -#X text 251 241 <-- sweep depth; -#X text 242 316 <-- base center frequency; -#X text 218 383 add base to sweep; -#X text 307 408 convert to Hz.; -#X text 13 28 If you want actively changing center frequencies \, use -"vcf~" instead of "bp~". The vcf~ module takes an audio signal to set -center frequency. (Q is still set by messages though.) Vcf is somewhat -more expensive than bp~.; -#X text 78 165 <-- pitch; -#X text 13 95 Note the effect of negative and positive sweep speed. -; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 12 0; -#X connect 6 0 7 0; -#X connect 7 0 5 0; -#X connect 8 0 30 0; -#X connect 11 0 25 0; -#X connect 12 0 11 0; -#X connect 13 0 29 0; -#X connect 14 0 13 1; -#X connect 15 0 14 0; -#X connect 16 0 15 0; -#X connect 17 0 28 0; -#X connect 18 0 27 1; -#X connect 19 0 6 0; -#X connect 20 0 18 0; -#X connect 21 0 17 0; -#X connect 22 0 16 0; -#X connect 23 0 24 0; -#X connect 24 0 25 2; -#X connect 25 0 26 0; -#X connect 26 0 2 0; -#X connect 27 0 13 0; -#X connect 28 0 27 0; -#X connect 29 0 25 1; diff --git a/pd/doc/3.audio.examples/F03.pulse.spectrum.pd b/pd/doc/3.audio.examples/F03.pulse.spectrum.pd new file mode 100644 index 00000000..1d04bf85 --- /dev/null +++ b/pd/doc/3.audio.examples/F03.pulse.spectrum.pd @@ -0,0 +1,126 @@ +#N canvas 227 143 860 515 12; +#X obj 189 166 line~; +#X obj 42 187 cos~; +#X obj 189 142 pack 0 50; +#X floatatom 189 41 0 0 100 0 - - -; +#X obj 43 114 -~ 0.5; +#X obj 43 140 *~; +#X obj 189 67 / 10; +#X obj 189 91 moses 0; +#X msg 189 115 0; +#X obj 42 163 clip~ -0.5 0.5; +#X text 184 23 bandwidth; +#X obj 189 191 +~ 1; +#X obj 42 211 +~ 1; +#X text 63 1 PULSE SPECTRUM MEASUREMENT; +#X text 14 357 Here is a measured amplitude spectrum for the pulse +train. Nutice that \, other than a smallish spillover \, the energy +sits in one "lobe" whose changing width justifies our calling the squeeze +factor the "bandwidth."; +#X text 16 428 The spectrum is in units of amplitude. THe sidelobes +\, although they look small \, are actually only about 34 dB down. +You can design more complicated pulse trains \, little Blackman window +functions \, which control the sidelobes much better.; +#X obj 42 293 output~; +#X obj 41 262 hip~; +#N canvas 122 211 558 609 fft 0; +#X obj 19 61 inlet~; +#X obj 208 212 inlet; +#X obj 29 92 rfft~; +#X obj 29 125 *~; +#X obj 60 125 *~; +#X obj 29 155 sqrt~; +#X obj 332 109 block~ 4096 1; +#X obj 29 181 biquad~ 0 0 0 0 1; +#X text 93 93 Fourier series; +#X text 98 146 magnitude; +#X text 96 131 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 193 164 delay two samples; +#X text 191 182 for better graphing; +#X obj 264 434 samplerate~; +#X obj 264 457 / 256; +#X obj 238 261 metro 500; +#X obj 238 238 inlet; +#X text 291 236 toggle to graph repeatedly; +#X text 262 212 bang to graph once; +#X obj 29 205 /~ 4096; +#X obj 19 295 tabwrite~ F03-signal; +#X obj 235 299 tabwrite~ F03-spectrum; +#X obj 264 409 bang~; +#X msg 209 322 \; pd dsp 1; +#X obj 264 482 s freq; +#X connect 0 0 2 0; +#X connect 0 0 22 0; +#X connect 1 0 22 0; +#X connect 1 0 23 0; +#X connect 1 0 25 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 21 0; +#X connect 15 0 16 0; +#X connect 16 0 26 0; +#X connect 17 0 22 0; +#X connect 17 0 23 0; +#X connect 18 0 17 0; +#X connect 18 0 25 0; +#X connect 21 0 23 0; +#X connect 24 0 15 0; +#X restore 95 264 pd fft; +#X obj 155 243 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 155 264 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X text 176 263 <-- repeatedly; +#X text 177 243 <-- graph once; +#X obj 42 235 *~ 0.5; +#X obj 43 90 phasor~; +#N canvas 0 0 450 300 graph1 0; +#X array F03-signal 882 float 0; +#X coords 0 1.02 882 -1.02 200 130 1; +#X restore 640 321 graph; +#N canvas 0 0 450 300 graph1 0; +#X array F03-spectrum 259 float 0; +#X coords 0 0.51 258 -0.008 256 130 1; +#X restore 579 99 graph; +#X text 640 454 ---- 0.02 seconds ----; +#X text 608 230 2; +#X text 639 230 4; +#X text 578 230 0; +#X text 616 245 -- partial number --; +#X text 671 230 6; +#X text 704 230 8; +#X text 732 230 10; +#X text 764 230 12; +#X text 796 230 14; +#X text 605 488 updated for Pd version 0.37; +#X obj 43 63 r freq; +#X connect 0 0 11 0; +#X connect 1 0 12 0; +#X connect 2 0 0 0; +#X connect 3 0 6 0; +#X connect 4 0 5 0; +#X connect 5 0 9 0; +#X connect 6 0 7 0; +#X connect 7 0 8 0; +#X connect 7 1 2 0; +#X connect 8 0 2 0; +#X connect 9 0 1 0; +#X connect 11 0 5 1; +#X connect 12 0 23 0; +#X connect 17 0 16 0; +#X connect 17 0 16 1; +#X connect 19 0 18 1; +#X connect 20 0 18 2; +#X connect 23 0 17 0; +#X connect 23 0 18 0; +#X connect 24 0 4 0; +#X connect 38 0 24 0; diff --git a/pd/doc/3.audio.examples/F04.filter.floyd.pd b/pd/doc/3.audio.examples/F04.filter.floyd.pd deleted file mode 100644 index 02027117..00000000 --- a/pd/doc/3.audio.examples/F04.filter.floyd.pd +++ /dev/null @@ -1,193 +0,0 @@ -#N canvas 133 190 795 593 12; -#X floatatom 44 540 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 15 568 pd output; -#X msg 90 540 MUTE; -#X text 151 539 <-- output amplitude; -#X obj 487 217 loadbang; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 302 48 graph; -#X text 504 141 0; -#X text 506 41 10; -#X text 321 151 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 309 225 graph; -#X text 319 333 ------ 130 samples ------; -#X text 518 318 0; -#X text 520 218 12000; -#X restore 490 428 pd conversion-tables; -#X obj 250 308 line~; -#X obj 250 284 pack 0 100; -#X floatatom 251 213 0 0 0; -#X obj 171 413 r q; -#X floatatom 171 437 0 0 0; -#X obj 15 492 vcf~; -#X obj 15 516 hip~ 5; -#X obj 250 333 tabread4~ mtof; -#X text 214 436 <-- Q (selectivity); -#X text 277 354 convert to Hz.; -#X text 35 6 ANOTHER SWEEPING FILTER EXAMPLE; -#X obj 15 286 clip~ 0 0.5; -#X obj 15 310 *~ 2; -#X obj 15 334 -~; -#X text 121 270 trick to; -#X text 121 291 make symmetric; -#X text 121 312 triangle wave; -#X obj 31 161 f; -#X obj 64 159 + 1; -#X obj 31 211 tabread array1; -#X obj 31 235 mtof; -#X obj 31 113 r metro; -#X obj 64 183 mod 8; -#X obj 31 259 phasor~ 0; -#N canvas 0 0 450 300 graph1 0; -#X array array1 8 float 0; -#X coords 0 96 8 36 200 100 1; -#X restore 464 75 graph; -#X obj 251 189 r cf; -#X text 293 210 <-- center frequency; -#X obj 31 137 metro 85; -#X obj 15 376 hip~ 5000; -#X obj 15 399 *~ 100; -#X obj 252 237 moses 61; -#X msg 251 260 61; -#X msg 487 241 \; cf 61 \; q 30 \; metro 1 \; array1 0 45 48 50 48 -55 53 55 57; -#X text 13 28 Here's an approximate reconstruction of an old riff by -Pink Floyd (I haven't checked the tempo or transposition against the -original yet.) Because we're filtering a waveform with odd partials -\, it's easier to pick out the partials in the filtered sound.; -#X text 104 352 Here we fudge; -#X text 100 371 to better imitate; -#X text 100 390 the EMS3 bandpass; -#X text 85 403 sound; -#X text 340 231 protect against; -#X text 341 252 hitting the; -#X text 341 271 fundamental; -#X text 137 139 sequencer for; -#X text 137 158 8 note loop; -#X obj 171 459 moses 1; -#X msg 144 459 1; -#X text 241 460 speaker protection; -#X text 437 558 updated for Pd version 0.35; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 38 0; -#X connect 6 0 13 0; -#X connect 7 0 6 0; -#X connect 8 0 36 0; -#X connect 9 0 10 0; -#X connect 10 0 49 0; -#X connect 11 0 12 0; -#X connect 12 0 1 0; -#X connect 13 0 11 1; -#X connect 17 0 18 0; -#X connect 18 0 19 0; -#X connect 19 0 34 0; -#X connect 23 0 24 0; -#X connect 23 0 25 0; -#X connect 24 0 28 0; -#X connect 25 0 26 0; -#X connect 26 0 29 0; -#X connect 27 0 33 0; -#X connect 28 0 23 1; -#X connect 29 0 17 0; -#X connect 29 0 19 1; -#X connect 31 0 8 0; -#X connect 33 0 23 0; -#X connect 34 0 35 0; -#X connect 35 0 11 0; -#X connect 36 0 37 0; -#X connect 36 1 7 0; -#X connect 37 0 7 0; -#X connect 49 0 50 0; -#X connect 49 1 11 2; -#X connect 50 0 11 2; diff --git a/pd/doc/3.audio.examples/F04.waveshaping.pulse.pd b/pd/doc/3.audio.examples/F04.waveshaping.pulse.pd new file mode 100644 index 00000000..5724aeba --- /dev/null +++ b/pd/doc/3.audio.examples/F04.waveshaping.pulse.pd @@ -0,0 +1,133 @@ +#N canvas 240 229 900 586 12; +#X obj 220 171 line~; +#X obj 220 147 pack 0 50; +#X floatatom 220 46 0 0 0 0 - - -; +#X obj 70 108 *~; +#X obj 220 72 / 10; +#X obj 220 96 moses 0; +#X msg 220 120 0; +#X text 215 28 bandwidth; +#X obj 78 141 *~; +#X obj 18 141 sig~ 1; +#X obj 39 194 /~; +#X obj 54 168 +~; +#X text 111 141 X^2; +#X text 84 171 1+X^2; +#X text 71 196 1/(1+X^2); +#X text 28 4 ANOTHER PULSE WIDTH MOD ALGORITHM; +#N canvas 0 0 450 300 graph1 0; +#X array F04-signal 882 float 0; +#X coords 0 1.02 882 -1.02 200 130 1; +#X restore 646 328 graph; +#N canvas 0 0 450 300 graph1 0; +#X array F04-spectrum 259 float 0; +#X coords 0 1.01 258 -0.008 256 200 1; +#X restore 587 38 graph; +#X text 646 461 ---- 0.02 seconds ----; +#X text 614 237 2; +#X text 645 237 4; +#X text 584 237 0; +#X text 622 252 -- partial number --; +#X text 677 237 6; +#X text 710 237 8; +#X text 738 237 10; +#X text 770 237 12; +#X text 802 237 14; +#X obj 40 277 output~; +#X obj 39 246 hip~; +#N canvas 122 211 558 609 fft 0; +#X obj 19 61 inlet~; +#X obj 224 210 inlet; +#X obj 29 92 rfft~; +#X obj 29 125 *~; +#X obj 60 125 *~; +#X obj 29 155 sqrt~; +#X obj 332 109 block~ 4096 1; +#X obj 29 181 biquad~ 0 0 0 0 1; +#X text 93 93 Fourier series; +#X text 98 146 magnitude; +#X text 96 131 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 193 164 delay two samples; +#X text 191 182 for better graphing; +#X obj 264 434 samplerate~; +#X obj 251 255 metro 500; +#X obj 251 232 inlet; +#X text 301 232 toggle to graph repeatedly; +#X text 278 210 bang to graph once; +#X obj 29 205 /~ 4096; +#X obj 264 409 bang~; +#X obj 264 457 / 512; +#X obj 19 295 tabwrite~ F04-signal; +#X obj 250 291 tabwrite~ F04-spectrum; +#X obj 264 483 s freq/2; +#X msg 224 321 \; pd dsp 1; +#X connect 0 0 2 0; +#X connect 0 0 23 0; +#X connect 1 0 23 0; +#X connect 1 0 24 0; +#X connect 1 0 26 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 20 0; +#X connect 15 0 22 0; +#X connect 16 0 23 0; +#X connect 16 0 24 0; +#X connect 17 0 16 0; +#X connect 17 0 26 0; +#X connect 20 0 24 0; +#X connect 21 0 15 0; +#X connect 22 0 25 0; +#X restore 93 248 pd fft; +#X obj 153 227 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 153 248 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X text 174 247 <-- repeatedly; +#X text 175 227 <-- graph once; +#X obj 69 81 osc~; +#X text 632 540 updated for Pd version 0.37; +#X text 23 515 NOTE: The PAF algorithm is protected by patents belonging +to IRCAM. Noncommercial use seems to be fine with them but contact +them first if you want to sell something using this.; +#X text 24 473 This is the form of pulse train used in the original +Phase Aligned Formant (PAF) algorithm.; +#X text 23 342 Here we use waveshaping to make another form of pulse +train. This one has a neat spectrum: the partials drop off exponentially +(with the "bandwidth" controlling the rate of dropoff.) In later patches +we'll use a wavetable to do the waveshaping but for simplicity \, it's +done algebraically here. The oscillator runs at half the fundamental +frequency. The symmetry of the waveshaping doubles the frequency of +the output.; +#X text 849 222 0; +#X text 846 35 1; +#X obj 69 56 r freq/2; +#X connect 0 0 3 1; +#X connect 1 0 0 0; +#X connect 2 0 4 0; +#X connect 3 0 8 0; +#X connect 3 0 8 1; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 5 1 1 0; +#X connect 6 0 1 0; +#X connect 8 0 11 1; +#X connect 9 0 10 0; +#X connect 9 0 11 0; +#X connect 10 0 29 0; +#X connect 10 0 30 0; +#X connect 11 0 10 1; +#X connect 29 0 28 0; +#X connect 29 0 28 1; +#X connect 31 0 30 1; +#X connect 32 0 30 2; +#X connect 35 0 3 0; +#X connect 42 0 35 0; diff --git a/pd/doc/3.audio.examples/F05.filter.noise.pd b/pd/doc/3.audio.examples/F05.filter.noise.pd deleted file mode 100644 index 7421c180..00000000 --- a/pd/doc/3.audio.examples/F05.filter.noise.pd +++ /dev/null @@ -1,196 +0,0 @@ -#N canvas 137 175 735 587 12; -#X text 437 559 updated for Pd version 0.26; -#X floatatom 67 397 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 38 425 pd output; -#X msg 96 397 MUTE; -#X text 135 396 <-- output amplitude; -#X obj 515 150 loadbang; -#N canvas 0 0 600 392 conversion-tables 0; -#N canvas 0 0 450 300 graph1 0; -#X array dbtorms 123 float 1; -#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 -2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 -4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 -8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 -0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 -0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 -0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 -0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 -0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 -0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 -2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 -6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; -#X coords 0 10 123 0 200 100 1; -#X restore 70 45 graph; -#X text 272 138 0; -#X text 274 38 10; -#X text 89 148 ------ 123 samples ------; -#N canvas 0 0 450 300 graph2 0; -#X array mtof 130 float 1; -#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 -12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 -21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 -36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 -61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 -103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 -174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 -293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 -493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 -830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 -1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 -2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 -4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 -7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 -11839.8 12543.9 13289.8 14080; -#X coords 0 12000 130 0 200 100 1; -#X restore 77 222 graph; -#X text 87 330 ------ 130 samples ------; -#X text 286 315 0; -#X text 288 215 12000; -#N canvas 244 212 672 338 regenerate-tables 0; -#X msg 415 84 bang; -#X obj 415 113 t b b; -#X obj 474 177 f; -#X obj 512 177 + 1; -#X msg 483 147 0; -#X obj 415 142 until; -#X obj 474 211 t f f; -#X obj 414 238 mtof; -#X obj 405 202 sel 129; -#X obj 413 264 tabwrite mtof; -#X obj 35 227 moses 2; -#X msg 19 76 bang; -#X obj 19 105 t b b; -#X obj 90 166 f; -#X obj 128 166 + 1; -#X msg 112 138 0; -#X obj 19 134 until; -#X obj 11 194 sel 122; -#X msg 35 258 0; -#X obj 79 259 dbtorms; -#X obj 90 194 t f f; -#X obj 35 291 tabwrite dbtorms; -#X text 18 49 bang to recalculate dbtorms table; -#X text 356 50 bang to recalculate the mtof table; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 8 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 7 0; -#X connect 6 1 9 1; -#X connect 7 0 9 0; -#X connect 8 0 5 1; -#X connect 10 0 18 0; -#X connect 10 1 19 0; -#X connect 11 0 12 0; -#X connect 12 0 16 0; -#X connect 12 1 15 0; -#X connect 13 0 14 0; -#X connect 13 0 17 0; -#X connect 13 0 20 0; -#X connect 14 0 13 1; -#X connect 15 0 13 1; -#X connect 16 0 13 0; -#X connect 17 0 16 1; -#X connect 18 0 21 0; -#X connect 19 0 21 0; -#X connect 20 0 10 0; -#X connect 20 1 21 1; -#X restore 375 76 pd regenerate-tables; -#X restore 449 418 pd conversion-tables; -#X obj 49 201 line~; -#X obj 49 177 pack 0 100; -#X floatatom 49 151 0 0 0; -#X obj 88 254 r q; -#X floatatom 88 278 0 0 0; -#X obj 38 342 vcf~; -#X obj 38 366 hip~ 5; -#X obj 49 226 tabread4~ mtof; -#X text 124 277 <-- Q (selectivity); -#X obj 49 127 r cf; -#X text 84 145 <-- center frequency; -#X text 35 6 FILTERING NOISE; -#X obj 39 102 noise~; -#X msg 515 174 \; cf 60 \; q 3 \;; -#X text 13 28 THe noise~ module puts out unit-amplitude white noise. -Be careful again here about surging amplitudes if Q hits zero.; -#X obj 88 305 moses 1; -#X msg 60 305 1; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 20 0; -#X connect 7 0 14 0; -#X connect 8 0 7 0; -#X connect 9 0 8 0; -#X connect 10 0 11 0; -#X connect 11 0 22 0; -#X connect 12 0 13 0; -#X connect 13 0 2 0; -#X connect 14 0 12 1; -#X connect 16 0 9 0; -#X connect 19 0 12 0; -#X connect 22 0 23 0; -#X connect 22 1 12 2; -#X connect 23 0 12 2; diff --git a/pd/doc/3.audio.examples/F05.ring.modulation.pd b/pd/doc/3.audio.examples/F05.ring.modulation.pd new file mode 100644 index 00000000..937b579e --- /dev/null +++ b/pd/doc/3.audio.examples/F05.ring.modulation.pd @@ -0,0 +1,160 @@ +#N canvas 83 89 793 595 12; +#N canvas 0 0 450 300 graph1 0; +#X array F05-signal 882 float 0; +#X coords 0 1 882 -1 200 130 1; +#X restore 554 218 graph; +#N canvas 0 0 450 300 graph1 0; +#X array F05-spectrum 256 float 0; +#X coords 0 0.51 255 -0.008 256 130 1; +#X restore 499 22 graph; +#X text 552 349 ---- 0.02 seconds ----; +#X text 507 563 updated for Pd version 0.37; +#X text 495 155 0; +#X text 534 174 -- partial number --; +#X text 761 142 0; +#X text 758 19 0.5; +#X floatatom 51 61 0 0 100 0 - - -; +#N canvas 329 22 680 421 pulse-train 0; +#X obj 184 348 line~; +#X obj 39 317 cos~; +#X obj 184 324 pack 0 50; +#X obj 39 245 -~ 0.5; +#X obj 39 269 *~; +#X obj 184 252 / 10; +#X obj 184 276 moses 0; +#X msg 184 300 0; +#X obj 39 293 clip~ -0.5 0.5; +#X obj 184 372 +~ 1; +#X obj 39 341 +~ 1; +#X obj 184 228 inlet; +#X obj 39 389 outlet~; +#X obj 39 365 *~ 0.5; +#X text 53 5 This is a modified version of the pulse train generator +from two examples back.; +#X text 107 140 We have to add 1/2 and wrap so that the center of the +pulse comes at phase zero (previously it was 1/2 cycle out of phase). +This wasn't a problem before but now we have to be in phase with the +oscillator we're multpplying with.; +#X text 276 262 otherwise it's the same as before.; +#X obj 40 85 phasor~; +#X obj 40 58 r freq; +#X connect 0 0 9 0; +#X connect 1 0 10 0; +#X connect 2 0 0 0; +#X connect 3 0 4 0; +#X connect 4 0 8 0; +#X connect 5 0 6 0; +#X connect 6 0 7 0; +#X connect 6 1 2 0; +#X connect 7 0 2 0; +#X connect 8 0 1 0; +#X connect 9 0 4 1; +#X connect 10 0 13 0; +#X connect 11 0 5 0; +#X connect 13 0 12 0; +#X connect 17 0 3 0; +#X connect 18 0 17 0; +#X restore 51 86 pd pulse-train; +#X text 83 61 <-- bandwidth; +#X obj 51 219 *~; +#X text 113 123 <-- modulation frequency as; +#X text 152 137 multiple of fundamental; +#X obj 51 277 output~; +#X obj 50 246 hip~; +#N canvas 122 211 563 534 fft 0; +#X obj 19 61 inlet~; +#X obj 208 212 inlet; +#X obj 29 92 rfft~; +#X obj 29 125 *~; +#X obj 60 125 *~; +#X obj 29 155 sqrt~; +#X obj 332 109 block~ 4096 1; +#X obj 29 181 biquad~ 0 0 0 0 1; +#X text 93 93 Fourier series; +#X text 98 146 magnitude; +#X text 96 131 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 193 164 delay two samples; +#X text 191 182 for better graphing; +#X obj 264 434 samplerate~; +#X obj 245 262 metro 500; +#X obj 245 233 inlet; +#X text 298 231 toggle to graph repeatedly; +#X text 262 212 bang to graph once; +#X obj 29 205 /~ 4096; +#X obj 264 409 bang~; +#X obj 264 483 s freq; +#X obj 264 457 / 256; +#X obj 19 295 tabwrite~ F05-signal; +#X obj 245 294 tabwrite~ F05-spectrum; +#X msg 224 321 \; pd dsp 1; +#X connect 0 0 2 0; +#X connect 0 0 24 0; +#X connect 1 0 24 0; +#X connect 1 0 25 0; +#X connect 1 0 26 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 20 0; +#X connect 15 0 23 0; +#X connect 16 0 24 0; +#X connect 16 0 25 0; +#X connect 17 0 16 0; +#X connect 17 0 26 0; +#X connect 20 0 25 0; +#X connect 21 0 15 0; +#X connect 23 0 22 0; +#X restore 98 245 pd fft; +#X obj 158 224 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 158 245 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X text 179 244 <-- repeatedly; +#X text 180 224 <-- graph once; +#X text 527 155 2; +#X text 559 155 4; +#X text 591 155 6; +#X text 623 155 8; +#X text 656 155 10; +#X text 688 155 12; +#X text 719 155 14; +#X text 759 213 1; +#X text 759 337 -1; +#X text 122 185 modulating oscillator; +#X text 153 6 RING MODULATED PULSE TRAINS; +#X text 23 357 Now we take a pulse train and ring modulate it \, which +effectively aliases the spectrum so that it is centered at any desired +partial number. The "bandwidth" control still affects the shape of +the peak \, independently of where it is centered. This generates a +formant centered at the given partial.; +#X floatatom 73 123 0 0 100 0 - - -; +#X obj 73 182 osc~; +#X obj 73 157 *; +#X obj 107 157 r freq; +#X text 23 457 This patch is limited to making formants centered on +harmonics. The center frequency thus can't be moved smoothly up and +down at will (try shift-clicking on modulation frequency to make fractions). +Next we'll look at two techniques for sliding a formant frequency without +losing harmonicity.; +#X text 184 85 <-- pulse train; +#X text 220 101 generator from before; +#X connect 8 0 9 0; +#X connect 9 0 11 0; +#X connect 11 0 15 0; +#X connect 11 0 16 0; +#X connect 15 0 14 0; +#X connect 15 0 14 1; +#X connect 17 0 16 1; +#X connect 18 0 16 2; +#X connect 33 0 35 0; +#X connect 34 0 11 1; +#X connect 35 0 34 0; +#X connect 36 0 35 1; diff --git a/pd/doc/3.audio.examples/F06.packets.pd b/pd/doc/3.audio.examples/F06.packets.pd new file mode 100644 index 00000000..ef098bba --- /dev/null +++ b/pd/doc/3.audio.examples/F06.packets.pd @@ -0,0 +1,117 @@ +#N canvas 207 159 864 663 12; +#X obj 327 413 line~; +#X obj 55 456 cos~; +#N canvas 0 0 450 300 graph1 0; +#X array pulse-output 882 float 0; +#X coords 0 1 882 -1 200 130 1; +#X restore 627 339 graph; +#X obj 327 390 pack 0 50; +#X floatatom 327 344 0 0 0 0 - - -; +#X obj 55 355 -~ 0.5; +#X obj 55 410 *~; +#X obj 327 367 / 10; +#X obj 55 433 clip~ -0.5 0.5; +#X text 327 322 bandwidth; +#X obj 327 436 +~ 1; +#X obj 55 479 +~ 1; +#X obj 206 491 cos~; +#X obj 56 547 *~; +#X floatatom 228 346 4 0 0 0 - - -; +#X obj 228 366 / 10; +#X text 627 472 --- 0.02 seconds ---; +#X obj 206 465 *~; +#N canvas 129 316 777 218 graph 1; +#X obj 70 76 inlet~; +#X obj 662 76 inlet; +#X obj 67 143 tabwrite~ pulse-output; +#X obj 298 81 inlet~; +#X obj 472 74 inlet~; +#X obj 295 148 tabwrite~ window; +#X obj 477 149 tabwrite~ carrier; +#X msg 654 140 \; pd dsp 1; +#X connect 0 0 2 0; +#X connect 1 0 2 0; +#X connect 1 0 5 0; +#X connect 1 0 6 0; +#X connect 1 0 7 0; +#X connect 3 0 5 0; +#X connect 4 0 6 0; +#X restore 100 572 pd graph; +#X obj 228 412 line~; +#X obj 228 389 pack 0 50; +#N canvas 0 0 450 300 graph3 0; +#X array carrier 882 float 0; +#X coords 0 1 881 -1 200 140 1; +#X restore 627 188 graph; +#N canvas 0 0 450 300 graph4 0; +#X array window 882 float 0; +#X coords 0 1 881 -1 200 140 1; +#X restore 628 35 graph; +#X text 204 573 <-- graph; +#X floatatom 55 310 4 0 0 0 - - -; +#X obj 55 331 phasor~ 100; +#X text 31 2 WINDOWED PACKETS; +#X text 51 266 fundamental; +#X text 206 260 center; +#X text 204 279 freq. (in; +#X text 203 298 tenths of; +#X text 202 318 fundamental); +#X text 119 493 window; +#X text 241 469 magnified phase; +#X text 283 509 desired center frequency; +#X text 255 492 <--this cosine goes at the; +#X text 284 528 but its phase is reset each; +#X text 282 547 fundamental period.; +#X text 28 32 The simpler of two techniques for making slidable center +frequencies is to synthesize enveloped sinusoidal wave packets. The +packets should repeat at the fundamental frequency \, but the frequency +of the packet itself controls the center frequency of the formant. +The length of the packet varies inversely with bandwidth.; +#X obj 55 604 output~; +#X obj 55 580 hip~; +#X obj 182 573 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 601 635 updated for Pd version 0.37; +#X obj 55 502 *~ 0.5; +#X text 831 161 -1; +#X text 833 31 1; +#X text 831 314 -1; +#X text 835 184 1; +#X text 832 458 -1; +#X text 835 333 1; +#X text 26 132 In the patch below \, the "clip~" followed by "cos~" +and "+~ 1" is the enveloping ("windowing") function \, which appears +in the top graph. The carrier \, on the other hand \, is a broken sinusoid +made by amplifying the phasor~ (the "*~" controlled by "center freq.") +and taking the cos~ of the result. The "breaks" in the sinusoid only +occur when the enveloping signal is zero.; +#X text 105 464 raised; +#X text 113 479 cosine; +#X text 51 285 frequency; +#X connect 0 0 10 0; +#X connect 1 0 11 0; +#X connect 3 0 0 0; +#X connect 4 0 7 0; +#X connect 5 0 6 0; +#X connect 5 0 17 0; +#X connect 6 0 8 0; +#X connect 7 0 3 0; +#X connect 8 0 1 0; +#X connect 10 0 6 1; +#X connect 11 0 43 0; +#X connect 12 0 13 1; +#X connect 12 0 18 2; +#X connect 13 0 18 0; +#X connect 13 0 40 0; +#X connect 14 0 15 0; +#X connect 15 0 20 0; +#X connect 17 0 12 0; +#X connect 19 0 17 1; +#X connect 20 0 19 0; +#X connect 24 0 25 0; +#X connect 25 0 5 0; +#X connect 40 0 39 0; +#X connect 40 0 39 1; +#X connect 41 0 18 3; +#X connect 43 0 13 0; +#X connect 43 0 18 1; diff --git a/pd/doc/3.audio.examples/F06.ring.modulation.pd b/pd/doc/3.audio.examples/F06.ring.modulation.pd deleted file mode 100644 index 0380a07d..00000000 --- a/pd/doc/3.audio.examples/F06.ring.modulation.pd +++ /dev/null @@ -1,153 +0,0 @@ -#N canvas 1 23 809 567 12; -#X graph graph1 0 -1.02 882 1.02 542 471 742 341; -#X array pulse-output 882 float 0; -#X pop; -#X floatatom 101 331 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 63 359 pd output; -#X msg 139 332 MUTE; -#X text 179 331 <-- output amplitude; -#X floatatom 63 48 0 0 0; -#X obj 63 303 hip~ 5; -#X graph graph1 0 0 128 1000 490 259 746 129; -#X array spectrum 128 float 0; -#X pop; -#X obj 129 278 tabwrite~ pulse-output; -#X msg 129 243 bang; -#X text 170 244 <-- click to graph; -#N canvas 204 17 358 234 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 2048 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 74 281 pd fft; -#X text 488 265 0; -#X obj 79 194 osc~ 0; -#N canvas 0 0 600 384 pulse-train 0; -#X obj 185 162 line~; -#X obj 39 251 cos~; -#X obj 185 138 pack 0 50; -#X obj 40 178 -~ 0.5; -#X obj 40 204 *~; -#X obj 185 63 / 10; -#X obj 185 87 moses 0; -#X msg 185 111 0; -#X obj 39 227 clip~ -0.5 0.5; -#X obj 185 187 +~ 1; -#X obj 38 274 +~ 1; -#X obj 184 38 inlet; -#X obj 38 299 outlet~; -#X obj 40 154 phasor~ 344.532; -#X text 51 13 This is the pulse train generator from example 17; -#X connect 0 0 9 0; -#X connect 1 0 10 0; -#X connect 2 0 0 0; -#X connect 3 0 4 0; -#X connect 4 0 8 0; -#X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 6 1 2 0; -#X connect 7 0 2 0; -#X connect 8 0 1 0; -#X connect 9 0 4 1; -#X connect 10 0 12 0; -#X connect 11 0 5 0; -#X connect 13 0 3 0; -#X restore 63 75 pd pulse-train; -#X floatatom 79 168 0 0 0; -#X text 124 167 <-- modulation frequency; -#X text 102 48 <-- bandwidth; -#X obj 63 218 *~; -#X text 736 262 2656 Hz.; -#X text 196 77 fundamental is 344.5 Hz; -#X text 157 210 an oscillator...; -#X text 66 22 RING MODULATION; -#X text 542 473 ---- 0.02 seconds ----; -#X text 528 533 updated for Pd version 0.34; -#X text 156 195 Just multiply by; -#X text 12 422 Ring modulation is just multiplication by an oscillator. -This patch shows the effect of ring modulation on a pulse train. When -bandwidth is high and modulation frequency is moderately low \, you -see the spectrum reflect off the "y axis".; -#X obj 79 140 * 344.5; -#X floatatom 79 114 0 0 0; -#X text 120 114 <-- modulation frequency as; -#X text 159 128 multiple of fundamental; -#X connect 1 0 2 1; -#X connect 2 0 1 0; -#X connect 3 0 2 2; -#X connect 5 0 14 0; -#X connect 6 0 2 0; -#X connect 9 0 8 0; -#X connect 9 0 11 1; -#X connect 13 0 18 1; -#X connect 14 0 18 0; -#X connect 15 0 13 0; -#X connect 18 0 11 0; -#X connect 18 0 6 0; -#X connect 18 0 8 0; -#X connect 27 0 15 0; -#X connect 28 0 27 0; diff --git a/pd/doc/3.audio.examples/F07.packet.spectrum.pd b/pd/doc/3.audio.examples/F07.packet.spectrum.pd new file mode 100644 index 00000000..bef1483b --- /dev/null +++ b/pd/doc/3.audio.examples/F07.packet.spectrum.pd @@ -0,0 +1,147 @@ +#N canvas 83 221 774 628 12; +#X obj 302 351 line~; +#X obj 34 444 cos~; +#X floatatom 71 560 0 0 0; +#N canvas 176 241 532 273 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 398 111 moses 1; +#X obj 83 148 dbtorms; +#X obj 398 86 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 17 148 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 15 125 audio; +#X text 93 110 show level; +#X obj 17 177 hip~ 1; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 12 0; +#X connect 5 0 12 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 5 0; +#X connect 8 1 4 1; +#X connect 9 0 23 0; +#X connect 10 0 1 1; +#X connect 10 0 8 0; +#X connect 11 0 9 0; +#X connect 11 0 17 0; +#X connect 13 0 26 0; +#X connect 14 0 16 0; +#X connect 14 0 19 0; +#X connect 17 0 18 0; +#X connect 20 0 21 1; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 23 0 20 0; +#X connect 26 0 21 0; +#X restore 35 587 pd output; +#X msg 111 560 MUTE; +#X obj 302 327 pack 0 50; +#X floatatom 302 255 0 0 0; +#X obj 34 356 -~ 0.5; +#X obj 34 395 *~; +#X obj 302 279 / 10; +#X obj 34 420 clip~ -0.5 0.5; +#X text 302 233 bandwidth; +#X obj 302 375 +~ 1; +#X obj 35 467 +~ 1; +#X obj 184 440 cos~; +#X obj 35 496 *~; +#X floatatom 206 269 4 0 0; +#X obj 206 293 / 10; +#X obj 184 414 *~; +#X text 204 224 center; +#X text 204 243 freq.; +#X obj 302 303 max 0; +#X obj 206 365 line~; +#X obj 206 341 pack 0 50; +#X obj 206 317 max 0; +#X floatatom 34 308 4 0 0; +#X obj 34 332 phasor~ 100; +#X text 156 559 <-- output; +#X text 30 283 freq.; +#X text 30 264 fundamental; +#X graph graph1 0 0 128 500 440 492 696 362; +#X array spectrum 128 float 0; +#X pop; +#X msg 108 498 bang; +#N canvas 204 17 358 238 fft 0; +#X obj 46 48 inlet~; +#X obj 159 181 tabwrite~ spectrum; +#X obj 159 145 inlet; +#X obj 46 78 rfft~; +#X obj 46 111 *~; +#X obj 77 111 *~; +#X obj 46 141 sqrt~; +#X obj 191 45 block~ 1024 1; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 0 4 1; +#X connect 3 1 5 0; +#X connect 3 1 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X restore 59 524 pd fft; +#X text 439 502 0; +#X text 687 499 5512; +#X text 149 498 <-- graph; +#X text 31 2 WINDOWED PACKET SPECTRUM; +#X text 19 34 Here's the spectrum you get. Note that even if you put +the center frequency right on a partial \, there is significant energy +in neighboring partials (try fundamental 440 \, "center freq" 30 \, +bandwidth 0.); +#X text 18 104 The center frequency is in units of ten per partial +\, or in other words a value of "30" means "centered on the third partial". +; +#X text 505 596 updated for Pd version 0.34; +#X text 22 155 This technique only works if you're doing Hanning-window +shaped PWM--you can't combine this naturally with FM or with the waveshaping +technique we'll see later.; +#X connect 0 0 12 0; +#X connect 1 0 13 0; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 5 0 0 0; +#X connect 6 0 9 0; +#X connect 7 0 8 0; +#X connect 7 0 18 0; +#X connect 8 0 10 0; +#X connect 9 0 21 0; +#X connect 10 0 1 0; +#X connect 12 0 8 1; +#X connect 13 0 15 0; +#X connect 14 0 15 1; +#X connect 15 0 3 0; +#X connect 15 0 32 0; +#X connect 16 0 17 0; +#X connect 17 0 24 0; +#X connect 18 0 14 0; +#X connect 21 0 5 0; +#X connect 22 0 18 1; +#X connect 23 0 22 0; +#X connect 24 0 23 0; +#X connect 25 0 26 0; +#X connect 26 0 7 0; +#X connect 31 0 32 1; diff --git a/pd/doc/3.audio.examples/F07.ssb.modulation.pd b/pd/doc/3.audio.examples/F07.ssb.modulation.pd deleted file mode 100644 index 968b3b45..00000000 --- a/pd/doc/3.audio.examples/F07.ssb.modulation.pd +++ /dev/null @@ -1,150 +0,0 @@ -#N canvas 7 6 923 594 12; -#X obj 170 349 phasor~ 0; -#X obj 170 393 cos~; -#X obj 206 371 +~ -0.25; -#X obj 206 394 cos~; -#X obj 23 438 *~; -#X obj 88 438 *~; -#X obj 22 462 -~; -#X floatatom 170 322 0 0 0; -#X obj 23 238 tabread4~ array1; -#X obj 23 67 r totsamps; -#X obj 23 142 /; -#X obj 23 190 *~ 0; -#X obj 23 166 phasor~ 0; -#X obj 23 214 +~ 1; -#X msg 23 117 44100; -#X obj 23 91 t b f; -#X obj 62 190 r totsamps; -#X msg 636 38 \; pd dsp 0; -#X text 429 14 START; -#X text 653 20 STOP; -#X floatatom 51 499 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 22 527 pd output; -#X msg 87 500 MUTE; -#X text 121 499 <-- output amplitude; -#N canvas 0 0 600 388 hilbert 0; -#X obj 166 190 biquad~ 0.83774 -0.06338 0.06338 -0.83774 1; -#X obj 166 164 biquad~ 1.94632 -0.94657 0.94657 -1.94632 1; -#X obj 99 111 biquad~ -0.02569 0.260502 -0.260502 0.02569 1; -#X obj 99 137 biquad~ 1.8685 -0.870686 0.870686 -1.8685 1; -#X obj 98 76 inlet~; -#X obj 166 213 outlet~; -#X obj 99 213 outlet~; -#X text 95 261 This is a pair of all-pass filters whose outputs somehow -manage to be about 90 degrees out of phase from each other. I don't -know what phase relation they have with the original signal. I adapted -this from a 4X patch by Emmanuel Favreau \, circa 1982; -#X connect 0 0 5 0; -#X connect 1 0 0 0; -#X connect 2 0 3 0; -#X connect 3 0 6 0; -#X connect 4 0 1 0; -#X connect 4 0 2 0; -#X restore 23 400 pd hilbert; -#X graph graph1 0 -1 155947 1 441 284 641 134; -#X array array1 155948 float 0; -#X pop; -#X text 36 257 sample loop for; -#X text 36 271 test signal; -#X text 35 314 pair of allpass; -#X text 34 333 filters to make; -#X text 34 353 90 degree phase; -#X text 32 373 shifted versions; -#X text 201 323 <-- shift frequency; -#X text 122 438 <-- complex multiply; -#X text 123 452 (calculate real part); -#X text 161 412 cosine and sine waves; -#X text 55 7 SINGLE SIDEBAND MODULATION; -#X text 55 26 (AKA FREQUENCY SHIFTING); -#X text 394 296 The signal sideband modulator gives you only one sideband -for each frequency in teh input signal (whereas ring modulation gave -both a positie and negative sideband.) You can set the shift frequency -positive to shift all frequencies upward \, or negative to shift them -downwards.; -#X obj 484 417 r readfile; -#X msg 334 34 \; readfile ../sound/bell.aiff \; pd dsp 1; -#X obj 484 444 symbol; -#X msg 483 470 read -resize \$1 array1; -#X obj 483 496 soundfiler; -#X obj 483 521 s totsamps; -#X text 671 568 updated for Pd version 0.33; -#X connect 0 0 2 0; -#X connect 0 0 1 0; -#X connect 1 0 4 1; -#X connect 2 0 3 0; -#X connect 3 0 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 1; -#X connect 6 0 21 0; -#X connect 7 0 0 0; -#X connect 8 0 24 0; -#X connect 9 0 15 0; -#X connect 10 0 12 0; -#X connect 11 0 13 0; -#X connect 12 0 11 0; -#X connect 13 0 8 0; -#X connect 14 0 10 0; -#X connect 15 0 14 0; -#X connect 15 1 10 1; -#X connect 16 0 11 1; -#X connect 20 0 21 1; -#X connect 21 0 20 0; -#X connect 22 0 21 2; -#X connect 24 0 4 0; -#X connect 24 1 5 0; -#X connect 39 0 41 0; -#X connect 41 0 42 0; -#X connect 42 0 43 0; -#X connect 43 0 44 0; diff --git a/pd/doc/3.audio.examples/F08.two.cosines.pd b/pd/doc/3.audio.examples/F08.two.cosines.pd new file mode 100644 index 00000000..ae4788f6 --- /dev/null +++ b/pd/doc/3.audio.examples/F08.two.cosines.pd @@ -0,0 +1,70 @@ +#N canvas 534 115 698 613 12; +#X obj 157 408 cos~; +#X floatatom 204 198 4 0 100 0 - - -; +#X obj 204 222 / 10; +#X text 461 275 --- 0.02 seconds ---; +#X obj 157 378 *~; +#X obj 204 294 line~; +#X obj 204 246 max 0; +#N canvas 0 0 450 300 graph3 0; +#X array F08-carrier 882 float 0; +#X coords 0 2 881 -2 200 140 1; +#X restore 447 123 graph; +#X floatatom 57 295 4 0 0 0 - - -; +#X text 53 251 fundamental; +#X text 53 270 frequency; +#X obj 199 408 cos~; +#X obj 240 321 wrap~; +#X obj 204 348 -~; +#X obj 199 378 +~; +#X obj 204 445 -~; +#X obj 219 475 *~; +#X obj 197 500 +~; +#X obj 204 270 pack 0 50; +#X text 254 408 synthesize the two partials; +#X text 447 590 updated for Pd version 0.37; +#X obj 198 526 hip~; +#X obj 199 552 output~; +#X text 26 29 The other \, spiffier way is to make a sum of cosines +to interpolate between adjacent harmonics. Suppose for example we want +a center frequency of 5.3 (in units of the fundamental.) We just take +partial 5 with amplitude 0.7 and partial 6 with amplitude 0.3:; +#X obj 286 552 tabwrite~ F08-carrier; +#X text 316 528 <-graph; +#X obj 284 527 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 57 319 phasor~ 100; +#X text 83 149 center frequency (in; +#X text 82 169 tenths of fundamental); +#X text 125 3 MOVABLE CENTER FREQUENCY BY ADDING TWO COSINES; +#X text 295 320 the fractional part "q"; +#X text 253 347 subtract to get the integer part "k"; +#X text 249 380 multiply phase by k and k+1; +#X text 252 444 c2 - c1; +#X text 267 473 q * (c2 - c1); +#X text 236 500 q * c2 + (1-q) * c1; +#X connect 0 0 15 1; +#X connect 0 0 17 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 4 0 0 0; +#X connect 4 0 14 0; +#X connect 5 0 13 0; +#X connect 5 0 12 0; +#X connect 6 0 18 0; +#X connect 8 0 27 0; +#X connect 11 0 15 0; +#X connect 12 0 13 1; +#X connect 12 0 16 1; +#X connect 13 0 4 1; +#X connect 14 0 11 0; +#X connect 15 0 16 0; +#X connect 16 0 17 1; +#X connect 17 0 21 0; +#X connect 17 0 24 0; +#X connect 18 0 5 0; +#X connect 21 0 22 0; +#X connect 21 0 22 1; +#X connect 26 0 24 0; +#X connect 27 0 4 0; +#X connect 27 0 14 1; diff --git a/pd/doc/3.audio.examples/F09.declickit.pd b/pd/doc/3.audio.examples/F09.declickit.pd new file mode 100644 index 00000000..f35f5da8 --- /dev/null +++ b/pd/doc/3.audio.examples/F09.declickit.pd @@ -0,0 +1,94 @@ +#N canvas 10 49 579 665 12; +#X obj 130 481 cos~; +#X obj 130 451 *~; +#X obj 172 481 cos~; +#X obj 214 397 wrap~; +#X obj 177 402 -~; +#X obj 172 451 +~; +#X obj 172 516 -~; +#X obj 192 548 *~; +#X obj 170 573 +~; +#X obj 204 159 loadbang; +#X obj 204 185 metro 400; +#X obj 216 209 del 200; +#X obj 252 326 samphold~; +#N canvas 0 0 405 406 switch 0; +#X obj 15 383 outlet~; +#X obj 8 193 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 329 195 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X obj 18 99 loadbang; +#X obj 18 131 1; +#X obj 53 261 sel 1; +#X obj 53 287 0; +#X obj 339 259 sel 1; +#X obj 339 288 0; +#X obj 47 316 inlet~; +#X obj 15 344 *~; +#X obj 340 312 inlet~; +#X obj 308 340 *~; +#X connect 1 0 5 0; +#X connect 1 0 10 1; +#X connect 2 0 7 0; +#X connect 2 0 12 1; +#X connect 3 0 4 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 7 0 8 0; +#X connect 8 0 1 0; +#X connect 9 0 10 0; +#X connect 10 0 0 0; +#X connect 11 0 12 0; +#X connect 12 0 0 0; +#X coords 0 0 1 1 80 35 1; +#X restore 177 351 pd switch; +#X text 31 2 CHANGING THE CENTER FREQUENCY QUICKLY; +#X text 34 27 Since in the previous patch the amplitudes of the two +cosines depend on "center frequency" we can't change that discontinuously +without clicking \, as you hear in this patch. The fix is to use a +samphold~ object to keep the center frequency frozen except at phase +crossings. At the phase crossings the two weighted cosines add to one +\, so we can discontinuously change the frequencies and weights there. +; +#X text 266 365 <--toggles to select which one; +#X text 369 384 is actually used; +#X obj 171 602 output~; +#X floatatom 225 264 3 0 50 0 - - -; +#X obj 178 263 pack; +#X text 258 263 <--gliss time; +#X text 324 647 updated for Pd version 0.37; +#X obj 178 287 line~; +#X msg 216 239 13.5; +#X msg 178 239 4; +#X obj 70 287 phasor~ 80; +#X connect 0 0 6 1; +#X connect 0 0 8 0; +#X connect 1 0 0 0; +#X connect 1 0 5 0; +#X connect 2 0 6 0; +#X connect 3 0 4 1; +#X connect 3 0 7 1; +#X connect 4 0 1 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 7 0 8 1; +#X connect 8 0 18 0; +#X connect 8 0 18 1; +#X connect 9 0 10 0; +#X connect 10 0 25 0; +#X connect 10 0 11 0; +#X connect 11 0 24 0; +#X connect 12 0 13 1; +#X connect 13 0 4 0; +#X connect 13 0 3 0; +#X connect 19 0 20 1; +#X connect 20 0 23 0; +#X connect 23 0 13 0; +#X connect 23 0 12 0; +#X connect 24 0 20 0; +#X connect 25 0 20 0; +#X connect 26 0 1 0; +#X connect 26 0 5 1; +#X connect 26 0 12 1; diff --git a/pd/doc/3.audio.examples/F10.sweepable.FM.pd b/pd/doc/3.audio.examples/F10.sweepable.FM.pd new file mode 100644 index 00000000..17fc920b --- /dev/null +++ b/pd/doc/3.audio.examples/F10.sweepable.FM.pd @@ -0,0 +1,152 @@ +#N canvas 60 64 834 697 12; +#X obj 168 476 cos~; +#X obj 168 430 *~; +#X obj 211 478 cos~; +#X obj 252 379 wrap~; +#X obj 215 378 -~; +#X obj 211 455 +~; +#X obj 209 513 -~; +#X obj 230 539 *~; +#X obj 215 348 samphold~; +#X text 167 6 APPLYING TWO-COSINE CARRIER TO FM; +#X floatatom 232 228 4 0 200 0 - - -; +#X obj 232 251 / 10; +#X text 232 147 center; +#X obj 232 300 line~; +#X text 232 167 freq. (in; +#X text 232 187 tenths of; +#X text 232 207 fundamental); +#X obj 232 277 pack 0 50; +#X obj 121 283 phasor~; +#X floatatom 121 260 4 0 0 0 - - -; +#X text 106 207 fundamental; +#X text 106 227 (= mod freq); +#X text 435 254 index; +#X text 435 274 (percent); +#X floatatom 435 295 4 0 500 0 - - -; +#X obj 385 361 cos~; +#X obj 435 364 line~; +#X obj 385 384 *~; +#X obj 435 318 / 100; +#X obj 435 341 pack 0 50; +#X obj 168 453 +~; +#X text 388 410 modulating; +#X text 388 430 oscillator; +#X text 40 452 both phases-->; +#X text 9 435 add modulator to; +#X obj 233 632 output~; +#X obj 232 601 hip~; +#N canvas 122 211 558 609 fft 0; +#X obj 23 55 inlet~; +#X obj 210 303 inlet; +#X obj 27 215 rfft~; +#X obj 27 248 *~; +#X obj 58 248 *~; +#X obj 27 278 sqrt~; +#X obj 334 200 block~ 4096 1; +#X obj 27 304 biquad~ 0 0 0 0 1; +#X text 91 216 Fourier series; +#X text 96 269 magnitude; +#X text 94 254 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 195 255 delay two samples; +#X text 193 273 for better graphing; +#X obj 292 79 samplerate~; +#X obj 240 352 metro 500; +#X obj 240 329 inlet; +#X text 293 327 toggle to graph repeatedly; +#X text 264 303 bang to graph once; +#X obj 27 328 /~ 4096; +#X obj 292 54 bang~; +#X msg 211 413 \; pd dsp 1; +#X obj 237 390 tabwrite~ F10-spectrum; +#X obj 292 102 / 4096; +#X obj 58 135 osc~; +#X obj 58 163 +~ 1; +#X obj 28 188 *~; +#X text 113 138 hanning window; +#X obj 254 79 0.5; +#X connect 0 0 27 0; +#X connect 1 0 22 0; +#X connect 1 0 23 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 20 0; +#X connect 15 0 24 0; +#X connect 16 0 23 0; +#X connect 17 0 16 0; +#X connect 17 0 22 0; +#X connect 20 0 23 0; +#X connect 21 0 15 0; +#X connect 21 0 29 0; +#X connect 24 0 25 0; +#X connect 25 0 26 0; +#X connect 26 0 27 1; +#X connect 27 0 2 0; +#X connect 29 0 25 1; +#X restore 286 601 pd fft; +#X obj 346 580 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 346 601 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X text 367 600 <-- repeatedly; +#X text 368 580 <-- graph once; +#X text 580 663 updated for Pd version 0.37; +#N canvas 0 0 450 300 graph1 0; +#X array F10-spectrum 259 float 0; +#X coords 0 0.51 258 -0.008 256 130 1; +#X restore 560 386 graph; +#X text 552 517 0; +#X obj 207 565 +~; +#X text 31 30 We can apply the two-cosine method to FM synthesis to +get FM spectra which slide up and down: we just treat the cosines like +carrier signals in an FM instrument. This doesn't work as well as you'd +wish \, because the phases of the partials of the two FM instruments +don't line up \, so that \, for indices of modulation above about 20% +\, you get beating effects as the center frequency goes up and down. +; +#X text 614 527 -- frequency --; +#X text 792 518 2700; +#X connect 0 0 6 1; +#X connect 0 0 45 0; +#X connect 1 0 30 0; +#X connect 2 0 6 0; +#X connect 3 0 4 1; +#X connect 3 0 7 1; +#X connect 4 0 1 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 7 0 45 1; +#X connect 8 0 4 0; +#X connect 8 0 3 0; +#X connect 10 0 11 0; +#X connect 11 0 17 0; +#X connect 13 0 8 0; +#X connect 17 0 13 0; +#X connect 18 0 8 1; +#X connect 18 0 25 0; +#X connect 18 0 1 0; +#X connect 18 0 5 1; +#X connect 19 0 18 0; +#X connect 24 0 28 0; +#X connect 25 0 27 0; +#X connect 26 0 27 1; +#X connect 27 0 30 1; +#X connect 28 0 29 0; +#X connect 29 0 26 0; +#X connect 30 0 5 0; +#X connect 30 0 0 0; +#X connect 36 0 35 0; +#X connect 36 0 35 1; +#X connect 38 0 37 1; +#X connect 39 0 37 2; +#X connect 45 0 36 0; +#X connect 45 0 37 0; diff --git a/pd/doc/3.audio.examples/F11.anharmonic.FM.pd b/pd/doc/3.audio.examples/F11.anharmonic.FM.pd new file mode 100644 index 00000000..333a6e44 --- /dev/null +++ b/pd/doc/3.audio.examples/F11.anharmonic.FM.pd @@ -0,0 +1,126 @@ +#N canvas 60 64 790 527 12; +#X obj 122 381 cos~; +#X floatatom 173 184 4 0 200 0 - - -; +#X obj 173 207 / 10; +#X text 173 103 center; +#X text 173 123 freq. (in; +#X text 173 143 tenths of; +#X text 173 163 fundamental); +#X floatatom 70 192 4 0 0 0 - - -; +#X text 46 145 fundamental; +#X text 46 165 (= mod freq); +#X text 251 208 index; +#X text 251 228 (percent); +#X floatatom 251 249 4 0 500 0 - - -; +#X obj 251 318 line~; +#X obj 201 338 *~; +#X obj 251 272 / 100; +#X obj 251 295 pack 0 50; +#X obj 122 358 +~; +#X text 204 364 modulating; +#X text 209 381 oscillator; +#X obj 123 459 output~; +#X obj 122 428 hip~; +#N canvas 122 211 558 609 fft 0; +#X obj 23 55 inlet~; +#X obj 210 303 inlet; +#X obj 27 215 rfft~; +#X obj 27 248 *~; +#X obj 58 248 *~; +#X obj 27 278 sqrt~; +#X obj 334 200 block~ 4096 1; +#X obj 27 304 biquad~ 0 0 0 0 1; +#X text 91 216 Fourier series; +#X text 96 269 magnitude; +#X text 94 254 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 195 255 delay two samples; +#X text 193 273 for better graphing; +#X obj 292 79 samplerate~; +#X obj 240 352 metro 500; +#X obj 240 329 inlet; +#X text 293 327 toggle to graph repeatedly; +#X text 264 303 bang to graph once; +#X obj 27 328 /~ 4096; +#X obj 292 54 bang~; +#X msg 211 413 \; pd dsp 1; +#X obj 292 102 / 4096; +#X obj 58 135 osc~; +#X obj 58 163 +~ 1; +#X obj 28 188 *~; +#X text 113 138 hanning window; +#X obj 254 79 0.5; +#X obj 240 390 tabwrite~ F11-spectrum; +#X connect 0 0 26 0; +#X connect 1 0 22 0; +#X connect 1 0 29 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 20 0; +#X connect 15 0 23 0; +#X connect 16 0 29 0; +#X connect 17 0 16 0; +#X connect 17 0 22 0; +#X connect 20 0 29 0; +#X connect 21 0 15 0; +#X connect 21 0 28 0; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 25 0 26 1; +#X connect 26 0 2 0; +#X connect 28 0 24 1; +#X restore 176 428 pd fft; +#X obj 236 407 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 236 428 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 +1; +#X text 257 427 <-- repeatedly; +#X text 258 407 <-- graph once; +#X text 530 479 updated for Pd version 0.37; +#N canvas 0 0 450 300 graph1 0; +#X array F11-spectrum 259 float 0; +#X coords 0 0.51 258 -0.008 256 130 1; +#X restore 514 291 graph; +#X text 506 422 0; +#X text 568 432 -- frequency --; +#X text 743 427 2700; +#X obj 173 256 *; +#X obj 173 233 t b f; +#X obj 201 315 osc~; +#X obj 122 322 phasor~; +#X text 31 30 Here's what happens if you just slide the carrier frequency +around. The spectrum moves up and down all right \, but is only periodic +at the original period when the center frequency roosts on a harmonic. +; +#X text 50 308 carrier; +#X text 24 325 oscillator; +#X text 167 6 HOW NOT TO APPLY TWO-COSINE CARRIER TO FM; +#X connect 0 0 21 0; +#X connect 0 0 22 0; +#X connect 1 0 2 0; +#X connect 2 0 33 0; +#X connect 7 0 32 0; +#X connect 7 0 34 0; +#X connect 12 0 15 0; +#X connect 13 0 14 1; +#X connect 14 0 17 1; +#X connect 15 0 16 0; +#X connect 16 0 13 0; +#X connect 17 0 0 0; +#X connect 21 0 20 0; +#X connect 21 0 20 1; +#X connect 23 0 22 1; +#X connect 24 0 22 2; +#X connect 32 0 35 0; +#X connect 33 0 32 0; +#X connect 33 1 32 1; +#X connect 34 0 14 0; +#X connect 35 0 17 0; diff --git a/pd/doc/3.audio.examples/F12.paf.pd b/pd/doc/3.audio.examples/F12.paf.pd new file mode 100644 index 00000000..f220bd45 --- /dev/null +++ b/pd/doc/3.audio.examples/F12.paf.pd @@ -0,0 +1,226 @@ +#N canvas 262 0 692 819 12; +#X obj 38 593 cos~; +#X obj 38 570 *~; +#X obj 81 593 cos~; +#X obj 137 527 wrap~; +#X obj 101 527 -~; +#X obj 81 570 +~; +#X obj 74 623 -~; +#X obj 94 655 *~; +#X obj 56 655 +~; +#X obj 100 500 samphold~; +#X floatatom 159 378 4 0 500 0 - - -; +#X obj 159 401 / 10; +#X text 157 311 center; +#X obj 159 449 line~; +#X text 157 359 fundamental); +#X obj 159 426 pack 0 50; +#X obj 39 446 phasor~; +#X floatatom 39 425 4 0 0 0 - - -; +#X text 19 398 fundamental; +#X text 303 460 index; +#X text 303 477 (percent); +#X floatatom 303 498 4 0 500 0 - - -; +#X obj 303 544 line~; +#X obj 224 564 *~; +#X obj 303 521 pack 0 50; +#N canvas 0 0 450 300 graph4 0; +#X array bell-curve 200 float 1; +#A 0 1.12535e-07 1.54727e-07 2.12059e-07 2.89706e-07 3.94519e-07 5.35535e-07 +7.24633e-07 9.77371e-07 1.31404e-06 1.76105e-06 2.35258e-06 3.13275e-06 +4.15832e-06 5.50199e-06 7.25659e-06 9.54016e-06 1.25023e-05 1.63317e-05 +2.1266e-05 2.76026e-05 3.57128e-05 4.60584e-05 5.92113e-05 7.58768e-05 +9.69224e-05 0.00012341 0.000156634 0.000198167 0.000249912 0.000314163 +0.000393669 0.000491721 0.000612231 0.000759842 0.000940028 0.00115923 +0.00142498 0.00174605 0.00213263 0.00259648 0.00315111 0.00381201 0.00459678 +0.0055254 0.0066204 0.00790705 0.0094136 0.0111714 0.013215 0.0155826 +0.0183156 0.0214592 0.0250621 0.0291763 0.0338573 0.0391639 0.0451575 +0.0519019 0.0594631 0.0679081 0.0773047 0.0877205 0.0992216 0.111872 +0.125732 0.140858 0.1573 0.1751 0.194291 0.214896 0.236928 0.260383 +0.285247 0.311486 0.339053 0.367879 0.397882 0.428956 0.46098 0.493812 +0.527292 0.561244 0.595473 0.62977 0.663916 0.697676 0.730811 0.763074 +0.794216 0.823987 0.852144 0.878447 0.902668 0.924595 0.944027 0.960789 +0.974725 0.985703 0.99362 0.998401 1 0.998401 0.99362 0.985703 0.974725 +0.960789 0.944027 0.924595 0.902668 0.878447 0.852144 0.823987 0.794216 +0.763074 0.730811 0.697676 0.663916 0.62977 0.595473 0.561244 0.527292 +0.493812 0.46098 0.428956 0.397882 0.367879 0.339053 0.311486 0.285247 +0.260383 0.236928 0.214896 0.194291 0.1751 0.1573 0.140858 0.125732 +0.111872 0.0992216 0.0877205 0.0773047 0.0679081 0.0594631 0.0519019 +0.0451575 0.0391639 0.0338573 0.0291763 0.0250621 0.0214592 0.0183156 +0.0155826 0.013215 0.0111714 0.0094136 0.00790705 0.0066204 0.0055254 +0.00459678 0.00381201 0.00315111 0.00259648 0.00213263 0.00174605 0.00142498 +0.00115923 0.000940028 0.000759842 0.000612231 0.000491721 0.000393669 +0.000314163 0.000249912 0.000198167 0.000156634 0.00012341 9.69224e-05 +7.58768e-05 5.92113e-05 4.60584e-05 3.57128e-05 2.76026e-05 2.1266e-05 +1.63317e-05 1.25023e-05 9.54016e-06 7.25659e-06 5.50199e-06 4.15832e-06 +3.13275e-06 2.35258e-06 1.76105e-06 1.31404e-06 9.77371e-07 7.24633e-07 +5.35535e-07 3.94519e-07 2.89706e-07 2.12059e-07 1.54727e-07; +#X coords 0 1 199 0 200 140 1; +#X restore 443 555 graph; +#N canvas 94 264 600 388 make-table 0; +#X msg 81 44 bang; +#X obj 81 73 t b b; +#X obj 159 142 f; +#X obj 197 142 + 1; +#X msg 175 112 0; +#X obj 81 102 until; +#X obj 161 177 t f f; +#X obj 76 306 tabwrite bell-curve; +#X obj 52 270 expr exp(-$f1*$f1); +#X obj 63 168 sel 199; +#X obj 51 241 expr ($f1-100)/25; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 9 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 10 0; +#X connect 6 1 7 1; +#X connect 8 0 7 0; +#X connect 9 0 5 1; +#X connect 10 0 8 0; +#X restore 507 515 pd make-table; +#X obj 224 541 cos~; +#X obj 224 518 -~ 0.25; +#X obj 224 587 +~ 100; +#X obj 224 610 tabread4~ bell-curve; +#X obj 95 684 *~; +#X text 131 682 <--ring mod step; +#X text 256 635 waveshaper; +#X text 425 791 updated for Pd version 0.37; +#X text 157 326 frequency; +#X text 157 342 (tenths of; +#X text 441 698 0; +#X text 632 697 200; +#N canvas 0 0 450 300 graph1 0; +#X array F12-spectrum 259 float 0; +#X coords 0 0.51 258 -0.008 256 130 1; +#X restore 421 308 graph; +#X text 418 440 0; +#X text 475 444 -- frequency --; +#X text 644 441 2700; +#X obj 95 756 output~; +#X obj 94 725 hip~; +#N canvas 122 211 558 609 fft 0; +#X obj 23 55 inlet~; +#X obj 210 303 inlet; +#X obj 27 215 rfft~; +#X obj 27 248 *~; +#X obj 58 248 *~; +#X obj 27 278 sqrt~; +#X obj 334 200 block~ 4096 1; +#X obj 27 304 biquad~ 0 0 0 0 1; +#X text 91 216 Fourier series; +#X text 96 269 magnitude; +#X text 94 254 calculate; +#X text 21 3 This subpatch computes the spectrum of the incoming signal +with a (rectangular windowed) FFT. FFTs aren't properly introduced +until much later.; +#X text 83 61 signal to analyze; +#X text 195 255 delay two samples; +#X text 193 273 for better graphing; +#X obj 292 79 samplerate~; +#X obj 240 352 metro 500; +#X obj 240 329 inlet; +#X text 293 327 toggle to graph repeatedly; +#X text 264 303 bang to graph once; +#X obj 27 328 /~ 4096; +#X obj 292 54 bang~; +#X msg 211 413 \; pd dsp 1; +#X obj 292 102 / 4096; +#X obj 58 135 osc~; +#X obj 58 163 +~ 1; +#X obj 28 188 *~; +#X text 113 138 hanning window; +#X obj 254 79 0.5; +#X obj 240 390 tabwrite~ F12-spectrum; +#X connect 0 0 26 0; +#X connect 1 0 22 0; +#X connect 1 0 29 0; +#X connect 2 0 3 0; +#X connect 2 0 3 1; +#X connect 2 1 4 0; +#X connect 2 1 4 1; +#X connect 3 0 5 0; +#X connect 4 0 5 0; +#X connect 5 0 7 0; +#X connect 7 0 20 0; +#X connect 15 0 23 0; +#X connect 16 0 29 0; +#X connect 17 0 16 0; +#X connect 17 0 22 0; +#X connect 20 0 29 0; +#X connect 21 0 15 0; +#X connect 21 0 28 0; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 25 0 26 1; +#X connect 26 0 2 0; +#X connect 28 0 24 1; +#X restore 148 725 pd fft; +#X obj 208 704 bng 18 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 208 725 tgl 18 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 +1; +#X text 229 724 <-- repeatedly; +#X text 230 704 <-- graph once; +#X text 17 21 Instead of using the two cosines as FM carrier oscillators +\, we can use them as ring modulators for a natural or synthetic tone. +Here we use waveshaping - to wit \, a sinusoid looking up a Gaussian +bell curve. This has the nice properties that the partials are always +positive cosines in phase \, and the spectrum spreads out smoothly +as the index changes.; +#X text 98 1 PAF: TWO-COSINE RING MODULATOR FOR WAVESHAPER; +#X text 17 253 Then with ~* we do the ring modulation and we're done. +This is the PAF (phase-aligned formant) synthesis algorithm (patented +1993 by IRCAM).; +#X obj 224 492 *~ 0.5; +#X text 17 129 For phase coherency \, the waveshaper and the cosine +pair are driven from the same phasor~ object. Since the waveshaping +is done using a symmetric curve \, its output is at double the frequency +of the input. So for each cycle of the phasor we compute a half-cycle +of the sine function (by multiplying by 0.5 and subtracting 0.25 before +the cosine lookup). We center the cosine output for lookup in a 200-point +table containing a bell curve.; +#X connect 0 0 6 1; +#X connect 0 0 8 0; +#X connect 1 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 6 0; +#X connect 3 0 4 1; +#X connect 3 0 7 1; +#X connect 4 0 1 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 7 0 8 1; +#X connect 8 0 31 0; +#X connect 9 0 4 0; +#X connect 9 0 3 0; +#X connect 10 0 11 0; +#X connect 11 0 15 0; +#X connect 13 0 9 0; +#X connect 15 0 13 0; +#X connect 16 0 9 1; +#X connect 16 0 5 1; +#X connect 16 0 1 0; +#X connect 16 0 53 0; +#X connect 17 0 16 0; +#X connect 21 0 24 0; +#X connect 22 0 23 1; +#X connect 23 0 29 0; +#X connect 24 0 22 0; +#X connect 27 0 23 0; +#X connect 28 0 27 0; +#X connect 29 0 30 0; +#X connect 30 0 31 1; +#X connect 31 0 44 0; +#X connect 31 0 45 0; +#X connect 44 0 43 0; +#X connect 44 0 43 1; +#X connect 46 0 45 1; +#X connect 47 0 45 2; +#X connect 53 0 28 0; diff --git a/pd/doc/3.audio.examples/F13.paf.control.pd b/pd/doc/3.audio.examples/F13.paf.control.pd new file mode 100644 index 00000000..59ebd334 --- /dev/null +++ b/pd/doc/3.audio.examples/F13.paf.control.pd @@ -0,0 +1,164 @@ +#N canvas 89 36 756 792 12; +#X obj 127 608 cos~; +#X obj 127 585 *~; +#X obj 170 608 cos~; +#X obj 225 553 wrap~; +#X obj 189 553 -~; +#X obj 170 585 +~; +#X obj 163 638 -~; +#X obj 183 670 *~; +#X obj 145 670 +~; +#X obj 189 521 samphold~; +#X floatatom 189 321 4 0 127 0 - - -; +#X text 185 283 center; +#X obj 189 388 line~; +#X obj 189 365 pack 0 50; +#X obj 80 464 phasor~; +#X floatatom 80 370 4 0 127 0 - - -; +#X text 71 331 fundamental; +#X floatatom 387 384 4 0 127 0 - - -; +#X obj 387 455 line~; +#X obj 298 584 *~; +#X obj 387 432 pack 0 50; +#N canvas 94 264 600 388 make-table 0; +#X msg 81 44 bang; +#X obj 81 73 t b b; +#X obj 159 142 f; +#X obj 197 142 + 1; +#X msg 175 112 0; +#X obj 81 102 until; +#X obj 161 177 t f f; +#X obj 76 306 tabwrite bell-curve; +#X obj 52 270 expr exp(-$f1*$f1); +#X obj 63 168 sel 199; +#X obj 51 241 expr ($f1-100)/25; +#N canvas 0 0 450 300 graph4 0; +#X array bell-curve 200 float 1; +#A 0 1.12535e-07 1.54727e-07 2.12059e-07 2.89706e-07 3.94519e-07 5.35535e-07 +7.24633e-07 9.77371e-07 1.31404e-06 1.76105e-06 2.35258e-06 3.13275e-06 +4.15832e-06 5.50199e-06 7.25659e-06 9.54016e-06 1.25023e-05 1.63317e-05 +2.1266e-05 2.76026e-05 3.57128e-05 4.60584e-05 5.92113e-05 7.58768e-05 +9.69224e-05 0.00012341 0.000156634 0.000198167 0.000249912 0.000314163 +0.000393669 0.000491721 0.000612231 0.000759842 0.000940028 0.00115923 +0.00142498 0.00174605 0.00213263 0.00259648 0.00315111 0.00381201 0.00459678 +0.0055254 0.0066204 0.00790705 0.0094136 0.0111714 0.013215 0.0155826 +0.0183156 0.0214592 0.0250621 0.0291763 0.0338573 0.0391639 0.0451575 +0.0519019 0.0594631 0.0679081 0.0773047 0.0877205 0.0992216 0.111872 +0.125732 0.140858 0.1573 0.1751 0.194291 0.214896 0.236928 0.260383 +0.285247 0.311486 0.339053 0.367879 0.397882 0.428956 0.46098 0.493812 +0.527292 0.561244 0.595473 0.62977 0.663916 0.697676 0.730811 0.763074 +0.794216 0.823987 0.852144 0.878447 0.902668 0.924595 0.944027 0.960789 +0.974725 0.985703 0.99362 0.998401 1 0.998401 0.99362 0.985703 0.974725 +0.960789 0.944027 0.924595 0.902668 0.878447 0.852144 0.823987 0.794216 +0.763074 0.730811 0.697676 0.663916 0.62977 0.595473 0.561244 0.527292 +0.493812 0.46098 0.428956 0.397882 0.367879 0.339053 0.311486 0.285247 +0.260383 0.236928 0.214896 0.194291 0.1751 0.1573 0.140858 0.125732 +0.111872 0.0992216 0.0877205 0.0773047 0.0679081 0.0594631 0.0519019 +0.0451575 0.0391639 0.0338573 0.0291763 0.0250621 0.0214592 0.0183156 +0.0155826 0.013215 0.0111714 0.0094136 0.00790705 0.0066204 0.0055254 +0.00459678 0.00381201 0.00315111 0.00259648 0.00213263 0.00174605 0.00142498 +0.00115923 0.000940028 0.000759842 0.000612231 0.000491721 0.000393669 +0.000314163 0.000249912 0.000198167 0.000156634 0.00012341 9.69224e-05 +7.58768e-05 5.92113e-05 4.60584e-05 3.57128e-05 2.76026e-05 2.1266e-05 +1.63317e-05 1.25023e-05 9.54016e-06 7.25659e-06 5.50199e-06 4.15832e-06 +3.13275e-06 2.35258e-06 1.76105e-06 1.31404e-06 9.77371e-07 7.24633e-07 +5.35535e-07 3.94519e-07 2.89706e-07 2.12059e-07 1.54727e-07; +#X coords 0 1 199 0 200 140 1; +#X restore 342 85 graph; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 9 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 10 0; +#X connect 6 1 7 1; +#X connect 8 0 7 0; +#X connect 9 0 5 1; +#X connect 10 0 8 0; +#X restore 536 647 pd make-table; +#X obj 298 558 cos~; +#X obj 298 533 -~ 0.25; +#X obj 298 610 +~ 100; +#X obj 298 633 tabread4~ bell-curve; +#X obj 184 699 *~; +#X text 330 658 waveshaper; +#X text 31 2 CHANGING PAF CONTROLS TO NATURAL UNITS; +#X obj 80 394 mtof; +#X obj 211 413 expr 1/$f1; +#X obj 189 341 mtof; +#X text 184 298 freq.; +#X obj 189 437 *~; +#X text 385 357 bandwidth; +#X obj 387 406 mtof; +#X obj 387 491 *~; +#X obj 387 515 *~ 25; +#X text 18 23 The more "natural" units for describing a formant might +be center frequency and bandwidth \, so that you can change the fundamental +without having the formant shift up and down in parallel. Here all +three frequencies are expressed in MIDI units. The bandwidth and center +frequency have to be divided by the fundamental (the expr 1/$f1 takes +its reciprocal and two *~ objects finish the division.); +#X text 427 490 divide by fundamental; +#X text 445 514 range for table; +#X text 364 609 offset to middle of table; +#X text 196 459 C.F. relative; +#X text 197 475 to fundamental; +#X text 69 346 (MIDI units); +#X text 220 697 ring mod; +#X obj 184 726 output~; +#X text 483 762 updated for Pd version 0.37; +#X text 19 137 Here we take a somewhat lax approach to sampholding +the center frequency control. The frequency itself changes instantly +\, but the center/fundamental frequency ratio waits for the next period. +This gives a slight "chirp" if the fundamental is abruptly raised a +couple of octaves. There's no easy way using Pd's built-in primitives +to avoid this. Note however that there's a "paf~" extern available +which solves this problem better and \, moreover \, runs much faster. +; +#X obj 298 508 *~ 0.5; +#X connect 0 0 6 1; +#X connect 0 0 8 0; +#X connect 1 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 6 0; +#X connect 3 0 4 1; +#X connect 3 0 7 1; +#X connect 4 0 1 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 7 0 8 1; +#X connect 8 0 26 0; +#X connect 9 0 4 0; +#X connect 9 0 3 0; +#X connect 10 0 31 0; +#X connect 12 0 33 0; +#X connect 13 0 12 0; +#X connect 14 0 9 1; +#X connect 14 0 1 0; +#X connect 14 0 5 1; +#X connect 14 0 49 0; +#X connect 15 0 29 0; +#X connect 17 0 35 0; +#X connect 18 0 36 0; +#X connect 19 0 24 0; +#X connect 20 0 18 0; +#X connect 22 0 19 0; +#X connect 23 0 22 0; +#X connect 24 0 25 0; +#X connect 25 0 26 1; +#X connect 26 0 46 0; +#X connect 26 0 46 1; +#X connect 29 0 30 0; +#X connect 29 0 14 0; +#X connect 30 0 33 1; +#X connect 30 0 36 1; +#X connect 31 0 13 0; +#X connect 33 0 9 0; +#X connect 35 0 20 0; +#X connect 36 0 37 0; +#X connect 37 0 19 1; +#X connect 49 0 23 0; diff --git a/pd/doc/3.audio.examples/G05.delay.reverb.pd b/pd/doc/3.audio.examples/G05.delay.reverb.pd index aad17023..0f5827f9 100644 --- a/pd/doc/3.audio.examples/G05.delay.reverb.pd +++ b/pd/doc/3.audio.examples/G05.delay.reverb.pd @@ -4,7 +4,7 @@ #X obj 74 201 -~; #X obj 74 177 *~ 3; #X obj 111 183 *~ 2; -#X floatatom 74 81 0 0 0; +#X floatatom 74 81 0 0 0 0 - - -; #X obj 74 153 clip~ 0 0.667; #X text 124 80 <-- pitch; #X obj 74 105 mtof; @@ -134,9 +134,9 @@ #X restore 75 129 pd test-input; #X text 328 322 updated for Pd version 0.26; #X text 62 8 REVERBERATOR; -#X floatatom 75 100 0 0 0; +#X floatatom 75 100 0 0 0 0 - - -; #X text 126 105 <-- pitch; -#X floatatom 137 219 0 0 0; +#X floatatom 137 219 0 0 0 0 - - -; #N canvas 159 26 618 379 output 0; #X obj 393 156 t b; #X obj 393 106 f; @@ -200,21 +200,16 @@ #X restore 75 247 pd output; #X msg 166 219 MUTE; #X text 184 217 <-- output amplitude; -#N canvas 137 269 1056 577 reverb 0; -#X obj 77 37 inlet~; -#X obj 77 85 echo echo-del2 8.45346; -#X obj 77 61 echo echo-del1 5.43216; -#X obj 77 109 echo echo-del3 13.4367; -#X obj 77 133 echo echo-del4 21.5463; -#X obj 77 157 echo echo-del5 34.3876; -#X obj 77 181 echo echo-del6 55.5437; -#X obj 253 545 delwrite~ loop-del1 70; -#X obj 295 157 delread~ loop-del1 70; -#X obj 466 157 delread~ loop-del2 81.9345; -#X obj 416 545 delwrite~ loop-del2 81.9345; -#X obj 665 154 delread~ loop-del3 94.7545; -#X obj 855 154 delread~ loop-del4 115.945; -#X obj 622 545 delwrite~ loop-del3 94.7545; +#N canvas 42 106 1114 602 reverb 1; +#X obj 13 19 inlet~; +#X obj 13 43 reverb-echo echo-del1 5.43216; +#X obj 124 547 delwrite~ loop-del1 70; +#X obj 303 154 delread~ loop-del1 70; +#X obj 441 177 delread~ loop-del2 81.9345; +#X obj 326 547 delwrite~ loop-del2 81.9345; +#X obj 727 163 delread~ loop-del3 94.7545; +#X obj 788 186 delread~ loop-del4 115.945; +#X obj 572 547 delwrite~ loop-del3 94.7545; #X obj 820 545 delwrite~ loop-del4 115.945; #X obj 282 215 +~; #X obj 443 215 +~; @@ -228,12 +223,12 @@ #X obj 411 397 +~; #X obj 615 407 -~; #X obj 785 388 -~; -#X obj 620 474 *~ 0; -#X obj 620 511 lop~ 5000; -#X obj 415 472 *~ 0; -#X obj 415 510 lop~ 5000; -#X obj 246 475 *~ 0; -#X obj 246 513 lop~ 5000; +#X obj 570 476 *~ 0; +#X obj 570 513 lop~ 5000; +#X obj 325 474 *~ 0; +#X obj 325 512 lop~ 5000; +#X obj 117 477 *~ 0; +#X obj 117 515 lop~ 5000; #X obj 821 472 *~ 0; #X obj 821 506 lop~ 5000; #X obj 924 254 inlet; @@ -242,64 +237,69 @@ #X msg 979 303 100; #X msg 930 349 -100; #X obj 934 386 / 200; -#X connect 0 0 2 0; -#X connect 1 0 3 0; -#X connect 1 1 3 1; -#X connect 2 0 1 0; -#X connect 2 1 1 1; -#X connect 3 0 4 0; -#X connect 3 1 4 1; -#X connect 4 0 5 0; -#X connect 4 1 5 1; -#X connect 5 0 6 0; -#X connect 5 1 6 1; -#X connect 6 0 15 0; -#X connect 6 1 16 0; -#X connect 8 0 15 1; -#X connect 9 0 16 1; -#X connect 11 0 19 1; -#X connect 11 0 21 1; -#X connect 12 0 20 1; -#X connect 12 0 22 1; -#X connect 15 0 17 0; -#X connect 15 0 19 0; -#X connect 15 0 21 0; -#X connect 16 0 18 0; -#X connect 16 0 20 0; -#X connect 16 0 22 0; -#X connect 19 0 23 0; -#X connect 19 0 25 0; -#X connect 20 0 25 1; -#X connect 20 0 23 1; -#X connect 21 0 24 0; -#X connect 21 0 26 0; -#X connect 22 0 24 1; -#X connect 22 0 26 1; -#X connect 23 0 27 0; -#X connect 24 0 29 0; -#X connect 25 0 31 0; -#X connect 26 0 33 0; -#X connect 27 0 28 0; -#X connect 28 0 13 0; -#X connect 29 0 30 0; -#X connect 30 0 10 0; +#X obj 13 67 reverb-echo echo-del2 8.45346; +#X obj 13 91 reverb-echo echo-del3 13.4367; +#X obj 13 115 reverb-echo echo-del4 21.5463; +#X obj 13 139 reverb-echo echo-del5 34.3876; +#X obj 13 163 reverb-echo echo-del6 55.5437; +#X connect 0 0 1 0; +#X connect 1 0 36 0; +#X connect 1 1 36 1; +#X connect 3 0 10 1; +#X connect 4 0 11 1; +#X connect 6 0 14 1; +#X connect 6 0 16 1; +#X connect 7 0 15 1; +#X connect 7 0 17 1; +#X connect 10 0 12 0; +#X connect 10 0 14 0; +#X connect 10 0 16 0; +#X connect 11 0 13 0; +#X connect 11 0 15 0; +#X connect 11 0 17 0; +#X connect 14 0 18 0; +#X connect 14 0 20 0; +#X connect 15 0 20 1; +#X connect 15 0 18 1; +#X connect 16 0 19 0; +#X connect 16 0 21 0; +#X connect 17 0 19 1; +#X connect 17 0 21 1; +#X connect 18 0 22 0; +#X connect 19 0 24 0; +#X connect 20 0 26 0; +#X connect 21 0 28 0; +#X connect 22 0 23 0; +#X connect 23 0 8 0; +#X connect 24 0 25 0; +#X connect 25 0 5 0; +#X connect 26 0 27 0; +#X connect 27 0 2 0; +#X connect 28 0 29 0; +#X connect 29 0 9 0; +#X connect 30 0 31 0; #X connect 31 0 32 0; -#X connect 32 0 7 0; -#X connect 33 0 34 0; -#X connect 34 0 14 0; -#X connect 35 0 36 0; +#X connect 31 1 33 0; +#X connect 32 0 34 0; +#X connect 32 1 35 0; +#X connect 33 0 32 0; +#X connect 34 0 35 0; +#X connect 35 0 28 1; +#X connect 35 0 26 1; +#X connect 35 0 24 1; +#X connect 35 0 22 1; #X connect 36 0 37 0; -#X connect 36 1 38 0; -#X connect 37 0 39 0; -#X connect 37 1 40 0; -#X connect 38 0 37 0; +#X connect 36 1 37 1; +#X connect 37 0 38 0; +#X connect 37 1 38 1; +#X connect 38 0 39 0; +#X connect 38 1 39 1; #X connect 39 0 40 0; -#X connect 40 0 33 1; -#X connect 40 0 31 1; -#X connect 40 0 29 1; -#X connect 40 0 27 1; +#X connect 39 1 40 1; +#X connect 40 0 10 0; +#X connect 40 1 11 0; #X restore 50 193 pd reverb; -#X floatatom 108 163 0 0 0; +#X floatatom 108 163 0 0 0 0 - - -; #X text 143 163 <-- feedback (100 maximum); #X text 32 41 Here is a simple recirculating reverberator. "Feedback" should be between -100 and 100; diff --git a/pd/doc/3.audio.examples/H01.intro.filters.pd b/pd/doc/3.audio.examples/H01.intro.filters.pd new file mode 100644 index 00000000..4a64a0b5 --- /dev/null +++ b/pd/doc/3.audio.examples/H01.intro.filters.pd @@ -0,0 +1,72 @@ +#N canvas 124 28 964 549 12; +#X floatatom 20 391; +#X floatatom 297 394; +#X floatatom 210 394; +#X graph graph1 0 -1 400 1 544 335 944 35; +#X array orig 400 float; +#X array lop 400 float; +#X array hip 400 float; +#X array bp 400 float; +#X pop; +#X obj 334 457 r metro; +#X obj 180 322 hip~ 100; +#X obj 105 320 lop~ 100; +#X obj 273 322 bp~ 100 10; +#X floatatom 255 245; +#X floatatom 338 295; +#X floatatom 118 393; +#X text 9 11 Filters; +#X msg 87 130 \; pd dsp 1 \; metro bang; +#X msg 191 135 \; pd dsp 0; +#X text 15 417 Original; +#X text 122 417 Low pass; +#X text 210 417 High pass; +#X text 298 416 Band pass; +#X obj 14 517 tabwrite~ orig; +#X obj 309 520 tabwrite~ bp; +#X obj 213 520 tabwrite~ hip; +#X obj 116 519 tabwrite~ lop; +#X text 97 110 start; +#X text 193 111 stop; +#X floatatom 14 235; +#X obj 14 261 osc~ 440; +#X text 51 236 <-- change frequency; +#X text 294 247 <-- center/rolloff frequency; +#X text 374 297 <-- Q; +#X text 548 341 This graph holds 4 arrays for the input and three filter outputs.; +#X text 375 389 RMS amplitudes of the original signal and the three filter outputs; +#X text 746 536 updated for Pd version 0.26; +#X obj 334 482 metro 1000; +#X text 29 33 Pd provides low \, high \, and band pass filters \, as shown here. By changing the test frequency \, the filter frequency \, and the "Q" value \, you can see how these filters affect the amplitude and phase of incoming signals; +#X obj 20 366 env~ 4096; +#X obj 118 368 env~ 4096; +#X obj 210 369 env~ 4096; +#X obj 297 369 env~ 4096; +#X obj 91 213 print~; +#X text 456 434 Notice how the phase of the graphed sinusoids slips back and forth... this is because graphing always starts on the nearest 64-sample boundary to the time the metronome fires. If you run at 48K the slippage disappears \, because then the metronome fires every 48K samples \, which is a multiple of 64; +#X connect 4 0 32 0; +#X connect 5 0 20 0; +#X connect 5 0 36 0; +#X connect 6 0 21 0; +#X connect 6 0 35 0; +#X connect 7 0 19 0; +#X connect 7 0 37 0; +#X connect 8 0 6 1; +#X connect 8 0 5 1; +#X connect 8 0 7 1; +#X connect 9 0 7 2; +#X connect 24 0 25 0; +#X connect 25 0 18 0; +#X connect 25 0 6 0; +#X connect 25 0 5 0; +#X connect 25 0 7 0; +#X connect 25 0 34 0; +#X connect 25 0 38 0; +#X connect 32 0 18 0; +#X connect 32 0 21 0; +#X connect 32 0 20 0; +#X connect 32 0 19 0; +#X connect 34 0 0 0; +#X connect 35 0 10 0; +#X connect 36 0 2 0; +#X connect 37 0 1 0; diff --git a/pd/doc/3.audio.examples/H01.more.FM.pd b/pd/doc/3.audio.examples/H01.more.FM.pd deleted file mode 100644 index 1b0e112b..00000000 --- a/pd/doc/3.audio.examples/H01.more.FM.pd +++ /dev/null @@ -1,132 +0,0 @@ -#N canvas 25 100 785 694 12; -#X floatatom 197 602 0 0 0; -#N canvas 159 26 541 274 output 0; -#X obj 351 166 t b; -#X obj 351 114 f; -#X obj 351 62 inlet; -#X text 358 30 mute; -#X obj 351 192 f; -#X msg 442 186 0; -#X msg 351 88 bang; -#X obj 351 140 moses 1; -#X obj 413 114 moses 1; -#X obj 86 153 dbtorms; -#X obj 413 88 r master-lvl; -#X obj 86 44 r master-lvl; -#X obj 351 218 s master-lvl; -#X obj 12 166 inlet~; -#X obj 207 43 inlet; -#X text 207 19 level; -#X obj 207 104 s master-lvl; -#X msg 100 67 set \$1; -#X obj 100 93 outlet; -#X msg 222 67 \; pd dsp 1; -#X obj 86 205 line~; -#X obj 12 218 *~; -#X obj 12 244 dac~; -#X obj 86 179 pack 0 50; -#X text 12 142 audio; -#X text 100 118 show level; -#X obj 12 192 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 158 630 pd output; -#X msg 234 602 MUTE; -#X text 528 618 updated for Pd version 0.34; -#X text 277 601 <-- output; -#X text 79 4 FM \, PWM \, PAF as formant generators; -#X text 39 22 The next several patches illustrate "Synthesizing Sounds -with Specified \, Time-Varying Spectra" presented at ICMC 2001 and -reprinted on http://www.crca.ucsd.edu/~msp/publications.html.; -#X obj 146 468 line~; -#X obj 146 444 pack 0 50; -#X floatatom 146 389 0 0 0; -#X obj 124 493 *~; -#X text 145 367 index; -#X floatatom 248 398 0 0 0; -#X text 250 370 carrier freq; -#X obj 158 547 cos~; -#X graph graph1 0 0 128 500 499 556 755 426; -#X array spectrum 128 float 0; -#X pop; -#X msg 233 546 bang; -#X text 271 543 <-- click to graph; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 187 574 pd fft; -#X text 490 562 0; -#X text 738 559 5512; -#X obj 153 520 +~; -#X obj 248 448 phasor~; -#X obj 23 458 osc~ 172.266; -#X obj 146 417 / 100; -#X obj 248 422 * 172.266; -#X text 34 93 First compare this phase modulation example with the -ring modulation example from the section on processing (patch 51). -Here we choose a convenient \, fixed modulation frequency and consider -the effect of changing carrier frequency and modulation index. It's -exactly as if the carrier frequency were a ring modulation frequency. -; -#X text 33 331 Next we'll look at two techniques for sliding a formant -frequency without losing harmonicity.; -#X text 33 191 Using either method we can synthesize the hat-shaped -spectra called "formants." However \, if you try to move the formant -up or down in frequency \, you'll lose harmonicity \; the partials -are only integer multiples of the fundamental \, 172.266 \, when the -carrier is an integer multiple. To hear this \, set index to 20 and -carrier frequency to zero \, and scroll carrier through integers. Then -shift-drag on the carrier frequency to change it in hundredths. Presto -\, inharmonic sounds...; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 7 0 10 1; -#X connect 8 0 7 0; -#X connect 9 0 24 0; -#X connect 10 0 21 0; -#X connect 12 0 25 0; -#X connect 14 0 1 0; -#X connect 14 0 18 0; -#X connect 16 0 18 1; -#X connect 21 0 14 0; -#X connect 22 0 21 1; -#X connect 23 0 10 0; -#X connect 24 0 8 0; -#X connect 25 0 22 0; diff --git a/pd/doc/3.audio.examples/H02.bandpass.pd b/pd/doc/3.audio.examples/H02.bandpass.pd new file mode 100644 index 00000000..0ce9cc47 --- /dev/null +++ b/pd/doc/3.audio.examples/H02.bandpass.pd @@ -0,0 +1,146 @@ +#N canvas 58 17 943 765 12; +#X floatatom 91 731 0 0 0; +#X graph graph1 0 -1 155947 1 624 401 824 251; +#X array array1 155948 float 0; +#X pop; +#X floatatom 247 705 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 406 192 t b; +#X obj 406 132 f; +#X obj 406 72 inlet; +#X text 413 35 mute; +#X obj 406 222 f; +#X msg 510 214 0; +#X msg 406 102 bang; +#X obj 406 162 moses 1; +#X obj 510 184 t b f; +#X obj 476 140 moses 1; +#X obj 100 178 dbtorms; +#X obj 476 110 r master-lvl; +#X obj 100 50 r master-lvl; +#X obj 406 252 s master-lvl; +#X obj 26 217 inlet~; +#X obj 239 49 inlet; +#X text 239 22 level; +#X obj 239 120 s master-lvl; +#X msg 115 78 set \$1; +#X obj 115 107 outlet; +#X msg 257 77 \; pd dsp 1; +#X obj 100 233 line~; +#X obj 26 254 *~; +#X obj 26 289 dac~; +#X obj 100 205 pack 0 50; +#X text 24 190 audio; +#X text 112 132 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 210 740 pd output; +#X msg 280 707 MUTE; +#X text 320 706 <-- output amplitude; +#X obj 206 654 hip~ 5; +#X obj 31 545 tabread4~ array1; +#X obj 31 340 r totsamps; +#X obj 31 430 /; +#X obj 206 625 bp~; +#X obj 206 596 bp~; +#X obj 216 463 mtof; +#X floatatom 216 491 0 0 0; +#X floatatom 319 570 0 0 0; +#X obj 319 541 r q; +#X floatatom 216 434 0 0 0; +#X msg 227 550 \; p set \$1; +#X obj 216 406 r p; +#X obj 90 647 env~ 4096; +#X obj 31 487 *~ 0; +#X obj 31 458 phasor~ 0; +#X obj 31 516 +~ 1; +#X obj 227 521 ftom; +#X msg 826 49 \; pd dsp 0; +#X obj 90 674 + 0.5; +#X obj 91 702 int; +#X msg 31 400 44100; +#X obj 31 368 t b f; +#X text 648 14 START; +#X text 845 19 STOP; +#X text 88 11 BANDPASS FILTERS; +#X text 12 41 In this example we use two cascaded bandpass filters +to troll for partials in Jonathan Harvey's famous bell sample.; +#X obj 78 487 r totsamps; +#X text 14 82 Note that filters can give unexpected level changes. +The bp~ object is designed to have roughly unit gain at teh pass band +\, so the higher you set "Q" the more amplitude is lost. YOu can correct +for this by pushing the output amplitude \, but be sure to remember +to reset the output amplitude before you reduce Q again. I set the +Q to 100 and the output amplitude to 110 or 120 (with the room gain +way down.) Then holding the shift key \, slowly drag the center pitch +upward listening for modes.; +#X text 16 233 You can hear partials around 48 \, 51.3 \, 55 (faint!) +\, 57 (fainter!) \, 60 \, two beating partials around 65 \, 67 \, 69 +\, 70.9 \, 71.75 \, 72.6 \, 74 \, 74.65 \, 75.6 \, 77 \, 81.2 \, 84.6 +\, 86.5 \, and probably many more. There's also one down at 36 \, but +it's easier to see it on the meter than hear it.; +#X text 271 436 <-- center pitch; +#X text 281 450 (shift-drag to fine tune); +#X text 292 492 <-- center frequency; +#X text 359 570 <-- Q (filter selectivity); +#X obj 683 453 r readfile; +#X obj 683 530 soundfiler; +#X msg 683 503 read -resize \$1 array1; +#X obj 683 478 symbol; +#X msg 553 48 \; readfile ../sound/bell.aiff \; totsamps 143718 \; +p 69 \; q 0 \; pd dsp 1; +#X text 681 739 updated for Pd version 0.33; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 6 0 3 0; +#X connect 7 0 11 0; +#X connect 8 0 28 0; +#X connect 9 0 21 0; +#X connect 10 0 6 0; +#X connect 10 0 19 0; +#X connect 11 0 10 0; +#X connect 12 0 13 0; +#X connect 13 0 11 1; +#X connect 13 0 10 1; +#X connect 13 0 23 0; +#X connect 14 0 11 2; +#X connect 14 0 10 2; +#X connect 15 0 14 0; +#X connect 16 0 12 0; +#X connect 18 0 16 0; +#X connect 19 0 25 0; +#X connect 20 0 22 0; +#X connect 21 0 20 0; +#X connect 22 0 7 0; +#X connect 23 0 17 0; +#X connect 25 0 26 0; +#X connect 26 0 0 0; +#X connect 27 0 9 0; +#X connect 28 0 27 0; +#X connect 28 1 9 1; +#X connect 33 0 20 1; +#X connect 40 0 43 0; +#X connect 42 0 41 0; +#X connect 43 0 42 0; diff --git a/pd/doc/3.audio.examples/H02.packets.pd b/pd/doc/3.audio.examples/H02.packets.pd deleted file mode 100644 index 072ae27d..00000000 --- a/pd/doc/3.audio.examples/H02.packets.pd +++ /dev/null @@ -1,161 +0,0 @@ -#N canvas 83 221 878 705 12; -#X obj 315 424 line~; -#X obj 47 517 cos~; -#X graph graph1 0 -2 882 2 644 469 844 339; -#X array pulse-output 882 float 0; -#X pop; -#X floatatom 84 633 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 48 660 pd output; -#X msg 124 633 MUTE; -#X obj 315 400 pack 0 50; -#X floatatom 315 328 0 0 0; -#X obj 47 429 -~ 0.5; -#X obj 47 468 *~; -#X obj 315 352 / 10; -#X obj 47 493 clip~ -0.5 0.5; -#X text 315 306 bandwidth; -#X msg 165 602 bang; -#X obj 315 448 +~ 1; -#X obj 48 540 +~ 1; -#X obj 197 513 cos~; -#X obj 48 569 *~; -#X floatatom 219 342 4 0 0; -#X obj 219 366 / 10; -#X text 644 472 --- 0.02 seconds ---; -#X obj 197 487 *~; -#N canvas 204 427 939 588 graph 0; -#X obj 91 345 inlet~; -#X obj 729 341 inlet; -#X obj 74 395 tabwrite~ pulse-output; -#X obj 319 350 inlet~; -#X obj 493 343 inlet~; -#X obj 302 400 tabwrite~ window; -#X obj 484 401 tabwrite~ carrier; -#X msg 390 53 \; array2 rename window; -#X connect 0 0 2 0; -#X connect 1 0 2 0; -#X connect 1 0 5 0; -#X connect 1 0 6 0; -#X connect 3 0 5 0; -#X connect 4 0 6 0; -#X restore 76 602 pd graph; -#X obj 315 376 max 0; -#X obj 219 438 line~; -#X obj 219 414 pack 0 50; -#X obj 219 390 max 0; -#X graph graph3 0 -2 881 2 644 328 844 188; -#X array carrier 882 float 0; -#X pop; -#X graph graph4 0 -2 881 2 645 175 845 35; -#X array window 882 float 0; -#X pop; -#X text 211 601 <-- graph; -#X floatatom 47 381 4 0 0; -#X obj 47 405 phasor~ 100; -#X text 31 2 WINDOWED PACKETS; -#X text 169 632 <-- output; -#X text 43 356 freq.; -#X text 43 337 fundamental; -#X text 28 51 The simpler technique is to synthesize enveloped sinusoidal -wave packets. The packets should repeat at the fundamental frequency -\, but the frequency of the packet itself controls the center frequency -of the formant. The length of the packet varies inversely with bandwidth. -; -#X text 27 132 In the patch below \, the "clip~" followed by "cos~" -and "+~ 1" is the enveloping ("windowing" function \, which appears -in the top graph. This is just the original PWM patch from part 2 The -carrier \, on the other hand \, is a broken sinusoid made by amplifying -the phasor~ (the "*~" controlled by "center freq.") and taking the -cos~ of the result. The "breaks" in the sinusoid only occur when the -enveloping signal is zero.; -#X text 197 256 center; -#X text 195 275 freq. (in; -#X text 194 294 tenths of; -#X text 193 314 fundamental); -#X text 92 535 window; -#X text 233 487 magnified phase; -#X text 278 531 desired center frequency; -#X text 250 514 <--this cosine goes at the; -#X text 279 550 but its phase is reset each; -#X text 277 569 fundamental period.; -#X text 612 666 updated for Pd version 0.34; -#X connect 0 0 14 0; -#X connect 1 0 15 0; -#X connect 3 0 4 1; -#X connect 4 0 3 0; -#X connect 5 0 4 2; -#X connect 6 0 0 0; -#X connect 7 0 10 0; -#X connect 8 0 9 0; -#X connect 8 0 21 0; -#X connect 9 0 11 0; -#X connect 10 0 23 0; -#X connect 11 0 1 0; -#X connect 13 0 22 3; -#X connect 14 0 9 1; -#X connect 15 0 17 0; -#X connect 15 0 22 1; -#X connect 16 0 17 1; -#X connect 16 0 22 2; -#X connect 17 0 22 0; -#X connect 17 0 4 0; -#X connect 18 0 19 0; -#X connect 19 0 26 0; -#X connect 21 0 16 0; -#X connect 23 0 6 0; -#X connect 24 0 21 1; -#X connect 25 0 24 0; -#X connect 26 0 25 0; -#X connect 30 0 31 0; -#X connect 31 0 8 0; diff --git a/pd/doc/3.audio.examples/H03.filter.sweep.pd b/pd/doc/3.audio.examples/H03.filter.sweep.pd new file mode 100644 index 00000000..0d478275 --- /dev/null +++ b/pd/doc/3.audio.examples/H03.filter.sweep.pd @@ -0,0 +1,173 @@ +#N canvas 194 58 693 586 12; +#X text 437 559 updated for Pd version 0.26; +#X floatatom 70 539 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 41 567 pd output; +#X msg 99 539 MUTE; +#X text 138 538 <-- output amplitude; +#X obj 41 212 line~; +#X floatatom 41 164 0 0 0; +#X obj 41 188 pack 0 100; +#X obj 528 110 loadbang; +#X text 35 6 SWEEPING FILTERS; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 302 48 graph; +#X text 504 141 0; +#X text 506 41 10; +#X text 321 151 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 309 225 graph; +#X text 319 333 ------ 130 samples ------; +#X text 518 318 0; +#X text 520 218 12000; +#X restore 461 256 pd conversion-tables; +#X obj 41 260 phasor~; +#X obj 41 236 tabread4~ mtof; +#X obj 174 384 +~; +#X obj 190 361 line~; +#X obj 190 337 pack 0 100; +#X floatatom 190 313 0 0 0; +#X floatatom 174 164 0 0 0; +#X floatatom 197 238 0 0 0; +#X obj 41 140 r pitch; +#X obj 197 214 r depth; +#X obj 174 140 r speed; +#X obj 190 289 r offset; +#X obj 121 465 r q; +#X floatatom 121 489 0 0 0; +#X obj 41 484 vcf~; +#X obj 41 508 hip~ 5; +#X obj 174 263 *~ 0; +#X obj 174 188 phasor~ 0; +#X obj 174 408 tabread4~ mtof; +#X msg 528 134 \; pitch 48 \; speed -2 \; depth 27 \; offset 56 \; +q 2; +#X text 160 490 <-- Q (selectivity); +#X text 51 277 sawtooth; +#X text 50 291 oscillator; +#X text 228 167 <-- sweep speed; +#X text 265 189 LFO for sweep; +#X text 251 241 <-- sweep depth; +#X text 242 316 <-- base center frequency; +#X text 218 383 add base to sweep; +#X text 307 408 convert to Hz.; +#X text 13 28 If you want actively changing center frequencies \, use +"vcf~" instead of "bp~". The vcf~ module takes an audio signal to set +center frequency. (Q is still set by messages though.) Vcf is somewhat +more expensive than bp~.; +#X text 78 165 <-- pitch; +#X text 13 95 Note the effect of negative and positive sweep speed. +; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 12 0; +#X connect 6 0 7 0; +#X connect 7 0 5 0; +#X connect 8 0 30 0; +#X connect 11 0 25 0; +#X connect 12 0 11 0; +#X connect 13 0 29 0; +#X connect 14 0 13 1; +#X connect 15 0 14 0; +#X connect 16 0 15 0; +#X connect 17 0 28 0; +#X connect 18 0 27 1; +#X connect 19 0 6 0; +#X connect 20 0 18 0; +#X connect 21 0 17 0; +#X connect 22 0 16 0; +#X connect 23 0 24 0; +#X connect 24 0 25 2; +#X connect 25 0 26 0; +#X connect 26 0 2 0; +#X connect 27 0 13 0; +#X connect 28 0 27 0; +#X connect 29 0 25 1; diff --git a/pd/doc/3.audio.examples/H03.packet.spectrum.pd b/pd/doc/3.audio.examples/H03.packet.spectrum.pd deleted file mode 100644 index bef1483b..00000000 --- a/pd/doc/3.audio.examples/H03.packet.spectrum.pd +++ /dev/null @@ -1,147 +0,0 @@ -#N canvas 83 221 774 628 12; -#X obj 302 351 line~; -#X obj 34 444 cos~; -#X floatatom 71 560 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 35 587 pd output; -#X msg 111 560 MUTE; -#X obj 302 327 pack 0 50; -#X floatatom 302 255 0 0 0; -#X obj 34 356 -~ 0.5; -#X obj 34 395 *~; -#X obj 302 279 / 10; -#X obj 34 420 clip~ -0.5 0.5; -#X text 302 233 bandwidth; -#X obj 302 375 +~ 1; -#X obj 35 467 +~ 1; -#X obj 184 440 cos~; -#X obj 35 496 *~; -#X floatatom 206 269 4 0 0; -#X obj 206 293 / 10; -#X obj 184 414 *~; -#X text 204 224 center; -#X text 204 243 freq.; -#X obj 302 303 max 0; -#X obj 206 365 line~; -#X obj 206 341 pack 0 50; -#X obj 206 317 max 0; -#X floatatom 34 308 4 0 0; -#X obj 34 332 phasor~ 100; -#X text 156 559 <-- output; -#X text 30 283 freq.; -#X text 30 264 fundamental; -#X graph graph1 0 0 128 500 440 492 696 362; -#X array spectrum 128 float 0; -#X pop; -#X msg 108 498 bang; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 59 524 pd fft; -#X text 439 502 0; -#X text 687 499 5512; -#X text 149 498 <-- graph; -#X text 31 2 WINDOWED PACKET SPECTRUM; -#X text 19 34 Here's the spectrum you get. Note that even if you put -the center frequency right on a partial \, there is significant energy -in neighboring partials (try fundamental 440 \, "center freq" 30 \, -bandwidth 0.); -#X text 18 104 The center frequency is in units of ten per partial -\, or in other words a value of "30" means "centered on the third partial". -; -#X text 505 596 updated for Pd version 0.34; -#X text 22 155 This technique only works if you're doing Hanning-window -shaped PWM--you can't combine this naturally with FM or with the waveshaping -technique we'll see later.; -#X connect 0 0 12 0; -#X connect 1 0 13 0; -#X connect 2 0 3 1; -#X connect 3 0 2 0; -#X connect 4 0 3 2; -#X connect 5 0 0 0; -#X connect 6 0 9 0; -#X connect 7 0 8 0; -#X connect 7 0 18 0; -#X connect 8 0 10 0; -#X connect 9 0 21 0; -#X connect 10 0 1 0; -#X connect 12 0 8 1; -#X connect 13 0 15 0; -#X connect 14 0 15 1; -#X connect 15 0 3 0; -#X connect 15 0 32 0; -#X connect 16 0 17 0; -#X connect 17 0 24 0; -#X connect 18 0 14 0; -#X connect 21 0 5 0; -#X connect 22 0 18 1; -#X connect 23 0 22 0; -#X connect 24 0 23 0; -#X connect 25 0 26 0; -#X connect 26 0 7 0; -#X connect 31 0 32 1; diff --git a/pd/doc/3.audio.examples/H04.filter.floyd.pd b/pd/doc/3.audio.examples/H04.filter.floyd.pd new file mode 100644 index 00000000..02027117 --- /dev/null +++ b/pd/doc/3.audio.examples/H04.filter.floyd.pd @@ -0,0 +1,193 @@ +#N canvas 133 190 795 593 12; +#X floatatom 44 540 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 15 568 pd output; +#X msg 90 540 MUTE; +#X text 151 539 <-- output amplitude; +#X obj 487 217 loadbang; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 302 48 graph; +#X text 504 141 0; +#X text 506 41 10; +#X text 321 151 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 309 225 graph; +#X text 319 333 ------ 130 samples ------; +#X text 518 318 0; +#X text 520 218 12000; +#X restore 490 428 pd conversion-tables; +#X obj 250 308 line~; +#X obj 250 284 pack 0 100; +#X floatatom 251 213 0 0 0; +#X obj 171 413 r q; +#X floatatom 171 437 0 0 0; +#X obj 15 492 vcf~; +#X obj 15 516 hip~ 5; +#X obj 250 333 tabread4~ mtof; +#X text 214 436 <-- Q (selectivity); +#X text 277 354 convert to Hz.; +#X text 35 6 ANOTHER SWEEPING FILTER EXAMPLE; +#X obj 15 286 clip~ 0 0.5; +#X obj 15 310 *~ 2; +#X obj 15 334 -~; +#X text 121 270 trick to; +#X text 121 291 make symmetric; +#X text 121 312 triangle wave; +#X obj 31 161 f; +#X obj 64 159 + 1; +#X obj 31 211 tabread array1; +#X obj 31 235 mtof; +#X obj 31 113 r metro; +#X obj 64 183 mod 8; +#X obj 31 259 phasor~ 0; +#N canvas 0 0 450 300 graph1 0; +#X array array1 8 float 0; +#X coords 0 96 8 36 200 100 1; +#X restore 464 75 graph; +#X obj 251 189 r cf; +#X text 293 210 <-- center frequency; +#X obj 31 137 metro 85; +#X obj 15 376 hip~ 5000; +#X obj 15 399 *~ 100; +#X obj 252 237 moses 61; +#X msg 251 260 61; +#X msg 487 241 \; cf 61 \; q 30 \; metro 1 \; array1 0 45 48 50 48 +55 53 55 57; +#X text 13 28 Here's an approximate reconstruction of an old riff by +Pink Floyd (I haven't checked the tempo or transposition against the +original yet.) Because we're filtering a waveform with odd partials +\, it's easier to pick out the partials in the filtered sound.; +#X text 104 352 Here we fudge; +#X text 100 371 to better imitate; +#X text 100 390 the EMS3 bandpass; +#X text 85 403 sound; +#X text 340 231 protect against; +#X text 341 252 hitting the; +#X text 341 271 fundamental; +#X text 137 139 sequencer for; +#X text 137 158 8 note loop; +#X obj 171 459 moses 1; +#X msg 144 459 1; +#X text 241 460 speaker protection; +#X text 437 558 updated for Pd version 0.35; +#X connect 0 0 1 1; +#X connect 1 0 0 0; +#X connect 2 0 1 2; +#X connect 4 0 38 0; +#X connect 6 0 13 0; +#X connect 7 0 6 0; +#X connect 8 0 36 0; +#X connect 9 0 10 0; +#X connect 10 0 49 0; +#X connect 11 0 12 0; +#X connect 12 0 1 0; +#X connect 13 0 11 1; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 19 0 34 0; +#X connect 23 0 24 0; +#X connect 23 0 25 0; +#X connect 24 0 28 0; +#X connect 25 0 26 0; +#X connect 26 0 29 0; +#X connect 27 0 33 0; +#X connect 28 0 23 1; +#X connect 29 0 17 0; +#X connect 29 0 19 1; +#X connect 31 0 8 0; +#X connect 33 0 23 0; +#X connect 34 0 35 0; +#X connect 35 0 11 0; +#X connect 36 0 37 0; +#X connect 36 1 7 0; +#X connect 37 0 7 0; +#X connect 49 0 50 0; +#X connect 49 1 11 2; +#X connect 50 0 11 2; diff --git a/pd/doc/3.audio.examples/H04.two.cosines.pd b/pd/doc/3.audio.examples/H04.two.cosines.pd deleted file mode 100644 index 0f813164..00000000 --- a/pd/doc/3.audio.examples/H04.two.cosines.pd +++ /dev/null @@ -1,124 +0,0 @@ -#N canvas 10 49 705 610 12; -#X floatatom 262 549 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 226 576 pd output; -#X msg 302 549 MUTE; -#X msg 59 550 bang; -#X obj 185 427 cos~; -#X floatatom 232 217 4 0 0; -#X obj 232 241 / 10; -#X text 464 288 --- 0.02 seconds ---; -#X obj 185 397 *~; -#X text 236 133 center; -#X obj 232 313 line~; -#X obj 232 265 max 0; -#X graph graph3 0 -2 881 2 450 276 650 136; -#X array carrier 882 float 0; -#X pop; -#X floatatom 33 284 4 0 0; -#X text 29 240 fundamental; -#X text 31 2 ADDING TWO COSINES; -#X text 234 152 freq. (in; -#X text 233 171 tenths of; -#X text 232 191 fundamental); -#X text 29 259 frequency; -#X obj 227 427 cos~; -#X obj 268 340 wrap~; -#X obj 232 367 -~; -#X obj 227 397 +~; -#X obj 232 464 -~; -#X obj 247 494 *~; -#X obj 225 519 +~; -#X obj 59 578 tabwrite~ carrier; -#X obj 33 308 phasor~ 40; -#X obj 232 289 pack 0 50; -#X text 27 36 The other \, spiffier way is to make a sum of cosines -to interpolate between adjacent harmonics. Suppose for example we want -a center frequency of 5.3 (in units of the fundamental.) We just take -partial 5 with amplitude 0.7 and partial 6 with amplitude 0.7:; -#X text 451 581 updated for Pd version 0.34; -#X text 281 366 subtract to get the integer part "n"; -#X text 277 399 multiply phase by n and n+1; -#X text 282 427 synthesize the two partials; -#X text 54 526 graph; -#X text 347 548 <--output; -#X text 323 339 the fractional part "b"; -#X text 280 463 p2 - p1; -#X text 295 492 b * (p2 - p1); -#X text 264 519 b * p2 + (1-b) * p1; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 27 0; -#X connect 4 0 24 1; -#X connect 4 0 26 0; -#X connect 5 0 6 0; -#X connect 6 0 11 0; -#X connect 8 0 4 0; -#X connect 8 0 23 0; -#X connect 10 0 22 0; -#X connect 10 0 21 0; -#X connect 11 0 29 0; -#X connect 13 0 28 0; -#X connect 20 0 24 0; -#X connect 21 0 22 1; -#X connect 21 0 25 1; -#X connect 22 0 8 1; -#X connect 23 0 20 0; -#X connect 24 0 25 0; -#X connect 25 0 26 1; -#X connect 26 0 1 0; -#X connect 26 0 27 0; -#X connect 28 0 8 0; -#X connect 28 0 23 1; -#X connect 29 0 10 0; diff --git a/pd/doc/3.audio.examples/H05.declickit.pd b/pd/doc/3.audio.examples/H05.declickit.pd deleted file mode 100644 index eb296e63..00000000 --- a/pd/doc/3.audio.examples/H05.declickit.pd +++ /dev/null @@ -1,132 +0,0 @@ -#N canvas 10 49 715 680 12; -#X floatatom 242 612 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 206 639 pd output; -#X msg 282 612 MUTE; -#X obj 165 490 cos~; -#X obj 165 460 *~; -#X obj 207 490 cos~; -#X obj 249 406 wrap~; -#X obj 212 415 -~; -#X obj 207 460 +~; -#X obj 207 525 -~; -#X obj 227 557 *~; -#X obj 205 582 +~; -#X text 454 648 updated for Pd version 0.34; -#X text 327 611 <--output; -#X obj 191 184 loadbang; -#X obj 191 210 metro 400; -#X obj 203 234 del 200; -#X obj 204 335 samphold~; -#X obj 259 364 toggle 20 0 empty empty empty 20 8 0 10 -262144 -1 -1 -0 1; -#X obj 166 290 sig~; -#X msg 203 263 3.5; -#X msg 166 263 2; -#X obj 23 280 phasor~ 169; -#N canvas 0 0 600 400 switch 0; -#X obj 85 52 inlet~; -#X obj 177 58 inlet~; -#X obj 298 66 inlet; -#X obj 112 107 -~; -#X obj 112 131 *~ 0; -#X obj 90 157 +~; -#X obj 160 249 outlet~; -#X connect 0 0 3 1; -#X connect 0 0 5 0; -#X connect 1 0 3 0; -#X connect 2 0 4 1; -#X connect 3 0 4 0; -#X connect 4 0 5 1; -#X connect 5 0 6 0; -#X restore 166 364 pd switch; -#X text 31 2 CHANGING THE CENTER FREQUENCY QUICKLY; -#X text 313 381 off to hear the straight sig~; -#X text 286 363 <--on to hear the "samphold~" \,; -#X text 25 27 Since in the previous patch the amplitudes of the two -cosines depend on "center frequency" we can't change that discontinuously -without clicking \, as you hear in this patch. The fix is to use a -samphold~ object to keep the center frequency frozen except at phase -crossings. At the phase crossings the two weighted cosines add to one -\, so we can discontinuously change the frequencies and weights there. -; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 9 1; -#X connect 3 0 11 0; -#X connect 4 0 3 0; -#X connect 4 0 8 0; -#X connect 5 0 9 0; -#X connect 6 0 7 1; -#X connect 6 0 10 1; -#X connect 7 0 4 1; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 1 0; -#X connect 14 0 15 0; -#X connect 15 0 21 0; -#X connect 15 0 16 0; -#X connect 16 0 20 0; -#X connect 17 0 23 1; -#X connect 18 0 23 2; -#X connect 19 0 17 0; -#X connect 19 0 23 0; -#X connect 20 0 19 0; -#X connect 21 0 19 0; -#X connect 22 0 4 0; -#X connect 22 0 8 1; -#X connect 22 0 17 1; -#X connect 23 0 7 0; -#X connect 23 0 6 0; diff --git a/pd/doc/3.audio.examples/H05.filter.noise.pd b/pd/doc/3.audio.examples/H05.filter.noise.pd new file mode 100644 index 00000000..7421c180 --- /dev/null +++ b/pd/doc/3.audio.examples/H05.filter.noise.pd @@ -0,0 +1,196 @@ +#N canvas 137 175 735 587 12; +#X text 437 559 updated for Pd version 0.26; +#X floatatom 67 397 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 38 425 pd output; +#X msg 96 397 MUTE; +#X text 135 396 <-- output amplitude; +#X obj 515 150 loadbang; +#N canvas 0 0 600 392 conversion-tables 0; +#N canvas 0 0 450 300 graph1 0; +#X array dbtorms 123 float 1; +#A 0 0 0 1.25893e-05 1.41254e-05 1.58489e-05 1.77828e-05 1.99526e-05 +2.23872e-05 2.51189e-05 2.81838e-05 3.16228e-05 3.54813e-05 3.98107e-05 +4.46684e-05 5.01187e-05 5.62341e-05 6.30957e-05 7.07946e-05 7.94328e-05 +8.91251e-05 1e-04 0.000112202 0.000125893 0.000141254 0.000158489 0.000177828 +0.000199526 0.000223872 0.000251189 0.000281838 0.000316228 0.000354813 +0.000398107 0.000446684 0.000501187 0.000562341 0.000630957 0.000707946 +0.000794328 0.000891251 0.001 0.00112202 0.00125893 0.00141254 0.00158489 +0.00177828 0.00199526 0.00223872 0.00251189 0.00281838 0.00316228 0.00354813 +0.00398107 0.00446684 0.00501187 0.00562341 0.00630957 0.00707946 0.00794328 +0.00891251 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 +0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 +0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 +0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 +0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 +0.794328 0.891251 1 1.12202 1.25893 1.41254 1.58489 1.77828 1.99526 +2.23872 2.51189 2.81838 3.16228 3.54813 3.98107 4.46684 5.01187 5.62341 +6.30957 7.07946 7.94328 8.91251 10 11.2202 12.5893; +#X coords 0 10 123 0 200 100 1; +#X restore 70 45 graph; +#X text 272 138 0; +#X text 274 38 10; +#X text 89 148 ------ 123 samples ------; +#N canvas 0 0 450 300 graph2 0; +#X array mtof 130 float 1; +#A 0 8.1758 8.66196 9.17702 9.72272 10.3009 10.9134 11.5623 12.2499 +12.9783 13.75 14.5676 15.4339 16.3516 17.3239 18.354 19.4454 20.6017 +21.8268 23.1247 24.4997 25.9565 27.5 29.1352 30.8677 32.7032 34.6478 +36.7081 38.8909 41.2034 43.6535 46.2493 48.9994 51.9131 55 58.2705 +61.7354 65.4064 69.2957 73.4162 77.7817 82.4069 87.3071 92.4986 97.9989 +103.826 110 116.541 123.471 130.813 138.591 146.832 155.563 164.814 +174.614 184.997 195.998 207.652 220 233.082 246.942 261.626 277.183 +293.665 311.127 329.628 349.228 369.994 391.995 415.305 440 466.164 +493.883 523.251 554.365 587.33 622.254 659.255 698.456 739.989 783.991 +830.609 880 932.328 987.767 1046.5 1108.73 1174.66 1244.51 1318.51 +1396.91 1479.98 1567.98 1661.22 1760 1864.66 1975.53 2093 2217.46 2349.32 +2489.02 2637.02 2793.83 2959.96 3135.96 3322.44 3520 3729.31 3951.07 +4186.01 4434.92 4698.64 4978.03 5274.04 5587.65 5919.91 6271.93 6644.88 +7040 7458.62 7902.13 8372.02 8869.84 9397.27 9956.06 10548.1 11175.3 +11839.8 12543.9 13289.8 14080; +#X coords 0 12000 130 0 200 100 1; +#X restore 77 222 graph; +#X text 87 330 ------ 130 samples ------; +#X text 286 315 0; +#X text 288 215 12000; +#N canvas 244 212 672 338 regenerate-tables 0; +#X msg 415 84 bang; +#X obj 415 113 t b b; +#X obj 474 177 f; +#X obj 512 177 + 1; +#X msg 483 147 0; +#X obj 415 142 until; +#X obj 474 211 t f f; +#X obj 414 238 mtof; +#X obj 405 202 sel 129; +#X obj 413 264 tabwrite mtof; +#X obj 35 227 moses 2; +#X msg 19 76 bang; +#X obj 19 105 t b b; +#X obj 90 166 f; +#X obj 128 166 + 1; +#X msg 112 138 0; +#X obj 19 134 until; +#X obj 11 194 sel 122; +#X msg 35 258 0; +#X obj 79 259 dbtorms; +#X obj 90 194 t f f; +#X obj 35 291 tabwrite dbtorms; +#X text 18 49 bang to recalculate dbtorms table; +#X text 356 50 bang to recalculate the mtof table; +#X connect 0 0 1 0; +#X connect 1 0 5 0; +#X connect 1 1 4 0; +#X connect 2 0 3 0; +#X connect 2 0 6 0; +#X connect 2 0 8 0; +#X connect 3 0 2 1; +#X connect 4 0 2 1; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 1 9 1; +#X connect 7 0 9 0; +#X connect 8 0 5 1; +#X connect 10 0 18 0; +#X connect 10 1 19 0; +#X connect 11 0 12 0; +#X connect 12 0 16 0; +#X connect 12 1 15 0; +#X connect 13 0 14 0; +#X connect 13 0 17 0; +#X connect 13 0 20 0; +#X connect 14 0 13 1; +#X connect 15 0 13 1; +#X connect 16 0 13 0; +#X connect 17 0 16 1; +#X connect 18 0 21 0; +#X connect 19 0 21 0; +#X connect 20 0 10 0; +#X connect 20 1 21 1; +#X restore 375 76 pd regenerate-tables; +#X restore 449 418 pd conversion-tables; +#X obj 49 201 line~; +#X obj 49 177 pack 0 100; +#X floatatom 49 151 0 0 0; +#X obj 88 254 r q; +#X floatatom 88 278 0 0 0; +#X obj 38 342 vcf~; +#X obj 38 366 hip~ 5; +#X obj 49 226 tabread4~ mtof; +#X text 124 277 <-- Q (selectivity); +#X obj 49 127 r cf; +#X text 84 145 <-- center frequency; +#X text 35 6 FILTERING NOISE; +#X obj 39 102 noise~; +#X msg 515 174 \; cf 60 \; q 3 \;; +#X text 13 28 THe noise~ module puts out unit-amplitude white noise. +Be careful again here about surging amplitudes if Q hits zero.; +#X obj 88 305 moses 1; +#X msg 60 305 1; +#X connect 1 0 2 1; +#X connect 2 0 1 0; +#X connect 3 0 2 2; +#X connect 5 0 20 0; +#X connect 7 0 14 0; +#X connect 8 0 7 0; +#X connect 9 0 8 0; +#X connect 10 0 11 0; +#X connect 11 0 22 0; +#X connect 12 0 13 0; +#X connect 13 0 2 0; +#X connect 14 0 12 1; +#X connect 16 0 9 0; +#X connect 19 0 12 0; +#X connect 22 0 23 0; +#X connect 22 1 12 2; +#X connect 23 0 12 2; diff --git a/pd/doc/3.audio.examples/H06.sweepable.FM.pd b/pd/doc/3.audio.examples/H06.sweepable.FM.pd deleted file mode 100644 index ff3827ee..00000000 --- a/pd/doc/3.audio.examples/H06.sweepable.FM.pd +++ /dev/null @@ -1,161 +0,0 @@ -#N canvas 89 117 803 661 12; -#X floatatom 242 605 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 204 634 pd output; -#X msg 280 606 MUTE; -#X obj 165 506 cos~; -#X obj 165 460 *~; -#X obj 208 508 cos~; -#X obj 249 409 wrap~; -#X obj 212 408 -~; -#X obj 208 485 +~; -#X obj 206 543 -~; -#X obj 226 575 *~; -#X obj 204 600 +~; -#X text 520 628 updated for Pd version 0.34; -#X text 325 605 <--output; -#X obj 212 378 samphold~; -#X text 31 2 APPLYING TWO-COSINE CARRIER TO FM; -#X floatatom 229 238 4 0 0; -#X obj 229 261 / 10; -#X text 229 157 center; -#X obj 229 330 line~; -#X obj 229 284 max 0; -#X text 229 177 freq. (in; -#X text 229 197 tenths of; -#X text 229 217 fundamental); -#X obj 229 307 pack 0 50; -#X obj 118 313 phasor~; -#X floatatom 118 290 4 0 0; -#X text 103 237 fundamental; -#X text 103 257 (= mod freq); -#X text 432 284 index; -#X text 432 304 (percent); -#X floatatom 432 325 4 0 0; -#X obj 382 391 cos~; -#X obj 432 394 line~; -#X obj 382 414 *~; -#X obj 432 348 / 100; -#X obj 432 371 pack 0 50; -#X obj 165 483 +~; -#X graph graph1 0 0 128 500 515 256 771 126; -#X array spectrum 128 float 0; -#X pop; -#X text 511 261 0; -#X text 759 258 5512; -#X msg 117 599 bang; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 68 630 pd fft; -#X text 25 33 And now we just treat the cosines like carrier signals -in an FM instrument. This doesn't work as well as you'd wish \, because -the phases of the partials of the two FM instruments don't line up -\, so that \, for indices of modulation above about 20% \, you get -beating effects as the center frequency goes up and down.; -#X text 385 440 modulating; -#X text 385 460 oscillator; -#X text 37 482 both phases-->; -#X text 6 465 add modulator to; -#X text 117 577 graph; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 9 1; -#X connect 3 0 11 0; -#X connect 4 0 37 0; -#X connect 5 0 9 0; -#X connect 6 0 7 1; -#X connect 6 0 10 1; -#X connect 7 0 4 1; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 1 0; -#X connect 11 0 42 0; -#X connect 14 0 7 0; -#X connect 14 0 6 0; -#X connect 16 0 17 0; -#X connect 17 0 20 0; -#X connect 19 0 14 0; -#X connect 20 0 24 0; -#X connect 24 0 19 0; -#X connect 25 0 14 1; -#X connect 25 0 32 0; -#X connect 25 0 4 0; -#X connect 25 0 8 1; -#X connect 26 0 25 0; -#X connect 31 0 35 0; -#X connect 32 0 34 0; -#X connect 33 0 34 1; -#X connect 34 0 37 1; -#X connect 35 0 36 0; -#X connect 36 0 33 0; -#X connect 37 0 8 0; -#X connect 37 0 3 0; -#X connect 41 0 42 1; diff --git a/pd/doc/3.audio.examples/H07.paf.pd b/pd/doc/3.audio.examples/H07.paf.pd deleted file mode 100644 index 56c024c0..00000000 --- a/pd/doc/3.audio.examples/H07.paf.pd +++ /dev/null @@ -1,234 +0,0 @@ -#N canvas 53 0 782 687 12; -#X floatatom 253 735 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 215 764 pd output; -#X msg 291 735 MUTE; -#X obj 158 616 cos~; -#X obj 158 593 *~; -#X obj 201 616 cos~; -#X obj 257 542 wrap~; -#X obj 221 542 -~; -#X obj 201 593 +~; -#X obj 194 646 -~; -#X obj 214 678 *~; -#X obj 176 678 +~; -#X text 515 768 updated for Pd version 0.34; -#X text 336 734 <--output; -#X obj 221 510 samphold~; -#X floatatom 221 369 4 0 0; -#X obj 221 392 / 10; -#X text 221 288 center; -#X obj 221 461 line~; -#X obj 221 415 max 0; -#X text 221 308 freq. (in; -#X text 221 328 tenths of; -#X text 221 348 fundamental); -#X obj 221 438 pack 0 50; -#X obj 104 445 phasor~; -#X floatatom 104 399 4 0 0; -#X text 84 372 fundamental; -#X text 435 441 index; -#X text 435 461 (percent); -#X floatatom 435 482 4 0 0; -#X obj 435 528 line~; -#X obj 343 550 *~; -#X obj 435 505 pack 0 50; -#X graph graph1 0 0 128 500 510 395 766 265; -#X array spectrum 128 float 0; -#X pop; -#X text 501 397 0; -#X text 745 398 5512; -#X msg 80 713 bang; -#N canvas 204 17 358 238 fft 0; -#X obj 46 48 inlet~; -#X obj 159 181 tabwrite~ spectrum; -#X obj 159 145 inlet; -#X obj 46 78 rfft~; -#X obj 46 111 *~; -#X obj 77 111 *~; -#X obj 46 141 sqrt~; -#X obj 191 45 block~ 1024 1; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 4 0; -#X connect 3 0 4 1; -#X connect 3 1 5 0; -#X connect 3 1 5 1; -#X connect 4 0 6 0; -#X connect 5 0 6 0; -#X connect 6 0 1 0; -#X restore 31 745 pd fft; -#X text 82 687 graph; -#X text 31 2 THE PAF: TWO-COSINE RING MODULATOR FOR WAVESHAPER; -#X graph graph4 0 0 199 1 563 718 763 578; -#X array bell-curve 200 float 1; -#A 0 1.12535e-07 1.54727e-07 2.12059e-07 2.89706e-07 3.94519e-07 5.35535e-07 -7.24633e-07 9.77371e-07 1.31404e-06 1.76105e-06 2.35258e-06 3.13275e-06 -4.15832e-06 5.50199e-06 7.25659e-06 9.54016e-06 1.25023e-05 1.63317e-05 -2.1266e-05 2.76026e-05 3.57128e-05 4.60584e-05 5.92113e-05 7.58768e-05 -9.69224e-05 0.00012341 0.000156634 0.000198167 0.000249912 0.000314163 -0.000393669 0.000491721 0.000612231 0.000759842 0.000940028 0.00115923 -0.00142498 0.00174605 0.00213263 0.00259648 0.00315111 0.00381201 0.00459678 -0.0055254 0.0066204 0.00790705 0.0094136 0.0111714 0.013215 0.0155826 -0.0183156 0.0214592 0.0250621 0.0291763 0.0338573 0.0391639 0.0451575 -0.0519019 0.0594631 0.0679081 0.0773047 0.0877205 0.0992216 0.111872 -0.125732 0.140858 0.1573 0.1751 0.194291 0.214896 0.236928 0.260383 -0.285247 0.311486 0.339053 0.367879 0.397882 0.428956 0.46098 0.493812 -0.527292 0.561244 0.595473 0.62977 0.663916 0.697676 0.730811 0.763074 -0.794216 0.823987 0.852144 0.878447 0.902668 0.924595 0.944027 0.960789 -0.974725 0.985703 0.99362 0.998401 1 0.998401 0.99362 0.985703 0.974725 -0.960789 0.944027 0.924595 0.902668 0.878447 0.852144 0.823987 0.794216 -0.763074 0.730811 0.697676 0.663916 0.62977 0.595473 0.561244 0.527292 -0.493812 0.46098 0.428956 0.397882 0.367879 0.339053 0.311486 0.285247 -0.260383 0.236928 0.214896 0.194291 0.1751 0.1573 0.140858 0.125732 -0.111872 0.0992216 0.0877205 0.0773047 0.0679081 0.0594631 0.0519019 -0.0451575 0.0391639 0.0338573 0.0291763 0.0250621 0.0214592 0.0183156 -0.0155826 0.013215 0.0111714 0.0094136 0.00790705 0.0066204 0.0055254 -0.00459678 0.00381201 0.00315111 0.00259648 0.00213263 0.00174605 0.00142498 -0.00115923 0.000940028 0.000759842 0.000612231 0.000491721 0.000393669 -0.000314163 0.000249912 0.000198167 0.000156634 0.00012341 9.69224e-05 -7.58768e-05 5.92113e-05 4.60584e-05 3.57128e-05 2.76026e-05 2.1266e-05 -1.63317e-05 1.25023e-05 9.54016e-06 7.25659e-06 5.50199e-06 4.15832e-06 -3.13275e-06 2.35258e-06 1.76105e-06 1.31404e-06 9.77371e-07 7.24633e-07 -5.35535e-07 3.94519e-07 2.89706e-07 2.12059e-07 1.54727e-07; -#X pop; -#N canvas 94 264 600 388 make-table 0; -#X msg 81 44 bang; -#X obj 81 73 t b b; -#X obj 159 142 f; -#X obj 197 142 + 1; -#X msg 175 112 0; -#X obj 81 102 until; -#X obj 161 177 t f f; -#X obj 76 306 tabwrite bell-curve; -#X obj 52 270 expr exp(-$f1*$f1); -#X obj 63 168 sel 199; -#X obj 51 241 expr ($f1-100)/25; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 9 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 10 0; -#X connect 6 1 7 1; -#X connect 8 0 7 0; -#X connect 9 0 5 1; -#X connect 10 0 8 0; -#X restore 627 538 pd make-table; -#X obj 104 422 * 0.5; -#X obj 343 527 cos~; -#X obj 343 504 -~ 0.25; -#X obj 343 573 +~ 100; -#X obj 343 596 tabread4~ bell-curve; -#X obj 104 474 *~ 2; -#X obj 215 707 *~; -#X text 25 33 Instead of using the two cosines as FM carrier oscillators -\, we can use them as ring modulators for a synthetic tone. Here (as -described in the paper) we use a sinusoid looking up a Gaussian bell -curve. This has the nice properties that the partials are always positive -cosines in phase \, and the spectrum spreads out smoothly as the index -changes.; -#X text 26 137 We needed the sine wave to have half the fundamental -frequency \, so we run the phasor~ at half speed but double its output -to the cosine pair and the samphold~ \, thus giving us the original -frequency. As to the half-speed signal \, we take its sine (-~ 0.25 -and cos~) \, then center it for lookup in a 200-point table containing -a bell curve.; -#X text 251 705 <--ring mod step; -#X text 375 621 waveshaper; -#X text 27 239 Then with ~* we do the ring modulation and we're done. -; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 9 1; -#X connect 3 0 11 0; -#X connect 4 0 8 0; -#X connect 4 0 3 0; -#X connect 5 0 9 0; -#X connect 6 0 7 1; -#X connect 6 0 10 1; -#X connect 7 0 4 1; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 48 0; -#X connect 14 0 7 0; -#X connect 14 0 6 0; -#X connect 15 0 16 0; -#X connect 16 0 19 0; -#X connect 18 0 14 0; -#X connect 19 0 23 0; -#X connect 23 0 18 0; -#X connect 24 0 44 0; -#X connect 24 0 47 0; -#X connect 25 0 42 0; -#X connect 29 0 32 0; -#X connect 30 0 31 1; -#X connect 31 0 45 0; -#X connect 32 0 30 0; -#X connect 36 0 37 1; -#X connect 42 0 24 0; -#X connect 43 0 31 0; -#X connect 44 0 43 0; -#X connect 45 0 46 0; -#X connect 46 0 48 1; -#X connect 47 0 14 1; -#X connect 47 0 4 0; -#X connect 47 0 8 0; -#X connect 48 0 1 0; -#X connect 48 0 37 0; diff --git a/pd/doc/3.audio.examples/H07.ssb.modulation.pd b/pd/doc/3.audio.examples/H07.ssb.modulation.pd new file mode 100644 index 00000000..968b3b45 --- /dev/null +++ b/pd/doc/3.audio.examples/H07.ssb.modulation.pd @@ -0,0 +1,150 @@ +#N canvas 7 6 923 594 12; +#X obj 170 349 phasor~ 0; +#X obj 170 393 cos~; +#X obj 206 371 +~ -0.25; +#X obj 206 394 cos~; +#X obj 23 438 *~; +#X obj 88 438 *~; +#X obj 22 462 -~; +#X floatatom 170 322 0 0 0; +#X obj 23 238 tabread4~ array1; +#X obj 23 67 r totsamps; +#X obj 23 142 /; +#X obj 23 190 *~ 0; +#X obj 23 166 phasor~ 0; +#X obj 23 214 +~ 1; +#X msg 23 117 44100; +#X obj 23 91 t b f; +#X obj 62 190 r totsamps; +#X msg 636 38 \; pd dsp 0; +#X text 429 14 START; +#X text 653 20 STOP; +#X floatatom 51 499 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 22 527 pd output; +#X msg 87 500 MUTE; +#X text 121 499 <-- output amplitude; +#N canvas 0 0 600 388 hilbert 0; +#X obj 166 190 biquad~ 0.83774 -0.06338 0.06338 -0.83774 1; +#X obj 166 164 biquad~ 1.94632 -0.94657 0.94657 -1.94632 1; +#X obj 99 111 biquad~ -0.02569 0.260502 -0.260502 0.02569 1; +#X obj 99 137 biquad~ 1.8685 -0.870686 0.870686 -1.8685 1; +#X obj 98 76 inlet~; +#X obj 166 213 outlet~; +#X obj 99 213 outlet~; +#X text 95 261 This is a pair of all-pass filters whose outputs somehow +manage to be about 90 degrees out of phase from each other. I don't +know what phase relation they have with the original signal. I adapted +this from a 4X patch by Emmanuel Favreau \, circa 1982; +#X connect 0 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 3 0; +#X connect 3 0 6 0; +#X connect 4 0 1 0; +#X connect 4 0 2 0; +#X restore 23 400 pd hilbert; +#X graph graph1 0 -1 155947 1 441 284 641 134; +#X array array1 155948 float 0; +#X pop; +#X text 36 257 sample loop for; +#X text 36 271 test signal; +#X text 35 314 pair of allpass; +#X text 34 333 filters to make; +#X text 34 353 90 degree phase; +#X text 32 373 shifted versions; +#X text 201 323 <-- shift frequency; +#X text 122 438 <-- complex multiply; +#X text 123 452 (calculate real part); +#X text 161 412 cosine and sine waves; +#X text 55 7 SINGLE SIDEBAND MODULATION; +#X text 55 26 (AKA FREQUENCY SHIFTING); +#X text 394 296 The signal sideband modulator gives you only one sideband +for each frequency in teh input signal (whereas ring modulation gave +both a positie and negative sideband.) You can set the shift frequency +positive to shift all frequencies upward \, or negative to shift them +downwards.; +#X obj 484 417 r readfile; +#X msg 334 34 \; readfile ../sound/bell.aiff \; pd dsp 1; +#X obj 484 444 symbol; +#X msg 483 470 read -resize \$1 array1; +#X obj 483 496 soundfiler; +#X obj 483 521 s totsamps; +#X text 671 568 updated for Pd version 0.33; +#X connect 0 0 2 0; +#X connect 0 0 1 0; +#X connect 1 0 4 1; +#X connect 2 0 3 0; +#X connect 3 0 5 1; +#X connect 4 0 6 0; +#X connect 5 0 6 1; +#X connect 6 0 21 0; +#X connect 7 0 0 0; +#X connect 8 0 24 0; +#X connect 9 0 15 0; +#X connect 10 0 12 0; +#X connect 11 0 13 0; +#X connect 12 0 11 0; +#X connect 13 0 8 0; +#X connect 14 0 10 0; +#X connect 15 0 14 0; +#X connect 15 1 10 1; +#X connect 16 0 11 1; +#X connect 20 0 21 1; +#X connect 21 0 20 0; +#X connect 22 0 21 2; +#X connect 24 0 4 0; +#X connect 24 1 5 0; +#X connect 39 0 41 0; +#X connect 41 0 42 0; +#X connect 42 0 43 0; +#X connect 43 0 44 0; diff --git a/pd/doc/3.audio.examples/H08.paf.control.pd b/pd/doc/3.audio.examples/H08.paf.control.pd deleted file mode 100644 index 7d329357..00000000 --- a/pd/doc/3.audio.examples/H08.paf.control.pd +++ /dev/null @@ -1,219 +0,0 @@ -#N canvas 89 36 743 752 12; -#X floatatom 217 684 0 0 0; -#N canvas 176 241 532 273 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 398 111 moses 1; -#X obj 83 148 dbtorms; -#X obj 398 86 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 17 148 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 15 125 audio; -#X text 93 110 show level; -#X obj 17 177 hip~ 1; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 26 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X connect 26 0 21 0; -#X restore 179 713 pd output; -#X msg 255 684 MUTE; -#X obj 122 565 cos~; -#X obj 122 542 *~; -#X obj 165 565 cos~; -#X obj 220 510 wrap~; -#X obj 184 510 -~; -#X obj 165 542 +~; -#X obj 158 595 -~; -#X obj 178 627 *~; -#X obj 140 627 +~; -#X text 478 719 updated for Pd version 0.34; -#X text 299 702 <--output; -#X obj 184 478 samphold~; -#X floatatom 183 266 4 0 0; -#X text 181 218 center; -#X obj 184 345 line~; -#X obj 184 322 pack 0 50; -#X obj 67 413 phasor~; -#X floatatom 69 305 4 0 0; -#X text 52 256 fundamental; -#X floatatom 408 361 4 0 0; -#X obj 408 438 line~; -#X obj 306 518 *~; -#X obj 408 415 pack 0 50; -#N canvas 94 264 600 388 make-table 0; -#X msg 81 44 bang; -#X obj 81 73 t b b; -#X obj 159 142 f; -#X obj 197 142 + 1; -#X msg 175 112 0; -#X obj 81 102 until; -#X obj 161 177 t f f; -#X obj 76 306 tabwrite bell-curve; -#X obj 52 270 expr exp(-$f1*$f1); -#X obj 63 168 sel 199; -#X obj 51 241 expr ($f1-100)/25; -#X graph graph4 0 0 199 1 342 225 542 85; -#X array bell-curve 200 float 1; -#A 0 1.12535e-07 1.54727e-07 2.12059e-07 2.89706e-07 3.94519e-07 5.35535e-07 -7.24633e-07 9.77371e-07 1.31404e-06 1.76105e-06 2.35258e-06 3.13275e-06 -4.15832e-06 5.50199e-06 7.25659e-06 9.54016e-06 1.25023e-05 1.63317e-05 -2.1266e-05 2.76026e-05 3.57128e-05 4.60584e-05 5.92113e-05 7.58768e-05 -9.69224e-05 0.00012341 0.000156634 0.000198167 0.000249912 0.000314163 -0.000393669 0.000491721 0.000612231 0.000759842 0.000940028 0.00115923 -0.00142498 0.00174605 0.00213263 0.00259648 0.00315111 0.00381201 0.00459678 -0.0055254 0.0066204 0.00790705 0.0094136 0.0111714 0.013215 0.0155826 -0.0183156 0.0214592 0.0250621 0.0291763 0.0338573 0.0391639 0.0451575 -0.0519019 0.0594631 0.0679081 0.0773047 0.0877205 0.0992216 0.111872 -0.125732 0.140858 0.1573 0.1751 0.194291 0.214896 0.236928 0.260383 -0.285247 0.311486 0.339053 0.367879 0.397882 0.428956 0.46098 0.493812 -0.527292 0.561244 0.595473 0.62977 0.663916 0.697676 0.730811 0.763074 -0.794216 0.823987 0.852144 0.878447 0.902668 0.924595 0.944027 0.960789 -0.974725 0.985703 0.99362 0.998401 1 0.998401 0.99362 0.985703 0.974725 -0.960789 0.944027 0.924595 0.902668 0.878447 0.852144 0.823987 0.794216 -0.763074 0.730811 0.697676 0.663916 0.62977 0.595473 0.561244 0.527292 -0.493812 0.46098 0.428956 0.397882 0.367879 0.339053 0.311486 0.285247 -0.260383 0.236928 0.214896 0.194291 0.1751 0.1573 0.140858 0.125732 -0.111872 0.0992216 0.0877205 0.0773047 0.0679081 0.0594631 0.0519019 -0.0451575 0.0391639 0.0338573 0.0291763 0.0250621 0.0214592 0.0183156 -0.0155826 0.013215 0.0111714 0.0094136 0.00790705 0.0066204 0.0055254 -0.00459678 0.00381201 0.00315111 0.00259648 0.00213263 0.00174605 0.00142498 -0.00115923 0.000940028 0.000759842 0.000612231 0.000491721 0.000393669 -0.000314163 0.000249912 0.000198167 0.000156634 0.00012341 9.69224e-05 -7.58768e-05 5.92113e-05 4.60584e-05 3.57128e-05 2.76026e-05 2.1266e-05 -1.63317e-05 1.25023e-05 9.54016e-06 7.25659e-06 5.50199e-06 4.15832e-06 -3.13275e-06 2.35258e-06 1.76105e-06 1.31404e-06 9.77371e-07 7.24633e-07 -5.35535e-07 3.94519e-07 2.89706e-07 2.12059e-07 1.54727e-07; -#X pop; -#X connect 0 0 1 0; -#X connect 1 0 5 0; -#X connect 1 1 4 0; -#X connect 2 0 3 0; -#X connect 2 0 6 0; -#X connect 2 0 9 0; -#X connect 3 0 2 1; -#X connect 4 0 2 1; -#X connect 5 0 2 0; -#X connect 6 0 10 0; -#X connect 6 1 7 1; -#X connect 8 0 7 0; -#X connect 9 0 5 1; -#X connect 10 0 8 0; -#X restore 573 591 pd make-table; -#X obj 67 390 * 0.5; -#X obj 306 495 cos~; -#X obj 306 472 -~ 0.25; -#X obj 306 549 +~ 100; -#X obj 306 572 tabread4~ bell-curve; -#X obj 67 442 *~ 2; -#X obj 179 656 *~; -#X text 338 597 waveshaper; -#X text 31 2 CHANGING PAF CONTROLS TO NATURAL UNITS; -#X obj 67 362 mtof; -#X obj 68 335 max 0; -#X obj 206 370 expr 1/$f1; -#X obj 183 296 mtof; -#X text 181 238 freq.; -#X obj 184 394 *~; -#X text 406 340 bandwidth; -#X obj 408 389 mtof; -#X obj 408 474 *~; -#X obj 408 498 *~ 25; -#X text 25 33 The more "natural" units for describing a formant might -be center frequency and bandwidth \, so that you can change the fundamental -without having the formant shift up and down in parallel. Here all -three frequencies are expressed in MIDI units. The bandwidth and center -frequency have to be divided by the fundamental (the expr 1/$f1 takes -its reciprocal and two *~ objects finish the division.); -#X text 448 473 divide by fundamental; -#X text 466 497 range for table; -#X text 372 548 offset to middle of table; -#X text 191 416 C.F. relative; -#X text 192 432 to fundamental; -#X text 48 275 (MIDI units); -#X text 215 654 ring mod; -#X text 25 150 And now you essentially have the PAF. Note \, however -\, that there's a nice paf~ "external" object in the "extras" library -that does this all more efficiently and takes care of a couple of subtle -details we don't see here...; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 9 1; -#X connect 3 0 11 0; -#X connect 4 0 8 0; -#X connect 4 0 3 0; -#X connect 5 0 9 0; -#X connect 6 0 7 1; -#X connect 6 0 10 1; -#X connect 7 0 4 1; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 10 0 11 1; -#X connect 11 0 33 0; -#X connect 14 0 7 0; -#X connect 14 0 6 0; -#X connect 15 0 39 0; -#X connect 17 0 41 0; -#X connect 18 0 17 0; -#X connect 19 0 29 0; -#X connect 19 0 32 0; -#X connect 20 0 37 0; -#X connect 22 0 43 0; -#X connect 23 0 44 0; -#X connect 24 0 30 0; -#X connect 25 0 23 0; -#X connect 27 0 19 0; -#X connect 28 0 24 0; -#X connect 29 0 28 0; -#X connect 30 0 31 0; -#X connect 31 0 33 1; -#X connect 32 0 14 1; -#X connect 32 0 4 0; -#X connect 32 0 8 0; -#X connect 33 0 1 0; -#X connect 36 0 27 0; -#X connect 36 0 38 0; -#X connect 37 0 36 0; -#X connect 38 0 41 1; -#X connect 38 0 44 1; -#X connect 39 0 18 0; -#X connect 41 0 14 0; -#X connect 43 0 25 0; -#X connect 44 0 45 0; -#X connect 45 0 24 1; diff --git a/pd/doc/3.audio.examples/J01.quartic.pd b/pd/doc/3.audio.examples/J01.quartic.pd deleted file mode 100644 index d71da05a..00000000 --- a/pd/doc/3.audio.examples/J01.quartic.pd +++ /dev/null @@ -1,140 +0,0 @@ -#N canvas 57 35 614 650 12; -#X graph graph1 0 0 40 1 151 551 551 301; -#X array array-ampdb 41 float 1; -#A 0 0.01 0.0112202 0.0125893 0.0141254 0.0158489 0.0177828 0.0199526 -0.0223872 0.0251189 0.0281838 0.0316228 0.0354813 0.0398107 0.0446684 -0.0501187 0.0562341 0.0630957 0.0707946 0.0794328 0.0891251 0.1 0.112202 -0.125893 0.141254 0.158489 0.177828 0.199526 0.223872 0.251189 0.281838 -0.316228 0.354813 0.398107 0.446684 0.501187 0.562341 0.630957 0.707946 -0.794328 0.891251 1; -#X array array-dbdb 41 float 1; -#A 0 0 0.025 0.05 0.075 0.1 0.125 0.15 0.175 0.2 0.225 0.25 0.275 0.3 -0.325 0.35 0.375 0.4 0.425 0.45 0.475 0.5 0.525 0.55 0.575 0.6 0.625 -0.65 0.675 0.7 0.725 0.75 0.775 0.8 0.825 0.85 0.875 0.9 0.925 0.95 -0.975 1; -#X array array-4thpow 41 float 1; -#A 0 0 3.90624e-07 6.25001e-06 3.16406e-05 1e-04 0.000244141 0.00050625 -0.000937891 0.0016 0.00256289 0.00390625 0.00571914 0.0081 0.0111566 -0.0150063 0.0197754 0.0256 0.0326254 0.0410062 0.0509067 0.0625 0.0759691 -0.0915063 0.109313 0.1296 0.152588 0.178506 0.207594 0.2401 0.276282 -0.316406 0.36075 0.4096 0.46325 0.522006 0.586182 0.6561 0.732094 0.814506 -0.903688 1; -#X pop; -#N canvas 293 37 890 657 otherstuff 0; -#X obj 42 438 loadbang; -#X msg 259 94 bang; -#X obj 259 123 t b b; -#X obj 337 192 f; -#X obj 375 192 + 1; -#X msg 353 162 0; -#X obj 259 152 until; -#X obj 263 329 dbtorms; -#X obj 339 227 t f f; -#X msg 51 101 bang; -#X obj 51 130 t b b; -#X obj 129 199 f; -#X obj 167 199 + 1; -#X msg 145 169 0; -#X obj 51 159 until; -#X obj 131 234 t f f; -#X obj 59 339 tabwrite array-dbdb; -#X obj 263 355 tabwrite array-ampdb; -#X msg 505 98 bang; -#X obj 505 127 t b b; -#X obj 583 196 f; -#X obj 621 196 + 1; -#X msg 599 166 0; -#X obj 505 156 until; -#X obj 585 231 t f f; -#X obj 559 432 expr $f1 * $f1 * $f1 * $f1; -#X obj 559 341 expr 1 + $f2 * ($f1 - 1); -#X obj 705 253 loadbang; -#X floatatom 703 309 0 0 0; -#X msg 705 281 1; -#X obj 559 385 max 0; -#X obj 561 464 tabwrite array-4thpow; -#X obj 263 274 + 100; -#X obj 51 232 sel 40; -#X obj 258 221 sel 40; -#X obj 503 226 sel 40; -#X obj 559 300 / 40; -#X obj 263 302 - 40; -#X obj 93 303 / 40; -#X msg 43 465 \; graph1 xlabel -0.03 0 10 20 30 40 \; graph1 ylabel --2 0.25 0.5 0.75 1; -#X text 53 27 (here's how I computed the three transfer functions...) -; -#X connect 0 0 39 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 2 1 5 0; -#X connect 3 0 4 0; -#X connect 3 0 8 0; -#X connect 3 0 34 0; -#X connect 4 0 3 1; -#X connect 5 0 3 1; -#X connect 6 0 3 0; -#X connect 7 0 17 0; -#X connect 8 0 32 0; -#X connect 8 1 17 1; -#X connect 9 0 10 0; -#X connect 10 0 14 0; -#X connect 10 1 13 0; -#X connect 11 0 12 0; -#X connect 11 0 15 0; -#X connect 11 0 33 0; -#X connect 12 0 11 1; -#X connect 13 0 11 1; -#X connect 14 0 11 0; -#X connect 15 0 38 0; -#X connect 15 1 16 1; -#X connect 18 0 19 0; -#X connect 19 0 23 0; -#X connect 19 1 22 0; -#X connect 20 0 21 0; -#X connect 20 0 24 0; -#X connect 20 0 35 0; -#X connect 21 0 20 1; -#X connect 22 0 20 1; -#X connect 23 0 20 0; -#X connect 24 0 36 0; -#X connect 24 1 31 1; -#X connect 25 0 31 0; -#X connect 26 0 30 0; -#X connect 27 0 29 0; -#X connect 28 0 26 1; -#X connect 29 0 28 0; -#X connect 30 0 25 0; -#X connect 32 0 37 0; -#X connect 33 0 14 1; -#X connect 34 0 6 1; -#X connect 35 0 23 1; -#X connect 36 0 26 0; -#X connect 37 0 7 0; -#X connect 38 0 16 0; -#X restore 53 608 pd otherstuff; -#X text 292 403 linear; -#X text 279 509 decibels; -#X text 387 518 quartic; -#X text 45 5 QUARTIC CURVES AS THE IDEAL AMPLITUDE AND FREQUENCY SCALERS -; -#X text 346 611 updated for Pd version 0.34; -#X text 246 578 units-->; -#X text 45 447 amplitude; -#X text 79 429 |; -#X text 79 420 |; -#X text 79 410 |; -#X text 79 402 |; -#X text 78 398 ^; -#X text 38 149 The graph below shows that a simple quartic curve \, -x-to-the-fourth-power \, twists like decibels but--unlike decibels--actually -hits zero at left. You get the best of both worlds. Moreover \, raising -something to the fourth power is very cheap: just two multiplications--whereas -\, if you're computing envelopes in dB \, eventually you'll have to -exponentiate \, sample by sample \, to get to linear units.; -#X text 36 34 It's an old saw that we perceive amplitude and frequency -logarithmically. But using decibels as a unit for controlling amplitude -and frequency gets ugly for two reasons. First \, it's expensive to -do the conversion. Second and more profoundly \, decibels grow by shifting -\, and things should grow by scaling \, so that \, for example \, zero -really means "nothing."; diff --git a/pd/doc/3.audio.examples/J02.more.quartic.pd b/pd/doc/3.audio.examples/J02.more.quartic.pd deleted file mode 100644 index fdb01dab..00000000 --- a/pd/doc/3.audio.examples/J02.more.quartic.pd +++ /dev/null @@ -1,147 +0,0 @@ -#N canvas 130 66 880 587 12; -#X floatatom 89 506 0 0 100; -#N canvas 159 26 516 274 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 396 182 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 391 110 moses 1; -#X obj 83 148 dbtorms; -#X obj 391 85 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 20 182 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 104 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 90 outlet; -#X msg 214 65 \; pd dsp 1; -#X obj 83 198 line~; -#X obj 20 207 *~; -#X obj 20 232 dac~; -#X obj 83 173 pack 0 50; -#X text 20 159 audio; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 12 0; -#X connect 5 0 12 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 5 0; -#X connect 8 1 4 1; -#X connect 9 0 23 0; -#X connect 10 0 1 1; -#X connect 10 0 8 0; -#X connect 11 0 9 0; -#X connect 11 0 17 0; -#X connect 13 0 21 0; -#X connect 14 0 16 0; -#X connect 14 0 19 0; -#X connect 17 0 18 0; -#X connect 20 0 21 1; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 23 0 20 0; -#X restore 51 534 pd output; -#X msg 127 507 MUTE; -#X obj 32 441 *~; -#X obj 12 469 -~; -#X obj 73 446 *~; -#X floatatom 170 421 1 0 100; -#X obj 365 337 osc~; -#X obj 365 362 *~; -#X obj 425 342 line~; -#X obj 365 312 line~; -#X obj 550 468 osc~; -#X obj 599 496 *~; -#X obj 621 379 line~; -#X obj 550 379 line~; -#X obj 550 326 sqrt; -#X obj 550 352 sqrt; -#X obj 621 326 sqrt; -#X obj 621 352 sqrt; -#X obj 550 411 *~; -#X obj 550 441 *~; -#X obj 621 411 *~; -#X obj 621 440 *~; -#X obj 550 301 unpack; -#X obj 621 301 unpack; -#X obj 365 287 r freq; -#X obj 425 318 r amp; -#X obj 550 276 r freq; -#X obj 621 276 r amp; -#X obj 365 388 s~ linear; -#X obj 599 523 s~ quartic; -#X obj 12 377 r~ linear; -#X obj 56 406 r~ quartic; -#X msg 27 185 \; amp 0 5000 \;; -#X msg 29 139 \; amp 1 5000 \;; -#X msg 139 185 \; amp 0 1000 \;; -#X msg 141 139 \; amp 1 1000 \;; -#X msg 26 238 \; freq 1760 5000 \;; -#X msg 29 286 \; freq 55 5000 \;; -#X msg 180 238 \; freq 1760 1000 \;; -#X msg 183 286 \; freq 55 1000 \;; -#X text 90 15 QUARTIC AND LINEAR ENVELOPES COMPARED; -#X obj 202 488 loadbang; -#X msg 202 516 \; amp 1 \; freq 1760; -#X text 194 414 1 for quartic \; 0 for linear; -#X text 19 39 This patch has two sine wave oscillators \, one with -linear envelopes \, the other with quartic ones which sound more uniform. -The "toggle switch" at bottom selects between the two \, and the message -boxes sweep the amplitude and frequency up and down.; -#X text 366 257 LINEAR; -#X text 555 249 QUARTIC; -#X text 335 120 The two oscillators are below. In the quartic one \, -for both the amplitude and the frequency \, we have to take the fourth -root of the target value (which we get by taking square root twice.) -Then we raise the line~ output to the fourth power by squaring twice -(the *~ objects \, whose left and right inlets are the same.) The cost -is mostly that of the four additional *~ objects.; -#X text 579 560 updated for Pd version 0.34; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 3 0 4 1; -#X connect 4 0 1 0; -#X connect 5 0 1 0; -#X connect 6 0 5 1; -#X connect 6 0 3 1; -#X connect 7 0 8 0; -#X connect 8 0 29 0; -#X connect 9 0 8 1; -#X connect 10 0 7 0; -#X connect 11 0 12 0; -#X connect 12 0 30 0; -#X connect 13 0 21 0; -#X connect 13 0 21 1; -#X connect 14 0 19 0; -#X connect 14 0 19 1; -#X connect 15 0 16 0; -#X connect 16 0 14 0; -#X connect 17 0 18 0; -#X connect 18 0 13 0; -#X connect 19 0 20 0; -#X connect 19 0 20 1; -#X connect 20 0 11 0; -#X connect 21 0 22 0; -#X connect 21 0 22 1; -#X connect 22 0 12 1; -#X connect 23 0 15 0; -#X connect 23 1 14 1; -#X connect 24 0 17 0; -#X connect 24 1 13 1; -#X connect 25 0 10 0; -#X connect 26 0 9 0; -#X connect 27 0 23 0; -#X connect 28 0 24 0; -#X connect 31 0 3 0; -#X connect 31 0 4 0; -#X connect 32 0 5 0; -#X connect 42 0 43 0; diff --git a/pd/doc/3.audio.examples/J10.waveshaping.pd b/pd/doc/3.audio.examples/J10.waveshaping.pd deleted file mode 100644 index b217112f..00000000 --- a/pd/doc/3.audio.examples/J10.waveshaping.pd +++ /dev/null @@ -1,133 +0,0 @@ -#N canvas 222 24 761 466 12; -#X floatatom 61 408 0 0 0; -#N canvas 159 26 495 266 output 0; -#X obj 338 160 t b; -#X obj 338 110 f; -#X obj 338 60 inlet; -#X text 344 29 mute; -#X obj 338 185 f; -#X msg 425 178 0; -#X msg 338 85 bang; -#X obj 338 135 moses 1; -#X obj 425 153 t b f; -#X obj 397 117 moses 1; -#X obj 83 148 dbtorms; -#X obj 397 92 r master-lvl; -#X obj 83 42 r master-lvl; -#X obj 338 210 s master-lvl; -#X obj 22 181 inlet~; -#X obj 199 41 inlet; -#X text 199 18 level; -#X obj 199 100 s master-lvl; -#X msg 96 65 set \$1; -#X obj 96 89 outlet; -#X msg 214 64 \; pd dsp 1; -#X obj 83 194 line~; -#X obj 22 212 *~; -#X obj 22 241 dac~; -#X obj 83 171 pack 0 50; -#X text 20 158 audio; -#X text 93 110 show level; -#X connect 0 0 4 0; -#X connect 1 0 7 0; -#X connect 2 0 6 0; -#X connect 4 0 13 0; -#X connect 5 0 13 0; -#X connect 6 0 1 0; -#X connect 7 0 0 0; -#X connect 7 1 8 0; -#X connect 8 0 5 0; -#X connect 9 1 4 1; -#X connect 10 0 24 0; -#X connect 11 0 1 1; -#X connect 11 0 9 0; -#X connect 12 0 10 0; -#X connect 12 0 18 0; -#X connect 14 0 22 0; -#X connect 15 0 17 0; -#X connect 15 0 20 0; -#X connect 18 0 19 0; -#X connect 21 0 22 1; -#X connect 22 0 23 0; -#X connect 22 0 23 1; -#X connect 24 0 21 0; -#X restore 23 433 pd output; -#X msg 99 405 MUTE; -#X text 139 406 <-- output amplitude; -#X obj 336 272 loadbang; -#X text 35 6 ANALOG SYNTH SEQUENCER; -#X obj 215 152 metro 100; -#X obj 214 178 f; -#X obj 248 181 + 1; -#X obj 248 205 mod 11; -#X graph graph1 0 36 11 96 511 197 711 97; -#X array array1 11 float 0; -#X pop; -#X floatatom 215 127 0 0 0; -#X floatatom 304 152 0 0 0; -#X obj 214 230 tabread array1; -#X obj 214 256 mtof; -#X obj 214 283 osc~ 0; -#X msg 26 171 1; -#X obj 24 303 *~; -#X obj 24 350 cos~; -#X obj 24 375 hip~ 5; -#X obj 24 327 +~ 0.1; -#X msg 336 298 \; array1 0 50 51 52 50 52 56 50 56 58 52 58; -#X floatatom 43 219 0 0 0; -#X floatatom 163 221 0 0 0; -#X floatatom 93 219 0 0 0; -#X floatatom 128 220 0 0 0; -#X msg 93 311 0; -#X msg 93 329 0.1; -#X msg 93 348 0.25; -#X msg 215 101 1; -#X text 244 101 <--START; -#X text 126 331 <--symmetry; -#X text 72 185 ADSR controls; -#X text 43 199 lvl; -#X text 95 200 A; -#X text 137 201 D; -#X text 170 202 S; -#X floatatom 298 181 0 0 0; -#X text 332 183 <--increment; -#X text 339 155 <--msec; -#X text 20 35 Analog synths had sequencers which could be used in a -wide variety of ways. You can use an array to hold a sequence of control -values as shown here.; -#X obj 23 274 adsr 1 65 13 10 1000; -#X obj 42 243 / 100; -#X text 336 340 You can also do microtones \; 50.5 is a quarter tone -sharper than 50; -#X text 505 431 updated for Pd version 0.34; -#X connect 0 0 1 1; -#X connect 1 0 0 0; -#X connect 2 0 1 2; -#X connect 4 0 21 0; -#X connect 6 0 7 0; -#X connect 6 0 16 0; -#X connect 7 0 8 0; -#X connect 7 0 13 0; -#X connect 8 0 9 0; -#X connect 9 0 7 1; -#X connect 11 0 6 0; -#X connect 12 0 6 1; -#X connect 13 0 14 0; -#X connect 14 0 15 0; -#X connect 15 0 17 1; -#X connect 16 0 41 0; -#X connect 17 0 20 0; -#X connect 18 0 19 0; -#X connect 19 0 1 0; -#X connect 20 0 18 0; -#X connect 22 0 42 0; -#X connect 23 0 41 4; -#X connect 24 0 41 2; -#X connect 25 0 41 3; -#X connect 26 0 20 1; -#X connect 27 0 20 1; -#X connect 28 0 20 1; -#X connect 29 0 11 0; -#X connect 37 0 8 1; -#X connect 41 0 17 0; -#X connect 42 0 41 1; diff --git a/pd/doc/3.audio.examples/K01.pulse.width.mod.pd b/pd/doc/3.audio.examples/K01.pulse.width.mod.pd new file mode 100644 index 00000000..214d250a --- /dev/null +++ b/pd/doc/3.audio.examples/K01.pulse.width.mod.pd @@ -0,0 +1,98 @@ +#N canvas 27 355 931 532 12; +#X floatatom 86 104 0 0 0; +#X graph graph1 0 -1.02 882 1.02 669 456 869 326; +#X array difference-output 882 float 0; +#X pop; +#X floatatom 123 324 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 86 351 pd output; +#X msg 162 324 MUTE; +#X obj 86 137 phasor~ 0; +#X text 83 86 frequency; +#X graph graph1 0 -1.02 882 1.02 668 179 868 49; +#X array phasor1-output 882 float 0; +#X pop; +#X msg 191 77 bang; +#X text 231 76 <-- click to graph; +#X text 57 9 CLASSICAL PULSE WIDTH MODULATION; +#X obj 102 196 phasor~ 0; +#X obj 102 172 + 0.2; +#X obj 86 246 -~; +#X graph graph1 0 -1.02 882 1.02 668 316 868 186; +#X array phasor2-output 882 float 0; +#X pop; +#X obj 191 164 tabwrite~ phasor1-output; +#X obj 191 222 tabwrite~ phasor2-output; +#X obj 191 276 tabwrite~ difference-output; +#X text 12 386 This patch demonstrates pulse width modulation \, which +is accomplished simply by subtracting two sawtooth waves at a varying +phase difference. Here their frequencies are set to differ by 1/5 Hz. +so that the relative phase wanders continuously.; +#X text 669 459 ---- 0.02 seconds ----; +#X text 665 498 updated for Pd version 0.34; +#X text 203 325 <-- output; +#X connect 0 0 5 0; +#X connect 0 0 12 0; +#X connect 2 0 3 1; +#X connect 3 0 2 0; +#X connect 4 0 3 2; +#X connect 5 0 13 0; +#X connect 5 0 15 0; +#X connect 8 0 15 0; +#X connect 8 0 16 0; +#X connect 8 0 17 0; +#X connect 11 0 13 1; +#X connect 11 0 16 0; +#X connect 12 0 11 0; +#X connect 13 0 17 0; +#X connect 13 0 3 0; diff --git a/pd/doc/3.audio.examples/K02.stereo.pd b/pd/doc/3.audio.examples/K02.stereo.pd new file mode 100644 index 00000000..1c417df5 --- /dev/null +++ b/pd/doc/3.audio.examples/K02.stereo.pd @@ -0,0 +1,87 @@ +#N canvas 27 355 553 341 12; +#X floatatom 59 63; +#X msg 340 12 \; pd dsp 1; +#X msg 407 12 \; pd dsp 0; +#X text 361 45 ON; +#X text 424 43 OFF; +#X floatatom 123 196; +#N canvas 159 26 618 383 output 0; +#X obj 393 156 t b; +#X obj 393 106 f; +#X obj 393 56 inlet; +#X text 399 25 mute; +#X obj 393 181 f; +#X msg 480 174 0; +#X msg 393 81 bang; +#X obj 393 131 moses 1; +#X obj 480 149 t b f; +#X obj 452 113 moses 1; +#X obj 138 144 dbtorms; +#X obj 452 88 r master-lvl; +#X obj 138 38 r master-lvl; +#X obj 393 206 s master-lvl; +#X obj 22 181 inlet~; +#X obj 254 37 inlet; +#X text 254 14 level; +#X obj 254 96 s master-lvl; +#X msg 151 61 set \$1; +#X obj 151 85 outlet; +#X msg 269 60 \; pd dsp 1; +#X obj 138 190 line~; +#X obj 22 212 *~; +#X obj 138 167 pack 0 50; +#X text 34 159 audio; +#X text 148 106 show level; +#X obj 73 182 inlet~; +#X obj 73 213 *~; +#X obj 22 241 dac~ 1; +#X obj 73 241 dac~ 2; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 23 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 21 0 27 1; +#X connect 22 0 28 0; +#X connect 23 0 21 0; +#X connect 26 0 27 0; +#X connect 27 0 29 0; +#X restore 61 224 pd output; +#X msg 152 196 MUTE; +#X text 186 195 <-- output amplitude; +#X obj 59 111 phasor~ 0; +#X text 56 45 frequency; +#X text 331 323 updated for Pd version 0.26; +#X text 57 9 CLASSICAL PULSE WIDTH MODULATION; +#X obj 131 110 phasor~ 0; +#X obj 59 134 -~ 0.5; +#X obj 131 85 + 0.5; +#X obj 131 135 -~ 0.5; +#X obj 131 160 *~ -1; +#X text 34 262 Here's what happens if you take the previous patch but \, instead of subtracting the two sawtooth waves \, we put them in two speakers with opposite phase.; +#X connect 0 0 9 0; +#X connect 0 0 15 0; +#X connect 5 0 6 2; +#X connect 6 0 5 0; +#X connect 7 0 6 3; +#X connect 9 0 14 0; +#X connect 13 0 16 0; +#X connect 14 0 6 0; +#X connect 15 0 13 0; +#X connect 16 0 17 0; +#X connect 17 0 6 1; diff --git a/pd/doc/3.audio.examples/K03.envelope.mod.pd b/pd/doc/3.audio.examples/K03.envelope.mod.pd new file mode 100644 index 00000000..52551163 --- /dev/null +++ b/pd/doc/3.audio.examples/K03.envelope.mod.pd @@ -0,0 +1,148 @@ +#N canvas 75 15 1014 733 12; +#X graph graph1 0 -1.02 44100 1.02 764 446 964 316; +#X array cos-output 44100 float 0; +#X pop; +#X graph graph1 0 -1.02 44103 1.02 761 148 961 18; +#X array sample-table 44103 float 0; +#X pop; +#X obj 593 579 loadbang; +#X floatatom 96 489 0 0 0; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 67 517 pd output; +#X msg 133 490 MUTE; +#X text 176 490 <-- output amplitude; +#X obj 67 460 hip~ 5; +#X obj 47 408 tabread4~ sample-table; +#X floatatom 46 50 0 0 0; +#X text 85 49 <-- frequency (Hz.); +#X floatatom 97 358 0 0 0; +#X obj 97 385 * 441; +#X obj 47 358 *~ 0; +#X obj 47 383 +~ 1; +#X text 271 274 <-- click to display output; +#X msg 229 275 bang; +#X text 136 357 <-- chunk size (100ths of a second); +#X obj 588 471 adc~ 1; +#X obj 588 495 hip~ 5; +#X obj 588 545 tabwrite~ sample-table; +#X msg 603 518 bang; +#X text 635 518 <-- click here to record your own sample; +#X text 704 583 v-- re-read the original sample; +#X text 40 9 ENVELOPING YOUR LOOPING SAMPLER; +#X obj 88 101 -~ 0.5; +#X obj 88 259 clip~ -0.5 0.5; +#X obj 88 237 *~ 1; +#X graph graph1 0 -1.02 44100 1.02 763 311 963 181; +#X array cos-input 44100 float 0; +#X pop; +#X obj 229 303 tabwrite~ cos-input; +#X obj 88 284 cos~; +#X obj 88 126 wrap~; +#X obj 88 155 -~ 0.5; +#X obj 88 332 *~ -0.5; +#X obj 88 307 -~ 1; +#X obj 229 329 tabwrite~ cos-output; +#X floatatom 119 187 0 0 0; +#X obj 67 433 *~; +#X text 157 98 subtracting 0.5 and wrapping produces a sawtooth wave +180 degrees out of phase from the original.; +#X text 153 150 as before we subtract 1/2 again to center the sawtooth +from -1/2 to 1/2.; +#X text 153 188 <-- sharpness (at least 1); +#X msg 593 608 read ../sound/voice.wav sample-table; +#X obj 593 633 soundfiler; +#X text 776 150 -- 44103 samples ---; +#X text 767 447 ----- 1 second ------; +#X obj 119 211 max 1; +#X obj 46 77 phasor~; +#X text 24 560 Here we apply an amplitude envelope to protect against +discontinuities at the loop point. The envelope is based on the pulse +width modulation example \, except that the widening is applied to +the "1" part of the pulse \, not the "0" part.; +#X text 23 647 To see the envelope \, put the phasor on 2 Hz \, select +"sharpness" values between 1 and 3 \, and look at "cos-input" and "cos-output." +You should both see and hear the effect of the "sharpness" parameter. +; +#X text 734 688 updated for Pd version 0.34; +#X connect 2 0 41 0; +#X connect 3 0 4 1; +#X connect 4 0 3 0; +#X connect 5 0 4 2; +#X connect 7 0 4 0; +#X connect 8 0 37 0; +#X connect 9 0 46 0; +#X connect 11 0 12 0; +#X connect 12 0 13 1; +#X connect 13 0 14 0; +#X connect 14 0 8 0; +#X connect 16 0 29 0; +#X connect 16 0 35 0; +#X connect 18 0 19 0; +#X connect 19 0 20 0; +#X connect 21 0 20 0; +#X connect 25 0 31 0; +#X connect 26 0 30 0; +#X connect 26 0 29 0; +#X connect 27 0 26 0; +#X connect 30 0 34 0; +#X connect 31 0 32 0; +#X connect 32 0 27 0; +#X connect 33 0 35 0; +#X connect 33 0 37 1; +#X connect 34 0 33 0; +#X connect 36 0 45 0; +#X connect 37 0 7 0; +#X connect 41 0 42 0; +#X connect 45 0 27 1; +#X connect 46 0 13 0; +#X connect 46 0 25 0; diff --git a/pd/doc/3.audio.examples/K04.even.odd.pd b/pd/doc/3.audio.examples/K04.even.odd.pd new file mode 100644 index 00000000..bfa950a9 --- /dev/null +++ b/pd/doc/3.audio.examples/K04.even.odd.pd @@ -0,0 +1,116 @@ +#N canvas 213 27 840 639 12; +#X floatatom 45 74 0 0 0; +#X obj 99 164 wrap~; +#X graph graph1 0 -1.02 882 1.02 624 153 824 23; +#X array phasor-output 882 float 0; +#X pop; +#X obj 45 102 phasor~ 0; +#X text 81 73 frequency; +#X obj 45 130 -~ 0.5; +#X obj 99 192 -~ 0.5; +#X obj 36 244 -~; +#X obj 98 244 +~; +#X graph graph1 0 -1.02 882 1.02 625 288 825 158; +#X array wrap-output 882 float 0; +#X pop; +#X graph graph1 0 -1.02 882 1.02 626 423 826 293; +#X array sum 882 float 0; +#X pop; +#X graph graph1 0 -1.02 882 1.02 626 563 826 433; +#X array difference 882 float 0; +#X pop; +#X obj 172 166 tabwrite~ phasor-output; +#X obj 172 218 tabwrite~ wrap-output; +#X obj 172 282 tabwrite~ sum; +#X obj 172 327 tabwrite~ difference; +#X msg 172 120 bang; +#X text 106 13 BUCHLA'S METHOD; +#X floatatom 119 369 0 0 0; +#N canvas 159 26 618 383 output 0; +#X obj 393 156 t b; +#X obj 393 106 f; +#X obj 393 56 inlet; +#X text 399 25 mute; +#X obj 393 181 f; +#X msg 480 174 0; +#X msg 393 81 bang; +#X obj 393 131 moses 1; +#X obj 480 149 t b f; +#X obj 452 113 moses 1; +#X obj 138 144 dbtorms; +#X obj 452 88 r master-lvl; +#X obj 138 38 r master-lvl; +#X obj 393 206 s master-lvl; +#X obj 22 181 inlet~; +#X obj 254 37 inlet; +#X text 254 14 level; +#X obj 254 96 s master-lvl; +#X msg 151 61 set \$1; +#X obj 151 85 outlet; +#X msg 269 60 \; pd dsp 1; +#X obj 138 190 line~; +#X obj 22 212 *~; +#X obj 138 167 pack 0 50; +#X text 34 159 audio; +#X text 148 106 show level; +#X obj 73 182 inlet~; +#X obj 73 213 *~; +#X obj 22 241 dac~ 1; +#X obj 73 241 dac~ 2; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 23 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 21 0 27 1; +#X connect 22 0 28 0; +#X connect 23 0 21 0; +#X connect 26 0 27 0; +#X connect 27 0 29 0; +#X restore 81 392 pd output; +#X msg 156 369 MUTE; +#X text 13 430 A patch to split a sawtooth into even and odd harmonics +ala Buchla. The wrap~ object folds its input into the interval [0 \, +1) so taht \, for instance \, subtracting 1/5 from a phasor and wrapping +it gives another phasor a half cycle out of phase frmo the original. +Adding and subtracting the two give the results shown and heard. (Listen +to the two outputs separately \, then together.); +#X text 631 567 ---- 0.02 seconds ----; +#X text 577 613 updated for Pd version 0.34; +#X text 193 369 <-- output; +#X connect 0 0 3 0; +#X connect 1 0 6 0; +#X connect 3 0 5 0; +#X connect 5 0 1 0; +#X connect 5 0 12 0; +#X connect 5 0 8 0; +#X connect 5 0 7 0; +#X connect 6 0 13 0; +#X connect 6 0 8 1; +#X connect 6 0 7 1; +#X connect 7 0 15 0; +#X connect 7 0 19 0; +#X connect 8 0 14 0; +#X connect 8 0 19 1; +#X connect 16 0 13 0; +#X connect 16 0 14 0; +#X connect 16 0 15 0; +#X connect 16 0 12 0; +#X connect 18 0 19 2; +#X connect 19 0 18 0; +#X connect 20 0 19 3; diff --git a/pd/doc/3.audio.examples/K05.bandlimited.pd b/pd/doc/3.audio.examples/K05.bandlimited.pd new file mode 100644 index 00000000..f49bcb68 --- /dev/null +++ b/pd/doc/3.audio.examples/K05.bandlimited.pd @@ -0,0 +1,166 @@ +#N canvas 21 90 540 752 12; +#X floatatom 183 91; +#X obj 183 115 mtof; +#X floatatom 340 183; +#X obj 164 431 -~; +#N canvas 391 51 561 806 tables 1; +#X graph graph1 0 -1 1002 1 99 322 499 22; +#X array array1 1002 float; +#X pop; +#X graph graph1 0 -1 882 1 96 684 496 384; +#X array array2 882 float; +#X pop; +#X text 138 326 ---------------- 1002 samples ---------------; +#X text 150 693 ---------------- 0.02 sec ---------------; +#X restore 33 201 pd tables; +#N canvas 104 390 728 408 make-table 0; +#X obj 469 146 cos~; +#X obj 303 146 cos~; +#X obj 255 141 cos~; +#X msg 199 210 bang; +#X obj 255 229 tabwrite~ array1; +#X text 366 79 period is 2000 samples \, twice the table length; +#X msg 94 94 \; pd dsp 1; +#X text 118 286 this network puts a half cycle of a band-limited square wave into the table "array1."; +#X text 114 335 logically the half-cycle is in samples 1 through 1000 \; samples 0 and 1001 are provided so that the 4-point interpolation will work everywhere.; +#X text 401 57 back the phase up one sample; +#X msg 336 56 -0.0005; +#X obj 171 16 loadbang; +#X obj 303 120 *~ 3; +#X obj 468 122 *~ 5; +#X obj 303 171 *~ 0.33333; +#X obj 468 172 *~ -0.2; +#X obj 255 169 *~ -1; +#X msg 171 38 bang; +#X obj 254 80 phasor~ 22.05; +#X obj 255 202 *~ 0.57692; +#X connect 0 0 15 0; +#X connect 1 0 14 0; +#X connect 2 0 16 0; +#X connect 3 0 4 0; +#X connect 10 0 18 1; +#X connect 11 0 17 0; +#X connect 12 0 1 0; +#X connect 13 0 0 0; +#X connect 14 0 19 0; +#X connect 15 0 19 0; +#X connect 16 0 19 0; +#X connect 17 0 10 0; +#X connect 17 0 6 0; +#X connect 17 0 3 0; +#X connect 18 0 2 0; +#X connect 18 0 12 0; +#X connect 18 0 13 0; +#X connect 19 0 4 0; +#X restore 34 224 pd make-table; +#X obj 183 163 sig~; +#X obj 341 283 /~; +#X obj 357 256 clip~ 1 999999; +#X obj 183 218 phasor~; +#X obj 196 301 *~; +#X obj 196 325 clip~ -0.5 0.5; +#X floatatom 183 139; +#X obj 196 397 tabread4~ array1; +#X floatatom 340 135; +#X obj 340 206 * 0.33333; +#X obj 340 159 mtof; +#X text 374 110 band limit (MIDI units); +#X text 220 78 pitch; +#X obj 340 87 loadbang; +#X msg 340 111 130; +#X obj 340 230 sig~; +#X text 246 139 frequency; +#X obj 196 349 *~ 1000; +#X obj 196 373 +~ 501; +#X obj 183 242 -~ 0.5; +#X floatatom 206 441; +#N canvas 159 26 495 266 output 0; +#X obj 338 160 t b; +#X obj 338 110 f; +#X obj 338 60 inlet; +#X text 344 29 mute; +#X obj 338 185 f; +#X msg 425 178 0; +#X msg 338 85 bang; +#X obj 338 135 moses 1; +#X obj 425 153 t b f; +#X obj 397 117 moses 1; +#X obj 83 148 dbtorms; +#X obj 397 92 r master-lvl; +#X obj 83 42 r master-lvl; +#X obj 338 210 s master-lvl; +#X obj 22 181 inlet~; +#X obj 199 41 inlet; +#X text 199 18 level; +#X obj 199 100 s master-lvl; +#X msg 96 65 set \$1; +#X obj 96 89 outlet; +#X msg 214 64 \; pd dsp 1; +#X obj 83 194 line~; +#X obj 22 212 *~; +#X obj 22 241 dac~; +#X obj 83 171 pack 0 50; +#X text 20 158 audio; +#X text 93 110 show level; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 6 0; +#X connect 4 0 13 0; +#X connect 5 0 13 0; +#X connect 6 0 1 0; +#X connect 7 0 0 0; +#X connect 7 1 8 0; +#X connect 8 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 24 0; +#X connect 11 0 1 1; +#X connect 11 0 9 0; +#X connect 12 0 10 0; +#X connect 12 0 18 0; +#X connect 14 0 22 0; +#X connect 15 0 17 0; +#X connect 15 0 20 0; +#X connect 18 0 19 0; +#X connect 21 0 22 1; +#X connect 22 0 23 0; +#X connect 22 0 23 1; +#X connect 24 0 21 0; +#X restore 177 469 pd output; +#X msg 235 441 MUTE; +#X text 276 440 <-- output amplitude; +#X text 27 503 Patch to make an approximately band-limited sawtooth. This is useful if you intend to use sawtooth generators above about 200 Hz. \, perhaps to use any of the techniques shown in the previous four patches.; +#X text 28 562 We generate a perfect square wave at Nyquist/6 \; this will have partials 1 \, 3 \, and 5 \, but the Nyquist frequency at partial 6 will cut off the rest of the partials. This is stored in array1 using the "make-table" subpatch.; +#X text 64 34 BAND-LIMITED SAWTOOTH GENERATOR; +#X obj 43 459 tabwrite~ array2; +#X msg 44 435 bang; +#X text 28 632 Now any time we wish to make a discontinuity in the output signal \, we make it look exactly like the bandlimited square wave looks. We do this by reading through the table we recorded \, carefully adding a "digital" \, non-band-limited \, sawtooth to "array1" so that the discontinuities in the two cancel out and what you have left is the transition in the table.; +#X text 338 737 updated for Pd version 0.26; +#X text 41 409 graph output; +#X connect 0 0 1 0; +#X connect 1 0 12 0; +#X connect 2 0 15 0; +#X connect 3 0 27 0; +#X connect 3 0 33 0; +#X connect 6 0 8 0; +#X connect 6 0 9 0; +#X connect 7 0 10 1; +#X connect 8 0 7 1; +#X connect 9 0 25 0; +#X connect 10 0 11 0; +#X connect 11 0 23 0; +#X connect 12 0 6 0; +#X connect 13 0 3 0; +#X connect 14 0 16 0; +#X connect 15 0 21 0; +#X connect 16 0 2 0; +#X connect 19 0 20 0; +#X connect 20 0 14 0; +#X connect 21 0 7 0; +#X connect 23 0 24 0; +#X connect 24 0 13 0; +#X connect 25 0 10 0; +#X connect 25 0 3 1; +#X connect 26 0 27 1; +#X connect 27 0 26 0; +#X connect 28 0 27 2; +#X connect 34 0 33 0; diff --git a/pd/doc/3.audio.examples/adsr2.pd b/pd/doc/3.audio.examples/adsr2.pd deleted file mode 100644 index 157a9c51..00000000 --- a/pd/doc/3.audio.examples/adsr2.pd +++ /dev/null @@ -1,110 +0,0 @@ -#N canvas 207 5 728 714 12; -#X obj 101 90 inlet; -#X obj 328 115 inlet; -#X text 101 69 trigger; -#X obj 101 126 sel 0; -#X obj 309 321 f \$1; -#X obj 394 117 inlet; -#X obj 474 385 line~; -#X obj 456 242 f \$4; -#X obj 474 334 pack 0 \$3; -#X obj 461 117 inlet; -#X obj 537 118 inlet; -#X obj 616 117 inlet; -#X msg 76 150 stop; -#X obj 594 311 pack 0 \$5; -#X text 328 94 level; -#X obj 456 281 * \$1; -#X text 309 377 ATTACK; -#X obj 474 408 outlet~; -#X text 44 125 release; -#X text 54 47 This patch is used as an abstraction in 27.envelope.slew.pd -; -#X obj 295 421 snapshot~; -#X obj 259 135 t b b; -#X text 587 333 RELEASE; -#X obj 181 261 * -1; -#X text 480 353 DECAY; -#X text 180 71 attack; -#X text 2 238 correct the attack; -#X text 12 254 multiplying by; -#X text 5 275 (target-current)/; -#X text 83 289 target; -#X text 8 321 which is the; -#X text 8 341 relative amount; -#X text 8 361 of slew in the attack.; -#X text 20 468 This version of the adsr envelope generator maintains -a constant rate of climb in the attact portion rather than a constant -attack time as the previous one did.; -#X obj 174 290 / \$1; -#X obj 174 313 * \$2; -#X obj 309 355 pack; -#X obj 181 238 - \$1; -#X obj 174 336 abs; -#X text 8 401 current value is greater than; -#X text 6 421 the target.; -#X text 8 381 The "abs" is in case the; -#X text 19 519 The "attack time" input here controls the time needed -to rist from 0 to the output level. When we get an attack \, we take -a snapshot~ of ouy current output level and adjust the attack time -accordingly.; -#X obj 183 89 moses; -#X text 267 106 from; -#X text 269 118 here; -#X obj 174 136 t b b; -#X text 182 107 from; -#X text 184 119 zero; -#X msg 223 136 0; -#X text 19 584 Another feature: if you give a negative number for the -trigger \, the output jumps to zero and slews from there \, instead -of slewing from the current level. This is often appropriate for pitch -envelopes.; -#X obj 456 305 * 0.01; -#X text 457 679 updated for Pd version 0.34; -#X obj 455 217 del; -#X text 391 95 attack; -#X text 458 93 decay; -#X text 55 4 adsr2 - arguments: level \, attack time \, decay time -\, sustain percentage \, release time; -#X text 533 91 sustain; -#X text 609 93 release; -#X connect 0 0 3 0; -#X connect 1 0 4 1; -#X connect 1 0 15 1; -#X connect 1 0 34 1; -#X connect 1 0 37 1; -#X connect 3 0 12 0; -#X connect 3 0 13 0; -#X connect 3 1 43 0; -#X connect 4 0 36 0; -#X connect 5 0 35 1; -#X connect 6 0 17 0; -#X connect 6 0 20 0; -#X connect 7 0 15 0; -#X connect 8 0 6 0; -#X connect 9 0 8 1; -#X connect 10 0 7 1; -#X connect 11 0 13 1; -#X connect 12 0 53 0; -#X connect 13 0 6 0; -#X connect 15 0 51 0; -#X connect 20 0 37 0; -#X connect 21 0 4 0; -#X connect 21 0 53 0; -#X connect 21 1 20 0; -#X connect 23 0 34 0; -#X connect 34 0 35 0; -#X connect 35 0 38 0; -#X connect 36 0 6 0; -#X connect 37 0 23 0; -#X connect 38 0 36 1; -#X connect 38 0 53 1; -#X connect 43 0 46 0; -#X connect 43 1 21 0; -#X connect 46 0 4 0; -#X connect 46 0 53 0; -#X connect 46 1 49 0; -#X connect 49 0 6 0; -#X connect 49 0 37 0; -#X connect 51 0 8 0; -#X connect 53 0 7 0; diff --git a/pd/doc/3.audio.examples/echo.pd b/pd/doc/3.audio.examples/echo.pd deleted file mode 100644 index 7666d5a7..00000000 --- a/pd/doc/3.audio.examples/echo.pd +++ /dev/null @@ -1,17 +0,0 @@ -#N canvas 0 0 600 492 12; -#X obj 66 95 inlet~; -#X obj 130 96 inlet~; -#X obj 69 216 outlet~; -#X obj 134 217 outlet~; -#X obj 67 143 +~; -#X obj 133 143 -~; -#X obj 134 167 delwrite~ \$1 \$2; -#X obj 133 193 delread~ \$1 \$2; -#X text 67 24 This appears as an abstraction in patch 44; -#X connect 0 0 4 0; -#X connect 0 0 5 0; -#X connect 1 0 4 1; -#X connect 1 0 5 1; -#X connect 4 0 2 0; -#X connect 5 0 6 0; -#X connect 7 0 3 0; diff --git a/pd/doc/3.audio.examples/output~.pd b/pd/doc/3.audio.examples/output~.pd index d1ccdc9f..07fb59f8 100644 --- a/pd/doc/3.audio.examples/output~.pd +++ b/pd/doc/3.audio.examples/output~.pd @@ -6,28 +6,28 @@ #X obj 516 499 moses 1; #X obj 630 518 t b f; #X obj 596 479 moses 1; -#X obj 30 117 dbtorms; -#X obj 86 207 inlet~; -#X msg 341 285 \; pd dsp 1; -#X obj 30 207 line~; -#X obj 64 241 *~; -#X obj 64 271 dac~; -#X obj 30 147 pack 0 50; -#X text 113 183 audio in; +#X obj 29 97 dbtorms; +#X obj 85 170 inlet~; +#X msg 278 300 \; pd dsp 1; +#X obj 29 170 line~; +#X obj 64 242 *~; +#X obj 64 272 dac~; +#X obj 29 127 pack 0 50; +#X text 121 146 audio in; #X text 301 496 test if less than 1 -->; #X text 267 523 if true convert to bang -->; -#X text 101 116 <-- convert from dB to linear units; -#X floatatom 341 221 3 0 100 0 dB - -; +#X text 100 96 <-- convert from dB to linear units; +#X floatatom 278 221 3 0 100 0 dB - -; #X obj 516 449 bng 15 250 50 0 empty empty mute -38 7 0 12 -262144 -1 -1; -#X text 119 146 <-- make a ramp to avoid clicks or zipper noise; -#X obj 175 208 inlet~; -#X obj 154 240 *~; +#X text 118 126 <-- make a ramp to avoid clicks or zipper noise; +#X obj 148 170 inlet~; +#X obj 154 241 *~; #X text 502 399 MUTE logic:; -#X obj 341 193 r \$0-master-lvl; +#X obj 278 193 r \$0-master-lvl; #X obj 516 573 s \$0-master-lvl; -#X obj 356 248 s \$0-master-out; -#X obj 30 91 r \$0-master-out; +#X obj 293 247 s \$0-master-out; +#X obj 29 71 r \$0-master-out; #X obj 596 450 r \$0-master-out; #X text 60 10 Level control abstraction \, used in many of the Pd example patches. The "level" and "mute" controls show up on the parent \, calling @@ -35,7 +35,9 @@ patch.; #X text 229 549 previous nonzero master-lvl -->; #X text 301 453 recall previous; #X text 301 471 value of master-lvl -->; -#X text 79 295 automatically start DSP -->; +#X text 16 310 automatically start DSP -->; +#X obj 85 192 hip~ 3; +#X obj 147 192 hip~ 3; #X connect 0 0 2 0; #X connect 1 0 4 0; #X connect 2 0 25 0; @@ -45,7 +47,7 @@ patch.; #X connect 5 0 3 0; #X connect 6 1 2 1; #X connect 7 0 13 0; -#X connect 8 0 11 1; +#X connect 8 0 34 0; #X connect 10 0 22 0; #X connect 10 0 11 0; #X connect 11 0 12 0; @@ -53,10 +55,12 @@ patch.; #X connect 18 0 9 0; #X connect 18 0 26 0; #X connect 19 0 1 0; -#X connect 21 0 22 1; +#X connect 21 0 35 0; #X connect 22 0 12 1; #X connect 24 0 18 0; #X connect 27 0 7 0; #X connect 28 0 1 1; #X connect 28 0 6 0; +#X connect 34 0 11 1; +#X connect 35 0 22 1; #X coords 0 0 1 1 65 55 1; diff --git a/pd/doc/3.audio.examples/partial.pd b/pd/doc/3.audio.examples/partial.pd index dae4a151..03bb925d 100644 --- a/pd/doc/3.audio.examples/partial.pd +++ b/pd/doc/3.audio.examples/partial.pd @@ -1,51 +1,76 @@ -#N canvas 439 152 649 445 12; -#X obj 495 257 sqrt; -#X text 78 85 trigger; -#X msg 82 143 bang; -#X obj 81 211 * \$2; -#X text 126 210 relative frequency; -#X obj 83 340 *~; -#X obj 262 307 line~; -#X obj 262 335 *~; -#X obj 260 364 *~; -#X obj 264 229 float; -#X msg 264 280 0 \$1; -#X obj 494 280 sqrt; -#X obj 82 110 r trigger; -#X obj 495 232 float \$1; -#X obj 294 206 r duration; -#X obj 81 179 float; -#X obj 126 180 r frequency; -#X text 497 199 amplitude; -#X obj 83 311 osc~ 0; -#X obj 278 168 t b b; -#X obj 81 238 + \$3; -#X text 119 240 detune; -#X obj 264 255 * \$4; -#X text 306 256 relative duration; -#X text 106 6 partial - arguments: amplitude \, frequency \, detune \, duration; -#X obj 83 367 throw~ sum; -#X text 74 35 This patch is used as an abstraction in 15.additive.pd; -#X connect 0 0 11 0; -#X connect 2 0 15 0; -#X connect 2 0 19 0; -#X connect 3 0 20 0; -#X connect 5 0 25 0; -#X connect 6 0 7 0; -#X connect 6 0 7 1; -#X connect 7 0 8 0; -#X connect 7 0 8 1; -#X connect 8 0 5 1; -#X connect 9 0 22 0; -#X connect 10 0 6 0; -#X connect 11 0 6 0; -#X connect 12 0 2 0; -#X connect 13 0 0 0; -#X connect 14 0 9 1; -#X connect 15 0 3 0; -#X connect 16 0 15 1; -#X connect 18 0 5 0; -#X connect 19 0 9 0; -#X connect 19 1 13 0; -#X connect 20 0 18 0; -#X connect 22 0 10 0; +#N canvas 18 78 880 448 12; +#X obj 465 234 sqrt; +#X text 17 88 trigger; +#X text 33 175 relative frequency; +#X obj 17 341 *~; +#X obj 227 322 line~; +#X obj 227 349 *~; +#X obj 227 376 *~; +#X msg 227 285 0 \$1; +#X obj 465 261 sqrt; +#X obj 17 113 r trigger; +#X obj 465 180 float \$1; +#X obj 249 235 r duration; +#X obj 39 226 r frequency; +#X obj 227 158 t b b; +#X text 303 209 relative duration; +#X obj 17 368 throw~ sum; +#X obj 17 140 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 465 288 \$1 5; +#X obj 227 185 del 5; +#X obj 465 207 * 0.1; +#X obj 17 279 + \$4; +#X text 550 178 get amplitude from argument 1; +#X text 524 206 normalize to 0.1; +#X text 516 233 take fourth root (square root twice); +#X text 544 250 because we'll raise line~ output to; +#X text 543 267 fourth power; +#X text 515 292 attack time 5 msec; +#X text 280 184 decay after 5 msec; +#X text 469 157 attack; +#X obj 226 211 float \$2; +#X obj 227 258 *; +#X text 264 258 actual duration; +#X obj 17 200 float \$3; +#X obj 17 252 *; +#X obj 17 314 osc~; +#X text 49 252 times global freq.; +#X text 60 279 plus detune; +#X text 271 285 decay msg to line~; +#X text 266 350 raise to fourth power for; +#X text 267 368 natural-sounding decay shape; +#X text 20 396 add to global; +#X text 19 415 summing bus; +#X text 21 45 This patch is used as an abstraction in the additive +synthesis example \, D06.additive.pd; +#X text 25 4 partial -- sinusoidal partial for additive synthesis; +#X text 631 12 arguments:; +#X text 605 37 1 amplitude \; 2 relative duration \; 3 relative frequency +\; 4 detune; +#X connect 0 0 8 0; +#X connect 3 0 15 0; +#X connect 4 0 5 0; +#X connect 4 0 5 1; +#X connect 5 0 6 0; +#X connect 5 0 6 1; +#X connect 6 0 3 1; +#X connect 7 0 4 0; +#X connect 8 0 17 0; +#X connect 9 0 16 0; +#X connect 10 0 19 0; +#X connect 11 0 30 1; +#X connect 12 0 33 1; +#X connect 13 0 18 0; +#X connect 13 1 10 0; +#X connect 16 0 13 0; +#X connect 16 0 32 0; +#X connect 17 0 4 0; +#X connect 18 0 29 0; +#X connect 19 0 0 0; +#X connect 20 0 34 0; +#X connect 29 0 30 0; +#X connect 30 0 7 0; +#X connect 32 0 33 0; +#X connect 33 0 20 0; +#X connect 34 0 3 0; diff --git a/pd/doc/3.audio.examples/reverb-echo.pd b/pd/doc/3.audio.examples/reverb-echo.pd new file mode 100644 index 00000000..e627e9fc --- /dev/null +++ b/pd/doc/3.audio.examples/reverb-echo.pd @@ -0,0 +1,18 @@ +#N canvas 0 0 600 492 12; +#X obj 66 95 inlet~; +#X obj 130 96 inlet~; +#X obj 69 216 outlet~; +#X obj 141 215 outlet~; +#X obj 67 143 +~; +#X obj 140 141 -~; +#X obj 141 165 delwrite~ \$1 \$2; +#X obj 140 191 delread~ \$1 \$2; +#X text 68 24 This appears as an abstraction in patch G05.reverb.pd +; +#X connect 0 0 4 0; +#X connect 0 0 5 0; +#X connect 1 0 4 1; +#X connect 1 0 5 1; +#X connect 4 0 2 0; +#X connect 5 0 6 0; +#X connect 7 0 3 0; diff --git a/pd/doc/3.audio.examples/sampvoice.pd b/pd/doc/3.audio.examples/sampvoice.pd index dafa3c67..ee9c19b4 100644 --- a/pd/doc/3.audio.examples/sampvoice.pd +++ b/pd/doc/3.audio.examples/sampvoice.pd @@ -1,105 +1,114 @@ -#N canvas 231 67 574 676 12; -#X obj 95 396 line~; -#X obj 301 396 line~; -#X obj 285 476 *~; -#X obj 317 607 outlet~; -#X obj 144 396 makefilename sample%d; -#X msg 144 419 set \$1; -#X obj 144 442 tabread4~ sample1; -#X obj 349 419 dbtorms; -#X obj 349 396 unpack; -#X obj 349 442 sqrt; -#X obj 349 465 sqrt; -#X obj 349 488 line~; -#X obj 333 559 *~; -#X obj 349 511 *~; -#X obj 349 534 *~; -#X msg 201 49 bang; +#N canvas 231 67 705 628 12; +#X obj 278 476 *~; +#X obj 177 604 outlet~; +#X obj 104 396 makefilename sample%d; +#X msg 104 419 set \$1; +#X obj 104 442 tabread4~ sample1; +#X obj 360 419 dbtorms; +#X obj 360 396 unpack; +#X obj 360 442 sqrt; +#X obj 360 465 sqrt; +#X obj 360 488 line~; +#X obj 338 559 *~; +#X obj 360 511 *~; +#X obj 360 534 *~; +#X msg 201 42 bang; #X obj 201 72 delay 5; #X obj 289 95 unpack 0 0 0 0 0 0 0; -#X obj 421 184 f; +#X obj 426 184 f; #X obj 367 161 f; #X obj 309 161 f; #X obj 278 161 f; -#X obj 252 161 f; -#X obj 173 161 f; -#X obj 173 184 mtof; -#X obj 173 207 / 261.62; -#X obj 173 230 * 4.41e+08; -#X obj 173 253 +; -#X obj 394 161 delay; -#X obj 252 303 pack 0 0 0 0 0; +#X obj 247 161 f; +#X obj 156 159 f; +#X obj 156 182 mtof; +#X obj 156 205 / 261.62; +#X obj 156 228 * 4.41e+08; +#X obj 156 251 +; +#X obj 399 161 delay; +#X obj 247 303 pack 0 0 0 0 0; #X obj 201 95 t b b b; #X obj 309 207 + 1; #X obj 309 184 * 44.1; -#X msg 85 337 0 5; -#X msg 286 337 1 5; -#X msg 319 337 0 \, \$1 \$2; -#X msg 158 337 \$3 \, \$4 1e+07; +#X msg 55 338 0 5; +#X msg 289 337 1 5; +#X msg 325 337 0 \, \$1 \$2; +#X msg 128 338 \$3 \, \$4 1e+07; #X msg 253 337 \$5; -#X msg 393 337 0 \$1; +#X msg 405 337 0 \$1; #X obj 289 72 inlet; -#X obj 61 565 inlet~; -#X obj 317 583 +~; -#X text 82 21 This is an abstraction used by a polyphonic sampler (example 24.); -#X connect 0 0 6 0; -#X connect 1 0 2 1; -#X connect 2 0 12 0; -#X connect 4 0 5 0; -#X connect 5 0 6 0; -#X connect 6 0 2 0; -#X connect 7 0 9 0; -#X connect 8 0 7 0; -#X connect 8 1 11 1; -#X connect 9 0 10 0; -#X connect 10 0 11 0; -#X connect 11 0 13 0; -#X connect 11 0 13 1; -#X connect 12 0 41 1; +#X obj 177 553 inlet~; +#X obj 177 579 +~; +#X text 44 15 This is an abstraction used by the polyphonic sampler. +; +#X text 505 67 ARGUMENTS FOR NOTES:; +#X text 505 89 pitch in halftones; +#X text 505 113 amplitude (dB); +#X text 505 161 sample number; +#X text 505 137 duration (msec); +#X text 505 185 start location (msec); +#X text 505 209 rise time (msec); +#X text 505 233 decay time (msec); +#X obj 45 396 vline~; +#X obj 301 396 vline~; +#X connect 0 0 10 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 0 0; +#X connect 5 0 7 0; +#X connect 6 0 5 0; +#X connect 6 1 9 1; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 11 0; +#X connect 9 0 11 1; +#X connect 10 0 39 1; +#X connect 11 0 12 0; +#X connect 11 0 12 1; +#X connect 12 0 10 1; #X connect 13 0 14 0; -#X connect 13 0 14 1; -#X connect 14 0 12 1; -#X connect 15 0 16 0; -#X connect 15 0 33 0; -#X connect 16 0 30 0; -#X connect 17 0 23 1; -#X connect 17 0 15 0; -#X connect 17 1 22 1; -#X connect 17 2 28 1; -#X connect 17 3 21 1; -#X connect 17 4 20 1; -#X connect 17 5 19 1; -#X connect 17 6 18 1; -#X connect 18 0 38 0; -#X connect 19 0 29 1; -#X connect 20 0 32 0; -#X connect 21 0 29 4; -#X connect 22 0 29 0; +#X connect 13 0 31 0; +#X connect 14 0 28 0; +#X connect 15 0 21 1; +#X connect 15 0 13 0; +#X connect 15 1 20 1; +#X connect 15 2 26 1; +#X connect 15 3 19 1; +#X connect 15 4 18 1; +#X connect 15 5 17 1; +#X connect 15 6 16 1; +#X connect 16 0 36 0; +#X connect 17 0 27 1; +#X connect 18 0 30 0; +#X connect 19 0 27 4; +#X connect 20 0 27 0; +#X connect 21 0 22 0; +#X connect 22 0 23 0; #X connect 23 0 24 0; #X connect 24 0 25 0; -#X connect 25 0 26 0; -#X connect 26 0 27 0; -#X connect 27 0 29 3; -#X connect 28 0 18 0; -#X connect 29 0 34 0; -#X connect 29 0 35 0; -#X connect 29 0 36 0; -#X connect 29 0 37 0; -#X connect 30 0 22 0; -#X connect 30 1 23 0; -#X connect 30 2 19 0; -#X connect 30 2 20 0; -#X connect 30 2 21 0; -#X connect 30 2 28 0; -#X connect 31 0 29 2; -#X connect 31 0 27 1; -#X connect 32 0 31 0; -#X connect 33 0 1 0; -#X connect 34 0 1 0; -#X connect 35 0 8 0; -#X connect 36 0 0 0; -#X connect 37 0 4 0; -#X connect 38 0 8 0; -#X connect 39 0 17 0; -#X connect 40 0 41 0; -#X connect 41 0 3 0; +#X connect 25 0 27 3; +#X connect 26 0 16 0; +#X connect 27 0 32 0; +#X connect 27 0 33 0; +#X connect 27 0 34 0; +#X connect 27 0 35 0; +#X connect 28 0 20 0; +#X connect 28 1 21 0; +#X connect 28 2 17 0; +#X connect 28 2 18 0; +#X connect 28 2 19 0; +#X connect 28 2 26 0; +#X connect 29 0 27 2; +#X connect 29 0 25 1; +#X connect 30 0 29 0; +#X connect 31 0 50 0; +#X connect 32 0 50 0; +#X connect 33 0 6 0; +#X connect 34 0 49 0; +#X connect 35 0 2 0; +#X connect 36 0 6 0; +#X connect 37 0 15 0; +#X connect 38 0 39 0; +#X connect 39 0 1 0; +#X connect 49 0 4 0; +#X connect 50 0 0 1; diff --git a/pd/doc/3.audio.examples/sampvoice2.pd b/pd/doc/3.audio.examples/sampvoice2.pd new file mode 100644 index 00000000..4350ea48 --- /dev/null +++ b/pd/doc/3.audio.examples/sampvoice2.pd @@ -0,0 +1,122 @@ +#N canvas 231 67 770 791 12; +#X obj 284 616 *~; +#X obj 183 744 outlet~; +#X obj 110 536 makefilename sample%d; +#X msg 110 559 set \$1; +#X obj 110 582 tabread4~ sample1; +#X obj 367 559 dbtorms; +#X obj 367 536 unpack; +#X obj 367 582 sqrt; +#X obj 367 605 sqrt; +#X obj 367 628 line~; +#X obj 344 699 *~; +#X obj 367 651 *~; +#X obj 367 674 *~; +#X msg 122 184 bang; +#X obj 130 207 delay 5; +#X obj 437 275 f; +#X obj 399 276 f; +#X obj 322 276 f; +#X obj 283 276 f; +#X obj 252 276 f; +#X obj 159 263 f; +#X obj 159 286 mtof; +#X obj 159 309 / 261.62; +#X obj 159 332 * 4.41e+08; +#X obj 159 363 +; +#X obj 253 443 pack 0 0 0 0 0; +#X obj 130 230 t b b b; +#X obj 322 322 + 1; +#X obj 322 299 * 44.1; +#X msg 85 478 0 5; +#X msg 295 477 1 5; +#X msg 331 477 0 \, \$1 \$2; +#X msg 134 478 \$3 \, \$4 1e+07; +#X msg 259 477 \$5; +#X msg 411 477 0 \$1; +#X obj 230 119 inlet; +#X obj 183 693 inlet~; +#X obj 183 719 +~; +#X text 498 181 pitch in halftones; +#X text 499 158 amplitude (dB); +#X text 499 206 sample number; +#X text 499 230 start location (msec); +#X text 499 254 rise time (msec); +#X text 499 278 decay time (msec); +#X text 498 133 ARGUMENTS FOR NOTE ON:; +#X text 460 317 (Zero amplitude means note off \;; +#X text 481 338 other parameters are ignored.); +#X obj 230 144 route 0; +#X obj 288 175 unpack 0 0 0 0 0 0; +#X text 35 5 This is an abstraction used by the polyphonic sampler +\, version 2 \, which takes separate note-on and note-off messages. +Unlike "sampvoice" (the first version) \, there is no "duration" field +\, and the amplitude and pitch fields are reversed to make it easy +to separate note-on from note-off messages (which have amplitude zero.) +; +#X text 299 153 note-on; +#X text 155 153 note-off; +#X obj 50 536 vline~; +#X obj 307 536 vline~; +#X msg 230 166 bang; +#X connect 0 0 10 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 0 0; +#X connect 5 0 7 0; +#X connect 6 0 5 0; +#X connect 6 1 9 1; +#X connect 7 0 8 0; +#X connect 8 0 9 0; +#X connect 9 0 11 0; +#X connect 9 0 11 1; +#X connect 10 0 37 1; +#X connect 11 0 12 0; +#X connect 11 0 12 1; +#X connect 12 0 10 1; +#X connect 13 0 14 0; +#X connect 13 0 29 0; +#X connect 14 0 26 0; +#X connect 15 0 34 0; +#X connect 16 0 25 1; +#X connect 17 0 28 0; +#X connect 18 0 25 4; +#X connect 19 0 25 0; +#X connect 20 0 21 0; +#X connect 21 0 22 0; +#X connect 22 0 23 0; +#X connect 23 0 24 0; +#X connect 24 0 25 3; +#X connect 25 0 30 0; +#X connect 25 0 31 0; +#X connect 25 0 32 0; +#X connect 25 0 33 0; +#X connect 26 0 19 0; +#X connect 26 1 20 0; +#X connect 26 2 16 0; +#X connect 26 2 17 0; +#X connect 26 2 18 0; +#X connect 27 0 25 2; +#X connect 27 0 24 1; +#X connect 28 0 27 0; +#X connect 29 0 53 0; +#X connect 30 0 53 0; +#X connect 31 0 6 0; +#X connect 32 0 52 0; +#X connect 33 0 2 0; +#X connect 34 0 6 0; +#X connect 35 0 47 0; +#X connect 36 0 37 0; +#X connect 37 0 1 0; +#X connect 47 0 54 0; +#X connect 47 1 48 0; +#X connect 48 0 13 0; +#X connect 48 0 19 1; +#X connect 48 1 20 1; +#X connect 48 2 18 1; +#X connect 48 3 17 1; +#X connect 48 4 16 1; +#X connect 48 5 15 1; +#X connect 52 0 4 0; +#X connect 53 0 0 1; +#X connect 54 0 15 0; diff --git a/pd/doc/3.audio.examples/shepvoice.pd b/pd/doc/3.audio.examples/shepvoice.pd index f1929976..9e05c48b 100644 --- a/pd/doc/3.audio.examples/shepvoice.pd +++ b/pd/doc/3.audio.examples/shepvoice.pd @@ -1,22 +1,32 @@ -#N canvas 63 20 638 403 12; -#X obj 300 253 pack 0 50; -#X obj 243 203 pack 0 50; -#X obj 151 216 inlet~; -#X obj 243 232 line~; -#X obj 300 278 line~; -#X obj 243 297 *~; -#X obj 151 316 +~; -#X obj 151 342 outlet~; -#X obj 399 121 r pitch+; -#X obj 326 108 r interval+; -#X obj 297 144 expr $f1 * $f2 + $f3; -#X obj 537 90 r dropoff+; -#X obj 297 75 expr ($i1% 10000) * 0.0002 - 1; -#X obj 296 20 r phase; -#X obj 296 47 + \$1; -#X obj 457 114 expr exp(-$f1*$f1*$f2); -#X obj 243 179 mtof; -#X obj 243 258 osc~; +#N canvas 471 146 638 403 12; +#X obj 156 262 pack 0 50; +#X obj 98 216 pack 0 50; +#X obj 29 298 inlet~; +#X obj 98 242 line~; +#X obj 156 288 line~; +#X obj 99 306 *~; +#X obj 29 324 +~; +#X obj 29 350 outlet~; +#X obj 285 165 r pitch+; +#X obj 185 139 r interval+; +#X obj 98 164 expr $f1 * $f2 + $f3; +#X obj 481 137 r dropoff+; +#X obj 297 63 expr ($i1% 10000) * 0.0002 - 1; +#X obj 297 11 r phase; +#X obj 297 37 + \$1; +#X obj 376 165 expr exp(-$f1*$f1*$f2); +#X obj 98 190 mtof; +#X obj 98 268 osc~; +#X text 64 8 our local phase =; +#X text 61 26 overall phase + our; +#X text 60 45 relative phase; +#X text 57 64 (modulo 10000); +#X text 59 81 normalized from -1 to 1; +#X text 349 36 \$1: relative phase; +#X text 9 110 pitch is center pitch; +#X text 16 125 + interval*phase; +#X text 373 194 amplitude is Gaussian \, with; +#X text 321 215 peak width controlled by "dropoff"; #X connect 0 0 4 0; #X connect 1 0 3 0; #X connect 2 0 6 0; diff --git a/pd/doc/3.audio.examples/spectrum-partial.pd b/pd/doc/3.audio.examples/spectrum-partial.pd index 584d3489..3c242504 100644 --- a/pd/doc/3.audio.examples/spectrum-partial.pd +++ b/pd/doc/3.audio.examples/spectrum-partial.pd @@ -1,7 +1,6 @@ #N canvas 211 116 826 530 12; #X obj 28 412 osc~; #X obj 94 197 r poll-table; -#X obj 78 311 moses 0; #X obj 129 337 + 50; #X obj 129 363 dbtorms; #X msg 78 339 0; @@ -36,22 +35,23 @@ one "catch~ sum-bus" at the output.; #X obj 78 284 tabread4 spectrum-tab; #X text 285 288 Finally get the strength from the table. Note that we use the control object \, tabread4 \, not tabread4~.; -#X connect 0 0 9 0; -#X connect 1 0 12 0; -#X connect 2 0 5 0; -#X connect 2 1 3 0; -#X connect 3 0 4 0; -#X connect 4 0 6 0; +#X obj 78 311 moses 1; +#X connect 0 0 8 0; +#X connect 1 0 11 0; +#X connect 2 0 3 0; +#X connect 3 0 5 0; +#X connect 4 0 5 0; #X connect 5 0 6 0; -#X connect 6 0 7 0; -#X connect 7 0 9 1; -#X connect 9 0 8 0; -#X connect 10 0 11 0; -#X connect 11 0 13 0; -#X connect 12 0 15 0; -#X connect 13 0 14 0; -#X connect 13 0 0 0; -#X connect 14 0 12 1; -#X connect 15 0 28 0; -#X connect 16 0 15 1; -#X connect 28 0 2 0; +#X connect 6 0 8 1; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 12 0; +#X connect 11 0 14 0; +#X connect 12 0 13 0; +#X connect 12 0 0 0; +#X connect 13 0 11 1; +#X connect 14 0 27 0; +#X connect 15 0 14 1; +#X connect 27 0 29 0; +#X connect 29 0 4 0; +#X connect 29 1 2 0; diff --git a/pd/doc/3.audio.examples/x.ps b/pd/doc/3.audio.examples/x.ps deleted file mode 100644 index 372dc540..00000000 --- a/pd/doc/3.audio.examples/x.ps +++ /dev/null @@ -1,844 +0,0 @@ -%!PS-Adobe-3.0 EPSF-3.0 -%%Creator: Tk Canvas Widget -%%For: msp -%%Title: Window .x80edcf8.c -%%CreationDate: Thu Aug 8 13:49:09 2002 -%%BoundingBox: 115 319 497 473 -%%Pages: 1 -%%DocumentData: Clean7Bit -%%Orientation: Portrait -%%DocumentNeededResources: font Courier-Bold -%%EndComments - -%%BeginProlog -50 dict begin - -% This is a standard prolog for Postscript generated by Tk's canvas -% widget. -% RCS: @(#) $Id: x.ps,v 1.1.1.1 2002-11-25 10:47:48 ggeiger Exp $ - -% The definitions below just define all of the variables used in -% any of the procedures here. This is needed for obscure reasons -% explained on p. 716 of the Postscript manual (Section H.2.7, -% "Initializing Variables," in the section on Encapsulated Postscript). - -/baseline 0 def -/stipimage 0 def -/height 0 def -/justify 0 def -/lineLength 0 def -/spacing 0 def -/stipple 0 def -/strings 0 def -/xoffset 0 def -/yoffset 0 def -/tmpstip null def - -% Define the array ISOLatin1Encoding (which specifies how characters are -% encoded for ISO-8859-1 fonts), if it isn't already present (Postscript -% level 2 is supposed to define it, but level 1 doesn't). - -systemdict /ISOLatin1Encoding known not { - /ISOLatin1Encoding [ - /space /space /space /space /space /space /space /space - /space /space /space /space /space /space /space /space - /space /space /space /space /space /space /space /space - /space /space /space /space /space /space /space /space - /space /exclam /quotedbl /numbersign /dollar /percent /ampersand - /quoteright - /parenleft /parenright /asterisk /plus /comma /minus /period /slash - /zero /one /two /three /four /five /six /seven - /eight /nine /colon /semicolon /less /equal /greater /question - /at /A /B /C /D /E /F /G - /H /I /J /K /L /M /N /O - /P /Q /R /S /T /U /V /W - /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore - /quoteleft /a /b /c /d /e /f /g - /h /i /j /k /l /m /n /o - /p /q /r /s /t /u /v /w - /x /y /z /braceleft /bar /braceright /asciitilde /space - /space /space /space /space /space /space /space /space - /space /space /space /space /space /space /space /space - /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent - /dieresis /space /ring /cedilla /space /hungarumlaut /ogonek /caron - /space /exclamdown /cent /sterling /currency /yen /brokenbar /section - /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen - /registered /macron - /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph - /periodcentered - /cedillar /onesuperior /ordmasculine /guillemotright /onequarter - /onehalf /threequarters /questiondown - /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla - /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex - /Idieresis - /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply - /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn - /germandbls - /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla - /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex - /idieresis - /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide - /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn - /ydieresis - ] def -} if - -% font ISOEncode font -% This procedure changes the encoding of a font from the default -% Postscript encoding to ISOLatin1. It's typically invoked just -% before invoking "setfont". The body of this procedure comes from -% Section 5.6.1 of the Postscript book. - -/ISOEncode { - dup length dict begin - {1 index /FID ne {def} {pop pop} ifelse} forall - /Encoding ISOLatin1Encoding def - currentdict - end - - % I'm not sure why it's necessary to use "definefont" on this new - % font, but it seems to be important; just use the name "Temporary" - % for the font. - - /Temporary exch definefont -} bind def - -% StrokeClip -% -% This procedure converts the current path into a clip area under -% the assumption of stroking. It's a bit tricky because some Postscript -% interpreters get errors during strokepath for dashed lines. If -% this happens then turn off dashes and try again. - -/StrokeClip { - {strokepath} stopped { - (This Postscript printer gets limitcheck overflows when) = - (stippling dashed lines; lines will be printed solid instead.) = - [] 0 setdash strokepath} if - clip -} bind def - -% desiredSize EvenPixels closestSize -% -% The procedure below is used for stippling. Given the optimal size -% of a dot in a stipple pattern in the current user coordinate system, -% compute the closest size that is an exact multiple of the device's -% pixel size. This allows stipple patterns to be displayed without -% aliasing effects. - -/EvenPixels { - % Compute exact number of device pixels per stipple dot. - dup 0 matrix currentmatrix dtransform - dup mul exch dup mul add sqrt - - % Round to an integer, make sure the number is at least 1, and compute - % user coord distance corresponding to this. - dup round dup 1 lt {pop 1} if - exch div mul -} bind def - -% width height string StippleFill -- -% -% Given a path already set up and a clipping region generated from -% it, this procedure will fill the clipping region with a stipple -% pattern. "String" contains a proper image description of the -% stipple pattern and "width" and "height" give its dimensions. Each -% stipple dot is assumed to be about one unit across in the current -% user coordinate system. This procedure trashes the graphics state. - -/StippleFill { - % The following code is needed to work around a NeWSprint bug. - - /tmpstip 1 index def - - % Change the scaling so that one user unit in user coordinates - % corresponds to the size of one stipple dot. - 1 EvenPixels dup scale - - % Compute the bounding box occupied by the path (which is now - % the clipping region), and round the lower coordinates down - % to the nearest starting point for the stipple pattern. Be - % careful about negative numbers, since the rounding works - % differently on them. - - pathbbox - 4 2 roll - 5 index div dup 0 lt {1 sub} if cvi 5 index mul 4 1 roll - 6 index div dup 0 lt {1 sub} if cvi 6 index mul 3 2 roll - - % Stack now: width height string y1 y2 x1 x2 - % Below is a doubly-nested for loop to iterate across this area - % in units of the stipple pattern size, going up columns then - % across rows, blasting out a stipple-pattern-sized rectangle at - % each position - - 6 index exch { - 2 index 5 index 3 index { - % Stack now: width height string y1 y2 x y - - gsave - 1 index exch translate - 5 index 5 index true matrix tmpstip imagemask - grestore - } for - pop - } for - pop pop pop pop pop -} bind def - -% -- AdjustColor -- -% Given a color value already set for output by the caller, adjusts -% that value to a grayscale or mono value if requested by the CL -% variable. - -/AdjustColor { - CL 2 lt { - currentgray - CL 0 eq { - .5 lt {0} {1} ifelse - } if - setgray - } if -} bind def - -% x y strings spacing xoffset yoffset justify stipple DrawText -- -% This procedure does all of the real work of drawing text. The -% color and font must already have been set by the caller, and the -% following arguments must be on the stack: -% -% x, y - Coordinates at which to draw text. -% strings - An array of strings, one for each line of the text item, -% in order from top to bottom. -% spacing - Spacing between lines. -% xoffset - Horizontal offset for text bbox relative to x and y: 0 for -% nw/w/sw anchor, -0.5 for n/center/s, and -1.0 for ne/e/se. -% yoffset - Vertical offset for text bbox relative to x and y: 0 for -% nw/n/ne anchor, +0.5 for w/center/e, and +1.0 for sw/s/se. -% justify - 0 for left justification, 0.5 for center, 1 for right justify. -% stipple - Boolean value indicating whether or not text is to be -% drawn in stippled fashion. If text is stippled, -% procedure StippleText must have been defined to call -% StippleFill in the right way. -% -% Also, when this procedure is invoked, the color and font must already -% have been set for the text. - -/DrawText { - /stipple exch def - /justify exch def - /yoffset exch def - /xoffset exch def - /spacing exch def - /strings exch def - - % First scan through all of the text to find the widest line. - - /lineLength 0 def - strings { - stringwidth pop - dup lineLength gt {/lineLength exch def} {pop} ifelse - newpath - } forall - - % Compute the baseline offset and the actual font height. - - 0 0 moveto (TXygqPZ) false charpath - pathbbox dup /baseline exch def - exch pop exch sub /height exch def pop - newpath - - % Translate coordinates first so that the origin is at the upper-left - % corner of the text's bounding box. Remember that x and y for - % positioning are still on the stack. - - translate - lineLength xoffset mul - strings length 1 sub spacing mul height add yoffset mul translate - - % Now use the baseline and justification information to translate so - % that the origin is at the baseline and positioning point for the - % first line of text. - - justify lineLength mul baseline neg translate - - % Iterate over each of the lines to output it. For each line, - % compute its width again so it can be properly justified, then - % display it. - - strings { - dup stringwidth pop - justify neg mul 0 moveto - stipple { - - % The text is stippled, so turn it into a path and print - % by calling StippledText, which in turn calls StippleFill. - % Unfortunately, many Postscript interpreters will get - % overflow errors if we try to do the whole string at - % once, so do it a character at a time. - - gsave - /char (X) def - { - char 0 3 -1 roll put - currentpoint - gsave - char true charpath clip StippleText - grestore - char stringwidth translate - moveto - } forall - grestore - } {show} ifelse - 0 spacing neg translate - } forall -} bind def - -%%EndProlog -%%BeginSetup -/CL 2 def -%%IncludeResource: font Courier-Bold -%%EndSetup - -%%Page: 1 1 -save -306.0 396.0 translate -0.846 0.846 scale --224 -91 translate --1 182 moveto 449 182 lineto 449 0 lineto -1 0 lineto closepath clip newpath -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -231 103 [ -(50.3695) -] 13 -0 0 0 false DrawText -grestore -gsave -230 105 moveto -281 105 lineto -285 101 lineto -285 88 lineto -230 88 lineto -230 105 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -230 89 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -230 105 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -231 125 [ -(set $1) -] 13 -0 0 0 false DrawText -grestore -gsave -230 127 moveto -278 127 lineto -274 123 lineto -274 114 lineto -278 110 lineto -230 110 lineto -230 127 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -230 111 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -230 127 moveto 7 0 rlineto 0 -0.999999999999993 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -16 103 [ -(150) -] 13 -0 0 0 false DrawText -grestore -gsave -15 105 moveto -38 105 lineto -42 101 lineto -42 88 lineto -15 88 lineto -15 105 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -15 89 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -15 105 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -16 148 [ -(r frequency) -] 13 -0 0 0 false DrawText -grestore -gsave -15 150 moveto -94 150 lineto -94 133 lineto -15 133 lineto -15 150 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -15 134 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -16 125 [ -(set $1) -] 13 -0 0 0 false DrawText -grestore -gsave -15 127 moveto -63 127 lineto -59 123 lineto -59 114 lineto -63 110 lineto -15 110 lineto -15 127 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -15 111 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -15 127 moveto 7 0 rlineto 0 -0.999999999999993 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -29 79 [ -(s frequency) -] 13 -0 0 0 false DrawText -grestore -gsave -28 81 moveto -107 81 lineto -107 64 lineto -28 64 lineto -28 81 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -28 81 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -231 148 [ -(r pitch) -] 13 -0 0 0 false DrawText -grestore -gsave -230 150 moveto -281 150 lineto -281 133 lineto -230 133 lineto -230 150 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -230 134 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -240 79 [ -(s pitch) -] 13 -0 0 0 false DrawText -grestore -gsave -239 81 moveto -290 81 lineto -290 64 lineto -239 64 lineto -239 81 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -239 81 moveto 7.00000000000006 0 rlineto 0 -1 rlineto -7.00000000000006 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -231 57 [ -(mtof) -] 13 -0 0 0 false DrawText -grestore -gsave -230 59 moveto -260 59 lineto -260 42 lineto -230 42 lineto -230 59 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -230 43 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -230 59 moveto 7 0 rlineto 0 -1.00000000000003 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -231 33 [ -(s frequency) -] 13 -0 0 0 false DrawText -grestore -gsave -230 35 moveto -309 35 lineto -309 18 lineto -230 18 lineto -230 35 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -230 35 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -16 33 [ -(s pitch) -] 13 -0 0 0 false DrawText -grestore -gsave -15 35 moveto -66 35 lineto -66 18 lineto -15 18 lineto -15 35 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -15 35 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -16 57 [ -(ftom) -] 13 -0 0 0 false DrawText -grestore -gsave -15 59 moveto -45 59 lineto -45 42 lineto -15 42 lineto -15 59 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -15 43 moveto 7 0 rlineto 0 -1 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -15 59 moveto 7 0 rlineto 0 -1.00000000000003 rlineto -7 0 rlineto closepath -0 setlinejoin 2 setlinecap -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -77 103 [ -(<-- set frequency) -] 13 -0 0 0 false DrawText -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -291 102 [ -(<-- set MIDI pitch) -] 13 -0 0 0 false DrawText -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -51 56 [ -(<-- convert frequency) -] 13 -0 0 0 false DrawText -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -92 41 [ -(to "MIDI" pitch) -] 13 -0 0 0 false DrawText -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -269 56 [ -(<-- convert "MIDI" pitch) -] 13 -0 0 0 false DrawText -grestore -gsave -233 88 moveto -242 81 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -233 88 moveto -233 59 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -233 110 moveto -233 105 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -18 88 moveto -31 81 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -18 88 moveto -18 59 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -18 133 moveto -18 127 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -18 110 moveto -18 105 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -233 133 moveto -233 127 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -233 42 moveto -233 35 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -18 42 moveto -18 35 lineto -0 setlinecap -1 setlinejoin -1 setlinewidth -[] 0 setdash -0.000 0.000 0.000 setrgbcolor AdjustColor -stroke -grestore -gsave -/Courier-Bold findfont 10 scalefont ISOEncode setfont -0.000 0.000 0.000 setrgbcolor AdjustColor -351 43 [ -(to frequency) -] 13 -0 0 0 false DrawText -grestore -restore showpage - -%%Trailer -end -%%EOF -- cgit v1.2.1