Why Call it Mungenetengine?


The Story Behind the Name

munging is a term describing processing things. Converting stuff. Or as the Munge Brothers said, turning data into information. Hey, and we said this wayyy before Uncle Bill started talking about Information at your Fingertips (now where has that gone?)

So, after the breakup of the Munge Brothers, I named my web site in honour of that time in my working career. There are a scant few times in your work-life where you mix and connect with a bunch of collegues and do some really cool stuff.

Anyway, the mungenetengine is just the latest incarnation of using the munge term and applying to something completely different. To make the URL shorter, I have renamed the mungenetengine into mne.

For further information on the Munge Brothers, please do not consult your local library:
Who are the Munge Brothers?

Why Did I Write My Own Content Management System?


Why Write Your Own?

A Content Management System, in my definition anyway, is a piece of software that takes all the content: text, images, links etc and manages them. It also understands the relationship between items. It also has enough intelligence to be able to present the content to the end user.

Previously on mungenet I have used Userland Frontier – and specifically a piece of code I wrote myself for Fairfax@Atlanta. The main lesson I learnt from writing this was that “structure defines navigation” and that “structure should be described in the database”. Therefore, its easy to add to the structure of the site – and the navigation will follow. The central premise of this is that the relationship between items is key to the rendering of the navigational pieces on the site.

After moving away from my home grown Fairfax@Atlanta system, I transitioned to a combination of GoLive for the bulk of the content and a variety of systems for the “blogging” first page.

Initially, I used Blogger for easily adding notes on a daily basis. Followed by Radio Userland – a free piece of software based on Frontier. For about 2 months in late 2001 I used a combination of PHP and MySQL as my first foray into PHP coding.

The mungenetengine as you see it today is a full PHP and MySQL based content management system that also contains and serves binary elements (PDF, images, SWF) as well as the HTML snippets. It renders the navigation from the relationship hierachy in the system from templates, as well as permitting arbitary pieces of code to run server side.

The most recent additions to the server-side code is the ability to switch content snippets and templates based on the client’s browser environment. There are alternate templates for Netscape 4.7 and earlier.

Once the data is stored in a database, it becomes extremly easy to bolt on features that permit easier creation and editing of content. In May 2002, a SOAP interface was added for a VB client application. In July 2002 a RSS XML feed was added.

There are many, many other systems that manage content for web sites. Each has their own strengths and weaknesses. As I consider cutting code a hobby rather than a profession, its really cool to have something you have written working in production on a daily basis.

Warping Text using Illustrator 10’s Warping Tools

NOTE: Technique for the latest version of Illustrator CS3 

Adobe Illustrator 10 has a collection of new Warping tools. These tools do not directly work with text. At first, this looks like a serious ommission. But hark! There is a little technique that will serve us well.

Firstly, let’s assume you have created some text in your Illustrator document.

[1000] 01 initial text

Create a rectangle that bounds the text exactly. This rectangle will not be visible: its used for the Envelope tool…

[1001] 02 rectangle

Select both the new rectangle and the text frame underneath. Go to Object>Envelope Distort>Make with Top Object.

This will take the underlying text and ‘distort’ it into the shape of a rectangle. The text probably hasn’t changed that much. But the beauty of Illustrator 10 is that we can now Warp the envelope shape.

[1002] 03 warp

Voila! we can now warp text!

To edit the text, you can select this object and go to Object>Envelope Distort>Edit Contents. Here you can edit the text rather than the envelope shape itself.

In this simple example, we are changing the shape of the envelope that the text is being stretched into.

Now, this alone is interesting and worthwhile. But there is another “thing” we can do…

By simply adding a Warp Envelope to our text object by going to Object>Envelope Distort>Make with Warp

[1003] 04 envelope with warp

We can change the shape the text is ‘enveloped’ into. These warp styles closely reflect the style in Photoshop 6.0. However, what is different is that there is an underlying shape that we can manipulate the effect the shape the text is warped into.

[1004] 05 warp envelope warp

Apart from using the ‘white arrow’ (direct select tool) to change the envelope, or we can use the Warping tools to change the shape.

Sweet.

InDesign 2.0: Hidden Baseline Grids


Exposing a Hidden Feature of InDesign 2.0

Does this describe you: Type is your thing. Ensuring that the baselines are consistent is causing a relationship breakdown between you and your partner, dog or manager. You wake up in a cold sweat thinking about bad hyphenation decisions you made during the day.

If so, its time to look at this little hidden feature of InDesign 2.0. It’s not as frivilous as zooming, zapping aliens – but it may change your life. At least a little.

Here’s the problem: you have two flows of text on a page; one master column contains the body copy; and there is also a second column that contains a pull quote, or margin notes that refer to the main body text.

To typeset the text to ensure readability, the appropriate process is to align the baseline of the first lines of each paragraph, with the main body paragraph flowing on the document-wide baseline; and the margin note starting on the same baseline, but the leading flowing appropriate to its smaller type size.

Setting this type manually is a chore. You have to exactly align the baselines of the two text frames. If the text reflows, or the margin quote needs to move – there is many minutes (to hours) of rework to realign your text.

InDesign 2.0 has what Tim Cole (Adobe’s InDesign Evangelist) calls a double-secret feature. Its a little hidden, but worth the effort to uncover to solve this problem and hopefully save the relationship with your pet.

Firstly, we need to ensure that the document has a baseline grid set. To do this, go to Edit>Preferences>Grids. The grouped area “Baseline Grid” contains the settings. Start is the starting position from the top of the document, Increment Every is the baseline setting.

[993] 01 preference

Set the baseline to the appropriate baseline grid for your document.

[994] 02 starting paragraph

[995] 03 align master paragraph

And assign to a paragraph by using the Type>Paragraph palette. The “Align to Baseline Grid” button is in palette as shown.

I have also turned on View>Show Baseline Grid to see where the baselines are… it helps visualise what is going on in our document.

The second paragraph in this instance lies to the right of the body paragraph. Its Character settings are completely different: different point size, leading.

[996] 04 second aligned

If you have not created a custom keyboard shortcut set, Click on the “New Set” button.

Now it is time to sneak up on the double secret feature. It is hidden in the Edit>Keyboard Shortcuts, specifically in the Text and Tables section. Scroll down until you see “Only Align First line to Grid” You will see that there is no keyboard shortcut assigned to this option.

We also need to assign a keyboard shortcut to this option. Click in the New Shortcut area, and type a new Shortcut. Press the keys for your new keyboard shortcut. If the key sequence is currently being used for another command, InDesign displays that command under Current Shortcuts.

The context here is important. The context ensures that the shortcut performs the way you intended. For example, you can assign Ctrl+G to group two cells together (Table context) and Ctrl+G to insert special characters (Text context).

[997] 03a keyboard settings

To enable this feature, assign it to a keyboard shortcut.

Now, back in our original document, we have a right hand “hanging” paragraph. The first step is to set it to the document’s baseline grid. Of course, all of the lines are now aligned to the document’s baseline. We’re one step on the way.

[996] 04 second aligned

Now we use the keyboard shortcut. In my keyboard set, they were assigned using the “Default” context. This means I have to select the text frame using the black arrow (Selection Tool) and type the new shortcut. Voila!

[998] 05 new feature turned on

Please note as I move the right hand paragraph down the page, the baseline for the first line stays aligned to the baseline grid whilst the following lines follow the leading for the paragraph.

[999] 06 moved paragraphs

Note that the you doesn’t have to use the keyboard shortcut on each paragraph. Though there is no UI in the palettes for this feature, it can be saved/captured as part of a paragraph style…the create and redefine functions both ‘see’ this attribute on a paragraph level.

[1006] 07 saved in para styles

The Edit>Keyboard Shortcuts is worth serious investigation. Next time you wake in a cold sweat, just jump onto your InDesign and have a look. Hopefully it will not send you back to sleep…

Thanks to: Tim Cole, Sandee Cohen.

PDF Forms and Javascript

Acrobat: Forms and Javascript

Don’t want to write CGI? Try this: Adobe Acrobat Reader and Forms Data without Custom CGI

Part 1: Insert into a database.

This note is largely based on the demonstration of Acrobat 5.0 Forms and Javascript I gave at the April 2001 Adobe PDF Days in India and South Asia.

The example Acrobat Forms Zipped FilesPDF and JavaScripts have been zipped here.

Creating the PDF

The first step is to create the base form. Here, the simple form is created in Microsoft Word 2000. Using the PDFMaker, covert the document into a PDF.

Adding the Form Fields

Adding the form fields is a matter of using the Form tool ( i[854] images/forms_tool.gif) to create four fields in the areas as indicated by the original Word areas.

Select form tool and drag out the form field filling to the area required.

You can copy and paste or ight click to copy, right click to paste to duplicate fields.

Double click on the field to edit the Field Properties. The scripts below nominate specific fields

[855] images/01_formfield.gif

Adding a Button

To create a button, use the same field tool as above and create it in the area required. Change the type to Button from the Type: popup menu.

[856] images/02_buttonfield.gif

In the Actions tab, select the Mouseup ‘when this happens…’ and click on the Add button. From the Type: popup, select ‘Javascript’

[857] images/03_javascript.gif

By clicking on the “Edit…” button you can insert the code into the Javascript section. This Javascript is executed when the ‘mouse goes up in the button’ – or in other words, when the mouse is clicked.

The Javascripts

// declare and fill local variables
var lAppName = this.getField("app.name").value;
var lAppAge = this.getField("app.age").value;
var lAppSkills = this.getField("app.skills").value;
var lAppYears = this.getField("app.years").value;

// save to ODBC database on local machine.
// this is named in Control Panels>Administrative Tools>Data Sources
var con = ADBC.newConnection("jobs");
var statement = con.newStatement();

//
var query = "INSERT INTO jobs ( name, age, skills, years) values ('" + lAppName + "','" + lAppAge + "','" + lAppSkills + "','" + lAppYears + "');";

// execute SQL statement on database
statement.execute(query);

Code example 1: Simple ODBC Insertion from a PDF form.

PlanetPDF on ADBC in Adobe PDF Forms

NB: Before this script will work, there needs to be an ODBC database source on your machine mapped to a database containing the table: ‘jobs’. This table will need at least 4 columns defined: ‘name’, ‘age’, ‘skills’ and ‘years’ I use Microsoft Access as my development database. Using Control Panels>Administrative Tools>Data Sources (ODBC) control panel, I have created an ODBC connection to the jobs.mdb file (Microsoft Access). This can be any ODBC datasouce.

[858] images/04_odbc.gif

var lAppName = this.getField("app.name").value;
var lAppAge = this.getField("app.age").value;
var lAppSkills = this.getField("app.skills").value;
var lAppYears = this.getField("app.years").value;

var lWeb = this.getField("web").value;

if (lWeb == "Yes") // we are submitting via a web server
{
var fieldsToSubmit = new Array("app.name","app.age","app.skills","app.years");
// change the http: URL to appropriate server name and/or address
this.submitForm("http://127.0.0.1/jobs.asp#FDF",true,false,fieldsToSubmit);
}
else
{
var con = ADBC.newConnection("jobs");
var statement = con.newStatement();
var query = "INSERT INTO jobs ( name, age, skills, years) values ('" + lAppName + "','" + lAppAge + "','" + lAppSkills + "','" + lAppYears + "');";
statement.execute(query);
}

Code example 2: Extending the example above, showing web submission alternative. The ASP referenced is in code example 3 below.

NB: This Javascript required the ASP in the next code example installed onto the server. The code above points to a server at “http://127.0.0.1/jobs.asp” This IP address is also known as the loopback address — its the same machine as the form is currently running on. Of course with real installations, this would point to a fully qualified domain name where the server-side script is residing. When sensitive information is involved, it is recommended to use a secure socket connection such as https://…

The Active Server Page (ASP)


<%Response.ContentType = "application/vnd.fdf"%>

<%

Set FdfAcx = Server.CreateObject("FdfApp.FdfApp")

Set FDF = FdfAcx.FDFCreate

Set FDFin = FdfAcx.FDFOpenFromBuf (Request.BinaryRead(Request.TotalBytes))

lName = FDFin.FDFGetValue("app.name")

lAge=FDFin.FDFGetValue("app.age")

lYears=FDFin.FDFGetValue("app.years")

lSkills=FDFin.FDFGetValue("app.skills")

set jobsConnection = Server.CreateObject("ADODB.Connection")

jobsConnection.Mode = adModeReadWrite

jobsConnection.Open "jobs"

set jobsRecordSet = Server.CreateObject("ADODB.RecordSet")

jobsRecordSet.LockType = 3

jobsRecordSet.Open "jobs",jobsConnection

jobsRecordSet.AddNew

jobsRecordSet.Fields("name") = lName

jobsRecordSet.Fields("age") = lAge

jobsRecordSet.Fields("years") = lYears

jobsRecordSet.Fields("skills") = lSkills

jobsRecordSet.Update

jobsRecordSet.Close

Response.BinaryWrite FDF.FDFSaveToBuf

FDF.FDFClose

%>

Code example 3: Active Server Page (ASP) using VBScript inserting the fields the form submits in code example 2.

NB: this code example requires an ODBC connection defined named ‘jobs’ This points to a database that contains the table ‘jobs’ with fields ‘name’, ‘age’, ‘years’, ‘skills’

Also installed is the Adobe FDFTK – Forms Data Format ToolKit. The Windows installer is available here.

For More Information

The best resouces for PDF and developer related information is PlanetPDF. More specifically, there is an Indepth Guide here. A fundamental requirement on the server-side is the Adobe FDF Toolkit

Adobe Systems’ information on the Forms feature of Acrobat is here.

Faster Editing with Premiere

Faster Editing with your Eyes Shut

Eyes Wide Shut, Stanley Kubrick’s is famous for many reasons: Tom and Nicole’s final film together; Stanley Kubrick’s swan song; and a film renoun for taking nearly eighteen months to film, let alone the time complete many edits.

As you create a video program, the number of source clips and settings you edit and manage become more complex. This can get in the way of your creative flow, so here are some tips and techniques to simplify a complex project and edit efficiently. We don’t all have years to edit our masterpieces, nor wish to expire before delivering the product.

Allocating sufficient RAM

Premiere plays and exports video most efficiently when up to approximately 64 MB of RAM (Windows) or 48 MB (Mac OS) is available to it. You can make more RAM available to Premiere, but above the recommended amounts the performance gains are not as significant. Make sure you aren’t running unnecessary programs, such as custom screen savers, that may be using memory that could be used more productively by Premiere. In Mac OS, leave at least 2 MB of unused RAM so that the system software has room to load additional Mac OS system components such as QuickTime.

Choosing between RAM (physical memory), Hard drive (disk space) or CPU (megahertz or gigahertz; number of CPUs) and Operating System (Windows, Mac) is always a difficult choice.

– Choose an operating system based on your personal taste and depending on who can support you. If you have friends and collegues who can support MacOS, personally, I would choose a Mac. Its these friends who will help out at the cost of a coffee or nice bottle of red

– If using Windows 95 or 98, based on your hardware capture cards and drivers, seriously consider Windows 2000

– If your RAM meets requirements, invest in a second faster hard drive

– If you are using many filters or effects, extra CPU performance and/or a dual processor would be a good investment

– Realtime cards are a boon when editing day in, day out.

Using low-resolution clips or offline files

Large frame sizes take longer to process than small frame sizes. When you edit you are viewing frames nearly all the time, so slow frame display can cause longer editing sessions. For better performance during editing, use low-resolution versions of your clips, or use offline files. Then capture the same clips later using high-resolution settings, and replace the low-resolution versions for recording or exporting the final version of the program.

This process is only effective when you are capturing with device control. Device control captures the timecode on the tape, which enables you to replace frames precisely. Only DV and analog with 3rd party device controllers have this facility.

If you’ve already captured the clips at high resolution, you can use Premiere to export low-resolution versions of them for editing and then substitute the high-resolution clips before recording or exporting the final version. You can also temporarily substitute a still image for a video clip. Using low-resolution or still versions of clips also lets you store more clips in the same amount of disk space.

Using low-resolution versions of clips is standard practice in offline editing, but you may prefer the speed benefits of using offline files even when your system is fast enough for online editing.

You can also create an offline file at any time. To create an offline file:

– Choose File > New > Offline File.

– Type a filename. In general, use the filename of the actual source video that is missing.

– For Duration, type the length for the offline file.

– For Timecode, type the timecode value of the In point of the missing source video.

– For Reel Name, type the name of the reel containing the missing source video.

– Choose a time format from the Format menu that corresponds to the source video.

– Choose a frame rate from the Speed menu.

– Select either or both Has Video or Has Audio, according to the contents of the source video. Then click OK.

[906] images/fe_01_NewOfflineFile.gif

After editing, to replace an offline file with a source video file:

– In a Project or Bin window, select the offline file.

– Choose Project > Replace Clips.

– Locate and select the actual source video file, and click OK.Using keyboard shortcuts

Almost every function in Premiere has an associated keystroke, including some functions that don’t appear as commands or buttons. Some keyboard shortcuts are very fast because they require pressing only one key. Keyboard shortcuts appear next to menu commands and in the Tool Tips for buttons and controls, and are fully documented in the Quick Reference Card that comes with Premiere. Keyboard shortcuts that have no equivalent in menus, tools, or buttons are listed in Premiere’s online Help.

[907] images/fe_02_QRC.gif

For example, when accessing Premiere’s clip properties on Windows, you can use the ALT key in combination with the underlined letter keys in the Clip pop-up menu, or use the keyboard combination listed to the right of the menu command. As a time saver, the arrow keys can be used to navigate through the menus.

Shortcut keys, when available, appear in the Tool Tip after the tool description. To ascertain the keyboard short cut, just move the mouse over an item, and wait for the Tool Tip to appear. For example, the Mark Out button’s Tool Tip displays the letter O (in parenthesis) as the shortcut key to mark an Out point.

[908] images/fe_03_ToolTips.gif

Using bins

During the process of capturing and editing you might accumulate many clips in your project, making it difficult to locate an item in the Project window. Organize items by creating and using bins in the Project window, which are like folders on your hard disk. If you use clips that you want to include in more than one project, you can save bins as files that are stored outside of projects.

To make a bin available for use in other projects, select the bin and choose Project > Export Bin from Project, or right-click (Windows) or Control-click (Mac OS) the bin and choose Export Bin from Project. Then, type a name, choose a location for the bin, and click Save. Bins created and saved in Windows use the extension .PLB. To use the saved bin file in any project, click File > Open, select the bin file (.PLB), and click Open.

[909] images/fe_04_bins.gif

In previous versions of Premiere, you could create containers called libraries, which were used to store clips from one or several projects. A library was stored as a separate file apart from any project. Although Premiere 6.0 doesn’t directly support libraries, you can open a library. The library is converted into a bin when you open it in a Premiere 6.0 project.

Closing unneeded windows and palettes

As you edit, each open window and palette requires processing time to update its display. To lighten the processing load, keep open only the windows and palettes that are necessary. Pressing the TAB key on your keyboard causes all of Premiere’s palettes to disappear and pressing the TAB key again causes the palettes to reappear.

To aid the process in Premiere 6.0, you can save Workspaces. A workspace is a particular configuration of palettes and windows for use later on. Arrange the palettes and windows to your taste, and go to Window > Workspace > Save Workspace. To select and reset your palettes and windows to a saved workspace, just select it from the Window > Workspace menu.

[910] images/fe_05_saveworkspace.gif

Hiding and locking tracks and clips

If you are working on a complex video program with many tracks, you can hide tracks you aren’t currently editing by marking the tracks as shy and then choosing Hide Shy Tracks from the Timeline window menu. To mark a track as shy, press Ctrl (Windows) or Command (Mac OS) as you click the eye icon (for video) or speaker icon (for audio) at the left edge of a track. The icon then appears as an outlined eye (for video) or outlined speaker (for audio)

To hide shy tracks, go to Timeline > Hide Shy Tracks.

If you do not want to modify a track or clip but you still want to see it, you can lock it. This can prevent you from accidentally modifying it.

[911] images/fe_06_ShyTracks.gif

Eyes Wide Shut depicts a couple in having marriage difficulties. Isn’t it strange how life imitates art.

Stop-motion Frames

How I Learned to Stop Worrying and Love Frames

Last month I made reference to Kubrick’s last film, Eyes Wide Shut. This month to find an interesting piece of trivia I visited my favourite movie web site, The Internet Movie Database: www.imdb.com, and searched for “stop motion.” Another Stanley Kubrick film was returned on the top of the list: “Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb.” Spooky – or merely a coincidence?

A common question from Premiere users is “How do I create stop-frame motion in Premiere?” Stop-frame video is sometimes called a “strobe” effect. I am sure you remember going to clubs in the 1970’s and 1980’s where a strobe light made all the dancers appear as still in time. At least my dancing looked better this way!

You can capture video using File>Capture>Stop Motion; but what if the clip is already imported? Well, its easy to accomplish – without resorting to filters or effects or exporting single frames of video as pictures and reimporting. Its all in the magic of the ‘Frame Hold Options’ dialog box.

The first step is to place the video clip you wish to have ‘stop framed’ in your Premiere timeline.

By right clicking (MacOS: control click) on this clip on the Timeline and go to Video Options>Frame Hold. (this can also be accessed from the menu Clip>video effects>Frame Hold…

[928] images/sf_01_popupmenu.gif

The Frame Hold Options dialog box appears:

[929] images/sf_02_framehold.gif

The key part to creating the stop motion effect is to adjust the frame rate. This does not alter the original clip, just the rate of playback in the final movie. In the ‘Alternate Rate’ section, place a new frame rate. For instance, if you would like to have a single frame per minute, the alternate rate is 1. For two frames every minute, the alternate rate is 2.

The good news is that audio will play back at normal speed. All we are adjusting is the video component of the movie.

A poster frame can be held during the duration of a completed video clip using the Frame Hold Options dialog box. Just specify “Frame 0” in the Hold frame popup. You can also hold the In point or Out point as the hold frame. The Poster frame special frame in clips. This poster frame is used in the Storyboard feature of Premiere as a user-specified frame that represents the content of the complete clip. It is marked using the Clip>Set Clip Marker>0 (Poster Frame). It can be placed anywhere in the clip. If the frame doesn’t freeze, make sure that you set the marker on a clip and not on the Timeline ruler.

The de-interlace option is important. With a single frame of interlaced video, it may appear jittery or washed out.

You may also need to apply frame blending, which interpolates between available frames to create intermediate frames that can make motion seem smoother. This also creates an interesting ghosting effect. You may or may not want this effect.

According to the Internet Movie Database (www.imdb.com) originally, “Dr Strangelove” filmed in 1963, was to have a custard pie fight and at one point, the President took a pie in the face and fell down, prompting George C Scott’s character to exclaim, “Gentlemen! Our gallant young president has just been struck down in his prime!” Kubrick had already decided to cut the pie fight before the Kennedy assassination, but this line (or possibly even the whole sequence) would certainly have been cut due to its eerie similarity to real events. Spooky.

Video to the Web

A copy of David Trescot’s presentation (Introduction to Digital Video) and my presentation (Video to the Web) are now here.

There are a couple of links that may be of interest:

More indepth technical information on DV; more generic information specifically here.

Current supported cards in Premiere 6.0 are listed at Premiere 6.0 Certified Cards

The Nicky Guides offer a different perspective on the world of digital video


Adobe is posting more Premiere 6.0 Technical Guides in the support section of our web site – including finding an appropriate codec and video codec compression methods, and factors that afffect video compression

Another site I recommend visiting is the Terran site explaining Codecs, Architectures: CodecsCentral

All things Microsoft Windows Media Player is here: WindowsMedia

Apple’s web site for QuickTime is comprehensive, but a little too focused on the software developer rather than the web author: Quicktime

(The JavaScript control of the QuickTime plug in is detailed there).

Real Networks has a very complete site detailing how to author for their platform. Real Networks

Avril Around the World

[930] Avril in Hollywood

April 1996

Avril with the lights and glimmer of LA in the distance


[931] Avril in Cupertino, Jan 1997

January 1997

Avril standing in front of “Moof” at the Apple HQ — Cupertino, California.


[932] Avril in Venice

May 1997

Avril on a water taxi in Venice.

[933] Avril and Nick in Florence

Avril and Nick dine at a monastery in Florence.

Crowded House Pictures

[934] Nick Seymour

[935] Neil on Mic

These photos were taken by my friend in Adelaide circa 1987.

[936] Neil Finn, Eddie Rayner in background

I saw a photo frame for sale in Adelaide with this photo inside. Needless to say, I purchased the frame, and never took the photo out! I think this was the 1988 Apollo Stadium gig in Adelaide.