<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/teraz---live-collective-ambient-experience-made-with-rails-tone-js-wjsourczu" -->

---
title: TERAZ - live collective ambient experience made with...
description: A Rails and Action Cable powered live performance called TERAZ turns audience members' phones into an ambient orchestra, assigning each device one of six...
canonical: https://daily.dev/posts/teraz---live-collective-ambient-experience-made-with-rails-tone-js-wjsourczu
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: TERAZ - live collective ambient experience made with Rails & Tone.js | daily.dev
og:description: A Rails and Action Cable powered live performance called TERAZ turns audience members' phones into an ambient orchestra, assigning each device one of six...
og:url: https://daily.dev/posts/teraz---live-collective-ambient-experience-made-with-rails-tone-js-wjsourczu
og:image: https://api.daily.dev/og/posts/WjSourczu.png
og:image:alt: TERAZ - live collective ambient experience made with Rails & Tone.js
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# TERAZ - live collective ambient experience made with Rails & Tone.js

**[arkency](https://daily.dev/sources/arkency)** · 9 min read · 0 upvotes · 0 comments

## Summary

A Rails and Action Cable powered live performance called TERAZ turns audience members' phones into an ambient orchestra, assigning each device one of six instrument parts (bass, piano, crackling noise, angel pads, drone, bells) generated locally via Tone.js. The server only sends lightweight control messages rather than streaming audio, and the piece requires participants to keep touching their screens to stay active in the piece. The creator shares lessons on cross-device audio quirks (Android bass issues, iPhone reliability), a silent-MP3 background-audio hack learned from an earlier project called Pogwar, testing with 100 Chrome tabs, and plans to add Rails Event Store for performance timelines.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://blog.arkency.com/teraz-live-collective-ambient-experience-made-with-rails-and-tone-dot-js>

## Questions this post answers

### How do you keep JavaScript audio running in the background on mobile browsers?

A common trick is playing a silent MP3 file on an infinite loop through an audio element, which helps JavaScript keep executing in the background on mobile devices. It is not a full fix: audio does not run at full power this way and can introduce artifacts, but it reveals what mobile browsers allow versus block for background audio.

_Anyone debugging mobile background audio quirks can compare notes and workarounds on daily.dev._

### Why would you send only control messages over WebSockets instead of streaming audio to many clients?

Streaming audio to many phones is heavy and fragile, so a lighter approach has each client generate sound locally with Tone.js while the server sends only small control messages through Action Cable, such as which track is active or the current volume. The one exception is piano, which uses a downloaded sample because generating a convincing piano on every device would be too computationally expensive.

_Developers weighing real-time architecture trade-offs like this often track similar system design patterns on daily.dev._

### What audio compatibility issues can appear when playing generated sound across many different Android and iPhone devices?

On some Android devices, sound below roughly 120 Hz was effectively inaudible, while iPhones generally handled sound more reliably. Because every instrument was technically available on every device, a mismatch like an Android phone assigned a bass part could be manually reassigned to another instrument through a control panel during a live performance.

_Teams building cross-device audio experiences can dig into device quirks like these on daily.dev._

## Similar posts on daily.dev

- [beats](https://daily.dev/posts/beats-beqixmqhh) · Hacker News · 0 upvotes · 0 comments
- [The groove is the 40 milliseconds a grid throws away, so we built a beat studio that gives them back, in a browser tab](https://daily.dev/posts/the-groove-is-the-40-milliseconds-a-grid-throws-away-so-we-built-a-beat-studio-that-gives-them-back-fiaruwgvg) · DEV · 11 upvotes · 0 comments
- [This Website Turns Your Sketches Into Music](https://daily.dev/posts/this-website-turns-your-sketches-into-music-k1v8qeolb) · 80 LEVEL · 2 upvotes · 0 comments
- [Introducing Three-Live: turning AI-generated Three.js into interactive 3D, AR, and WebXR across web and mobile](https://daily.dev/posts/introducing-three-live-turning-ai-generated-three-js-into-interactive-3d-ar-and-webxr-across-web--rhlauvxix) · Google Open Source Blog · 22 upvotes · 0 comments
- [GitHub - rauversion/rauversion: Open source Music Multiverses](https://daily.dev/posts/github---rauversion-rauversion-open-source-music-multiverses-bldfntlcj) · Ruby Flow · 0 upvotes · 0 comments

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#rails](https://daily.dev/tags/rails), [#generative-art](https://daily.dev/tags/generative-art)

[View this post on daily.dev](https://daily.dev/posts/teraz---live-collective-ambient-experience-made-with-rails-tone-js-wjsourczu)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"TERAZ - live collective ambient experience made with Rails \u0026 Tone.js","url":"https://daily.dev/posts/teraz---live-collective-ambient-experience-made-with-rails-tone-js-wjsourczu","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/teraz---live-collective-ambient-experience-made-with-rails-tone-js-wjsourczu"},"datePublished":"2026-09-18T23:48:01.941Z","dateModified":"2026-09-18T23:48:24.608Z","description":"A Rails and Action Cable powered live performance called TERAZ turns audience members' phones into an ambient orchestra, assigning each device one of six...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6842f9da7d8ec7d9fa1b0f07e00ffdc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d6842f9da7d8ec7d9fa1b0f07e00ffdc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"arkency","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"arkency","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/8f136fafb2a547659a8923f7f2a1d5ee","url":"https://daily.dev/sources/arkency"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/teraz---live-collective-ambient-experience-made-with-rails-tone-js-wjsourczu","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,rails,generative-art","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"arkency","item":"https://daily.dev/sources/arkency"},{"@type":"ListItem","position":3,"name":"TERAZ - live collective ambient experience made with Rails \u0026 Tone.js"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/teraz---live-collective-ambient-experience-made-with-rails-tone-js-wjsourczu#faq","mainEntity":[{"@type":"Question","name":"How do you keep JavaScript audio running in the background on mobile browsers?","acceptedAnswer":{"@type":"Answer","text":"A common trick is playing a silent MP3 file on an infinite loop through an audio element, which helps JavaScript keep executing in the background on mobile devices. It is not a full fix: audio does not run at full power this way and can introduce artifacts, but it reveals what mobile browsers allow versus block for background audio. Anyone debugging mobile background audio quirks can compare notes and workarounds on daily.dev."}},{"@type":"Question","name":"Why would you send only control messages over WebSockets instead of streaming audio to many clients?","acceptedAnswer":{"@type":"Answer","text":"Streaming audio to many phones is heavy and fragile, so a lighter approach has each client generate sound locally with Tone.js while the server sends only small control messages through Action Cable, such as which track is active or the current volume. The one exception is piano, which uses a downloaded sample because generating a convincing piano on every device would be too computationally expensive. Developers weighing real-time architecture trade-offs like this often track similar system design patterns on daily.dev."}},{"@type":"Question","name":"What audio compatibility issues can appear when playing generated sound across many different Android and iPhone devices?","acceptedAnswer":{"@type":"Answer","text":"On some Android devices, sound below roughly 120 Hz was effectively inaudible, while iPhones generally handled sound more reliably. Because every instrument was technically available on every device, a mismatch like an Android phone assigned a bass part could be manually reassigned to another instrument through a control panel during a live performance. Teams building cross-device audio experiences can dig into device quirks like these on daily.dev."}}]}
```

