MIERZWA

AUDIO LIBRARY · AUDACITY INTEGRATION

In development · downloads are not available yet

Change the pitch. Keep the timing.

An offline audio processing library by Jaroslaw Mierzwa — Mierzwa Studio. The accompanying Audacity panel lets you process a selection and compare it with the original on a separate track.

Two parts. One audio engine.

SDK

For your own application

The SDK contains the processing library, C headers, examples and documentation. A program supplies audio samples and receives the result. It does not need to launch Audacity.

AUDACITY

For Audacity users

The Audacity integration is a separate companion panel. It obtains the selected audio, processes it with Perun HQ, then adds a new, muted track at the original start time. It is an offline connector, rather than a VST3 effect or a real-time processor.

Actual Perun HQ companion panel on Linux
Actual prototype interface

What the current prototype does

  • Retunes material based on A=440 Hz to A=432 Hz while preserving the number of samples and sample rate.
  • Processes mono or stereo at 44,100 or 48,000 Hz; the Audacity selection limit is 120 seconds.
  • Uses 32-bit floating-point WAV between Audacity and Perun, independently of your normal export settings.
  • Keeps the original for comparison. Cancel is available before the result is committed; it is disabled during import.
  • Provides a 440 → 440 control mode and a standalone WAV processing option.

Compatibility: verified and planned

PlatformCurrent status
Linux x86_64Prototype verified on JPC and the build server; Audacity 3.7.9 integration tested.
Arch / Ubuntu / DebianOne Linux engine is possible, but distribution versions and runtime libraries require individual compatibility checks.

The current Linux library requires glibc 2.35 and libstdc++ symbols through GLIBCXX_3.4.32. This is not a promise of compatibility with every Linux distribution. Audacity 4.x has not been tested with this connector. Windows, macOS, ARM64 and FreeBSD are outside the current work.

Audacity: from a file to a result

These are the steps for the current Linux prototype, tested with Audacity 3.7.9. Download packages will become available after release.

  1. Enable the connection

    In Audacity, open Edit → Preferences → Modules. Set mod-script-pipe to Enabled, then restart Audacity. The module allows trusted local programs to control the editor; disable it when you no longer need it.

  2. Open the companion panel

    Once the package is available, extract the whole folder and open a terminal there. Run ./launch.sh. Python 3 and Tk are required. To add the panel to your application menu, run python3 install_launcher.py once; no administrator privileges are needed.

  3. Choose one track and a region

    Import audio using File → Import → Audio. Stop playback. Select a region of one mono or stereo track, up to 120 seconds, entirely within the track.

  4. Connect and process

    In the Perun panel, choose Check connection, select 432 Hz, then Process selection. The progress bar describes the current stage. You may move the windows, but do not edit the project during processing.

  5. Compare the result

    Perun adds a muted result track aligned to the selected region. Mute the source and unmute the result to compare them. Do not play both together when judging the sound.

  6. Save your finished audio

    Use Audacity’s normal export after checking levels. The library does not automatically normalise or limit peaks. The original source file is not overwritten by the connector.

Prefer working with a WAV file?

Choose Process WAV file in the panel, select an input and a new output name. Existing files are protected against overwriting. Supported inputs: PCM16/24/32 and float32 RIFF WAV, mono/stereo, 44.1/48 kHz. The current reader limit is 256 MiB. You can import the result into Audacity yourself.

If the connection does not work

Check that Audacity has an open project, no blocking dialog, and mod-script-pipe enabled. Use one connector at a time. On some Audacity 3.7.x installations, startup plug-in scanning can replace the scripting pipes. A separate test profile used Effects/SkipEffectsScanAtStartup=1 as a workaround; this requires manual scanning for new effects. Do not edit Audacity’s configuration while it is running. After a pipe timeout, restart Audacity before retrying.

Audacity · mod-script-pipe

Connecting the SDK to your program

The SDK exposes a C interface, so a C or C++ application can call it directly and other languages can use a native binding. The HQ sink entry point receives a complete input buffer and returns consecutive output chunks. Cancellation and progress use callbacks. This is offline processing: chunked output does not mean the whole engine is a real-time stream.

  1. Include the SDK headers and link or load the library for the matching system and CPU architecture.
  2. Supply finite, interleaved float32 samples. Keep the input buffer alive throughout processing.
  3. Configure source and target tuning, progress/cancellation callbacks and the output sink.
  4. Write each returned chunk in order, verify the frame count and publish the finished output only after success.
ptp_process_f32_to_sink_hq(input, frames, channels, sample_rate,
    440.0, 432.0, sink_callback, user_data, &options);

For the verified example, source tuning is 440 Hz and target tuning is 432 Hz. The program does not detect the recording’s tuning automatically. Memory reported for the output chunk is not the total process memory.

Downloads

Downloads will be served directly from mierzwa.us. Files are currently withheld; neither the SDK nor the connector can be downloaded from this page yet.

LINUX x86_64

PerunTimePitch HQ SDK

Current Linux x86_64 SDK: 240 kB compressed / 614 kB unpacked. The shared library is 243 kB.

Started downloads: 0

LINUX x86_64

Audacity integration

Panel, local launcher and setup guide. The release package size will be shown when available.

Started downloads: 0

The counter records started package transfers, not visits or clicks on “Coming soon”. It does not require names or IP addresses. Before release the count stays at zero.

A few useful distinctions

Does “432 Hz” mean a 432 Hz sample rate?

No. It is a tuning reference. Audio here is still sampled at 44,100 or 48,000 samples per second.

Is this the Audacity application?

No. Audacity is a separate application. This project provides the Perun library and a companion integration.

Does the prototype include 528 Hz or formant controls?

The current panel offers 432 Hz and an unchanged 440 Hz control. It does not offer a 528 Hz preset, automatic tuning detection or formant controls.

Can I download it now?

Not yet. The page and download counters are prepared, but file distribution remains disabled. Release terms and verified packages will be added before downloads are enabled.