<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[12 bit sampler sound emulation?]]></title><description><![CDATA[<p>I've been playing around a bit with pd audio objects mostly basic stuff from help files.<br />
I'm just wondering if is possible to emulate 32kHz 12 bit sampler sound in pd?<br />
Where to start?<br />
thanks in advance</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation</link><generator>RSS for Node</generator><lastBuildDate>Wed, 11 Nov 2026 00:07:06 GMT</lastBuildDate><atom:link href="http://forum.pdpatchrepo.info/topic/7726.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 16 Sep 2013 14:38:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 14:38:21 GMT]]></title><description><![CDATA[<p>I've been playing around a bit with pd audio objects mostly basic stuff from help files.<br />
I'm just wondering if is possible to emulate 32kHz 12 bit sampler sound in pd?<br />
Where to start?<br />
thanks in advance</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation</guid><dc:creator><![CDATA[susz0n]]></dc:creator><pubDate>Mon, 16 Sep 2013 14:38:21 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 15:25:12 GMT]]></title><description><![CDATA[<p>You can affect the bit depth of your pd patches with either block~ or switch~. You can limit the sample rate of a signal path with samphold~. That should get you started.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/2</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/2</guid><dc:creator><![CDATA[sunji]]></dc:creator><pubDate>Mon, 16 Sep 2013 15:25:12 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 15:43:28 GMT]]></title><description><![CDATA[<p>thanks sunji<br />
could you provide example of use of block~ object</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/3</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/3</guid><dc:creator><![CDATA[susz0n]]></dc:creator><pubDate>Mon, 16 Sep 2013 15:43:28 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 18:17:29 GMT]]></title><description><![CDATA[<p>I don't think [block~] does anything with bit-depth.</p>
<p>To get some bit-crushing, take your signal in the range of -1 to 1 and remap it to the integer range of whatever bit-depth you're using. For example, an 8-bit range would be 0-255 (it's 2^8=256 values). Then, quantize them to integers and scale them back:</p>
<p>[+~ 1]<br />
|<br />
[*~ 127.5] &lt;-- because we're in the range of 0-2, so we use 255/2<br />
|<br />
[clip~ 0 255] &lt;-- anything more requires more bits<br />
|<br />
[expr~ int($v1)]<br />
|<br />
[/~ 127.5]<br />
|<br />
[-~ 1]</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/4</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/4</guid><dc:creator><![CDATA[Maelstorm]]></dc:creator><pubDate>Mon, 16 Sep 2013 18:17:29 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 18:55:41 GMT]]></title><description><![CDATA[<p>for the downsampling I would run pd at a samplerate that's a multiple of 32000 like 64000. this is because in order to downsample without aliasing you need to upsample by the least common multiple if it's a rational factor and then downsample. since it's harder if not impossible to upsample to non-powers of 2 in pd I'd just run it at 64000 to start with.</p>
<p>edit: these paragraph is kinda pointless as what I was suggesting is better accomplished with tabread4~ (see 2 posts down)</p>
<p><a href="http://en.wikipedia.org/wiki/Downsampling" rel="nofollow">http://en.wikipedia.org/wiki/Downsampling</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/5</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/5</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Mon, 16 Sep 2013 18:55:41 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 19:17:29 GMT]]></title><description><![CDATA[<p>10000 x thanks Maelstorm this is awesome!!<br />
Excellent for spicing up samples <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/exclamation.png" title="!!!" alt="!!!" /><br />
Exactly what i wanted.<br />
Btw 12bit = 2^12 right?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/6</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/6</guid><dc:creator><![CDATA[susz0n]]></dc:creator><pubDate>Mon, 16 Sep 2013 19:17:29 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 19:58:20 GMT]]></title><description><![CDATA[<p>Thanks Sebfumaster i wish i could understand it all <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":)" alt=":)" /><br />
All i have so far is what Malestorm suggested + samphold<br />
Please see attached patch<br />
My question is whats gonna happen if i pass through it 16 bit 44000 sample ?<br />
is it gonna be converted to 12 bit 32000?</p>
<p>It sort of change the sound and add that &quot;his&quot; to the sound similar to my old akai s1000</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/sampler_thing.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/sampler_thing.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/7</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/7</guid><dc:creator><![CDATA[susz0n]]></dc:creator><pubDate>Mon, 16 Sep 2013 19:58:20 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 20:15:06 GMT]]></title><description><![CDATA[<p>the bitcrushing is right and you are getting the signal to 12 bit, but the resampling is generating aliasing. it is pretty complex. Currently you are taking it down to 32000 but that itself is sampled at 44100<br />
but aliasing can sound good and/or desirable, it depends on the sound you're going for.</p>
<p>i forgot to mention that i wouldn't use lop~ for resampling, I'm no dsp expert but just guessing It'd be better to use something like lp4_butt~ from iemlib. basically you don't want any frequencies above 16000 before going into the 32000 samphold~ so you actually need the cutoff a little lower than 16000 to compensate for the skirt.</p>
<p>edit: another thing to do if one does not want aliasing would be to run pd at 64000, and read a 44100 sample at 44.1 k with tabread4~, then send it into your slightly-lower-than- 16000 hz lowpass (lp4_butt~?), and then into a samphold~ with a phasor~ at 32000 (and then maybe another 16000 lowpass?). this is probably the easiest way actually</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/8</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/8</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Mon, 16 Sep 2013 20:15:06 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 21:09:31 GMT]]></title><description><![CDATA[<p>here's what I described above to read 44.1 k samples, to make it better you could find better resampling filters so you can raise the cutoff frequency<br />
make sure you're running at 64000</p>
<p>you can also play around with the cutoff frequency of the first filter to get various amounts of aliasing</p>
<p><a href="http://www.pdpatchrepo.info/hurleur/samplerate-conversion.pd" rel="nofollow">http://www.pdpatchrepo.info/hurleur/samplerate-conversion.pd</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/9</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/9</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Mon, 16 Sep 2013 21:09:31 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 21:45:12 GMT]]></title><description><![CDATA[<p>Many thanks Sebfumaster thats awesome!!<br />
Btw i tried it on long electric piano loop on both 32k and 64k -&gt; sample rate in pd and i couldnt hear the difference</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/10</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/10</guid><dc:creator><![CDATA[susz0n]]></dc:creator><pubDate>Mon, 16 Sep 2013 21:45:12 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Mon, 16 Sep 2013 22:08:13 GMT]]></title><description><![CDATA[<p>if you run pd at 32000 then the samphold~ and filters won't do too much and are actually unnecessary. pd and tabread4~ will do the samplerate and your soundcard's dac will do the second of the 2 filters. I suppose I was assuming you would want to run other audio at the same time (that might have frequencies up to 20000 hz)</p>
<p>actually when I play this patch at 32000 the samphold~ stops everything because the phasor is at 32000 and therefore never changes at 32000 sr, not sure how it got past for you.<br />
upon bypassing the samphold~ the filters make it sound really dark at 32000 for me, I think because the tabread4~ is already reading it at 32000 or there is still aliasing after the filter in the 64 k version</p>
<p>edit: been thinking about this, you could actually emulate a sampler at any samplerate with no aliasing while running pd at any samplerate with just the 1 &quot;analog&quot; resampling filter... but aliasing is part of that old digital sound maybe in which case I would go with the patch above at 64 k</p>
<p>if not, maybe someone with knowledge on adcs can suggest a filter...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/11</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/11</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Mon, 16 Sep 2013 22:08:13 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Tue, 17 Sep 2013 07:21:24 GMT]]></title><description><![CDATA[<p>im already very very happy with the results<br />
thanks so much for sharing your knowledge <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/exclamation.png" title="!!!" alt="!!!" /></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/12</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/12</guid><dc:creator><![CDATA[susz0n]]></dc:creator><pubDate>Tue, 17 Sep 2013 07:21:24 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Thu, 19 Sep 2013 18:03:17 GMT]]></title><description><![CDATA[<p>Doing this accurately can be rather complicated, depending on the sampler you're trying to emulate. Any transposition of a recorded sample (i.e. the interesting part of what you expect a sampler to do) is effectively a sample rate conversion, and there are many different ways to do this.</p>
<p>Samplers like the Emu SP-1200 and Ensoniq Mirage play back sounds at low sample rates with only sample truncation (zero order hold). This is important, as it leaves in lots of additional high frequency tones (images). You could set the sample rate to 32 kHz, play samples from a table with [tabread~] rather than [tabread4~] (truncation/zero order hold rather than cubic interpolation), then quantize to 8 or 12 bits (and actually some things used &amp;#956;-law or A-law DACs, which isn't the same as a linear DAC), then apply an amplitude envelope. You can also independently control the effective input sample rate by quantizing the phasor that's reading the sample.</p>
<p>You can't accurately emulate sample rate reduction using [samphold~] while the patch is running at an unrelated sample rate, as the aliased tones generated by [samphold~] will themselves alias. The sample rate must be an integer multiple of the [samphold~] rate. Similarly it's incorrect to reduce bit depth by quantization after the amplitude envelope.</p>
<p>Other machines like the PPG Wave 2.2 and 2.3, Emu Emax, Sequential Circuits Prophet VS, etc. use the same approach but with a higher output sample rate, around 200 kHz to 1 MHz. You can emulate this by oversampling.</p>
<p>Samplers like the Akai S900, Emu Emulator series, Kurzweil K250, Korg DSS-1, Sequential Circuits Prophet 2000, etc. are much different, as they generate a variable playback sample rate by integer division of a high frequency clock (around 6 to 12 MHz). These generate no inharmonic aliasing at all, and this can't by emulated as easily. You could use either a very high sample rate with constrained playback frequencies, or approximate it using something like integrated wavetables. I've made some abstractions ([dphasor~], etc.) to obtain similar (but not identical) results at more modest sample rates.</p>
<p>The Akai S1000 isn't really &quot;lo-fi&quot; but uses an advanced waveform interpolation that's actually better than the one in [tabread4~]. Many other samplers simply used linear interpolation.</p>
<p>I've been planning on writing more about this, as it's a topic that I'm particularly interested in. I'm sorry if it's unclear, but this is just a really brief overview...</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/13</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/13</guid><dc:creator><![CDATA[acreil]]></dc:creator><pubDate>Thu, 19 Sep 2013 18:03:17 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Thu, 19 Sep 2013 21:37:22 GMT]]></title><description><![CDATA[<blockquote>
<p>You could set the sample rate to 32 kHz, play samples from a table with [tabread~] rather than [tabread4~]</p>
</blockquote>
<p>the issue with this is that the samples themselves are recorded at 44.1 so in order to emulate the sampling you need to either read between the sample values first with tabread4~ or convert them beforehand. Quantizing the phasor or vline~ before tabread4~ might work to emulate zero-order hold though if pitchshifting, without pitchshift it can be emulated with just tabread4~. Best would probably be to convert to 32 k with soX beforehand to get better resampling than tabread4~</p>
<p>acreil, happen to have that dphasor~ around?<br />
edit: nevermind, found 'em <a href="http://puredata.hurleur.com/viewtopic.php?pid=33738" rel="nofollow">http://puredata.hurleur.com/viewtopic.php?pid=33738</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/14</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/14</guid><dc:creator><![CDATA[seb-harmonik.ar]]></dc:creator><pubDate>Thu, 19 Sep 2013 21:37:22 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Sat, 23 Jan 2021 02:49:08 GMT]]></title><description><![CDATA[<p>this thread is 7 years old but still fascinating, especially acreills rundown of the vintage synths synthesis as im working on an old school wavetable synth with variable sample rate for a while. i still havent found a way to simulate variable sample rate with correct mirror frequencies in PD. the best way to do this now in hardware would be FPGA and an A-Law Dac that is being driven by the fpga with variable speed - i think.</p>
<p>synths like the PPG wave or the microwave sound exactly so cool because the mirror frequencies move with the tuning harmonically - or disharmonically <img class="emoji emoji-extended" src="http://forum.pdpatchrepo.info/plugins/nodebb-plugin-emoji-extended/images/grinning.png" title=":-)" alt=":-)" /> there is a video of an interview with one of the engineers of the prophet vs where he explains that a strange sounding sine from a PPG wave was one of the main inspirations for the prophet vs.<br />
so tuning, sample rate and resolution are essential for the sound of an instrument.</p>
<p>does anybody have any clue as to how to simulate the mirror frequencies and variable sample rate in PD?</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/15</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/15</guid><dc:creator><![CDATA[lilakmonoke]]></dc:creator><pubDate>Sat, 23 Jan 2021 02:49:08 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Thu, 07 Apr 2022 21:54:42 GMT]]></title><description><![CDATA[<p>If the artifacts of the downsampler are the problem, here is a possible solution: <a href="https://github.com/MikeMorenoDSP/pd-mkmr/blob/master/effects/fx.downsample%7E-help.pd" rel="nofollow">https://github.com/MikeMorenoDSP/pd-mkmr/blob/master/effects/fx.downsample~-help.pd</a></p>
<p>Some further reading: <a href="https://ccrma.stanford.edu/~dtyeh/papers/yeh07_icmc_sp12.pdf" rel="nofollow">https://ccrma.stanford.edu/~dtyeh/papers/yeh07_icmc_sp12.pdf</a></p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/16</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/16</guid><dc:creator><![CDATA[tungee]]></dc:creator><pubDate>Thu, 07 Apr 2022 21:54:42 GMT</pubDate></item><item><title><![CDATA[Reply to 12 bit sampler sound emulation? on Thu, 28 Apr 2022 19:41:07 GMT]]></title><description><![CDATA[<p>samplingrate reduction and bitdepth reduction will still not give you satisfying results.</p>
<p>the AKAI S-900 and S-950 for example have a <em>variable-samplingrate</em> DA converter and analogfilters - these are the main soundforming parts.</p>
<p>the emulator II still has the SSM filters.</p>
<p>while you can emulate analog filters quite good today, implementing that AKAI type of DAC within a fixed-rate digital enviroment is not so easy.</p>
]]></description><link>http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/17</link><guid isPermaLink="true">http://forum.pdpatchrepo.info/topic/7726/12-bit-sampler-sound-emulation/17</guid><dc:creator><![CDATA[Obineg]]></dc:creator><pubDate>Thu, 28 Apr 2022 19:41:07 GMT</pubDate></item></channel></rss>