Typewriter Text Revisited Revisited

This ongoing adventure to create a typewriter text effect has had a lot of twists and turns over the years. Back in 2011 I used Pure Data to achieve this effect. Fast forward to 2019 and I experimented with Kdenlive and Natron before settling on Animation Nodes. In April 2020 update on this I detailed how I used Animation Nodes and attempted to use Aegisub to create this effect. Around the same time I had started experimenting with expressions in Natron to achieve the same effect.

The value of a parameter can be set by Python expressions. An expression is a line of code that can either reference the value of other parameters or apply mathematical functions to the current value.

The expression will be executed every times the value of the parameter is fetched from a call to getValue(dimension) or get().

In theory with Natron expressions I could created a counter that would increment on every frame and type words out character by character. Y’know, like a typewriter. I’m forever learning Python so after a lot of effort, and a lot of help from people on the Natron forum I came up with the following solution. In the Text node I entered the following expression:

originalText = original.text.get()
output = " "
ptr = 0
slowFac = 4
for i in range(frame/slowFac, len(originalText)+1):
	if frame/slowFac < len(originalText):
		ptr=frame/slowFac
	else:
		ptr=len(originalText)
ret = originalText[0:ptr]

A fellow Natron user greatly simplified the code and presented the following solution:

text = Text1.text.get()
ret = text[:frame-1]

Success! I used this in the last video for Design Yourself:

The typewriter text effect starts from 01:04. The same Natron user also posted an alternative solution.

I noticed a bug which meant that I couldn’t change the speed that the letters typed out at. One method of speeding up the text would be to use ret = text[:frame*2-1] or a different multiplier. However, I wanted something a little bit more precise, so I thought about using the Retime node. Unfortunately there was a bug which prevented this. The workaround of using a Constant node worked. In the end it got fixed, but not in time for making that Design Yourself video.

In June I was asked if I could make an intro video for Network music Festival. The organisers wanted around 10 slides of text to appear throughout the video. Some had only several words on them but some had large blocks of text.

I already decided that I wanted to use the typewriter text effect to make the text appear and then to hold that text for a couple of seconds. This presented an interesting problem. Without a Retime node the text appears one character per frame. With a large block of text 250 characters in length (including spaces) this would take, well, 240 frames to appear, which at 24 fps would be 10 seconds. The organisers wanted the video to be about a minute long, so having one slide take up 10 seconds would be far too long.

What I needed was a method for making an arbitrary amount of text to appear within a specific time/frame count. My final Natron expression (after a bit of bug fixing) looked like this.

text = Source.text.get()
letter= 0

# what frame to start triggering the write-on effect
trigger = 15

# how many frames it'll take to write the full text
length = 46

# map values. Taken from herehttps://stackoverflow.com/a/1969274
def translate(value, leftMin, leftMax, rightMin, rightMax):
    # Figure out how 'wide' each range is
    leftSpan = leftMax - leftMin
    rightSpan = rightMax - rightMin

    # Convert the left range into a 0-1 range (float)
    valueScaled = float(value - leftMin) / float(leftSpan)

    # Convert the 0-1 range into a value in the right range.
    return rightMin + (valueScaled * rightSpan)


if  frame >= trigger:
	letter = int(ceil(translate(frame-trigger, 1, length, 1, len(text))))
else:
	letter = 0

ret= text[:letter]

This expression does several things. It first allows a user to specify at which frame the text will appear (trigger). Then, no matter how much input text there is it will be mapped to the length value. Oddly Python doesn’t have a built in mapping function so I had to use the one from here. Unfortunately it doesn’t work as expected if your Text node has keyframed text changes. So, for that you’ll have to have multiple Text nodes. Here’s the finished Network Music Festival video.

Something In The Water – Issue 1

Earlier in the year I produced some illustrations of BiLE, Glitch Lich and Benoît and the Mandelbrots for a mini booklet about Network Music Festival. The whole magazine, which includes the mini booklet, has recently been released as Something In The Water:

Something In The Water is a magazine that delves into the past, present and future music scenes/clubs/creativity of Birmingham.
The magazine unveils long forgotten, eye-opening events, allowing a new audience to understand the importance of Birmingham’s musical history, while allowing another audience to reminisce. Something In The Water contains no photography and is illustrated by talented creatives from across the world.

The magazine is having a launch party on 26th May 2012. You can see my work alongside the interviews from page 40 onwards, or have a look below

Something in the Water

Something in the Water

Performances at Network Music Festival

On Thursday 26th January I performed with Freecode at the Network Music Festival pre-festival party.

For this set at any one time there were two people doing audio and two doing video. We also had the theme “Something old, something new, something borrowed, something blue”. To try and explain further:

Something old
Video: Antonio (hellocatfood) and Alan (laternist)
Audio: Leon (Chromatouch) and Jim (minuek)

Something new
Video: Chromatouch and minuek
Audio: hellocatfood and laternist

Something borrowed:
Video: hellocatfood and minuek
Audio: Chromatouch and laternist

Something blue:
Video: Chromatouch and laternist
Audio: hellocatfood and laternist

Working in this way I think gave us a bit more structure and allowed each person to shine in the spotlight for a bit. It also saw us mixing and matching styles a lot more. For example, myself and laternist create very abstract and noisy images and sound whereas Chromatouch and minuek create audio that’s more listenable and do similar things with visuals. Having two of these mixing created great results!

We now have a tumblr account where we’ll be posting all of our videos. Go visit it: http://freecodecollective.tumblr.com/

The following day I performed with BiLE. We performed two pieces at Network Music Festival: XYZ and Laptopera. The visuals for XYZ have evolved quite a bit since its first performance.

XYZ - Old visuals

Previously the visuals acted mostly as a display of the data being sent over the network. Without knowing what the data was it was hard to get any meaning from the visuals. Now, however, I feel it better represents the interactions between the players. Here it is being performed at Network Music Festival:

Please excuse the positioning of the camera. I also posted at work in progress video of those visuals in case you should want to get a better idea of what’s happening.

BiLE also premiered Laptopera, which you can watch and listen to on the BiLE YouTube channel

Freecode at Network Music Festival: Pre-festival Party

As well as performing in BiLE for Network Music etsival I’ll be performing in Freecode at the pre-festival party on 26th January at The Edge in Digbeth.

We’ll be performing something old, something new, something borrowed and something blue… It’ll all become clearer on the night 😉 Also performing on that night will be Juneau Brothers and Lash Frenzy. Tickets are £5, check out the event page for more details.

Click to buy

BiLE Business

The world of BiLE is a busy one recently! On January 3rd we were featured in an article in the Financial Times about Laptop Orchestra’s

BiLE in the Financial Times

Read the interview here

Thanks to Alex Newman for writing the article. The article also makes reference to Network Music Festival, which is taking place in from 27-29th January in various locations around Birmingham.

The festival will featrue performances, workshops and lectures from national and international laptop ensembles and performers including Benoît and the Mandelbrots – we both performed at Laptops Meet Musicians Festival in Venice last year – and BiLE

BiLE

Local journalist Ross Cotton interviewed BiLE ahead of our performance next week:

With elements of both art and music within their sound, BiLE fuse together two creative outlets and present their experiments through performance.

“It’s very much a musical background that we all come from, and I think that translates into the approach that we take” says Iain.

[…]

“We’re more about exploring other avenues alongside the other things that we are doing. But the stuff that we’re doing in BiLE is definitely influencing my other compositions. Working with a group of composers with other ideas just opens your eyes to other avenues.”

“We are always trying to create interesting music”, says fellow member Chris.

“We’re not about technical fetishes or using technology for the sake of it, we are just using technology as a way of enabling us to do interesting and new things.

“The technology is much more of an enabling factor, rather than a necessity. It’s about new ways of expression, rather than genre-based roots”, he says.

Full interview is available here

BiLE will be performing XYZ and will be premiering Laptopera. In terms of visuals, for this performance I wanted to move away from using pre-recorded videos and instead use purely generative visuals. This required me to learn a lot about using particles in GEM – [part_head], [part_velocity] etc. Here’s a preview of the results for XYZ and Laptopera.

It still needs a bit of work, but it’s coming along nicely!

Tickets for Network Music Festival can be bought from the website and costs from £8 for day tickets to £25 for a weekend pass.

Click to buy