Theo Verelst Diary Page

Latest: 25 january 2001

I've decided after good example to write some diary pages with toughts and events.

Oh, in case anybody fails to understand, I'd like to remind them that these pages are copyrighted, and that everything found here may not be redistributed in any other way then over this direct link without my prior consent. That includes family, christianity, and other cheats. The simple reason is that it may well be that some people have been ill informed because they've spread illegal 'copies' of my materials even with modifications. Apart from my moral judgement, that is illegal, and will be treated as such by me. Make as many references to these pages as you like, make hardcopies, but only of the whole page, including the html-references, and without changing a iota or tittel...

And if not? I won't hesitate to use legal means to correct wrong that may be done otherwise. And I am serious. I usually am. I'm not sure I could get 'attempt to grave emotional assault' out of it, but infrigement on copyright rules is serious enough. And Jesus called upon us to respect the authorities of state, so christians would of course never do such a thing. Lying, imagine that.
 

Previous Diary Entries
 

Januari 25, 2001

FM synthesis

Basically I've been reading this myself, and its quite some info on frequency modulation. This site on fm synthesis has quite some data on frequency modulation, a nice example is this animated gif of the changing harmonics with increasing modulation index. Notice the harmonics increase in general for higher modulation index, but that individual harmonics have dips and peaks for various amounts of one fm modulator driving the other.

A complex sound synthesis, fm synthesis, hard to program, certainly a lot harder then adding harmonics and using filters. The spectrum of two oscilators modulating one another is like in the picture, with oscilators, things get quite more complicated, for instance making only a certain specific spectrum is neard enough, if possible, but then taking beatings into account by detuning the oscilators the whole idea becomes very hard, and then all oscilators have an output amplitude varying with time.

Maybe I'll try some fm operators, the sounds are interesting to use with the filter, too, but I remember that 6 is quite needed, most 4 operator fm sounds are not up to my livelyness standards.

I remembered I forgot one of my synths in the lineup a few pages ago, the Yamaha TG500, a sort of sample replay module, with quite good quality sounds, including drum sets, 2 effect units built in, and 64 note polyphony. I can't find a good picture. Its funny to see that Yamaha themselves, too, make their fm sounds sort of heard in this type of instrument, theire even called fm-ish names, and like always, they ring a bell but are not realy near th ereal thing, basically because, eh well, again the same: a sample is just a sample, it repeats every time, and therefore is fateguing from the second time onward, minus effects and modulation.

The tg500 has filters too, alledgedly 4 pole (like on analog synths), but in fact, oops. They don't fail completely, but no juiciness much, no analog feel much no strong resonance, no fatness much, useless as direct analog simulations. But of course they change and add to the sound, which is pretty good. I remember there was a wersi or so (probably it was another brand of electronic organs, I try to remember) instrument that did 8 operator fm, like a super dx-7 at the time the dx7 was popular. I wonder how they got away with that, I know that for instance Casio got away from patent infringements (chowning, Stanford, Yamaha donno who held which patents, but surely there was not much competition trying their legal department, and certainly not their r&d, too, in fact), by using 'phase modulation' (PM) for instance on the cz101 at the time.

That sort of worked, mathematically, a integration step away from fm synthesis. I had the nerve at a former professional (not expensive) music store in the Hague that saw quite some of ('my') cash flow to suggest and actually state that I considered not going for a DX7 (I didn't have the money yet) and instead go for the similar (in certain theoretical ways) PD Casio synth. I was an electrical engineering student. I did read scores fast. I already had a synthesizer and a drumcomputer, and generally knew my stuff. I got away with it.

Gaussian elimination or sweeping, why?

Another band suggestion? No, this is mathematics, linear algebra. The reason I could do the network equations inversions long ago to compute the properties of audio equalizer filters!

Can this be made popular? Yes, I think, by just understanding that systems of equations are important in many, even everyday problems, and that gaussian elimination gives us a recipe to solve any set of equations where the number of variables, or unknowns, is equal to the number of equations, unless there is no solution, or there happens to be a (not too likely) need to condition the problem a bit better by shuffling equations around before the recipe is used.

Example. Lets say we have to equations about for instance The current through two lamps, based on the voltage, lets say

   i1 = r1 x U1
   i2 = r2 x U2
And the network equations which make clear what happens when we connect these two lamps in series with a voltage source of 5 Volt exactly:
   U1 + U2 = 5
Most will be able to follow with some highschool knowledge that we can use these equations together to arrive at a solution to the equations, by for instance filling in one in the other. In this case that wouldn't work yet, simply because we don't know everything about the network yet. Supposing we connect the lights in series, Kirchoff law simply states the obvious, the incoming current is equal to the outgoing current at each point in the circuit network, so we have:
   i1 = i2

Now we can in fact solve this problem, but it would be more interesting to solve it in a general way, that would also work for other problems like it, and therefore we'l rewrite these equations into a regular array, and look at the solution for such sets of regularly defined equations, with the rudimentaries of matrix compuations.

Next page

What's up, doc ?

I browsed over to the Clavia site, synthesizer builders from sweden, that built the recent enough, popular 'North Lead' analog sounding synthesizers (digitally simulated sounds), the red little beasts it may have shown up on clips or so.

I've tried them (at least one or two models) shortly, and they're worth having, even, analog warmth enough, strength enough, variation enough, more than enough punchiness, pleasant enough knob control of the sounds, and understandable. I had a plan when I walked in a music store some time ago, to walk to the machine, get headphones or amp, play nothing, program a certain type of obvious anough sound, a synth type of brass sound, and do so completely from carte blanche, that is by only looking at the knobs, not trying a key until the sounds should be finished. Saw tooths, octave, moderate detune, bit of attack, slow and reasonable decay, touch of sustain, filter attack playing arounf the vca attack and decay, assume cutoff and key-follow act as expected, that sort of thing. After a few minutes: my first notes on the instrument. It worked! Major fun, except they were headphones, they suck, normally, maybe with a good reverb.

Anyhow, I looked at their website again, being iterested for some time of course already (I do know some flaws in their previous model, and haven't figured out where I should position its type of sound yet). It did not sound like my current synth/software does, maybe t could quite a bit, maybe not, that's interesting enough by itself.

Now what about their site? They have a new idea on a planned model, for instance: individual keyclick patterns for every key, (check it out) to make an instrument modeling vintage instruments like organs with, well, well, luckily my files have (stored) date- stamps on them. Just kiddin'. Appearently not such an alien idea verelst, wonder about the other question, about the responsiveness of the keyboard (that is the interaction speed in the audio cycling delay time range), and the fractioned behaviour of the key contacts on multi gathering bus rail drawbar instruments such as hammonds. At least they're making money, I guess.

Check the page on the instument, I'll copy (hopefully with permission, maybe I'm advertising?) this picture:

Those bars with big 5MM round leds, one of them was on my own keyboard, 20 years ago. Ha, that in that time was still hip enough for me, and usfull in fact, but already the radio shack chip I used had worn down in terms of great desirablity, mainly because I wanted more leds, and peak hold...

I could make that myself, but I guess the challenge devided by the number of parts was not up to some other projects. A bar like that, like a record VU meter on a cassette deck (do mpeg coders have them?) is a measurement device with high speed, and mine was sort of completely up to audio speed, and I kept it that way, it makes it jumpy and vaguer, but at least it didn't respond just as slow as an analog meter. Later on I made overall peak holds (I never liked averaging VU's), but the bars had their purpose. I had a big rotary knob, completely unfashionable, like anchient machine in my opinion at that time, to select what the bar would indicate, and for instance envelope generator voltage or lfo voltage were also options, or the signal sensor on the synth's mixing rail. That was good effect, didn't see that much the vca input voltage with tremolo showing visually, with quick response.

Did I say I could make that myself? Yep. No prob, I knew my digital circuits, and peak hold I also figured out good enough, in fact later on I did it nearly perfect. It is a rectifier circuit, followed by a peak hold circuit, which can be made with some diodes, resistors and capacitors. Then a second bar generator, bases on a similar chip, and logical 'or' the outputs together (or circuits come 4 per chip for $.5 a piece, and then a logic level converter would be a transitor per led plus some resistors, I knew that stuff), or add them, or use two color leds, they were available. They were expensive, though, and definately fashionable. I guess the main point was that I didn't like a whole-logic-circuit-per-led, I was into a whole 2 octaves for two keys for organ oscilators per cheap and easy chip, that was sort of satisfying in using the little black boxes.

A whole video circuit, that was at that point in time worth the hundreds of wires, that was a challenge (black and white, but I did make my own drawing and maze game, completely in hardware).

I also had a TI chip for synthesizer sounds at the time, it did nice tones and noises such as wishles and steam engines, gun shots, that sort of stuff. I was unsatisfied that such a chip (with its 24 pins and all) did not have the accuracy or strength to do sound synthesis in the musical range with good filter and such, I had hoped it would. It went half dead doing a stereo steam loc imitation on my stereo, and some wires shortcircuited.

Excellent Java?

Well it's got me doing interesting graphs I quite familiar with, and on a web browser, which is quite neat. The applet I'l put on this page uses Java 1.1, I didn't make it, it's from 'dsptutor' affiliated with 'online university', I didn't frequent their pages often, though I do get their emails regularly, there seem to be good pages on digital filtering principles, though I didn't read them yet.

Basically its a javascript driving a general purpose Java applet in the same webpage, which is decent and general application practice, I like that. General applet, no fuzz, serious stuff, no wishtles, general 'data' interface.

Lets see if this can be applied on this page itself, then I'll prepare some graphs from my software, that makes good example.

You need a Java-enabled browser to view the applet.

Number of samples:
Sampling rate: samples / s
Signal waveform expression:

I've not gone over the code enough to change a little annoyance: first put the cursor (with the mouse) at least once in the 'samples' (256) field before clicking 'plot signal', then the sine wave should appear in the upper window. Then click 'plot spectrum' to get one spectral component in the lower spectrum window. Adding more components puts more spectral components in, for instance by adding more sine waves. Two examples for are:

A square waves' first 8 harmonics:
sin(2*pi*t)+(1/3)*sin(3*2*pi*t)+(1/5)*sin(5*2*pi*t)+(1/7)*sin(7*2*pi*t)

A sawtooth's first 8 harmonics:
sin(2*pi*t)+(1/2)*sin(2*2*pi*t)+(1/3)*sin(3*2*pi*t)+(1/4)*sin(4*2*pi*t)+(1/5)*sin(5*2*pi*t)+(1/6)*sin(6*2*pi*t)+(1/7)*sin(7*2*pi*t)+(1/8)*sin(3*2*pi*t)

Cut-and-paste these sequences of sine waves into the 'expression' entry, press plot graph and plot spectrum to get an idea of additive synthesis of waveforms.

There are more expressions possible (in fact all javascript math expressions Math.*), and a few functions are available, such as 'saw(2*pi*t)'. I've experimented with FM waves, such as sin(2*pi*t*(1.0+0.3*sin(2*pi*t)), and at least the expression is parsed correctly, and the graphs can be viewed, except I'm not sure about the definition of the modulation index, such that the plots inthe graph above can be made with this application, to after good scientific habit check wether all adds up.