audiobits 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # audiobits
2
2
 
3
+ ## 0.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 7aa39bd: Align the package README with published capabilities and add the public website
8
+ and relevant npm keywords to package metadata. Runtime behavior is unchanged.
9
+
10
+ ## 0.1.2
11
+
12
+ ### Patch Changes
13
+
14
+ - 7f792f9: Clarify npm installation and the minimal confirmation-sound quick start in the shipped README and Skill, with nearby browser gesture and lifecycle guidance.
15
+
3
16
  ## 0.1.1
4
17
 
5
18
  ### Patch Changes
package/README.md CHANGED
@@ -1,20 +1,23 @@
1
1
  # AudioBits
2
2
 
3
+ [Website and documentation](https://audiobits.joacod.com/)
4
+
3
5
  AudioBits is available on npm as `audiobits`. It includes confirmation, impact, thruster, tactile click, gentle rejection,
4
6
  glass notification, whoosh and power-up; schema-1 recipes; play/live controls; seeded variation; bounded
5
7
  voices; bus gain, mute and routing; native output taps; and explicit lifecycle APIs.
6
- Prerelease verification target: current Chromium. Other browsers and operating
7
- systems are unverified and deliberately deferred. Maintainer listening acceptance for the
8
+ Current Chromium is the only automated browser verification target. Other
9
+ browsers and operating systems are unverified and deliberately deferred. Maintainer listening acceptance for the
8
10
  unchanged sound definitions is recorded separately.
9
11
 
10
- ## Install
12
+ ## Quick start
11
13
 
12
14
  ```sh
13
15
  npm install audiobits
14
16
  ```
15
17
 
16
- Use a browser bundler and call `play()` directly from a gesture handler. Surface rejection
17
- with `void play().catch(showError)` and retry from a fresh gesture.
18
+ Use a browser bundler. Create the engine and sound once; run the final two lines
19
+ inside a user gesture handler, such as a button click. Call `audio.start()`
20
+ directly in that handler and await it before playback.
18
21
 
19
22
  ```ts
20
23
  import { createAudio } from "audiobits";
@@ -22,19 +25,15 @@ import { confirmation } from "audiobits/recipes";
22
25
 
23
26
  const audio = createAudio();
24
27
  const sound = audio.sound(confirmation);
25
- export async function play() {
26
- await audio.start();
27
- sound.play();
28
- }
29
- export function stop() {
30
- audio.stopAll({ tails: "cut" });
31
- }
32
- export async function dispose() {
33
- await audio.dispose();
34
- }
28
+
29
+ await audio.start();
30
+ sound.play();
35
31
  ```
36
32
 
37
- Bind `play()` to a button click (`void play().catch(showError)`).
33
+ Surface activation failures and retry from a fresh gesture. Use
34
+ `audio.stopAll({ tails: "cut" })` to stop playback and `await audio.dispose()`
35
+ when the host is removed. See the production lifecycle example below for
36
+ hiding and navigation.
38
37
 
39
38
  ## Production lifecycle
40
39
 
@@ -116,7 +115,7 @@ Schema version 1 supports:
116
115
  Depth is limited to 16, visited values to 10000, and diagnostics to 100.
117
116
  Source/filter frequencies must be below the owning context's Nyquist frequency
118
117
  at playback, including all mapping/variation extrema. Other effects,
119
- expression strings, sequencing, and continuous random modulation are rejected. These are the capabilities shipped in 0.1.0.
118
+ expression strings, sequencing, and continuous random modulation are rejected.
120
119
  The generated schema is available as `recipeSchema` or `audiobits/schema.json`.
121
120
 
122
121
  ## Runtime ownership
@@ -213,21 +212,14 @@ promise identical oscillator/filter samples across browsers or sample rates.
213
212
 
214
213
  ## Noise ownership and bounds
215
214
 
216
- Each noise layer owns one mono, one-second buffer at context sample rate. The
217
- last 20 ms crossfades into the first 20 ms; looping resumes after that prefix,
218
- so the wrap follows an ordinary adjacent sample pair. The loop period is about
219
- 0.98 seconds. Both finite and sustained noise loop this bounded resource.
220
- This treatment has signal evidence and maintainer listening acceptance;
221
- individual listening observations were not recorded. There is no shared noise cache or rendered-output cache.
215
+ Each noise layer uses a bounded generated mono buffer at the context sample rate,
216
+ looped with a crossfade for finite and sustained playback. Noise generation is
217
+ reproducible for the same recipe, controls, seed and sample rate. There is no
218
+ shared noise cache or rendered-output cache.
222
219
 
223
220
  Noise supports integer sample rates from 8000 through 192000 Hz. Unsupported
224
- rates fail with `noise-rate` before voice allocation. A layer retains at most
225
- 768000 sample bytes (192000 at 48 kHz); generation temporarily uses one extra
226
- buffer of that size. A recipe has at most 16 layers, and existing voice limits
227
- bound concurrent buffers. The thruster owns ten nodes and one buffer per voice;
228
- with its default eight-voice limit plus one retiree, sample storage is at most
229
- 1728000 bytes at 48 kHz. The engine master owns two additional nodes for independent gain and mute. These are
230
- owned sample-storage bounds, not measurements of all browser memory.
221
+ rates fail with `noise-rate` before voice allocation. Recipe layer limits and
222
+ engine/sound voice limits bound concurrent noise resources.
231
223
 
232
224
  Control updates allocate no new audio nodes or buffers. Finishing a voice clears
233
225
  its buffer-source references and disconnects owned nodes, including cancellation
@@ -312,9 +304,8 @@ and suspend on hide. Returning does not resume; a fresh gesture starts audio.
312
304
  Late activation after suspension is cancelled and cannot replay an old request.
313
305
  The engine also clears owned voices/effects on native interruption; automatic
314
306
  native recovery is suspended until a fresh `start()` request. Physical OS
315
- interruption still requires manual evidence. Step 04 passed maintainer manual
316
- verification on 2026-10-06. Browser/device details and individual observations
317
- were not supplied; automated checks remain separate from that acceptance.
307
+ interruption still requires manual evidence. Automated checks do not establish
308
+ physical-device compatibility.
318
309
 
319
310
  Buses provide gain, mute, and routing. Shared effects are deferred until
320
311
  multiple real sound requirements justify an API.
@@ -1,5 +1,5 @@
1
1
  {
2
- "packageVersion": "0.1.1",
2
+ "packageVersion": "0.1.3",
3
3
  "schemaVersion": 1,
4
4
  "status": "stable",
5
5
  "recipe": {
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "audiobits",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Procedural browser audio: versioned recipes, live controls, managed voices and buses.",
5
5
  "license": "MIT",
6
+ "homepage": "https://audiobits.joacod.com/",
7
+ "keywords": [
8
+ "web-audio",
9
+ "procedural-audio",
10
+ "sound-effects",
11
+ "sfx",
12
+ "game-audio",
13
+ "typescript"
14
+ ],
6
15
  "repository": {
7
16
  "type": "git",
8
17
  "url": "https://github.com/joacod/audiobits.git",
package/skill/SKILL.md CHANGED
@@ -8,10 +8,13 @@ description: Integrate AudioBits procedural sounds into a browser application, i
8
8
  This guide ships with the `audiobits` npm package. Confirm the installed
9
9
  package version and read `audiobits/capabilities.json` and
10
10
  `audiobits/schema.json` before choosing primitives. Package metadata describes
11
- shipped behavior, not registry availability. Prerelease verification target: current Chromium. Other browsers and operating
12
- systems are unverified and deliberately deferred.
11
+ shipped behavior, not registry availability. Current Chromium is the only
12
+ automated browser verification target. Other browsers and operating systems are
13
+ unverified and deliberately deferred.
13
14
 
14
- Use public imports from `audiobits` and `audiobits/recipes`. Create engines and
15
+ Install with `npm install audiobits` and use a browser bundler. Follow the
16
+ [package quick start](../README.md#quick-start) to play the bundled `confirmation`
17
+ recipe with public imports from `audiobits` and `audiobits/recipes`. Create engines and
15
18
  sounds without browser activation, then invoke `start()` synchronously inside
16
19
  a user gesture and await it before `play()`. Surface failures and allow a fresh
17
20
  gesture retry. Never queue playback across Stop, hiding, or disposal.