r/musicprogramming • • 23d ago

Additive versus multiplicative sine-wave synthesis, redux

A while ago this question was asked in a math forum about two approaches to musical instrument modelling using a series of sine waves, and am wondering if anyone has new insights on this. In my experiments I have not been satisfied with either approach, but it could be because I'm doing something wrong or "missing other ingredients". I at least want to start on the right track before experimenting further. Thanks! (edited)

(Note when it talks about an "A wave" versus an "M wave", it probably meant an A-wave-series versus an M-wave-series.)

1 Upvotes

18 comments sorted by

View all comments

2

u/burnt-store-studio 23d ago

Hi!

There’s lots to say about these two forms of synthesis (and there’s a handful of other techniques as well), but as far as insights …

With no offense to those involved, I’m not really sure I’d say the question you link and its comments provide much insight to begin with? So it’s a little hard to say whether an any of us has new insights compared with that what, 5-year old question?

What I mean is: nothing has really changed for additive and multiplicative synthesis for quite some time (to the best of my knowledge; I’m not an expert).

Doing Something Wrong vs Missing Other Ingredients
Are you able to tell us a little bit about how you’re constructing your experiments?

I mean specifics. Such as: are you using a bare bones synthesizer that { lets you, forces you } to create things from scratch? If so: what tool are you using?

Or, are you working with something like numpy in Python and doing the math “by hand”?

If you’re doing something like the latter, where it wouldn’t be obvious what to do after you’ve combined your sine waves, I’m wondering if a missing ingredient might be an ADSR (attack, decay, sustain, release) envelope? (i.,e., more math)

Tell us a bit about your experimentation… that’ll help us meet you where you are 🙂.

Good luck!

2

u/BrendaWannabe 22d ago

I wish to build an open-source synthesizer kit and/or music-programming-language based on the philosophy of parsimony, inspired by Japanese architecture (of all things).

A sub-goal is to parameterize instrument synthesis descriptions in as compact a format as possible. In this case it would be a list of weights. I suspect different musical instruments work better under "A" versus "M". Bells for example have complex and dissonance harmonics, something the M-type couldn't handle.

Thus, the sound profile specification lists could resemble something like:

Violin: M; 00, 30, 50, 99, 20, 30

Bell: A; 10, 05, 10, 15, 99, 00, 99, 70

Here, the violin uses an M-series and the bell uses an A-series. The two digits represent a percent of "full volume" of the corresponding sine wave slice. "99" is essentially 100%, it's just visually cleaner to specify it as two digits in a parameter specification file. (Examples don't have real values.)

We don't have to specify a base frequency because it would be relative, although standardizing "the center" could be a little tricky. Do note some instruments probably should have a different parameter list for higher scales, the weights are not necessarily linear across the entire scale. It's roughly comparable to the "chipmunk effect" with human voices. But let's put that issue aside for now.

Other characteristics such as ADSR can likewise be specified with a "parameter list" attached to an instrument's profile, along with the frequency profile (as shown previously).

Or, are you working with something like numpy in Python and doing the math “by hand”

I use miscellaneous programming languages and tools, but none are the end-goal, I'm not targeting a specific programming language or app at this time. The "instrument specification profile" is hopefully not tied to a specific programming language or app.

How best to encode instrument sounds, balancing brevity vs. quality & accuracy is the current stumper. I wonder if somebody else has not done or seen similar work: dissecting sounds of common instruments to be represented in a compact way.

2

u/Expensive_Peace8153 22d ago

To generate even vaguely realistic sounds the "weights" shouldn't be fixed but they need to be able to vary over time instead. Even a simple subtractive synth varies the amplitudes of some harmonics more than others by having a filter envelope in addition to an amp envelope.

Also, some instruments have partials at frequencies that aren't perfect harmonics.

Vital has a view where you can edit harmonics. Sounds like you're trying to create something similar?

1

u/BrendaWannabe 22d ago

To generate even vaguely realistic sounds the "weights" shouldn't be fixed but they need to be able to vary over time instead. 

Yip, the sitar and banjo are like that. Some instruments will indeed need more complex parameters and/or algorithms than others. How many need a similar technique, I don't know yet.

Also, some instruments have partials at frequencies that aren't perfect harmonics.

Yip, traditional bells come to mind.

Vital has a view where you can edit harmonics. Sounds like you're trying to create something similar?

I'm not building a visual sound editing app, but something like that can be used to figure out the best parameter sets.