Skip to content

v0.2.200

Choose a tag to compare

@proggeramlug proggeramlug released this 21 Mar 22:17
· 4636 commits to main since this release

What's New

Fix: perry setup now saves to project perry.toml

All 3 platform setup wizards (iOS, Android, macOS) previously skipped writing project-specific config when perry.toml didn't exist — they just printed manual instructions. Now the file is auto-created with the correct [ios], [android], or [macos] section.

Audio Capture API (perry/system)

Real-time microphone capture with A-weighted dB(A) metering on all 6 platforms:

import { audioStart, audioGetLevel, audioGetPeak, audioGetWaveformSamples } from "perry/system";

audioStart();
setInterval(() => console.log(audioGetLevel(), "dB"), 100);
  • audioStart() / audioStop() — start/stop capture
  • audioGetLevel() — smoothed dB(A) reading
  • audioGetPeak() — peak amplitude (0.0–1.0)
  • audioGetWaveformSamples(count) — recent samples for visualization
  • getDeviceModel() — device model identifier
Platform Backend
macOS AVAudioEngine
iOS AVAudioSession + AVAudioEngine
Android AudioRecord (JNI)
Linux PulseAudio
Windows WASAPI
Web getUserMedia + AnalyserNode

Camera API (perry/ui, iOS)

Live camera preview with color sampling:

import { CameraView, cameraStart, cameraSampleColor, cameraSetOnTap } from "perry/ui";

const cam = CameraView();
cameraStart(cam);
cameraSetOnTap(cam, (x, y) => {
  const rgb = cameraSampleColor(x, y);
});
  • CameraView() — AVCaptureSession-based live preview widget
  • cameraStart / cameraStop / cameraFreeze / cameraUnfreeze
  • cameraSampleColor(x, y) — pixel-level color sampling (5x5 averaged)
  • cameraSetOnTap(handle, callback) — tap-to-sample with normalized coordinates

Documentation