hr.~ high resolution objects

Jan 18, 2006 at 4:54pm

hr.~ high resolution objects

hi

if i am making an FM synth, am i going to get a better
sound by using jkc’s high resolution objects than 32
bit ones? or is it mainly the sample rate thats
important….?

thanks

james

#23987
Jan 18, 2006 at 9:41pm

These objects were primarily designed for generating accurate sub-
sample values for reading from large buffers, and filters where 32bit
precision weren’t adequate for filter coefficients. If your FM
algorithm contains feedback, you might find that these objects
provide results with less accumulation of quantization error, though
whether or not that is even a problem or sounds “better” is obviously
dependent on what you’re doing, and what your ear prefers. I would
recommend using the standard objects first, and then perhaps
experimenting with the hr objects to see if you can notice a
difference. For FM, I’d imagine you won’t notice a large difference,
however I’d be interested to hear your findings.

-Joshua

#68677
Jan 19, 2006 at 10:05pm

I think the sample rate would make a big difference for
high frequency FM. The higher the sample rate, the fewer aliased frequencies appearing in the audible range. I can’t comment on
quantization error or how much difference it would make.

If I were you, I’d forget FM and just go with Phase Modulation instead. Once you start builing complicated FM stuff (multiple carriers/modulators interacting with eachother), it starts to sound like crap (imho), especially with feedback. I can’t give a DSP math explanation as to why. Russel Pinkston wrote in the Csound book that complicated FM can introduce DC offset (I can vouch for that) and carrier drift.

Here’s an example of 1 carrier, 1 mod PM with feedback:

max v2;
#N vpatcher 550 184 984 693;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P message 297 177 14 196617 1;
#P newex 147 228 43 196617 * 0.1;
#P comment 254 126 63 196617 mod amp;
#P comment 200 91 63 196617 mod freq;
#P newex 297 154 48 196617 loadbang;
#N vpreset 8;
#X append 1 2 4 312 35 gain~ list 69 10. ; 10 43 77 flonum float 75. ; 11 32 190 flonum float 0.5 ; 13 126 218 flonum float 7.71 ; 19 208 147 flonum float 0. ;;
#X append 2 2 4 312 35 gain~ list 69 10. ; 10 43 77 flonum float 345. ; 11 32 190 flonum float 0.5 ; 13 126 218 flonum float 0.33 ; 19 208 147 flonum float 0.53 ;;
#X append 3 2 4 312 35 gain~ list 69 10. ; 10 43 77 flonum float 311. ; 11 32 190 flonum float 0.87 ; 13 126 218 flonum float 0.66 ; 19 208 147 flonum float 0.95 ;;
#X append 8 2 4 312 35 gain~ list 69 10. ; 10 43 77 flonum float 6. ; 11 32 190 flonum float 0.5 ; 13 126 218 flonum float 13.42 ; 19 208 147 flonum float 1. ;;
#P preset 297 197 47 27;
#P newex 130 289 53 196617 tapout~ 1;
#P newex 130 270 47 196617 tapin~ 1;
#P newex 77 202 27 196617 +~;
#P newex 130 250 27 196617 *~;
#P flonum 147 208 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 190 51 29 196617 t b f;
#P newex 190 72 29 196617 * 1.;
#P comment 77 29 63 196617 carrier freq;
#P newex 147 126 52 196617 cycle~ 1.;
#P user spectroscope~ 92 312 300 100 20 0 0 0 1 1 0 0 0 0 0 0;
#X frgb 224 224 224;
#X brgb 255 255 255;
#X rgb2 0 0 0;
#X rgb3 243 204 204;
#X rgb4 255 0 0;
#X rgb5 184 184 184;
#X rgb6 0 0 0;
#X rgb7 0 0 0;
#X rgb8 255 255 255;
#X rgb9 255 0 0;
#X rgb10 255 191 0;
#X rgb11 0 191 127;
#X rgb12 127 0 127;
#X rgb13 0 0 0;
#X range 0. 1.2;
#X domain 0. 22050.;
#X done;
#P flonum 218 126 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 147 149 35 196617 *~ 1.;
#P flonum 190 32 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 77 43 56 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 190 106 58 196617 phasor~ 1.;
#P newex 77 175 34 196617 +~ 1.;
#P newex 77 142 58 196617 phasor~ 1.;
#P newex 35 224 52 196617 cycle~ 1.;
#P user ezdac~ 35 444 79 477 0;
#P user gain~ 35 312 24 100 158 0 1.071519 7.94321 10.;
#P comment 227 32 103 196617 car freq multiple;
#P comment 183 209 54 196617 feedback;
#P window setfont “Sans Serif” 18.;
#P window linecount 2;
#P comment 115 418 291 196626 1 Modulator , 1 Carrier Phase Modulation (w/feedback);
#P window setfont “Sans Serif” 9.;
#P window linecount 3;
#P comment 178 228 100 196617 limit fdbk ranger to [0 , .1] , cause it’s too sensitive;
#P connect 6 0 4 0;
#P connect 4 0 5 0;
#P connect 4 0 5 1;
#P connect 10 0 7 0;
#P connect 7 0 8 0;
#P connect 8 0 21 0;
#P connect 21 0 6 1;
#P fasten 6 0 14 0 40 306 97 306;
#P fasten 23 0 21 1 135 309 112 309 112 196 99 196;
#P fasten 12 0 8 1 152 170 106 170;
#P connect 6 0 20 0;
#P connect 20 0 22 0;
#P connect 22 0 23 0;
#P connect 15 0 12 0;
#P connect 19 0 28 0;
#P connect 28 0 20 1;
#P fasten 13 0 12 1 223 145 177 145;
#P connect 9 0 15 1;
#P connect 11 0 18 0;
#P connect 18 0 17 0;
#P connect 10 0 17 0;
#P connect 17 0 9 0;
#P connect 18 1 17 1;
#P connect 25 0 29 0;
#P connect 29 0 24 0;
#P pop;

#68678
Jan 25, 2006 at 1:20am

thanks for that patch

i had a mess around with replacing all the FM with PM
in my synth patch, and it sound sharper, but not
necessarily better. for instance with FM you get a
pitch wobble on attacks as the oscillators drift from
the fundamental, but that actually sounds sort of
realistic. the PM sounds alot more synthetic to my
ears, which i guess could be good sometimes.
i’d be interested if any one else has experimented
with PM versus FM synthesis

cheers!

#68679

You must be logged in to reply to this topic.