Re: [music-dsp] Build waveform sample array from array of harmonic strengths?

2018-04-17 Thread Frank Sheeran
Hi Paula,

My soft synth is a programming language (interpreted or compiled) used to
route audio and control signals between C++ modules.  (See
http://moselle-synth.com for details.)

It is currently a stand-alone PC application, while I develop the language
and modules.

Naturally my goal is to turn it into a plug-in usable by a DAW.

I've also talked with a hardware developer about building a DSP-based
hardware solution, mainly for lower latency and higher polyphony.  But it
seems like that's also a pretty good way to go bankrupt.

While on the PC, I've used a thread-pool to increase voice output
calculation, increasing polyphony.  However I'm only using that for actual
voice production, not for calculating wavetables.

So in summary: no, FPGA is probably out of the immediate plans, but your
suggestion of parallelization could certainly help and I've noted that on
my to-do list.  Thanks!



On Tue, Apr 17, 2018 at 5:28 PM,  wrote:

> Hi,
>
>  Have you considered moving to an FPGA? this way you could potentially do
> a large portion of the processing in parallel.
>
> Paula
>
>
>
> On 2018-04-16 16:46, Frank Sheeran wrote:
>
> RBJ says:
>
> > are you making wavetables, Frank?? is that what you're doing?
>
> Well yes.
>
> More specifically, I'm adding Wavetable SYNTHESIS to my long-standing
> software synthesizer.
>
> It's been generating waveforms the patch-writer specifies by formula,
> and/or by setting individual harmonics, and the like, for years.  It takes
> a portion of a second to do for a single wave.   I generate several
> bandwidth-limited versions (by default 1/4 octave apart).  Some call the
> resulting data structure a mipmap, some call it a wavetable, but the
> salient point is that there's only one spectrum (at least, at any given
> pitch range).
>
> The problem is that now I'd doing it for say 32 or 64 or 256 waveforms at
> once it can take a full second on a fast modern CPU.
>
> So, the simple symmetry-based solution I had before isn't really fit for
> purpose.
>
>
>
> To all: thanks for all the pointers.  I'm not a maths/acoustics guy, just
> a humble software developer, but I'll work through all the references and
> see how much I understand.
>
>
>
>
> ___
> 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] Build waveform sample array from array of harmonic strengths?

2018-04-17 Thread paula
Hi, 

 Have you considered moving to an FPGA? this way you could potentially
do a large portion of the processing in parallel. 

Paula

On 2018-04-16 16:46, Frank Sheeran wrote:

> RBJ says:
> 
>> are you making wavetables, Frank?? is that what you're doing?
> 
> Well yes.
> 
> More specifically, I'm adding Wavetable SYNTHESIS to my long-standing 
> software synthesizer.
> 
> It's been generating waveforms the patch-writer specifies by formula, and/or 
> by setting individual harmonics, and the like, for years.  It takes a portion 
> of a second to do for a single wave.   I generate several bandwidth-limited 
> versions (by default 1/4 octave apart).  Some call the resulting data 
> structure a mipmap, some call it a wavetable, but the salient point is that 
> there's only one spectrum (at least, at any given pitch range).
> 
> The problem is that now I'd doing it for say 32 or 64 or 256 waveforms at 
> once it can take a full second on a fast modern CPU.
> 
> So, the simple symmetry-based solution I had before isn't really fit for 
> purpose.
> 
> To all: thanks for all the pointers.  I'm not a maths/acoustics guy, just a 
> humble software developer, but I'll work through all the references and see 
> how much I understand.
> 
> ___
> 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] Build waveform sample array from array of harmonic strengths?

2018-04-16 Thread Nigel Redmon
Hi Frank,

Just a minor point, but yes, you want the inverse FFT. (Um, it’s the same 
thing, pretty much, the main issue being scaling, depending on implementation. 
Just highlighting that specifying frequency and converting to time domain is 
“inverse”, the other is plain or “forward”.)

My series on wavetable oscillators may or may not help. But in a nutshell, the 
FFT gives a vast improvement in the speed of calculating harmonically related 
sines, and the longer the table, the bigger the win.

http://www.earlevel.com/main/category/digital-audio/oscillators/wavetable-oscillators/?order=ASC
 



> On Apr 16, 2018, at 8:46 AM, Frank Sheeran  wrote:
> 
> RBJ says:
> 
> > are you making wavetables, Frank?? is that what you're doing?
> 
> Well yes.
> 
> More specifically, I'm adding Wavetable SYNTHESIS to my long-standing 
> software synthesizer.
> 
> It's been generating waveforms the patch-writer specifies by formula, and/or 
> by setting individual harmonics, and the like, for years.  It takes a portion 
> of a second to do for a single wave.   I generate several bandwidth-limited 
> versions (by default 1/4 octave apart).  Some call the resulting data 
> structure a mipmap, some call it a wavetable, but the salient point is that 
> there's only one spectrum (at least, at any given pitch range).
> 
> The problem is that now I'd doing it for say 32 or 64 or 256 waveforms at 
> once it can take a full second on a fast modern CPU.
> 
> So, the simple symmetry-based solution I had before isn't really fit for 
> purpose.
> 
> 
> 
> To all: thanks for all the pointers.  I'm not a maths/acoustics guy, just a 
> humble software developer, but I'll work through all the references and see 
> how much I understand.
> 
> 
> 
> ___
> 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] Build waveform sample array from array of harmonic strengths?

2018-04-16 Thread Frank Sheeran
 RBJ says:

> are you making wavetables, Frank?? is that what you're doing?

Well yes.

More specifically, I'm adding Wavetable SYNTHESIS to my long-standing
software synthesizer.

It's been generating waveforms the patch-writer specifies by formula,
and/or by setting individual harmonics, and the like, for years.  It takes
a portion of a second to do for a single wave.   I generate several
bandwidth-limited versions (by default 1/4 octave apart).  Some call the
resulting data structure a mipmap, some call it a wavetable, but the
salient point is that there's only one spectrum (at least, at any given
pitch range).

The problem is that now I'd doing it for say 32 or 64 or 256 waveforms at
once it can take a full second on a fast modern CPU.

So, the simple symmetry-based solution I had before isn't really fit for
purpose.



To all: thanks for all the pointers.  I'm not a maths/acoustics guy, just a
humble software developer, but I'll work through all the references and see
how much I understand.
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Build waveform sample array from array of harmonic strengths?

2018-04-16 Thread Ethan Fenn
Another alternative to calling sin() repeatedly is to use some kind of
recursive oscillator which just takes a few operations to output each
sample.

This article is a very readable starting point and presents a few options:
http://vicanek.de/articles/QuadOsc.pdf

As for whether an FFT would do the job, that depends on exactly what you're
trying to do. If you have an array of harmonic strengths which don't vary
over time, the harmonics are always perfectly aligned (no detuning), and
you just want to generate one period of the waveform, then an FFT is
perfect. That's exactly what an FFT does, it generates a weighted sum of
complex exponentials (I guess usually we think of the inverse FFT as doing
this, rather than the forward one, but they're really the same thing). If
any one of those assumptions about what you're doing is relaxed it might
not do what you want any more.

-Ethan



On Sun, Apr 15, 2018 at 5:07 PM, robert bristow-johnson <
r...@audioimagination.com> wrote:

>
>
>  Original Message 
> Subject: [music-dsp] Build waveform sample array from array of harmonic
> strengths?
> From: "Frank Sheeran" 
> Date: Sun, April 15, 2018 2:55 pm
> To: music-dsp@music.columbia.edu
> --
>
>
> > I'm currently just looping and calling sin() a lot. I use trivial 4-way
> > symmetry of sin() and build a "mipmap" of progressively octave-higher
> > versions of a wave, to play for higher notes, by copying samples off the
> > lowest-frequency waveform. That still is only 8x faster than the naive
> way
> > to do it.
> >
> > I know in theory that a FFT or DFT will turn a CONTINUOUS graph of
> > frequency into a graph of time, and vice versa, but if I don't have a a
> > continuous graph of frequency but rather an array of strengths, can I
> still
> > use it?
> >
> > I thought of making a continuous graph of frequency from my harmonics,
> but
> > 1) sounds quite imprecise and 2) I note real FFT graphs have smooth
> "hills"
> > where harmonics are, rather than point peaks, and am wondering whether
> I'd
> > get expected output if I didn't generate those hills.
>
> are you making wavetables, Frank?  is that what you're doing?
>
>
> --
>
> 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
>
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Build waveform sample array from array of harmonic strengths?

2018-04-15 Thread robert bristow-johnson







 Original Message 

Subject: [music-dsp] Build waveform sample array from array of harmonic 
strengths?

From: "Frank Sheeran" 

Date: Sun, April 15, 2018 2:55 pm

To: music-dsp@music.columbia.edu

--



> I'm currently just looping and calling sin() a lot. I use trivial 4-way

> symmetry of sin() and build a "mipmap" of progressively octave-higher

> versions of a wave, to play for higher notes, by copying samples off the

> lowest-frequency waveform. That still is only 8x faster than the naive way

> to do it.

>

> I know in theory that a FFT or DFT will turn a CONTINUOUS graph of

> frequency into a graph of time, and vice versa, but if I don't have a a

> continuous graph of frequency but rather an array of strengths, can I still

> use it?

>

> I thought of making a continuous graph of frequency from my harmonics, but

> 1) sounds quite imprecise and 2) I note real FFT graphs have smooth "hills"

> where harmonics are, rather than point peaks, and am wondering whether I'd

> get expected output if I didn't generate those hills.



are you making wavetables, Frank?� is that what you're doing?


--



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] Build waveform sample array from array of harmonic strengths?

2018-04-15 Thread Diemo Schwarz


On 15/04/18 20:55, Frank Sheeran wrote:
I'm currently just looping and calling sin() a lot.  I use trivial 4-way 
symmetry of sin() and build a "mipmap" of progressively octave-higher versions 
of a wave, to play for higher notes, by copying samples off the lowest-frequency 
waveform.  That still is only 8x faster than the naive way to do it.


I know in theory that a FFT or DFT will turn a CONTINUOUS graph of frequency 
into a graph of time, and vice versa, but if I don't have a a continuous graph 
of frequency but rather an array of strengths, can I still use it?


this sounds a lot like FFT-1 by Freed, Rodet, Depalle:
https://hal.archives-ouvertes.fr/IRCAM/hal-01105443

I thought of making a continuous graph of frequency from my harmonics, but 1) 
sounds quite imprecise 


nope, since you also have to provide the phase

and 2) I note real FFT graphs have smooth "hills" where 
harmonics are, rather than point peaks, and am wondering whether I'd get 
expected output if I didn't generate those hills.



...Diemo


--
Diemo Schwarz, PhD -- http://diemo.concatenative.net
Sound–Music–Movement Interaction Team -- http://ismm.ircam.fr
IRCAM - Centre Pompidou -- 1, place Igor-Stravinsky, 75004 Paris, France
Phone +33-1-4478-4879 -- Fax +33-1-4478-1540
___
dupswapdrop: music-dsp mailing list
music-dsp@music.columbia.edu
https://lists.columbia.edu/mailman/listinfo/music-dsp

Re: [music-dsp] Build waveform sample array from array of harmonic strengths?

2018-04-15 Thread Phil Burk
If you are looking for a way to generate band-limited oscillators using
octave based tables then here is an implementation in Java for JSyn:

https://github.com/philburk/jsyn/blob/master/src/com/jsyn/engine/MultiTable.java
https://github.com/philburk/jsyn/blob/master/src/com/jsyn/unitgen/SawtoothOscillatorBL.java
https://github.com/philburk/jsyn/blob/master/src/com/jsyn/unitgen/SquareOscillatorBL.java

It windows the higher order partials to reduce the Gibbs Effect.

I can smoothly ramp the frequency and do not hear any abrupt transitions.

Phil Burk


On Sun, Apr 15, 2018 at 11:55 AM, Frank Sheeran  wrote:

> I'm currently just looping and calling sin() a lot.  I use trivial 4-way
> symmetry of sin() and build a "mipmap" of progressively octave-higher
> versions of a wave, to play for higher notes, by copying samples off the
> lowest-frequency waveform.  That still is only 8x faster than the naive way
> to do it.
>
> I know in theory that a FFT or DFT will turn a CONTINUOUS graph of
> frequency into a graph of time, and vice versa, but if I don't have a a
> continuous graph of frequency but rather an array of strengths, can I still
> use it?
>
> I thought of making a continuous graph of frequency from my harmonics, but
> 1) sounds quite imprecise and 2) I note real FFT graphs have smooth "hills"
> where harmonics are, rather than point peaks, and am wondering whether I'd
> get expected output if I didn't generate those hills.
>
> ___
> 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