Theo Verelst Diary Page

Latest: 29 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

January 29, 2001

Some corrections and plans, and new materials, for the moment skipping over the promised network and programming material. What am I, trying to professor my Diary? In fact it will be usefull I'm sure, but it starts to look like improved, updated and interactive versions of other pages, and the whole is up to professoring into making a complete synthesized high quality audio system based on analog and digital circuits and dsp and general software, which is good for a neat and completely laid out site, such as the built up of some of my other pages, except that currently I don't have access to means to make high q scans, pictures, or processing or even simple programming, so its a bit with bare means, but they do work.

And in fact, all together serves the purpose of making clear what I've wanted to communicate, for various parties, and that at least I think is served, also by the diary page interactive stuff, but it would be nice to streamline the whole idea set, which I'll think about a bit more.


At least I've corrected a few things in some previous pages, so they may appear a bit, though not much, different. One thing to note about the applet in Diary page 47 is that when the page is loaded, the cursor must bu put in the '256' samples field once, otherwise the applet doesn't read a correct value. Loading the original sites' page once may also help. Note that though the applet does work on at least a few systems, it was intended to maybe show knowledge enough about Java, javascript, and html extensions and forms (which isn't evident from the rest of my site, but I did produce working database interfaces with forms), which never hurts, but it is not intended to show off eloquence in the language, so its mainly to make the applet work. I do like the idea in the applet, so probably I'll take some time to make some more happen with it as I have opportunity. For instance I've tried code where the content of the field changes with a mouseclick, and I think I'd like the idea of putting the applet in a seperate (top) page.

Note that the last sequence in the same page, where a sawtooth is generates needs a (real) correction in the last term, the 8th harmonic: the weigth is 1/8, but the frequency is 3 instead of 8 (3*2*pi*t should be 8*2*pi*t). Therefore the wave looks not good when used without correction, which wasn't intended or educational.

The resulting waves of course are not perfect waves, as is clear from the spectrum, a lot more harmonics should be present that are far from small in a perfect wave. Soundwise, up to 16 harmonics works fine, as in done in the synth software. Assuming a highest frequency of the highest harmonic of 16kHz, then the next harmonic is probably above the human audio range, the base frequency would be in the middle range, roughly an octave above the c above middle a. Every key that is played lower then that one will 'lack' some harmonics, and thus sound audibly duller.

Of course, the sampling frequency limits the highest audible frequence, which 'legally' is just under half the sampling frequency, assuming good anti-aliasing filtering. Practically, limiting the spectrum makes it unneeded to filter the digital filter, because the effect of limiting the spectrum is as if a perfect low-pass filter is applied, better than any real filter. The limited spectrum for subtractive synthesis is not much of a problem except when the filter is completely opened in a traditional synths signal path. That does happen, so the solution is limited, but apart from a certain brightness, the portions of the signal were fatness and warmth are at stake are not impacted. 24 decibel pr octave means that the filter above the cutoff frequency will cut of 4 octave higher harmonics effectively to about -100dB, which is below a CD's noise level. When the filter is used to let only one harmonic in place of 16, than the 16th is already attenuated this far. Normally it will probably leave some more in place, but then still the cut-off harmonics are attenuated considerably, and will not be missed all too much, as is observed in practice on the synth. In high sweep or bright attack portions, they are.


Yesterday I was into FM and trying non-linear filter components a bit. The FM part gave me a strong sound to start with almost straight away: carrier, one modulator, same frequency, .2 or so modulation (weighed agains 1), no detune, and a strong bass note was the result, quite strong. I remember making a threefold split sound on a DX7, where 2 operators were used (with the keyboard level scaling) to make a bass note. I don't remember what I used there in the end, and I remember that the sound was usefull, though not thick, but the sound I made yesterday had a strength I normally didn't find in a dx sound, and just with 2 ops. The straight signal path and keyhandling must be important there, too, and maybe the amp and speakers, but then again, the speakers aren't even in a cabinet, and I didn't use any volume at all.

3 Detuned oscilators in 1:2:3 ratio and some others I tried, also 1:2:2, with moderate detune, which gives nice typical FM sounds: when you replace them by for instance additive synthesis one immedeately misses their 'live' and 'moving' qualities, and the only competition I can generate for their warmth is a tight analog simulation, which then wins, because of the kind of sloppyness in the bessel spectrums. Common knowledge from decades ago, still valid.

I was generating pulse waves (additively), and have just changed the filter paramers in the software to for the first and second interpolation point have the same range, so the filter had to be tested, when I found a nice analog sound effect: an almost perfect waterdrop imitation: 'ploinc'. Nice, and even with tapped delay type of reverb effect when making use of either the syncing at integer harmonics of the changing fitler cutoff frequency, or hearing the bit under optimal update rate of the cutoff frequency's staircase effect. I tought the latter (I think it is 1 in 16 audio samples, which is not that bad), but it seemed to be the first. How does a white noise pattern map to the spectrum made of only 16 partials, should their frequenc be dithered? Sort of a trick question.

Non-linearities in the filter

One of the subjects I set out to deal with some years ago is non-linear behaviour in dynamical sound generator algorithms, preferably such as the waveguide approach, see other pages.

But then again, what's my weight if I cant even do the 'normal' analog or generator thing with at least satisfactory results. Well, I built the analog parts, they worked, and I made various digital simulations, of which the latter can now (for programmers at least) be proof that I cover simulations of strong analog sounds completely in the digital domain (Delft word) enough to make it even sound right enough for my own, critical ears, so I'm credible enough about the onset, I guess.

The idea of non-linearities IS already in the because of lack of means until today discontinued waveguide software. In the traditinal analog synthesizer, the electronics are normally quite linear, except when they are intended not to be, or when they are driven into overload. The main idea is that well chosen non-linearities in the signal path produce extra harmonics, depending on the signal, that means the whole processing of the signal until the point where the non-linearity is matters for which additional harmonics are generated. Like with a guitar amplifier: the sound of the guitar, the phases of the notes in the chord, the settings of the preamp, and the master volume all have effect on the distored sound the comes from it, and in the end even the speaker characteristics.

Starting from a completely 'clean' signal makes for the best control of every intentional added distortion or effect, just like for hifi systems, the prefered method is to make every element in the sound reproduction chain as straight as possible, so the intentions on the record or CD can be heard. The idea of the analog synthesizer as described both in analog sense or digitally simulated sense evolves around the same principle: every element of the sound's parameters should preferably be known exactly, and be controlled in understandable ways to have a good programmable synth infrastructure.

Starting from here, it is interesting to introduce non-linearities in the signal path, just like the 'feed' or 'distortion' effects on a guitar, both for solo sounds (not to many notes simultaneously), and for chords, which ar distinct effects. Considering the synth currently is mainly monophonic, with 2 oscilators, solo-type of sounds are the first target, logically, but I', trained enough in hearing to try to focus on effects that will work in general, and maybe I'll use chord samples in the generator bank to see what happens.

I used a the software with the harmonics generators and simulated envelope and filter, where I added non-linear behaviour in the filter signal path. Mainly to make for 'smooth' type of distortions, otherwise a) the signal becomes to digital-fuzz-box like, which is banal, and b) the objective reason is that every hard clip generates an infinite (theoretical and practical) harmonics spectrum, which during sample playback will generate audible and quite annoying aliasing intermodulation products. Both directly, because the non-existent output filter doesn't remove the lower half of the 'reflected' (or repeated) spectrum, but maybe even more annoyingly, indirectly because of the quantization in the resampling for different notes.

So I changed the filter components in two ways: one is to somewhere in a filter internal signal, between two of the 4 filter elements, not before the first, to make sure the signal is smoothened first (keep in mind the the envelope generator can generate very fast signal changes), and not after the last, because then the resulting signal wouldn't be filtered any longer, and because then it wouldn't be part of the feedback signal path, introduce a non-linearity, controllable by a slider. Simple put, the signal is amplified differently, for instance a factor 2 or 4 above or under an adjustable threshold, where a first order function attenuates the signal.

The second method is more subtle: the same in the difference signal in one or two filter sections, simulating the capacitor charge behaviour, thus impacting the analog-equivalent time constant within a waveform.

I'm not yet lest call it satisfied, but both effects sure work. I've done a creaming enough hammond (organ) imitation with either an fm-sh sample (with the low frequency latest operator tricl I failed to mention above, I'll go into that later), or with a well chosen spectrum (easy enough with the drawbar approack), and a resonance kicking in to turn quantisation noise and near self oscilation into nice enough grunginess. Starting with such a sound, the first kind of distortion for certain keyranges, surprisingly a bit this was quite sensitive, introduces a quite good enough distortion of the tube amp and speakers in an organ. The thing is 'working'.

For this type of sound, the second effect was subtle and maybe quite good for certain notes, but not generally satisfying enough to continue in this form, it would need work or just isn't the right effect.

For wonderfull sustained analog synth sounds, that is quite different. That medium pitched 'growling' in these sort of long running mellow-sh typical strong (analog) synth sounds was achieved with this type of non-linearity enough to at least be of serious use. Switching it of made me miss the effect in a good enough synth sound with some not-common spectrum as starting point, of course relying on the detune of the oscilators. Interestingly enough, the detune effect at this point is brought in after the filter in the signal path, not before, so the 'distortion' is stricly speaking in the sample even being looped, and not brough into effect more and less (as in slow signal changes) primarily by throughs and knots introduced by more than one oscilator 'beating' patterns.

The other, more straigh 2 gain level, hard seperated bi-linear amp effect inside the filter's signal path has at least produced one or two sounds good enough in their own respect by (evidently) adding harmonics dynamically, adding a hard edge to the sound that works good. Using the feedback, and also adding extra, non-linear feedbakcs also makes for interesting effects, but not clear and satisfying enough without further thinking.

See this page for the analog parts I built (on top of the simulation, see the audio page from my home page for pictures of the circuit board of one filter for instance), with simulation results.

New York Times

A little quote from January 29, 2001:

          The Privilege of Kings Becomes That of


               The presidential power to
               pardon is enshrined in Article
          II of the Constitution. Kings had
          the ability to grant mercy to those
          convicted of crime; the framers
          wanted their leader to enjoy the
          same ability. But unlike other
          powers granted to elected officials,
          this one came with no restrictions.

          "To most lawyers, it seems very
          strange," said Jerome P. Mullins, a
          criminal lawyer in San Jose, Calif.,
          who is an expert on the pardons
          system. "It doesn't fit into the
          checks and balances concept. It
          appears to be almost an unfettered


See here, the password can be gotten for free.

As if the 'checks and balance' system is not primarily about simple, constitutional justice to begiin with. I would say there are two effects, first everyone deserves punishment for undetected crimes anyway, which I find very true for some but absolutely unacceptable in general and fo a general audience, second that the justice system doesn't always lead to justice and doesn't always judge just, which is obvious enough, and then simply should be made to work according to truth and existent rules, in my opinion.

Hi, child abuser judge, how was your day, I don't think I agree with you system...

Wanna apeal?

          "I will not give anyone special treatment," Mr. Clinton replied, "and I will
          strongly adhere to the law."

Example of a right qoute that is still sort of a misqoute.

Amplifiers forever

The amplifier I use currently is the best example of a non-trivial signal processing unit that is of such quality that by and large it will not affect the signal enough to even be in the way in absolute top quality audio reproduction. There it can be improved, and it may just not be acceptable, but when the datasheets are not lying, which is uncommon, and assuming my use of the chip does not introduce effects not predicted clear enough by these sheets and their proper application, which is also reasonably speaking good enough, though whould have to be verify for absolute certainty, the audio signal quality achievable with this amp is good.

The datasheets, some I scanned in the past, give clear indications of know quality measures:

To know what chip we're talking about, I'll include a picture of a closeup in an older test circuit (the white thing is a little clamp with wire for measurement purposes). The type number can even be read onthe chip.

This is an older version, the latest is smaller, very straight and looking neat, where the equivalent parts fit in a matchbox (when the chip is bent on its pins, and the heatsink not fitted):

To get an idea of the size of the heatsinks, see the page where this picure is also from.

The main figure often quoted for hifi equipment is the harmonics distortion, assuming that the frequency behaviour is basically straight between 20 Hz and 20 kHz, which is certainly the case, as with most better amps, which apart from intermodulation distortion is at least a good indicator of the lets say 'pureness' of the signal coming from the amps' output. For 1 kHz and 50 Watts or (rms) output power, the figure depends on impedance, and maybe on the supply, but can be 0.005 %, even over quite a power and frequency range, which is definately a good figure. Interestingly, the 'takeover' distortion is visible, (see for instance the second graph), because at a low power setting, distortion increases. The raise in distortion above a few kiloHerz is a pity, though for the highest frequencies isn't dramatic.

Now what if tis chip is applied to crank out at least 100 or 200 watts, what happens? At a hundred watts, with the 80 volts supply, and a sinusodial signal, the distortion starts to show the end of the output voltage range: 0.5 percent, which as power figure works, many will let it distort a lot more before the sound messes up audibly enough, at about 130 watts, clipping sets in to about 10% distortion, which is not good enough for anything quality like except guitars any more, except maybe fro short peaks, but that seems to be the idea for 4 ohms at 80 volts supply, extrapolating from figure 7. Now with a non-sinusoidial signal, a square wave in extreme case, we get an output power of at least about 1.5 times as much, depending on effective power permitted, about, lets see, the sine power is rougly 1/3 of the peak to peak voltage squared divided by the impedance, in this case (75/3)^2 / 4 would be 625/4 is about 150, which is a bit to optimistic, so the peak to peak voltage swing the output can handle is probably something like 23 volts with the supply I used, yielding an rms power of (72/(2*srq(2))^2/4 ohm (assuming 4 ohm speaker effective impedance, which varies) equals 162 watts. Thats a wrong guess probably, because of taking srq2, showing that the formula is sensitive to the voltage under the square. Lets take 20 volts to be safe enough under the 10 % maximum, that gives a hundred watts. Twenty volts effective means the peak to peak voltage is about 60 volts, which is 30 volts effective for a square wave, which at 10 amps maxumum current of the chip would be 300 watts for a square wave signal. Coudl explain why it at least was loud, because in that case the dissipated power by the chip it can transport to the heat sink (up to about 50 watts dissipation for longer duration, it may get quite hot, way over 120 degrees, and doesn't need carefullness, it automatically and quickly adjusts back amplification when maximum temperature is reached, even in second time frame), is manageable.

I took the extrapolation very conservative, at 0.5 % we're already at about 130 watts for 4 ohm. The slew rate at 10V/usec is quite fine, see sheet 3 on the page mentioned (copy te url by right clicking in the picture, choosing 'copy image location', and paste it in the url-bar, press return if the site doesn't respond right, all sheets are there, same url with 1,2,3,4), where the overall figures of 0.1% , 20-20kHz are as well.

Noise figures are at least up to cd range, and more, and it can be assumed that the way I built it lets it do 20Hz to 20kHz without significant resonances or roll offs, in fact it's almost built in a way that is also prescribed for high frequency SMD parts: short wires, parts connected at short distances to the chip, and heavy enough supply connections close to the chip.

Software building blocks

This figure is an example of a course software signal path representation of the synth software on page 47, minus a few changes:

it is taken from a page on bwise which is a tcl/tk based package where a user can put various types of blocks in a window, such as the analog synth signal path example above. In the software, keycv is not a voltage, and it is combined with the VCO into what could be called a dco or a fourier synthesis block, while I decided the filter would follow the voltage controlled amplifier (amp with electrical volume knob), instead of the other way around.

A graph like the one shown is interactive, check the page for url's and maybe look around where scriptics at the moment stores the tcl/tl package for free download (for jsut about any type of machine), download bwise, and try for yourself. That means the blocks can be dragged around by the mouse, and pins can be clicked on to select them to connect them up. There are various types of blocks, and they can also be active, that is in the package they can be put to work.

The synth software doesn't show a block graph, and doesn't allow for all kinds of signal paths to made, so it would be interesting, assuming I'd have a machine for it, to make a software synthesizer which links the blocks I'v made in the latest software with this type of diagram, to be able to do signal processing as in modular analog synthesizers, where any module can be connected up with any other.

What is then possible depends on the quality and capabilities of the blocks, and their strength, and wether all analog synth equivalents are available. See this page for an overview of the processor system and and an older version of the synthesis software, and even the Z80 sample player and UI code. Currently, the major ones I've got covered enough to make them seriously usefull, the generators, preferably with spectrum limitation, and maybe resampling of waveforms with higher interpolation order than 0, the filter unit is definately up to serious analog sounds (I'll make wav functionality, I know I promised), lfo's arer jsut like oscilators, the ads (not adsr) in linear form is good enough together with a VCA simulation, though probably can use at least an exponentional decay section, mixing is fine, too, so most important blocks can be made even good enough to be put to equivalent use as in a modular, as long as the CPU is up to it, and the sound programmer, too.

Using modulation should make for interesting addition, as well as using high quality (As in 44kHz 16bit stereo with time stretch ambitions) samples and their analysis, which is not doable on my current PC system. considering FM and fast filter sweeps work satisfactory, and that the signal update rate also for control signals is good, modulation should work good, and I think will enhance many sounds quite a bit. Walter carlos possible on a softsynth like the one that could result from this approach? Mainly I consider it a sound programming problem at the moment, I think the modules can be up to it with considerable work in some departments, and not so much at all in others.

Just combining Bwise with the synthesis blocks is an interesting option, basically it means putting the blocks I now use into more decent or standard C, using a general sample update sequence block, and combining the resulting program, though some kind of connection interface, with Bwise running under tcl. I've, obviously also for this purpose, prepared for interprocess socket connections, and even the aol-like connection program as a bwise block, looking at the possibilities and pitfalls of interfacing a gnu-C program with such an approach. Hoping that the windows cygwin sockets of the latest version are up to preventing a few fluch problems, or otherwise using linux, the approach has already been successfully prototyped, which even means that a distributed version of the sound rendering would directly be possible.

I've looked a bit a directX for sound reproduction, making a game program compile succesfully under cygnus, including soundlib. It should be possible to get this to work to do semi real time synthesis at least interaction wise, though I'm not sure about the delay introduced, which is probably too much for real synthesizer use, as in most other packages. An alternative would be to use the steinberg plugin architecture, which at least also works in the demo version, and is an open software architecture, they migh even like more users of it.

The main question then is wether the CPU is up to doing the synthesis job in real time, which at least for simple enough sound generators should indeed be the case, even for the quality I'm looking for. If the current 12 MHz 286 can almost do the filtering job in real time when it is not even optimized for moderate q 8 bit samples, a pentium at over 100 MHz should be up to the job at my quality standard, maybe even more than one channel. Looking at the assembly when I tried the cygwin / gnu assembler, combined with C (which worked, even with parameter passing between C functions), I looked at the pention instruction set very short, later I checked a library book on the pentium, reading up on the insane addressing modes ans memory block protection associated with it and some instructions, and recently I looked at some 286 assembly, so some assembly blocks should be doable.

In that case at least an interesting PC software package would result, good enough to stand the test of competition in important areas. And lets put it this way, if it is true that tcl/tk can indeed be compiled under cygnus completely (sort of 'halelujah' that should be in software land, my gawd, all that code, for various platforms, with so little bugs, and almost all UI and other programming minus multimedia in it available and even directly compilable, that is major value), windows programming of a complete application with UI should be quite possible with high quality results on the basis of it, for a programmer like me, that knows all the games, but not all the windows interactors and window handling stuff. Did that before, and that is work, work, work, and maybe old fashioned on 2000. And in the microsoft way maybe even obligatory in some C++ variation with a lot of stuff I don't want to know about if I have the choice of doing it in straight and effective C.

And if cygnus still runs and preferably has some bugs solved, it acts as good enough multitasking system to make this available to windows users without noticing much, which makes for interesting software combination possibilities. Linux would make that fine, too of course. Doing the UI part in tcl/tk would make that completely easy, the C code on my sites' examples usually runs without much change or any change at all under cyngus on windows, or on Linux. The mac is another story, but tcl/tk runs on it, and so does linux..

Now suppose I'd have the what is it again, $1000?, even $200 for a simpler (printer port), to have a TI evaluation board and development environment for the tms 320C6202 dsp or comparable, things can get into the real synth animal range. This thing with my current builfing blocks can run a real analog synth simulation at high quality for certain when it is up to its specs, and why wouldn't it be. The development evironment allows C development, and there is support for PC to board and back communication, the PCI version even at quite enough speed, though I'm not sure this all works bug free with a PC running windows, and all kinds of communication going on simulaneously.

Assuming a good digital to analog converter, I'm working on it, and maybe the reverse also for making sound samples, and good signal conditioning, a machine based on these things can sound very good. I've been looking at 20 and even 24 bits codec chips (samples), with built in oversampling filtering, and it takes me some thoughts to think about the proper application of these to do good sample reproduction, including matching the signal generators with the reconstruction filters' impulse response.

Alternatively, I can do sample replay with high quality for quite some channels with dedicated harware and my own (multiplying) dac and filtering as well, which is definately interesting, and could do multi-rate sampling for improved sample detuning as well. I'd need more test equipment to get into analog / digital hybrid systems, for sampling, compression and automated mixer with low latency type of processing.

Anyhow, a dsp or fast processor using the knowledge and current synth blocks is up to strong sounds, and can do so autonomously, that is just a case around it, a keyboard attached, no disk, no PC, just an instrument. I've been thinking about (industrial) motherboards running (maybe standalone) linux, in a 19 inch rack case, augmented with a portable TV with tft display as a display unit, or maybe a (infrared linked ?) pda for the same.

Gold plated connectors realm, verelst? Nope, this is serious thoughts, and completely practical and usefull. Gold plated connecters have their use too, I'm aware of it that they don't rust, but it is sort of to discern wether I'm capable of doing the whole machine instead of bla bla-ing in semi audiophyle talk. Or conversely do freaky gadget developments without making it into a profi enough machine to be usefull.

Not the synth database

Do pictures speak louder than words? I saw the previous picture, and was reminded it was amoung other things for educational purposes, and quite organized and neat, in spite of its superficially messy appearance:

This, too, is a bwise application, based on tcl/tk.

For many it is clear this ran on a Mac (a g3 to be precise), and as I've made clear before, the interesting part is that exactly the same tcl/tk program runs on for instance a windows PC, or a Linux PC. I've tested both (though the latter with an older database version), and even on a Unix workstation (didn't have one for quite some years).

Now what is it? It is the same Bwise main window, where images are presented as and on top of blocks (bwise is short for block-wise, such as the recent bbc term 'rehearse wise' I saw). the pictures are from a database of art digitisations, and were put in place automatically after retrieving a number of them fromt he database by some criterion, we'll look at that. The right lower window shows one entry from the database in the standard database window, with all fields of the entry listed, the name of the field on the left side, its content (of any) on the right side. The Next and Previous buttons navigate through the database fields in the order they are stored in. Every entry can have different fields, though often a fixed field layout is handy. The fields' information can be input by simply putting the cursor in one of the edit boxes and typing. As soon as the information is typed, it is stored, and remembered when the database 'save' button is pressed, in the slim rectangular windo on the left, in a file indicated by the name on the left of the load button. The file is a tcl list that can be read into a wordprocessor or sourced into another tcl program easily.

In that little window a 'create new entry' button copies the field layout from the current database window to the end of the database with empty fields, to add to the database. I've done a version where the arrow keys and other easy key combinations can be used to navigate and add new fields, taking into consideration that the field with the same name as the previous is automatically highlighted in the next data window, for quick and key efficient database update and maintenance, and that the tab and shift tab can be used to go over the various fields without needing the mouse.

Searching the database is easy: type a search string in the lower right search field and press return to search for the next page where a datafield matches the pattern. A pattern can contain *'s and ?'s to indicate 0 or more of any character, or one random character, and searching is fast, 10.000 data pages is no problem on a pc or mac with some clockrate, under a second easily, normally. By also typing a desired field match pattern, searching is restricted to the indicated fields. The example in the picture searches for any content of more than one character in the Image fields, note that the caption on the left is accidently reversed. Any field starting with Im is scanned for at least one charecter, followed by any number more, for the purpose of finding non-empty image fields.

Maybe I'll make the latest package available in general, the latest bwise, downloadable from my pages, already has this database I think, it is not too much source code. With image extension, it displays an image (for some tcl/tk's only in gif or ppm format), if a field named Image contains a file name. The way it is shown automatically goes over all the database entries with an image, and will show the next one everytime return is pressed with the cursor still in the search field.

The little window left to it contains the whole list of results of a query (a search command), all on row, it was the basis for the pictures in the bwise windows, which were taken from those database entries and automatically put on a row. The search command can be types in a little command window in the bwise window, too, press the paper icon to get one, and type

dbsearch  [fields]
to get a list of all entries containing the pattern. This works the same from the tcl text window. The fun part starts, as some may anticipate, when the database is seen as a bwise block, which I've tried. Input pins: pattern, field, trigger, file (maybe); output fields: entries, indexes. The latter would be just a list of numbers into the database from the matching entries. A edit field in the canvas can then for instance first be processed, fed to a database search, and the output can for instance be turned into a web page. And all that without cgi's, in quite reliable form, and at a significant server speed, assuming the database fits in core. 10.000 entries like the on on the picture worked. Even 30.000 on a 128 Meg G3, though that requires some care. Thats enough for medium sized web applications.

The network (yellow boxes) visible in the bwise window (this thing is jpeg coded, so the colours are a bit smeared) is an automatically generated square of blocks (which can do whatever), fed with a simple pattern, and sinked by a 'mon' block (started with 'newmon' in the global tcl text window partly visible in the bottom left), showing the result of the signals coming through this network in a short table, which could contain database information or fields after a search.

The idea here is that the window with the list of fields from a certain database lookup has entries that can be clicked by the mouse, which will highlight or put on top the corresponding image on the canvas, and vice versa. So the images can be clicked for instance to make a database window appear for them. Also this functionality is easy enough to pgogram as a list based script, and could (I didn't) be made by using a sequence of connected blocks.

To make tcl procedures or functions (a bit of programming language text with a name), the upper right window can be used, which is handy. I found out that after scriptics, the makers of the free tcl/tk package, after being sponsored or taken over by a web authoring company found it in themselves to even make the development version, tclpro, available for free, which contains most probably a more elaborate version of the same. This window however, is written in pure tcl, and shows all available functions as they are loaded in a list in the top part, filtering out tcls' own functions by checking a file which can be modyfied to make it show the desired functions alone. One function can be selected by simply double clicking in the top part (scrolling works by holding the mouse button down and while moving above the top or under the bottom of the list sub window), which then appears in the bottom window as source code in legal tcl format, that is the whole code in the bottom window could be pasted in the main tcl text window, or a program, and it would be accepted as a new function.

Normal editing is possible, and to make sure the changes are effectuated in tcl, press the 'Update Proc' button. The window can be invoked by typing

source procshtp2.tcl
on the tcl prompt after starting up tcl in the directory where the file procshtp2.tcl resides. A new function can be made by using the tcl text window and simply typing proc new_function_name, after which it can be given content by updating the function list by 'refresh list', and scrolling to the new function name, and double clicking it. Be sure to update the latest one before doing this, or the older versio is preserved and the edits lost.

The leftmost bottom entry on the function window is for incremental saves. Put a file name in it, press save, and all the functions that have been changed since starting the procs_window up are put in a source-ble tcl file. Handy to see what the work today has been. Merging of proc files is just like with tcl files, to get the latest version of everything, it could be enough to:

foreach i [lsort -incr -dict [glob proc*.tcl]] {
   source $i
Which would scan all tcl files starting with proc in the directory, latest last (I think), and read them in. Fraction of a second work, and all procedures should be in place. All changes to the set of active procedures made in other ways (even by bwise networks generating procedures, which is quite easy) can be seen by double clicking a function name, since the window simply interfaces over the normal procedure update methods.

Try things yourself

I decided to put at least my latest library of tcl routines in the public domain, what the hell, who steals it is responsible, I of course hold the copyright. I made the briefcase dir public, hope it works. I'll have a look (without having tcl) at the files to indicate their use. The two major library files should be enough, just load them, and type some of the bootstrap function names, such a 'bwise' or 'startdb' or so when needed. I'll look at all this, it's powerfull stuff. I just saw that the big library can be sourced into tcl just like that, but it starts an application that you might want to edit out from the very end of the file, hgeditinit and htmlwindow, because they are meant to be used with greek and hebrew font images available in the path indicated in the routines, which you may want to do by bulk ftp-ing from my websites Font directory (I don't remember the url, check a hebrew or greek page to find out), having internet ready, and prepare for interactive looking up of greek words from the Perseus lexicon, and automatically generating a web page with the results and you own comments..

Advanced server and content manipulation stuff, definately fun and usefull, but I haven't been able to use it for a while, and it may be that tufts changed some of the table and form inputs. It did work: use alternate character or the buttons to enter greek, put the word ot look up on top, press f1 or so, and the main meanings from the perseus server are automatically pasted in after the word. Text can be added, or corrected, even hebrew can be typed (from right to left, with shift alternate or so, or the buttons), and more greek can be looked up.

The idea was, and that worked, too, that the resulting page in the edit window

(this is an older version of it, it looks the same) can be seen in a browser by using the integrated web server, at an adress something like

which would make it possible to either present or print the page (including greek and hebrew in reasonable font, and later on I even included official fonts, I'm not sure that's in the lib, anyhow, the pictures work even on older netscapes) share ideas over the web, and even make sessions, because anyone connecting to a certain server page would get their own page, and the one running the server sees a an edit window pop up for every distict user, where edits can be made. The principle was for a server containing the OT hebrew and greek, where pages per bible verse could be drawn from, with editable fields per greek or hebrew word. The whole verse would then be seen in an editwindow, and every change every users makes in the fields giving the word translations would be visible on the server side as soon as a user updates the form. Fun enough for multiuser and transatlantic translation discussions.

Anyhow, the perseus is still there, and it has the new testament greel on it itself, but definately is would still be handy to generate a good verse table with the main meanings automatically generated in it, so I would still use it, and a server with the hebrew verses would make is possible to make them available with feedback, and just as input means for a new translation, and for text analysis with a browser interface. The Davidson lexicon, or another than strongs on line would be good, too.

The editwindows' latest version, which might be in the lib, simply requires on to type greek font word, press a button, and get the main meanings, by doing various processing, it gets a web page from the server by forming a url and getting the page, the source is shown in a window on the screen, then it searches for certain portions of the page, to lok up th elink to the actual word in the database, then that page is drawn, which is then searched for italic sections in the main lexicon body, which are put on a row, seperated by comma's, and pasted in the edit window. Pretty slick. Some fonttranslations are handy enough general routines, they can be found in the lib.

Btw, I did link up the tcl server with bwise, and a tcl-cgi equivalent is quite possible, so indeed I've made page structures with the bwise window as a guide for dynamic content pages, even with the canvas showing the actions when a page is requested. Quite fun. Then I got kicked of the system. One cannot make peacefull, fun, and non-insulting intelligent things ?