Skip to the page
TACTILE UI

04.1Block 04.1 · Heroes

Speaker Launch

A speaker launch where the product works on the page. Press Play and a loop made in the browser lifts a gold bowl of ferrofluid into spikes on every kick.

Version
0.1.0
Size
83.1 KB gzipped
Access
With a Pass
Needs
speaker-launch.mjs + speaker-launch.css · Ferrofluid
Tests
11 tests · 10 states
On this page
  1. Use it
  2. Options
  3. Methods
  4. States
  5. How it works
  6. Built with
01

Use it

Launch a physical product whose selling point is something you have to see (here, bass you can watch) with the object doing the demonstration, so the visitor's first action is pressing Play rather than reading a claim; price, one buy action and the figures that back the claim sit beside it.

Copy the speaker-launch folder and the ferrofluid folder from its package next to your page, link the stylesheets and mount it on an element. Every option has a default; the lab’s Code tab writes the same example at any settings, and for React, Vue, Svelte or a custom element (Using a framework).

<link rel="stylesheet" href="ferrofluid/ferrofluid.css">
<link rel="stylesheet" href="speaker-launch/speaker-launch.css">
<div id="speaker-launch"></div>

<script type="module">
  import Ferrofluid from './ferrofluid/ferrofluid.mjs';
  import { mount } from './speaker-launch/speaker-launch.mjs';

  const speakerLaunch = mount(document.getElementById('speaker-launch'), {
    brand: 'Halde',
    product: 'Tarn',
    eyebrow: 'New: Tarn F1 ferrofluid speaker',
  }, { Ferrofluid });

  // speakerLaunch.update({ … });   change any option in place
  // speakerLaunch.destroy();        and take it away again
</script>
02

Options

OptionTypeDefaultWhat it does
brandtext'Halde'The wordmark in the nav.
producttext'Tarn'Set very large; short names read best.
eyebrowtext'New: Tarn F1 ferrofluid speaker'Eyebrow
taglinetext'A speaker you can watch.'Tagline
bodytext'Forty millilitres of ferrofluid rest on the bass driver’s magnet. Every kick drum lifts them into a crown of spikes; every silence lets them settle back to a mirror.'Paragraph
pricetext'£649'Price
priceNotetext'Free delivery · 2-year warranty'Under the price
ctatext'Pre-order'Followed by the product name.
shiptext'Ships 18 November'Shipping line
hreftext'#preorder'Buy link
navtext'Tarn, Sound, Design, Specs'Comma-separated, up to five.
statstext'38 Hz: lowest note you can see; 40 ml: ferrofluid in the bowl; 18 h: per charge; 2.4 kg: walnut, brass and glass'“value: label; value: label”, up to four.
specstext'2 × 25 W class-D · 38 Hz–22 kHz ±3 dB · 40 ml ferrofluid · Walnut & spun brass · 18 h battery · Bluetooth 5.3 & USB-C'Specs line
tracktext'Low Tide'Demo track name
palettewalnut · graphite · ivory'walnut'Walnut with a brass bowl, graphite with steel, or ivory with a ceramic bowl.
temponumber, 72 to 12892Demo tempo (BPM)
reactivitynumber, 0.6 to 1.61.15The magnet’s strength at a full kick.
densitynumber, 10 to 2015Spike density
sharpnessnumber, 0.3 to 10.8Spike sharpness
lightnumber, 0 to 3453300 is from above, clockwise.
03

Methods

mount(element, options, { Ferrofluid })
Builds the block inside the element and returns its handle. Hand it the Ferrofluid it is built with.
handle.update(next = {})
Change options in place.
handle.playing
handle.fluid
handle.player
handle.root
handle.destroy()
Stops it and cleans up after it.
04

States

  1. At restEvery word readable, the bowl a still glossy pool, the status line says the sound is made in the browser and silent until played. No audio context exists and nothing runs.
  2. ArrivingIntro lines, buy row, demo deck and figures rise 14px and fade in once over 0.9s, staggered; CSS only.
  3. PlayingA four-bar loop in D minor (kick, bass, pad, hats) is scheduled on the audio clock; the fluid listens to the kick-and-bass bus and rises into a crown on every kick; the magnet sways gently; a 12-bar meter follows the low end; Play reads Pause, aria-pressed true, and the status line says what is playing.
  4. PausedThe master fades over 60ms, the context suspends, the fluid stops listening, melts back and sleeps; no frames are requested.
  5. Hover and focusNav links brighten, the Pre-order pill takes an accent border, buttons take their hover fill and the buy arrow slides; every control shows a 2px focus ring.
  6. PaletteWalnut with a brass bowl, graphite with a steel bowl, or ivory with a ceramic bowl: one token table each.
  7. TabletAt container widths 640–999px the name and tagline sit left of the paragraph, the bowl runs the full width, figures four across.
  8. PhoneUnder 640px one column: header with the nav on a second row, name, bowl bleeding to the edges with the deck under it, price over a full-width buy button, figures two by two.
  9. Reduced motionNo arrival; the bowl shows the spiked still and never moves; Play still plays the sound, the status says the fluid is shown still, and the meter does not move.
  10. Off screen or hiddenThe object pauses itself; the block's own frame loop only runs while playing.
05

How it works

Made of: Product shot as demo, Browser synthesised loop, Lookahead audio scheduler, Low end drive bus, Container query recomposition, Palette from object finish.

Original composition; Halde, Tarn, the demo loop and all copy are invented. No image and no audio file: the only picture is the Ferrofluid, the only sound is synthesised in Web Audio after the visitor presses Play. Faces: Italiana and Geist Mono (SIL OFL 1.1) as WOFF2, licences beside them.

06

Built with

More blocks on the same object:

Docs
Finish
Volume