The Eat at Joe's Kawai K5000 Message Board Digest
Techniques and Formulae for Creating ADD Patches
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
One harmonic from another
Wednesday, 24-Jun-98 22:55:47
152.163.205.67 writes:
I've made a lot of original additives patches that I have liked and used in my
songs, but the creation of these patches has all been guess work by matter of
chance. At least in Analog Subtractive synthesis I know what a certain parameter
change is gonna do to the sound I have. In the K5000 I can't tell what one
sine wave does from another, their seems to be very little difference in changing
the harmonic levels. A more radical change comes when messing with the
formant filter and useing LFOs on the FF. Can anyone give me tips on using
additive synthesis to the fullest?
David Beckman
------------------------------------------------------------------------------------------
Re: One harmonic from another
Thursday, 25-Jun-98 12:17:50
192.28.2.16 writes:
It works in mysterious ways . . . . Individual harmonics can seem like they're
too low to hear, yet when you take out a bunch of them the whole character of
the sound changes. I'd recomend wading through the message archive on this site.
Maybe we could compile a list of methods to set the harmonics. Here's mine, in
chrono order:
a) copy from another patch
b) use a sound diver template
c) draw freehand (i.e. trial and error)
d) select individual harmonics (and get a lot of bell patches)
e) imitate harmonic profiles of real instruments, from books and the "sharc"
website (difficult but rewarding)
f) follow mathematical formulas (ditto)
Another would be to use the sound diver "import" function; I haven't tried
it much myself.
leiter
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
K5k Programing Made Easy
Saturday, 27-Jun-98 14:15:26
199.86.33.51 writes:
To program the harmonic levels, you need to find a way to reduce 64 numbers to a
few meaningful decisions or a few meaningful numbers.
One way to do this is to find a formula, A(n,a,b,c), that tells you an amplitude
(A) for each harmonic number (n) after you plug in a few simple variables
(a,b,c). A good formula should give you as much meaningful control as possible
while using as few variables as possible.
I’ve been using spreadsheets to try out different formulas and I’ve settled on
one that seems to be optimal. Hopefully someone on this board, or at Kawai or
Emagic, will write a utility that has "knobs" for the variables and a "transmit"
button to send the harmonic profile to a selected ADD in the K5k.
The best formula I’ve found uses between 1 and 7 variables. (That is, you don’t
have to use them all.) The variables are designated a, b, c, X%, d, e, Y%.
Okay, here goes:
A(n)=[1/n^a]*[(sin(n*Pi*X%))^b]*[(cos(n*Pi*X%))^c]*[(sin(n*Pi*Y%))^d]*[(cos(n*Pi*Y%))^e]
Simplifies everything, right? :-)
The formula can be broken down into three "modules". The first is simply [1/n^a].
The formula for a saw wave uses just this module; it’s A(n) =1/n . You
can get that by setting a=1 and b=c=d=e=0.
The second and third "modules" are the same, excpt that one uses "X%" and the
other uses "Y%". The "module" is:
[(sin(n*Pi*X%))^b]*[(cos(n*Pi*X%))^c].
This lets you multiply in as many sine and cosine functions of X% as you want.
(The sine is most useful, cosine sometimes; the other four trig fuctions go to
infinity so they wouldn’t be useful.) For example, the formula for a 20% pulse is:
A(n)=[1/n]*[sin(n*Pi*20%)].
You can get that by setting a=b=1, c=d=e=0, and X%=20%.
Here are some settings and the waveforms you get:
a b c X% d e Y% Waveform
1 0 0 --- 0 0 --- saw
1 1 0 20% 0 0 --- 20% pulse
1 1 0 50% 0 0 --- square
2 1 0 50% 0 0 --- triangle
2 1 0 20% 0 0 --- 20% uneven triangle (plucked string)
2 2 0 10% 0 0 --- 10% triangular pulse (brassy)
3 1 0 48% 2 0 3.5% analog-style square
0.4 1 0 12% 0 1 47% oboe essence (roll off the high end)
2 1 0 4.5% 1 0 6.25% trombone essence (ditto)
2 1 0 9% 1 0 13% french horn essence (ditto)
I’m sending in three patches (see below) that use some of these waveforms.
There’s one more step, which is to plug the amplitude values into Jen’s formula
to get K5k harmonic level values (L):
L(n)=128+8*(log2(abs(A(n)/A(max)))). A(max) is usually, but not always, A(1).
The spreadsheet I use takes seven variables as input and displays what the
harmonic profile looks like, what the waveform should look like, and what the 64
(or 128) harmonic level values are. I’m getting pretty quick at entering the
numbers into sounddiver from the keypad, but I bet a utility could be written to do
all this and then send the harmonic levels to a selected ADD automatically. If
it could do realtime modulation of these variables, that would really be
something.
There it is. If you’ve read this far and understand it, post a reply.
copyright 1998
P.S. the patches:
L7 Lead: Uses an analog-style square waveform, i.e. with sloping sides and tops.
Obonus: Starts with an oboe-emulation waveform but adds synth-style filtering.
FrchHorn: French Horn emulation.
leiter
------------------------------------------------------------------------------------------
Re: K5k Programing Made Easy
Monday, 29-Jun-98 09:55:37
194.172.230.108 writes:
How did you get the idea to cascade two comb filters? Just creative inspiration?
I like the idea with the power parameters acting as "filter influence faders", too.
Another 7-parameter suggestion:
A(n)=[1/n*[(sin(Pi*(n*X%+b)))^c]*[(sin(Pi*(n*Y%+d)))^e]^a]
Here, a has become a global bright/mellow parameter. And b and d get a different
meaning, similar to the well-known odd/even parameter. In fact, when X%
resp. Y% are 50%, then b resp. d are odd/even parameters.
How about that?
Jens Groh
------------------------------------------------------------------------------------------
Re: Re: K5k Programing Made Easy
Monday, 29-Jun-98 16:20:49
192.28.2.16 writes:
> How did you get the idea to cascade two comb filters? Just creative inspiration?
It was necessary to make trapezoidal pulses, which are a better brass emulation
than triangular pulses (see the new French horn patch).
>Another 7-parameter suggestion:
> A(n)=[1/n*[(sin(Pi*(n*X%+b)))^c]*[(sin(Pi*(n*Y%+d)))^e]^a]
If you move "a" to the end, you miss out on the ability to use fractional values
for 1/n. You can uses fractional exponents for 1/n but not for the trig functions,
because they go negative and then the result is imaginary. Unless there's a fix?
I really like the idea of the "phase-shift" parameters b and d. You can change the
sine to cosine by setting b or d = 1/2. But you also have the intermediate
values--I'm not even sure what that will look like; I'll post again when I try it.
leiter
------------------------------------------------------------------------------------------
Re: Re: Re: K5k Programing Made Easy
Tuesday, 30-Jun-98 05:17:43
194.172.230.108 writes:
[If you move "a" to the end, you miss out on the ability to use fractional values
for 1/n. You can uses fractional exponents for 1/n but not for the trig
functions, because they go negative and then the result is imaginary. Unless
there's a fix?]
Oh, I see. But you can take the absolute value of the sinusoids. Then the powers
are always taken from positive numbers. This is no loss, as you need to
make the amplitude positive anyway.
Jens Groh
------------------------------------------------------------------------------------------
Re: Re: Re: Re: K5k Programing Made Easy
Tuesday, 30-Jun-98 17:19:41
192.28.2.16 writes:
>Oh, I see. But you can take the absolute value of the sinusoids. Then
>the powers are always taken from positive
>numbers. This is no loss, as you need to make the amplitude positive anyway.
That's a good fix. The only catch is that you loose the ability to graph the
waveform with the plus and minus signs in place, which you need if you want to see
a triangle (e.g.); but, whatever.
leiter
------------------------------------------------------------------------------------------
Re: Re: Re: K5k Programing Made Easy
Tuesday, 30-Jun-98 17:15:49
192.28.2.16 writes:
> I really like the idea of the "phase-shift" parameters b and d. You can change
> the sine to cosine by setting b or d = 1/2.
> But you also have the intermediate values--I'm not even sure what that
> will look like; I'll post again when I try it.
Okay, I found the right identity to use:
sin(Pi*(n*X%+b)) = cos(Pi*b)*sin(Pi*n*X%) + sin(Pi*b)*cos(Pi*n*X%)
So it's the _sum_ of a sin X% and a cos X%, with b as a kind of fader between
them. (For b=0 it's all sine, for b=1/2 it's all cosine.)
leiter
------------------------------------------------------------------------------------------
Re: K5k Programing Made Easy
Monday, 06-Jul-98 21:15:46
209.160.126.117 writes:
My Oberheim synth allows you to sum square and saw waves. I was wondering if the
following adaption of your equation would do the same:
A(n)=((1/n)+abs((1/n)*(sin(n*Pi*0.50))))/2
Leslie
------------------------------------------------------------------------------------------
Re: Re: K5k Programing Made Easy
Tuesday, 07-Jul-98 13:43:30
199.86.33.68 writes:
I think that's right.
But it may not sound the same: In the K5k case, all of the harmonics of the two
waves would always be perfectly in phase, always adding and never
cancelling. That probably isn't true in the OB.
leiter
------------------------------------------------------------------------------------------
Re: K5k Programing Made Easy
Tuesday, 07-Jul-98 15:59:12
209.160.126.70 writes:
Another question (doubt if it will be the last).
When I calculate a pulse wave of less than 50%, the max amplitude is less than 1.
I have a software program that does additive synthesis using a linear scale
instead of a decibel one. Can I normalize the results of the equation be adding
a fixed number to all the harmonics with amplitudes greater than zero?
Leslie
------------------------------------------------------------------------------------------
Re: Re: K5k Programing Made Easy
Tuesday, 07-Jul-98 20:56:36
199.86.33.50 writes:
Jen's formula for harmonic levels (above) does it a good way--divide every value
by the maximum value, so the max is always 1 and the rest are relative.
leiter
------------------------------------------------------------------------------------------
Re: Re: Re: K5k Programing Made Easy
Tuesday, 07-Jul-98 22:39:00
209.160.126.77 writes:
I use Jen's formula for my K5 because it uses a decibel scale for the harmonic's
amplitude. For a linear scale, like my software program, I was just
wondering if there was some other way.
I wonder if we can get more cool waveforms from your equations by summing up
some of them. I mentioned the saw and square my OB uses --what about
summing up different pulse widths? I may mess around with my Oberheim to see if
any useful ones come up.
Leslie
------------------------------------------------------------------------------------------
Re: Re: Re: K5k Programing Made Easy
Tuesday, 07-Jul-98 23:09:35
209.160.126.158 writes:
Whoops! You answered my question and I didn't even realize it. Just divide the
number by the maximum value; Got it! Thanks.
Leslie
------------------------------------------------------------------------------------------
Re: K5k Programing Made Easy
Sunday, 12-Jul-98 22:40:27
209.160.126.89 writes:
Since I've been using your equations, I have tried to think of a way to combine
them with what I know about calculating FM sidebands. This is what I've
come up with so far:
A(c+(m*n))=1/(c+(m*n))
A(abs(c-(m*n)))=1/(abs(c-(m*n)))
Where A is the amplitude, c is the carrier, m is the modulator, and n is the
number the modulator is multiplied by (n starts at 0 and increases by one each
time the equations are used). There is two formulas because FM always generates
sidebands in pairs. If you had the ratio 7:1, where 7 is the modulator and
1 is the carrier, you would get the following:
A(1)=127
A(6)=106
A(8)=103
A(13)=97
A(15)=95
A(20)=92
A(22)=91
This is like a saw with many of its harmonics missing. It sounds like a bell.
A ratio of 3:1 produces a hollow guitar like sound. Another variation of the
formula could be:
A(c+(m*n))=1/n
A(abs(c-(m*n)))=1/n
Here the carrier would be elimanated. A ratio of 2:5 might sound interesting.
What would really be cool would be a formula for calculating a ratio like
22:3:1. This would be kinda hard because each sideband generated by 22:3 would
become a modulator for 1.
These formulas are not meant to calculate the amplitudes of the harmonics as
they would be generated by FM, but rather make the FM spectra easier to
use.
Leslie
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
Parametric Formant Filter Tool
Friday, 03-Jul-98 07:57:14
194.172.230.108 writes:
Hi all!
Leiter's seven-knobs-for-all-real-life-waveforms formula is a cool idea. It can
be called a parametric approach, the only way to really morph sounds, not to
just cross-fade them.
I am working on a similar thing for the Formant Filter. I have written a program
(for Atari - sorry!) that calculates a resonator bank and transmits the data to
the K5000. It has still a lot of parameters, but resonators are already somewhat
closer to 'real life' than FF levels. Each resonator has an amplitude, a center
frequency, and a bandwidth. There is an additional delay parameter in order to
make the PWM emulation stuff we were talking about a while ago. A
universal filter is connected in series with the resonator bank, with a few
(not yet parametric) lowpass templates I have made.
It is all in a very early state. The software does not even have a user
interface. (Who wants to make it for me? :-) A demo patch will follow soon.
Jens Groh
------------------------------------------------------------------------------------------
Re: Parametric Formant Filter Tool
Saturday, 04-Jul-98 23:16:21
199.86.40.89 writes:
That sounds good--what's the math?
leiter
------------------------------------------------------------------------------------------
Re: Re: Parametric Formant Filter Tool
Sunday, 05-Jul-98 10:50:47
195.232.55.162 writes:
The resonator bank consists of a number of band-pass filters. I calculate the
frequency responses of these filters and sum them up.
A single band-pass filter with the resonance frequency fR , the resonance
amplitude AR and the relative bandwidth D has the following frequency response:
AR * D * i * (f / fR) / ( 1 + D * i * (f / fR) + (f / fR)2 )
Attention - this formula uses complex-numbers arithmetic! (Complex numbers
represent both amplitude and phase - I refer to the literature.)
I realize the delays T by additionally multiplying each resonator's frequency
response with a "rotation factor":
exp( i * T * f )
In order to get a real-valued result I take the absolute value of the complex
amplitude after the summation.
The frequencies are taken from the table in the K5000 manual.
That's it, in principle.
Jens Groh
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
Site Update: Leiter's patch available now
Tuesday, 27-Oct-98 00:06:52
208.254.230.161 writes:
At long last I uploaded the patch that Leiter sent in. You can get it in the
Patch Archive right here.
Here is a description:
SolinaPd: An analog string-synth style pad.
The waveforms come from:
A(n)=1/n + (1/n)(cos(Pi*n*X%)^21)
where X is 34% for one and 25.5% for another.
This came out of trial and error, looking for waveforms with the right "sawteeth".
Kenji
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
Is the K5000s capable of complex functions?
Wednesday, 04-Nov-98 02:38:57
152.171.44.48 writes:
Hello K5ker's! I too have noticed the sam ash sale. Being that I'm a comp sci
student, I'm no stranger to math. I'm currently thinking of adding this synth to my
Yamaha EX5, Alesis QSR, and Ensoniq ESQ1.
Question is: can it do complex functions? say(This might not even be possible, just
an arbitrary function out of my head)something to the effect of:
f(x)=(cos x^2)*(tan x)/(PI/4)*(e^x)
I do have one of those neat TI-85 calculators to see all the waves before I
actually do them.
And also, are a good bit of these kind of functions musical, or will only all but
carefuly engineered ones sound like garbage?
Thanx in advance. Btw, I'm part of the non-techno/not dance crowd, doing prog rock.
Figure this might be something for that "different" sound, any thoughts? How does
it do the non-dance stuff?
Thanx in advance
Wes
------------------------------------------------------------------------------------------
Re: Is the K5000s capable of complex functions?
Wednesday, 04-Nov-98 03:01:45
209.160.126.113 writes:
You should look a leiter's formula in the Message Board Digest under "Techniques
and Formulae for Creating ADD Patches".
My specialty has been to adapt FM synthesis to additive synthesis. I'm currently
rewriting my Wavemaker program for the Atari to include more FM algorithms this
time using feedback. You can find some discusssion in the digest on this subject
as well.
Leslie
------------------------------------------------------------------------------------------
Re: Is the K5000s capable of complex functions?
Wednesday, 04-Nov-98 15:48:55
192.28.2.16 writes:
>Question is: can it do complex functions?
A perfect additive synth would be able make a Fourier reconstruction of any
repeating waveform. The K5k has two shortcomings from this ideal. First, the
partials all come out in the same phase. This is not a big problem musically,
since the difference is usually inaudible. Second, each additive source (ADD)
creates only partials that are in a harmonic series.
Natural instruments generally have overtones that are near the harmonic series, but
not always. Since you can use up to six ADDs in a patch, independently tuned, you
can still combine a significant number of non-harmonic partials. But there are
things you can't do, like stretch tuning. Still, it's the limitations that make the
character of a synth; I think this one has a sweet sound because the overtones are
often more in tune than in a natural instrument.
>And also, are a good bit of these kind of functions musical, or will only all but
carefuly engineered ones sound like garbage?
"Careful" helps but "persistent" is better! Many elegant functions and beautiful
looking waveforms sound like crap. Just keep throwing out the cheeze organs,
irritating bells, and Simon game sounds and you'll find a lot of very musical
functions.
> Figure this might be something for that "different" sound, any thoughts?
You're right!
leiter
------------------------------------------------------------------------------------------
Re: Is the K5000s capable of complex functions?
Wednesday, 04-Nov-98 23:19:09
209.207.189.165 writes:
"A convergent Fourier series may be found for any bounded periodic function, f(x),
that contains a finite number of maximum points, minimum points, and points of
discontinuity within a given period a convergent Fourier. The series will be
convergent at each point of x were f(x) is continuous and to the average of the left
and right hand limits of f(x) at those points where f(x) is discontinuous."
-Theorem attributed to PG Dirichlet
I can't reproduce the proof for that but I think that in a word it means yes is
the answer to your question. Basically, most periodic mathematical functions that
can be defined in closed form will have a Fourier series representation that is
suitable for use with the K5000. So yeah, if the TI-85 will graph it (watch out
for jumps to infinity though: like when x= +- pi/2 for your function), then if
you're clever enough you'll probably be able to persuade the K5000 to "sound" it.
Actual acoustic signals introduce a new dimension of difficulty since they don't
have a steady state (not in real life anyway), may not be strictly periodic and
definitely aren't expressable in closed form. The best you can hope for here is
probably a good approximation, if you're very clever. I'm not brave enough to tread
this territory, not yet anyway!
I'm not sure about the enharmonics, but I suspect that this results from applying
the actual Fourier transform to a non-periodic signal and examining each value of
the resulting continuous frequency spectrum. BTW, the actual transform isn't
necessary for a strictly periodic signal. Although, non-periodicity is going to be
a problem for the K5000, as well as any instrument that depends on strictly
periodic harmonic oscillators to generate waveforms.
Funny you should bring up the TI-85, mine spent the weekend on top of my K5000
(& it was on most of the time too!).
jon
------------------------------------------------------------------------------------------
Re: Re: Is the K5000s capable of complex functions?
Thursday, 05-Nov-98 08:11:01
164.107.171.51 writes:
>Although, non-periodicity is going to be a problem for the K5000, as well as any
instrument that depends on strictly periodic harmonic oscillators to generate
waveforms.
I believe you can get around this through clever use of un-looped envelopes, since
you can apparently have a different envelope for each tone, or at least voice/band
in the FF. Haven't tried it yet though--I just got my K5000s yesterday.
Bob
------------------------------------------------------------------------------------------
Re: Re: Re: Is the K5000s capable of complex functions?
Thursday, 05-Nov-98 12:22:21
209.207.189.209 writes:
I agree, up to a point. The envelopes will help alleviate this to an extent, but
their limited number of stages will quickly cause non-periodicity to become a
problem again. I really love the K5000 but I'm kind of hoping that since they
cancelled the K5000X they will produce a K6000 with 127 freely assignable env
stages for each osc. With envelopes like that we might get alot further alot easier
with replicating acoustic signals.
jon
------------------------------------------------------------------------------------------
Re: Re: Re: Re: Is the K5000s capable of complex functions?
Thursday, 05-Nov-98 13:52:42
192.86.155.91 writes:
And while your at it make the machine such that the large numbers of sine waves it
produces can be tuned however you want - with templates you can use to set them up
in the harmonic series when desired. Now combine that with the 127 env
stages.....mmmmmmm......
You would almost never need to make another synth again!
Kenji
------------------------------------------------------------------------------------------
Re: Re: Re: Re: Re: Is the K5000s capable of complex functions?
Thursday, 05-Nov-98 14:42:05
209.207.189.216 writes:
Amen! Thats the right idea.
This weekend, while I was tinkering with my K5000, I also decided to try additive
techniques out with my Casio VZ synth. This turned out to be somewhat worthwhile
since it gives you tunable oscillators (up to about 6 octaves) with eight stage
envelopes (just like the CZ's envelopes). You only get eight oscs per sound but
by layering you can get up to 32 oscs(4 note polyphony though). Maybe Casio and
Kawai should collaborate and produce the KZ-6000, I'd buy one!
jon
------------------------------------------------------------------------------------------
Re: Re: Re: Re: Re: Is the K5000s capable of complex functions?
Thursday, 05-Nov-98 16:05:41
192.28.2.16 writes:
You could implement non-harmonic overtones without getting too complicated by
allowing "stretching", i.e. allowing the interval between harmonics to be greater
than (or less than) the fundamental. That would make just one more number to
set.
I don't know what I'd do with 64 completely arbitrary harmonics!
leiter
------------------------------------------------------------------------------------------
Re: Re: Re: Re: Re: Re: Is the K5000s capable of complex functions?
Thursday, 05-Nov-98 16:41:09
209.160.126.140 writes:
What would also be nice is the ability to use other waveforms besides sine. I have
an old Digidesign program for my Atari. It allows you to use other waves like triangle, square, filtered noise, and white noise. What I've found is assigning
white noise to one of the partials giving it a very short decay can help the attack
of many sounds. Of course, some of the attack
transients of the K5000 may do this trick for you.
I also like the idea of stretch tuning the harmonics. From what I understand, the
harmonics of an acoustic instrument like the guitar have harmonics which are sharp
compared to the fundamental. For example, the first harmonic could be 440hz,
the second 883hz, and the third 1326 and so on.
Leslie
------------------------------------------------------------------------------------------
Re: Re: Re: Re: Re: Re: Re: Is the K5000s capable of complex functions?
Thursday, 05-Nov-98 17:41:49
192.28.2.16 writes:
Oh yeah--for stretched harmonics, you'd also have to stretch tune the keyboard.
The stretch in the harmonics of strings is supposed to be due to string stiffness.
Maybe that's why the K5K emulates a classical guitar better than a steel string
guitar. Also, it's more important with shorter strings than longer strings.
It is possible to do a stretch by taking, e.g., the fourth harmonic to be the
fundamental, the 9th as the second, the 14th as the third, etc. I haven't gotten
many good results yet, though, partly because you can't stretch tune the keyboard.
Also, it's too much stretch. It tends to sound like a tubular bell--which is, I
suppose, just a very stiff string.
leiter
------------------------------------------------------------------------------------------
Re: Re: Re: Re: Re: Re: Is the K5000s capable of complex functions?
Thursday, 05-Nov-98 21:43:56
209.207.189.217 writes:
I'm afraid that I don't really understand stretch tuning, but it seems to me that
it would be possible with tunable oscs. I would interested in hearing more about
it, are there any resources about this (online or otherwise)?
64 tunable oscs would be a headache in alot of ways, I think that you would
probably need a computer based helper app to assist with the programming chores.
Come to think of it the K5000 could really use such an app. I don't think that
programming the K5000 is unintuitive (it's as elegant as possible for an instrument
that can generate any periodic waveform), but it is very time consuming.
One other thing, the Casio VZ allows for using non-sine waveforms as building
blocks(5 saws each with increasing harmonic content & noise). The VZ wasn't
primarily designed to be an additive synth, but it's cool that you can do it.
jon
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------