> On Sep 21, 2015, at 1:59 PM, robert bristow-johnson 
> <r...@audioimagination.com> wrote:
> On 9/21/15 1:26 PM, Nigel Redmon wrote:
>> And to elaborate on your comment that two tables per octave gets you over 
>> 19k, I believe that requires an asterisk (doesn’t it? had to do this 
>> quickly...): Whereas one table per octave works out symmetrically, where the 
>> top harmonics would be at 14700 and fold back to 14700 when shifted up an 
>> octave, two-per is not so convenient. The aliasing is limited to 19153 IF 
>> the highest harmonic is limited to 17640 (F_top for num_tables_per_octave = 
>> 2). Now that’s not much of a limitation, because “good luck hearing 
>> harmonics over 17640”, and aliasing would be a bigger concern, so it’s a 
>> good tradeoff—just noting it’s not 19/19 (highest allowed harmonic in table 
>> / lowest alias). I wanted to add that because you wrote of a band above 19k 
>> "in which you *do* allow foldover and aliasing.  or, on the other hand, 
>> missing harmonics”, but you really don’t get both.
> 
> well, you don't get both with the very same note.

To be clear, I meant on the same table (not note), over the pitch shift range 
of the table. In other words, for a single table per octave (and therefore one 
octave shift range), at 48k, a table that has it’s highest harmonic at 16 kHz 
unshifted, will have its lowest alias at 16 kHz at max frequency shift. Anyway, 
the important part of that had to do with your comment about 44.1k getting you 
over 19k, and that’s no longer a point, as you amended that to say at 48k.

And yes, I get 19882 Hz for 48k also.

> other than the practicalities of the brick-wall filter, what am i doing wrong?

Nothing—looks good to me!


> On Sep 21, 2015, at 1:59 PM, robert bristow-johnson 
> <r...@audioimagination.com> wrote:
> 
> On 9/21/15 1:26 PM, Nigel Redmon wrote:
>> Hi Robert,
>> 
>> Yes, my answer was strictly for the special case of one table per octave. In 
>> that case, the start of the highest table (which would also be highest 
>> harmonic per table), such that transposing up by the maximum amount (in this 
>> case, one octave) is SR/3. But the general case is:
>> 
>>   F_top = SR / (2 + 1 / num_tables_per_octave)
>> 
>> And, whereas in the one-octave case the frequency base of the next higher 
>> table is twice the current table, the general case is higher by a factor of:
>> 
>>   2^(1 / num_table_per_octave)
>> 
>> The general case for the number of harmonics per table is:
>> 
>>   floor(F_top / current_table_base_freq)
>> 
>> And to elaborate on your comment that two tables per octave gets you over 
>> 19k, I believe that requires an asterisk (doesn’t it? had to do this 
>> quickly...): Whereas one table per octave works out symmetrically, where the 
>> top harmonics would be at 14700 and fold back to 14700 when shifted up an 
>> octave, two-per is not so convenient. The aliasing is limited to 19153 IF 
>> the highest harmonic is limited to 17640 (F_top for num_tables_per_octave = 
>> 2). Now that’s not much of a limitation, because “good luck hearing 
>> harmonics over 17640”, and aliasing would be a bigger concern, so it’s a 
>> good tradeoff—just noting it’s not 19/19 (highest allowed harmonic in table 
>> / lowest alias). I wanted to add that because you wrote of a band above 19k 
>> "in which you *do* allow foldover and aliasing.  or, on the other hand, 
>> missing harmonics”, but you really don’t get both.
> 
> 
> well, you don't get both with the very same note.
> 
> lemme see how i crunch the formulae:
> 
> your lowest fundamental (at the bottom of the split) is f0 (what you're 
> labeling as "current_table_base_freq"), your sample rate is SR, and the upper 
> limit to the bandwidth is F_top where F_top < SR/2.
> 
> a the bottom of the split, the highest harmonic number is
> 
>   N = floor(F_top/f0)
> 
> the highest non-zero harmonic is at N*f0 < F_top < SR/2 and the lowest image 
> is SR - N*f0 > SR - F_top > SR/2.  so that image is not an alias.
> 
> now you're gonna play notes in the same split and the highest note (r = 
> "num_table_per_octave" which is what i would call the "number of splits per 
> octave") is at
> 
>   2^(1/r)*f0
> 
> and the highest harmonic before foldover is
> 
>  N * 2^(1/r)*f0
> 
> 
> folded over that harmonic becomes an alias at
> 
>  SR - N * 2^(1/r)*f0
> 
> 
> and we're gonna make sure that this alias stays above F_top
> 
>  SR - N * 2^(1/r)*f0 > F_top
> 
> 
> in the worst case N*f0 is within a millismidgen of F_top (but just below it) 
> so
> 
>   SR - 2^(1/r) * N*f0 >  N*f0
> 
>   SR >  2^(1/r) * N*f0  +  N*f0  =  (1 + 2^(1/r)) * N*f0  =  (1 + 2^(1/r)) 
> F_top
> 
> that's the worst case.  so to keep that inequality happy
> 
>   2^(1/r) <  SR/F_top - 1
> 
> or
> 
>  r >  1/log2( SR/F_top - 1 )
> 
> or
> 
>  F_top < SR/( 2^(1/r) + 1)
> 
> so, after plugging in numbers, i must confess that my memory is corrected.
> 
> at SR = 48 kHz, and 2 splits per octave, i get F_top = 19.882 kHz  almost 20 
> kHz.  this was what i thought i was remembering.  but i remembered the SR 
> wrong.
> 
> of course, at SR = 44.1 you get a lower number for F_top which i have at 
> 18.267 kHz.
> 
> so, if your sample rate is 44.1 kHz, and if you're willing to put in a 
> brickwall LPF at 18.267 kHz, you can do wavetable synthesis, rich in 
> harmonics all the way up to 18.267 kHz with two splits per octave.  as the 
> note goes up the keyboard from the bottom of the split (where all of the 
> harmonics above F_top are zero) to the top of the split (where some of those 
> harmonics are aliased, but none of the aliases are below F_top), you can 
> synchronously mix (or crossfade) between the two wavetables, between the one 
> at the bottom of the split and the wavetable at the top of the split (which 
> is the same wavetable at the bottom of the adjacent split above).  the 
> wavetables are identical for the harmonics below the top harmonic of the 
> higher split.  all higher harmonics *must* be at zero amplitude in order for 
> this to work.
> 
> so, while i understand i misremembered a number (i thought i was at 44.1, but 
> it was SR=48kHz), i don't get the same numbers you have, Nigel.
> 
> other than the practicalities of the brick-wall filter, what am i doing wrong?
> 
> 
> -- 
> 
> r b-j                  r...@audioimagination.com
> 
> "Imagination is more important than knowledge."


_______________________________________________
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Reply via email to