Although a lot of adjustability is available, the download is ready to go without modification.

The Story

This sequence tells a short story unto itself. On the first channel output, we see a match lit, flaring brightly at first, then flickering dimmer. A few seconds later, the fuse sputters to life and travels along the ground. Fuse brightness and speed varies, presumably due to the irregularities in the fuse material. When it reaches the destination, a mine shaft, for example, there is a dramatic pause, then a large detonation. After a fixed plus random delay, the scene replays. As set, the sequence replays every 25 seconds, give or take.

Every part of the effect contains random elements, so it never looks the same twice. The lighter flame differs and takes a different amount of time to light the fuse. The fuse varies at spots and in total time. The explosion looks similar each time, but also varies.

To add a little drama like the movies, there is an unpredictable delay from the time when the fuse ends to when the explosion occurs, “Should I go in and lay another fuse?”

Behind a Rock

If the fuse goes behind a rock, the fuse’s travel time can be simulated instead of adding LED Ports. The fuse is seen fading behind one side. After a time, it fades back on at the other side.

LED Ports

Currently, all LED ports are used, but many options free up ports, which can then be used for other effects:

  • Chn1
    • The lighter/match is lit and lights the fuse
  • Chn1-Chn8
    • The fuse travels through 8. Note that Chn1 served as both lighter and fuse
  • Chn8-Chn9
    • The explosion was on the last two channels. Note that Chn8 served as both the end of the fuse and the explosion

However, it can be reduced to a very minimal layout with short fuse:

  • Chn1
    • The lighter/match and the beginning of the fuse
  • Chn1-Chn3
    • The fuse travels from 1 to 3.
  • Chn3
    • Is both the end of the fuse and the explosion

In such a configuration, three powder kegs, three fuses and three matches could be driven from the same Morsel all operating at the same time, independently, on different LED Ports. This three-kegger is in the downloads.

Laying the Fuse

The fuse is reminiscent of Westerns, where the powder keg is poured out in a line of black powder. The sparks of the fuse are intense but erratic. They must be far dimmer than the explosion.

The trick is laying the fuse in the scene. The fuse consists of up to 8 LED’s in a row. The LED’s themselves should not be visible. Instead, they should indirectly light a slit or trench in the model. LED’s may be mounted horizontally or vertically below such a slit such that their light overlaps.

When the sparks of the fuse fade slowly from Port a to b to c, the intense spot of light should appear at a diffuse point between LED’s, rather than from two distinct LED’s. This results in a more than 10-fold reduction in the number LED’s needed. The way to do this is to recess the LED’s enough, or position LED’s close enough together that their diffuse cones of light fully overlap.

User Settings

The attached sequence is ready to use with the following settings. Change their values to customize.

The listing is too long to include here. Instead, we show where the sequence is easily modified.

Making these adjustments and trying them out will take several minutes. Don’t worry about mistakes. If you don’t know what you did, just go back to the original zip file and start over. It will go faster the next time.

Lighter/Match Channel

We economize on LED ports by sharing the fuse with the lighter channel. If this does not look right, set to Chn10, then free up an LED port below, then assign this LED Port to the lighter/match using Theme Designer:

define matchChn chn1

Dramatic Pause

The explosion hesitates a tense moment after the fuse finishes. Change that delay here, which is a random number of loops that are multiples of 45ms:

define anticipation 97%

The eyeball estimate for the above loop at 97% chance is around 30 times (refer to the tutorial on Go statements for eyeball estimates).

Explosion repercussions

The explosion flashes a number of times like rapid lightning. Make it randomly flash more times here.

define repercussions 55%

Explosion Channels

One channel is dedicated to the explosion. If more channels are freed up below, then this channel can be duplicated on many LED Ports using Theme Designer.

define boomCh1 chn9 //inside gold mine or building

We shared the last LED of the fuse with the explosion on Chn8. If the fuse is made shorter, this channel can be set to the new end of the fuse. If however, the end of the fuse is outside the mine, it might not look right sharing it with the explosion. Make it another channel, such as chn11. It currently looks like this:

define boomCh2 chn8     //could be shared with last fuse LED

BoomCh1 and BoomCh2 are slightly different, so the loss of one them is not too significant.

Replay Delay

The show must go on. Just not right away. The replay delay can be adjusted with a constant part plus variable part to make it less predictable:

define replayConstantDelay @+2s //always wait at least this long
define replayVariableDelay 95% //chance of looping to more 0.3s delays

The eyeball estimate of a loop with 95% chance is around 20 times 0.3s or 6 seconds.

Fuse Speed

The speed of the fuse is random, but the chance it lingersat each position is as follows:

define lingerHL 90%

HL refers to high and low brightnesses at each position. To make the fuse twice as slow, use 95%. Four times slower, 97.5%, etc. To make the fuse twice as fast, use 80%, four times as fast, 60%.

Fuse Length

The fuse currently traverses 8 channels. To change it to fewer channels, uncomment one of the other choices:

//(uncomment only one of the following)
//define kaboomAt3 go to kaboom //explode after channel 3, ie 3 led's in fuse
//define kaboomAt4 go to kaboom //explode after channel 4, ie 4 led's
//define kaboomAt5 go to kaboom //explode after channel 5, ie 5 led's
//define kaboomAt6 go to kaboom //explode after channel 6, ie 6 led's
//define kaboomAt7 go to kaboom //explode after channel 7, ie 7 led's
define kaboomAt8 go to kaboom //explode after channel 8, ie 8 led's

Behind a Rock

If the fuse goes behind a rock, at least one LED can be omitted. The time behind the rock can instead be simulated by a delay, such as the 2 seconds shown. Currently, the fuse does not go behind a rock, so all choices are commented out.

//(uncomment one of the following)
//adjust @+2s shorter or longer depending on size of rock.
//define rockAt3 chn3=0% @+2s //You can omit LED 3, it's behind a rock
//define rockAt4 chn4=0% @+2s //You can omit LED 4, it's behind a rock
//define rockAt5 chn5=0% @+2s //You can omit LED 5, it's behind a rock
//define rockAt6 chn6=0% @+2s //You can omit LED 6, it's behind a rock

Fuse Brightness

The fuse should be as faint as possible to make the explosion look that much brighter. But not too faint. In daylight or if the fuse is too dim in the crack along the ground, it can be brightened up. Choices are 10%, 20%, 30% and 50%. By comparison, the explosion is 100%.

The nature of the code requires us to uncomment a whole group of lines associated with brightness. Happily, Sequence Composer allows you to select and uncomment a group of lines all at once (the editor  may take a few seconds to do this). Do not change these lines. Just comment or uncomment them. The current brightness is 20%. Here is what 10% looks like:

//uncomment for max fuse brightness=10%
//define ledIa 9%
//define ledIIa 1%
//define ledIb 8%
//define ledIIb 2%
//define ledIc 7%
//define ledIIc 3%
//define ledId 6%
//define ledIId 4%
//define ledIe 5%
//define ledIIe 5%
//define ledIf 4%
//define ledIIf 6%
//define ledIg 3%
//define ledIIg 7%
//define ledIh 2%
//define ledIIh 8%
//define ledIi 1%
//define ledIIi 9%
////single LED's at 10%
//define led11 chn1=10%
//define led22 chn1=0% chn2=10%
//define led33 chn2=0% chn3=10%
//define led44 chn3=0% chn4=10%
//define led55 chn4=0% chn5=10%
//define led66 chn5=0% chn6=10%
//define led77 chn6=0% chn7=10%
//define led88 chn7=0% chn8=10%

 

Download

The complete sequence can be downloaded here:

 Two versions Lighter-Fuse-Powderkeg.zip

After downloading, right click the zip file and choose “Extract all”.

Two versions are enclosed:

  • The 9 LED Port version with a long fuse
    • This works well with the test sequence and theme
  • A 3 to 4 LED version with a shorter and slower fuse
    • A theme file is included that has three such powderkegs playing at random times. The theme file is set with Theme Designer
    • Modify the theme to substitute some other effects, if desired

Theme Designer and Multiple Copies Running

Theme Designer needs to know if you intend to drive many LED Ports from one sequence, or a few Ports from additional copies of the sequence playing independently. The Sid (Shared ID) column of Theme Designer does this. It could be called the “Together” column. Those LED Ports sharing the same Sid number will play together, using the same copy of the sequence.

About the Code (internal details)

In programmer’s terminology, the sequence is a “nested For loop” unrolled into inline code, with half a dozen lines devoted to each position of sparks on the fuse. It could have been written without the inline loop if we made a special theme, but that theme would need be preloaded by PowerCookie Boards and would not be alterable.

Sequences use two kinds of memory, storage and player memory. Although this sequence is very long, it consumes less than 15% of storage memory.

Player memory is only used if the sequence is currently playing. Two resources that use memory are the number of output channels and the number of Go labels, both of which are higher than usual in this sequence. The result is that no more than 3 copies can play at the same time, meaning the three-kegger example included in the zip file will play but a four-kegger would not. Medium sized or small sequences easily play nine copies on the nine Morsel LED Ports.

 

 

 

Back
Forward
No action

Mouse Gestures

Back

Forward

Scroll up

Scroll down

Switch to previous tab

Switch to next tab

Close all tabs except current

Close current tab

Open new tab

Close all tabs

Refresh current tab

Stop loading

Scroll to bottom

Scroll to top

Reopen closed tab

Go to home page

Back

Mouse Gestures

Back

Forward

Scroll up

Scroll down

Switch to previous tab

Switch to next tab

Close all tabs except current

Close current tab

Open new tab

Close all tabs

Refresh current tab

Stop loading

Scroll to bottom

Scroll to top

Reopen closed tab

Go to home page