Re: [music-dsp] Wavetable File Formats?

2018-03-14 Thread gm

Good idea with the random phase

We did pseudo PWM with two identical arbitrary waves, one inverted, but 
not what you describe with random phase




Am 14.03.2018 um 13:06 schrieb Frank Sheeran:

> Another disadvantage was that you get a noticable chirp transient when
> the phases realign after one complete cycle of the wavetable.

Just put them in the buffer with random phases and they'll never 
re-align.  That's not what a piano does of course, but might be 
servicable.


BTW, my synth does PW/PWM with two out-of-phase sawtooths, one 
negative.  When I make the harmonics of one of the sawtooths random, 
you get something that sounds like PWM except it never comes to a 
"peak", it just grinds away.


I haven't heard that on any other synth but would love to know if 
anyone knows prior art.



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


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

Re: [music-dsp] Wavetable File Formats?

2018-03-14 Thread Frank Sheeran
 > Another disadvantage was that you get a noticable chirp transient when
> the phases realign after one complete cycle of the wavetable.

Just put them in the buffer with random phases and they'll never re-align.
That's not what a piano does of course, but might be servicable.

BTW, my synth does PW/PWM with two out-of-phase sawtooths, one negative.
When I make the harmonics of one of the sawtooths random, you get something
that sounds like PWM except it never comes to a "peak", it just grinds away.

I haven't heard that on any other synth but would love to know if anyone
knows prior art.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Wavetable File Formats?

2018-03-14 Thread gm



Am 14.03.2018 um 12:00 schrieb robert bristow-johnson:



> Some years ago I tried to make a "stretched partials" sawtooth this way
> and found that the tables get prohibitively large

the *number* of wavetables gets large, right?  is that what you mean?



yes, bad wording


it doesn't have anything to do with the size of the wavetable.

with gigabytes of memory and 64-bit addressing space, i am not sure 
what is "prohibitive".  a regular sampled note can easily take up 1/2 
meg.  how many 2048-point wavetables can you fit into that space? or 
in a meg?  or 4 meg?




true, but personally I am not a fan of synths that take up much memory 
and that was

one of the reasons it wasn't implemented in the final product


> which also makes their detuning relationships unnatural compared to
> for instance a piano tone.

more unnatural than flat?



Thats a matter of taste in the end, at least I was a little bit 
dissapointed with the results of my experiments



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

Re: [music-dsp] Wavetable File Formats?

2018-03-14 Thread robert bristow-johnson







 Original Message 

Subject: Re: [music-dsp] Wavetable File Formats?

From: "gm" <g...@voxangelica.net>

Date: Wed, March 14, 2018 6:46 am

To: music-dsp@music.columbia.edu

--



>

> Another disadvantage was that you get a noticable chirp transient when

> the phases

> realign after one complete cycle of the wavetable.

> You don't have this in a piano since the phases never realign again

> after the initial strike

> so you have the transient only at the onset of the note.
�
i think i know what you mean.� but then, i guess the moral of the story is that 
a piano note is not sufficiently periodic to qualify as "quasi-periodic".� 
which means that wavetable synthesis is just
not good enough for it.


but the partials *are* quite harmonic.� and the higher overtones deviate from 
their harmonic values by a small and gradually increasing amount.� and the 
lower harmonics (where the great majority of the energy is) are still quite 
harmonic.� it *should* be decently harmonic after the
attack transient.
�
--


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

Re: [music-dsp] Wavetable File Formats?

2018-03-14 Thread robert bristow-johnson







 Original Message 

Subject: Re: [music-dsp] Wavetable File Formats?

From: "gm" <g...@voxangelica.net>

Date: Wed, March 14, 2018 6:39 am

To: music-dsp@music.columbia.edu

--



> Some years ago I tried to make a "stretched partials" sawtooth this way

> and found that the tables get prohibitively large



the *number* of wavetables gets large, right?� is that what you mean?



it doesn't have anything to do with the size of the wavetable.
with gigabytes of memory and 64-bit addressing space, i am not sure what is 
"prohibitive".� a regular sampled note can easily take up 1/2 meg.� how many 
2048-point wavetables can you fit into that space?�
or in a meg?� or 4 meg?


> since you are restricted to common devisors or integer multiples for the

> "spin cycles"�and phase steps of the partials.
yes.� that is true.


>

> The second lowest partial needs to make at least one spin cycle, and

> all higher partials need to make an integer multiple of that
yes.� (but the integer multiple could be 1.)
> which also makes their detuning relationships unnatural compared to

> for instance a piano tone.



more unnatural than flat?



that the lower sharpened harmonics are detuned by, say, +5 Hz while higher 
harmonics are detuned by +10 Hz and still higher harmonics are detuned by 15 
Hz?� that's unnatural (in comparison to flat, exact integer harmonic frequency 
ratios for all of the partials)?
BTW, i really like the
term "spin cycle".� sorta associates this cylinder with that in a washing 
machine.
--


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

Re: [music-dsp] Wavetable File Formats?

2018-03-14 Thread gm


Another disadvantage was that you get a noticable chirp transient when 
the phases

realign after one complete cycle of the wavetable.
You don't have this in a piano since the phases never realign again 
after the initial strike

so you have the transient only at the onset of the note.


Am 14.03.2018 um 11:39 schrieb gm:

Some years ago I tried to make a "stretched partials" sawtooth this way
and found that the tables get prohibitively large
since you are restricted to common devisors or integer multiples for 
the "spin cycles"

and phase steps of the partials.

The second lowest partial needs to make at least one spin cycle, and
all higher partials need to make an integer multiple of that
which also makes their detuning relationships unnatural compared to
for instance a piano tone.







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



Re: [music-dsp] Wavetable File Formats?

2018-03-14 Thread gm

Some years ago I tried to make a "stretched partials" sawtooth this way
and found that the tables get prohibitively large
since you are restricted to common devisors or integer multiples for the 
"spin cycles"

and phase steps of the partials.

The second lowest partial needs to make at least one spin cycle, and
all higher partials need to make an integer multiple of that
which also makes their detuning relationships unnatural compared to
for instance a piano tone.





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



Re: [music-dsp] Wavetable File Formats?

2018-03-13 Thread Andy Drucker
Below is my interpretation of the cool partial-shifting method Robert has
proposed.  (I'm just trying to understand, no claim to originality.)

As far as I understand it, the method obtains, from a harmonic waveform, a
family of new waveforms where the partials are selectively pitch-shifted,
but remain harmonic.  It doesn't smoothly vary the pitch thru inharmonic
frequencies.



*Basic sonic waveform* to be manipulated:  a finite, weighted,* harmonic*
sum of k sinusoids, which for simplicity I'll assume all cross 0 at time
0.  So, the 1-periodic waveform

F(t)  =  Sum over i = 1, ..., k:a_i * sin( w_i  t)

where each w_i is a positive integer mult. of 2 pi.  (We'll see where this
gets used.)


*Desired:* a way to selectively shift some of the harmonics
of our waveform.  Let q_1, ..., q_k be "shift-susceptibility" parameters
for the k harmonics; each may be positive, negative, or zero, but they need
to be integer multiples of 2 * pi.


*2-D Wavetable:* store for "all"  pairs (t, y) in the unit square [0, 1]^2,
the
value

G(t, y) =   Sum over i = 1, ..., k:a_i * sin( w_i * t + q_i * y )

Ignoring time- and value-quantization issues here, as well as
y-quantization.

(Observe that for fixed y-value, the waveform over t is just a selectively
phase-shifted version of F.)


*Parameter to choose:*  an *integer* value c giving overall pitch-shift
amount desired.

(One could have more tuning parameters at the cost of a higher-dimensional
table G.)


*Synthesis lookup rule:  *at time T > 0  (a real value) the digital
oscillator outputs the value

Val(T) = G(T mod 1,  (cT) mod 1)

which, we note, equals

=   Sum over i = 1, ..., k:a_i * sin(w_i * (T mod 1)   +   q_i * (cT
mod 1))

=   Sum over i = 1, ..., k:a_i * sin((w_i + c * q_i) * T)

---the last equality using the fact that w_i and c*q_i are both integer
mults of 2 *pi.

...so that, under this setting to c, the i'th partial has been
frequency-shifted by an amount c*q_i from its original frequency, w_i.





On Tue, Mar 13, 2018 at 11:05 AM, Risto Holopainen 
wrote:

>
> > imagine it's two-dimensional vector synthesis like a Prophet VS.  one
> > dimension is some other timbre parameter with a minimum and a maximum
> > (no wrap around).
> >
> > so, in the other dimension, imagine having say, 6 identical wavetables
> > except the 2nd harmonic is offset by 60 degrees in phase between
> > adjacent wavetable vector points in that dimension.  all other
> > harmonics are exactly the same.  so as you crossfade from wavetable 0
> > to 1, that 2nd harmonic advances 60 degrees, as you crossfade from
> > wavetable 1 to 2, the 2nd harmonic advances another 60 degrees.
> > wavetable 6 and wavetable 0 are exactly the same.  as you crossfade
> > from wavetable 5 to 6 you're advancing the final 60 degrees back to
> > the original phase of wavetable 0.
> >
> That makes sense, I'll have to try it. Six wavetables for the detuned
> partial seems like a good number, and I can see that you would not want
> too few of them. But what's the reasoning behind how many to use?
>
> > now, if all of the other harmonics remain the same phase for all 6
> > wavetables, moving around between them does not detune those
> > harmonics.  but if you go around that circle (in the positive
> > direction) one complete loop, the 2nd harmonic made one more cycle
> > than it would have otherwise if the vector location was stationary.
> > if you whip around that loop 50 times per second, the 2nd harmonic
> > will be detuned higher by 50 Hz.  if you whip around that loop in the
> > opposite direction, you will be detuning that 2nd harmonic lower in
> > frequency.
> >
> > the application where this might be useful might be with piano tones
> > or some other natural instrument with sharpened higher harmonics (like
> > above the 9th or 12th harmonic).  it's a different (and cheaper) way
> > of doing it than employing what they call "group additive synthesis"
> > where the higher harmonics are put into a different set of wavetables
> > and run in a different wavetable oscillator that runs at a slightly
> > sharp fundamental.
> >
>
> On the other hand, I find group additive synthesis conceptually simpler
> when dealing with inharmonic partials.
>
> What is the maximum detuning a partial can have with the wavetable
> method? Intuitively I would guess it's the same as the fundamental
> frequency, so the harmonic k could be tuned down to (k-1) or up to (k+1)
> at most, is that right?
>
> Risto
>
>
>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Wavetable File Formats?

2018-03-13 Thread Risto Holopainen

> imagine it's two-dimensional vector synthesis like a Prophet VS.  one
> dimension is some other timbre parameter with a minimum and a maximum
> (no wrap around).
>
> so, in the other dimension, imagine having say, 6 identical wavetables
> except the 2nd harmonic is offset by 60 degrees in phase between
> adjacent wavetable vector points in that dimension.  all other
> harmonics are exactly the same.  so as you crossfade from wavetable 0
> to 1, that 2nd harmonic advances 60 degrees, as you crossfade from
> wavetable 1 to 2, the 2nd harmonic advances another 60 degrees. 
> wavetable 6 and wavetable 0 are exactly the same.  as you crossfade
> from wavetable 5 to 6 you're advancing the final 60 degrees back to
> the original phase of wavetable 0. 
>
That makes sense, I'll have to try it. Six wavetables for the detuned
partial seems like a good number, and I can see that you would not want
too few of them. But what's the reasoning behind how many to use?

> now, if all of the other harmonics remain the same phase for all 6
> wavetables, moving around between them does not detune those
> harmonics.  but if you go around that circle (in the positive
> direction) one complete loop, the 2nd harmonic made one more cycle
> than it would have otherwise if the vector location was stationary. 
> if you whip around that loop 50 times per second, the 2nd harmonic
> will be detuned higher by 50 Hz.  if you whip around that loop in the
> opposite direction, you will be detuning that 2nd harmonic lower in
> frequency.
>
> the application where this might be useful might be with piano tones
> or some other natural instrument with sharpened higher harmonics (like
> above the 9th or 12th harmonic).  it's a different (and cheaper) way
> of doing it than employing what they call "group additive synthesis"
> where the higher harmonics are put into a different set of wavetables
> and run in a different wavetable oscillator that runs at a slightly
> sharp fundamental.
>

On the other hand, I find group additive synthesis conceptually simpler
when dealing with inharmonic partials.

What is the maximum detuning a partial can have with the wavetable
method? Intuitively I would guess it's the same as the fundamental
frequency, so the harmonic k could be tuned down to (k-1) or up to (k+1)
at most, is that right?

Risto




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

Re: [music-dsp] Wavetable File Formats?

2018-03-13 Thread robert bristow-johnson







 Original Message 

Subject: Re: [music-dsp] Wavetable File Formats?

From: "Risto Holopainen" <ebel...@ristoid.net>

Date: Mon, March 12, 2018 1:19 pm

To: music-dsp@music.columbia.edu

--



>

> �

> Thanks for your friendly comments, Robert!

> First of all, I probably need to clarify that I'm not trying to make a

> traditional synth application out of these wavetables, but I will use

> some of them in my own compositions in one way or another.

>>

>> 1. "The wavetables are written to an array expected to be of type

>> double, float, or long double, and of odd length."�

>> why an odd length???�

>>

> Maybe that's not necessary when I think about it. But the oscillator

> I've written expects a wavetable where the first and last entry are

> identical, for the purpose of convenient interpolation. For waveforms

> that are symmetric about their midpoint it's practical that both halves

> of the waveform fit into exactly the same number of samples, and then

> there's the guard point at the end that makes the size odd.

>

>> expect to do linear interpolation with the large and upsampled

>> wavetable to get rid of quantization error.

>>

> Yes, the oscillator does linear interpolation.

>>
i understand.� that extra repeated point is for linear interpolation.

so for a 1024-point wavetable you have 1025 elements to your table indexed from 
0 to 1024 and x[0]=x[1024].



i would still recommend a power of two (so that circular indexing is easy) with 
that one extra repeated point at the end.


>> 2. "Choose a waveshape, find its Fourier series, and add up a limited

>> number of partials to make a strictly bandlimited waveform."�

>> this is good advice.� it is the advice i give when using wavetable to

>> do "classic analog" waveforms like saw and triangle and square and PWM

>> and even master-slave sync-saw or sync-square.� It is pretty easy to

>> use the FFT and iFFT to do this.� use a big-long FFT (like 1 Meg

>> long).� you can prune it down to 2048 or 4096 later.� we can discuss

>> the detail of how to do this wavetable harmonic pruning in a later

>> music-dsp post.

>>

> Yeah, I realise the FFT is the way to go to make arbitrary waveforms

> bandlimited. I've done a few Fourier series by pen and paper so far, but

> I think I'll leave out the FFT from this small library.

>
it's just that you can "draw" (or define) whatever time-domain waveform, put a 
single cycle of it in a huge FFT buffer, FFT it, remove the harmonics that will 
alias, and inverse FFT and you have a bandlimited waveform.� you can uniformly 
"sample" that huge FFT
buffer to get 1024 or 2048 or 4096 or whatever point wavetable.

>

>> 4. wavetables can be interpolated between each other to morph tones

>> between different MIDI NoteOn pitches, between different MIDI key

>> velocities, between different MIDI mod-wheel settings, and between

>> wavetables extracted at different times during the note evolution

>> between NoteOn, NoteOff, and when the note finally dies after

>> NoteOff.� One will need to extract wavetables more densely around the

>> NoteOn attack portion than during the decay of the note.� to do this

>> right, the wavetables need to be aligned to each other, perhaps

>> spinning one wavetable so that its circular cross-correlation is

>> maximum to its adjacent wavetable that it is being interpolated with.

> And that's already four dimensions of wavetables!
that would be expensive (you double your computational cost for each time you 
add one dimension).� you wouldn't necessarily do all four.� maybe time elapsed 
since NoteOn, MIDI key velocity, and MIDI pitch for three
dimensions.� or maybe two of those plus some expression pedal or slider or mod 
wheel.

>� I've barely tried some

> timbral morphing and pitch interpolation, and not even simultaneously.

> But perhaps you can get away with a two dimensions of wavetables, one

> that drops off harmonics as pitch increases and another one for

> miscellaneous modulation effects?
sure.� (no MIDI key velocity and no elapsed time since NoteOn.)


>>

>> 5. you can also interpolate between wavetables to **selectively**

>> detune some partials away from their harmonic value and not other

>> partials (that remain harmonic to the fundamental).� you do that by

>> crossfading to other wavetables that are identical but with some

>> harmonics shifted in phase.� a change in phase means a detuning of the

>> frequency of the partial from the harmonic value.� to do t

Re: [music-dsp] Wavetable File Formats?

2018-03-12 Thread Risto Holopainen

 
Thanks for your friendly comments, Robert!
First of all, I probably need to clarify that I'm not trying to make a
traditional synth application out of these wavetables, but I will use
some of them in my own compositions in one way or another.
>
> 1. "The wavetables are written to an array expected to be of type
> double, float, or long double, and of odd length." 
> why an odd length??? 
>
Maybe that's not necessary when I think about it. But the oscillator
I've written expects a wavetable where the first and last entry are
identical, for the purpose of convenient interpolation. For waveforms
that are symmetric about their midpoint it's practical that both halves
of the waveform fit into exactly the same number of samples, and then
there's the guard point at the end that makes the size odd.

> expect to do linear interpolation with the large and upsampled
> wavetable to get rid of quantization error.
>
Yes, the oscillator does linear interpolation.
>
> 2. "Choose a waveshape, find its Fourier series, and add up a limited
> number of partials to make a strictly bandlimited waveform." 
> this is good advice.  it is the advice i give when using wavetable to
> do "classic analog" waveforms like saw and triangle and square and PWM
> and even master-slave sync-saw or sync-square.  It is pretty easy to
> use the FFT and iFFT to do this.  use a big-long FFT (like 1 Meg
> long).  you can prune it down to 2048 or 4096 later.  we can discuss
> the detail of how to do this wavetable harmonic pruning in a later
> music-dsp post.
>
Yeah, I realise the FFT is the way to go to make arbitrary waveforms
bandlimited. I've done a few Fourier series by pen and paper so far, but
I think I'll leave out the FFT from this small library.

> I also wrote a paper in the 90s about wavetable synthesis and
> mathematics regarding it (the "Wavetable 101" paper). 
>
Thanks, I'll take a look at that paper.

> 4. wavetables can be interpolated between each other to morph tones
> between different MIDI NoteOn pitches, between different MIDI key
> velocities, between different MIDI mod-wheel settings, and between
> wavetables extracted at different times during the note evolution
> between NoteOn, NoteOff, and when the note finally dies after
> NoteOff.  One will need to extract wavetables more densely around the
> NoteOn attack portion than during the decay of the note.  to do this
> right, the wavetables need to be aligned to each other, perhaps
> spinning one wavetable so that its circular cross-correlation is
> maximum to its adjacent wavetable that it is being interpolated with.
And that's already four dimensions of wavetables! I've barely tried some
timbral morphing and pitch interpolation, and not even simultaneously.
But perhaps you can get away with a two dimensions of wavetables, one
that drops off harmonics as pitch increases and another one for
miscellaneous modulation effects?
>
> 5. you can also interpolate between wavetables to **selectively**
> detune some partials away from their harmonic value and not other
> partials (that remain harmonic to the fundamental).  you do that by
> crossfading to other wavetables that are identical but with some
> harmonics shifted in phase.  a change in phase means a detuning of the
> frequency of the partial from the harmonic value.  to do that, the
> dimension involved should be made circular like with cylindrical
> coordinates.
>
> i have some C code that demonstrates this interpolation (all linear)
> in up to 3 cartesian dimensions (cylindrical in one dimension is an
> easy modification), if anyone is interested.  it's conceptually very
> simple.  if there is a clamoring, i can post it here or send it to
> whomever requests.  just lemme know.
>

I hadn't thought of that way of doing it. Wouldn't you have to crossfade
between the wavetables with phase offsets several times each cycle for
this to work? And I don't quite see what you mean by cylindrical
coordinates here, so if you don't mind, please elaborate.

Risto


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

Re: [music-dsp] Wavetable File Formats?

2018-03-12 Thread robert bristow-johnson







 Original Message 

Subject: Re: [music-dsp] Wavetable File Formats?

From: "Risto Holopainen" <ebel...@ristoid.net>

Date: Sat, March 10, 2018 11:58 am

To: music-dsp@music.columbia.edu

--



>

>

> Den 2018-03-10 kl. 16:33, skrev Frank Sheeran:

>

>>

>> What I notice in so many of the existing tools in this niche is that

>> they all let you "draw your own waveform!!" as if that's something

>> you'd actually want to do.� It always seemed obvious to me that at

>> least drawing the harmonic spectrum would be far more useful, so why

>> this "draw waveform" ability?� Is it just because that's what naive

>> users think would be good?

>

> Yes, I think you're on to something. Most musicians who use wavetable

> synthesizers probably have no idea what Fourier series are, and at best

> have a diffuse understanding of the relation between waveforms and

> spectra. I also think that this visual interaction can be very appealing

> for many users.

>

> I can imagine an editor with more perceptually motivated functions,

> where you'd specify a waveform in terms of feature extractors such as

> centroid, odd/even balance of partials, formants, spectral rolloff etc.

>

> Here's my take on wavetable synthesis, which definitely doesn't let you

> draw your own waveform!

>

> https://ristoid.net/prog/waveforms.html

>

> Comments are appreciated. I hope to add a few sound examples some day.

�
okay, you're gonna get some friendly comments from me:
1. "The wavetables are written to an array expected to be of type double, 
float, or long double, and of odd length."�

why an odd length???� it's pretty hard to get a power of 2 to be equal to an 
odd number (bigger than 1) and there is a great advantage in implementation to 
make wavetables a large power of 2 (like 2048 or bigger).� now, wavetables 
**can** be interpolated and stored in memory as a large
power of two when they are loaded (at program change time).� but during 
synthesis, it's really important that they be a power of two, for simplicity 
and efficiency in the code.� make the wavetable big but with much fewer 
harmonics than Nyquist permits (the highest harmonic should be much
less than half the number of wavetable samples).� expect to do linear 
interpolation with the large and upsampled wavetable to get rid of quantization 
error.
2. "Choose a waveshape, find its Fourier series, and add up a limited number of 
partials to make a strictly bandlimited
waveform."�
this is good advice.� it is the advice i give when using wavetable to do 
"classic analog" waveforms like saw and triangle and square and PWM and even 
master-slave sync-saw or sync-square.� It is pretty easy to use the FFT and 
iFFT to do this.� use a big-long FFT (like 1 Meg
long).� you can prune it down to 2048 or 4096 later.� we can discuss the detail 
of how to do this wavetable harmonic pruning in a later music-dsp post.�
i have found that, with 48 kHz sample rate and a 19 kHz top-end bandwidth, that 
you can get away with 2 wavetables per octave (spaced at 6 semitones) and not 
have aliasing of harmonics.
I have not done any code for this for a quarter century, but long ago i *did* 
write the DSP code for this
software product called "Prophet VS Wavewrangler" by the now defunct "Interval 
Music Systems" (Scott Morgan).� I also wrote a paper in the 90s about wavetable 
synthesis and mathematics regarding it (the "Wavetable 101" paper).� anything 
that's a harmonic tone,
including evolving harmonic tones, can be done convincingly and efficiently 
with wavetable synthesis.� this includes most (a) additive synthesis, (b) 
sampling of harmonic notes, (c) and most algorithmic synthesis (like FM, 
non-linear waveshaping, even FOF with some precomputation, and
"classic" analog waveforms), just as long as the partials or overtones do not 
deviate very far from harmonic frequency values.
3. wavetables can be interpolated between samples (so that the pitch can be 
precisely tuned) and
4. wavetables can be interpolated between each other
to morph tones between different MIDI NoteOn pitches, between different MIDI 
key velocities, between different MIDI mod-wheel settings, and between 
wavetables extracted at different times during the note evolution between 
NoteOn, NoteOff, and when the note finally dies after NoteOff.� One will
need to extract wavetables more densely around the NoteOn attack portion than 
during the decay of the note.� to do this right, the wavetables need to be 
aligned to each other, perhaps spinning one wavetable so that its circular 
cross-correlation is maximum to its adjacent wavetable that it is
being interpolated with.
5.

Re: [music-dsp] Wavetable File Formats?

2018-03-11 Thread Eric Brombaugh

On 03/10/2018 12:40 PM, Andy Drucker wrote:
Just to note, WaveEdit *does* let you draw in the spectrum.  It's the 
only tool I can think of that seamlessly allows edits in both domains at 
once, and allows non-mathematical users to "puzzle out" the relation 
between the two in a hands-on way.


This is what I believe is the key feature - immediately revealing to 
intimate relationship between the time and frequency series. Since I'm 
involved behind the scenes in producing some of these synthesizer 
modules (I wrote the embedded code for the Synthtech E352 and E370) I 
see a lot of what the customers are asking for - they want control over 
the waveforms and the most obvious approach is to simply draw them. 
Those who take the next step and actually try to do this often become 
frustrated that their intuition about shape vs sound fails them. 
Bringing in the frequency series control helps to mold the intuition and 
makes for an overall more useful tool that also helps teach.


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

Re: [music-dsp] Wavetable File Formats?

2018-03-10 Thread Andy Drucker
>What I notice in so many of the existing tools in this niche is that they
all let you "draw your own waveform!!" as if that's something you'd
actually want to do.  It always seemed obvious to me that at least drawing
the harmonic spectrum would be far more useful, so why this "draw waveform"
ability?  Is it just because that's what naive users think would be good?

Just to note, WaveEdit *does* let you draw in the spectrum.  It's the only
tool I can think of that seamlessly allows edits in both domains at once,
and allows non-mathematical users to "puzzle out" the relation between the
two in a hands-on way.
There are also several FX with similarly immediate visual feedback.  It's
great, and should be a must-try for anyone using a wavetable synth.
Between this and VCV Rack, huzzah for Andrew Belt!

On Sat, Mar 10, 2018 at 9:58 AM, Risto Holopainen 
wrote:

>
>
> Den 2018-03-10 kl. 16:33, skrev Frank Sheeran:
>
>
> What I notice in so many of the existing tools in this niche is that they
> all let you "draw your own waveform!!" as if that's something you'd
> actually want to do.  It always seemed obvious to me that at least drawing
> the harmonic spectrum would be far more useful, so why this "draw waveform"
> ability?  Is it just because that's what naive users think would be good?
>
>
> Yes, I think you're on to something. Most musicians who use wavetable
> synthesizers probably have no idea what Fourier series are, and at best
> have a diffuse understanding of the relation between waveforms and spectra.
> I also think that this visual interaction can be very appealing for many
> users.
>
> I can imagine an editor with more perceptually motivated functions, where
> you'd specify a waveform in terms of feature extractors such as centroid,
> odd/even balance of partials, formants, spectral rolloff etc.
>
> Here's my take on wavetable synthesis, which definitely doesn't let you
> draw your own waveform!
>
> https://ristoid.net/prog/waveforms.html
>
> Comments are appreciated. I hope to add a few sound examples some day.
>
> Risto
>
>
>
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp
>
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Wavetable File Formats?

2018-03-10 Thread Risto Holopainen


Den 2018-03-10 kl. 16:33, skrev Frank Sheeran:

>
> What I notice in so many of the existing tools in this niche is that
> they all let you "draw your own waveform!!" as if that's something
> you'd actually want to do.  It always seemed obvious to me that at
> least drawing the harmonic spectrum would be far more useful, so why
> this "draw waveform" ability?  Is it just because that's what naive
> users think would be good?

Yes, I think you're on to something. Most musicians who use wavetable
synthesizers probably have no idea what Fourier series are, and at best
have a diffuse understanding of the relation between waveforms and
spectra. I also think that this visual interaction can be very appealing
for many users.

I can imagine an editor with more perceptually motivated functions,
where you'd specify a waveform in terms of feature extractors such as
centroid, odd/even balance of partials, formants, spectral rolloff etc.

Here's my take on wavetable synthesis, which definitely doesn't let you
draw your own waveform!

https://ristoid.net/prog/waveforms.html

Comments are appreciated. I hope to add a few sound examples some day.

Risto


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

Re: [music-dsp] Wavetable File Formats?

2018-03-10 Thread Frank Sheeran
>
>
>
> There's an open-source wavetable editor:
>
> https://github.com/AndrewBelt/WaveEdit


Thanks Eric.



> This was written by Andrew Belt (author of VCV Rack) under commission
> from Synthesis Technology for creating wavetables for their line of
> Eurorack wavetable oscillators. Several other Eurorack manufacturers are
> also beginning to use this for their products as well.
>

> There's an open online repository of wave banks which this application
> supports where the user community has begun to share tables that they've
> created with the tool, as well as classic wavetables from older
> synthesizers like Ensoniq and PPG.


I'm seeing PPG Wave wavetables.  One called "Fairlight" with no further
comment, and two that seem to be a collection of single waves from the
ESQ-1 (not the transwaves, which would make a lot more sense, as that was
Ensoniq's term for wavetable).  Of the rest, none--strangely--look to have
been produced by this editor.  Instead they're agglomerations of waveforms
from other sources; don't have DC filtered out; don't have phases aligned,
etc.

What I notice in so many of the existing tools in this niche is that they
all let you "draw your own waveform!!" as if that's something you'd
actually want to do.  It always seemed obvious to me that at least drawing
the harmonic spectrum would be far more useful, so why this "draw waveform"
ability?  Is it just because that's what naive users think would be good?
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Wavetable File Formats?

2018-03-06 Thread Nigel Redmon
Hi Frank. I’ve never messed with these, but it seems obvious that they are 
either going to have a predictable format (that they specify *somewhere*, if 
they intend to let people sue anything but their own editor), or add/expect 
additional info bundled in the wave file (in which case they’d also need to 
specify).

In a quick search, I see that Serum expects 2048-sample wavetable (not a 
surprising number—let’s you span the audio range with all audible harmonics):

Wavetables in a Serum-compatible format can be directly loaded into Expanse. 
You can also make your own Serum-compatible wavetables using Serum or other 
audio software, or programming environments that offer wav file output. The 
format is as follows.
– 2048 samples per single-cycle
– Maximum of 256 frames (positions), less than 256 frames will be morphed or 
crossfaded according to the import setting.


> On Mar 6, 2018, at 6:27 AM, Frank Sheeran  wrote:
> 
> I've written a Wavetable Oscillator for my modular software synthesizer.
> 
> Surveying the synth software I can find (Serum, XRSDO, etc.) it seems that 
> they all store wavetables in WAV files, PCM format, which I'm able to read 
> and use with libsndfile.
> 
> However, is there any idea how I can tell how many samples per wave there is?
> 
> Clearly I can limit myself to factors of the file size.  EG a 65536 byte file 
> can have 256 waves of 256 samples, or 64 samples of 1024 samples, etc.
> 
> Is there any de-facto standard?  Or a short list of heuristics I could use?
> 
> I've tried integrating (simply summing) the waves, hoping to see the sum come 
> to zero right on a factor (and its multiples).  In some cases: perfect!  But 
> in fact many of these files seem to have either DC or simply wave changes 
> that keep these numbers from being zero, even when I can see by the harmonic 
> plot's orderliness that I have the correct sample count.
> 
> Thanks,
> Frank Sheeran
> http://moselle-synth.com 
> ___
> dupswapdrop: music-dsp mailing list
> music-dsp@music.columbia.edu
> https://lists.columbia.edu/mailman/listinfo/music-dsp

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

[music-dsp] Wavetable File Formats?

2018-03-06 Thread Frank Sheeran
I've written a Wavetable Oscillator for my modular software synthesizer.

Surveying the synth software I can find (Serum, XRSDO, etc.) it seems that
they all store wavetables in WAV files, PCM format, which I'm able to read
and use with libsndfile.

However, is there any idea how I can tell how many samples per wave there
is?

Clearly I can limit myself to factors of the file size.  EG a 65536 byte
file can have 256 waves of 256 samples, or 64 samples of 1024 samples, etc.

Is there any de-facto standard?  Or a short list of heuristics I could use?

I've tried integrating (simply summing) the waves, hoping to see the sum
come to zero right on a factor (and its multiples).  In some cases:
perfect!  But in fact many of these files seem to have either DC or simply
wave changes that keep these numbers from being zero, even when I can see
by the harmonic plot's orderliness that I have the correct sample count.

Thanks,
Frank Sheeran
http://moselle-synth.com
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp