orklev2-portaudio

Explain Orkid's PortAudio backend callback flow and Singularity synth integration.

35|16|Updated Feb 10, 2013
One-click install
npx skills add https://github.com/tweakoz/orkid --skill orklev2-portaudio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: orklev2-portaudio
Source: https://github.com/tweakoz/orkid/tree/main/.claude/skills/orklev2-portaudio
Command: npx skills add https://github.com/tweakoz/orkid --skill orklev2-portaudio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides focused documentation and actionable answers for developers working with Orkid's PortAudio audio backend so they can understand callback threading, data format conversions, device selection, and how the Singularity synth is driven without scanning the entire codebase.

Core Features & Use Cases

  • PortAudio callback model: Describes the single-callback flow where PortAudio invokes the audio thread callback, how input is converted from int16 to float, how the Singularity synth is called to compute output, and how buffers are interleaved for output.
  • Device selection and resolution: Explains enumerating PortAudio devices, resolving 4-character base36 short IDs to device names, matching channel counts, and opening/starting streams with overrides.
  • Platform and performance notes: Documents sample formats (int16 input, float output), typical frames-per-buffer differences between macOS and Linux, and CPU load tracking via the PortAudio API. Use cases include diagnosing callback latency or artifacts, verifying device mapping by short ID, and understanding how audio data flows into and out of the Singularity synth for cross-platform playback.

Quick Start

Explain how Orkid's PortAudio backend converts int16 input to float output, selects devices by short ID, and how the Singularity synth is invoked on the PortAudio callback thread.

Frequently Asked Questions about orklev2-portaudio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does the PortAudio callback work with the Singularity synth in Orkid?

The PortAudio callback drives the Singularity synth by invoking the audio thread, converting int16 input to float, computing synth output, and interleaving buffers for cross-platform playback within the ork.lev2 codebase.

How do I select an audio device using short IDs in Orkid's PortAudio backend?

Orkid's PortAudio backend selects audio devices by resolving 4-character base36 short IDs to device names, matching channel counts, and opening streams using these short ID overrides.

How are int16 audio inputs converted to float in the Orkid audio backend?

Int16 audio inputs are converted to float within the PortAudio callback thread before being passed to the Singularity synth for processing, ensuring compatibility with the synth's internal floating-point pipeline.

Does Orkid's PortAudio backend track CPU load and buffer sizes across macOS and Linux?

Yes, the backend tracks CPU load via the PortAudio API and handles frames-per-buffer differences between macOS and Linux, using int16 input and float output sample formats for cross-platform stream configuration.

Why am I getting audio artifacts or latency in the Singularity synth callback?

Audio artifacts or latency in the Singularity synth often stem from PortAudio callback buffer mismatches, incorrect frames-per-buffer settings, or CPU load spikes, diagnosable by checking stream configuration flags and buffer interleaving.