NAME

Peta::Synth::Engine::GPU - the voices rendered on the graphics card

VERSION

version 0.2610180

DESCRIPTION

Every partial of every voice of a quantum at once, in compute shaders, through pperl's Peta::WebGPU; 32-bit floats, so it agrees with the Perl engine to about a hundred-thousandth of full scale. Needs pperl and a graphics card. See Peta::Synth::Engine for the interface.

METHODS

new, name

new(%arg) makes the engine (it dies where it cannot run here); name is gpu.

adapter

The graphics card it renders on: name, backend, driver and more.

render

render(\@voices, $n, $rate): the voices' next $n samples, mixed, as array references: left, right and the reverb send.

render_reverb

render_reverb(\@voices, $n, $rate, $reverb): as render, and the Peta::Synth::Reverb's wet left and right of the send, on the card (none when the reverb is off).

reads_waves

False: the card turns partials for next to nothing, while a wave sequence's controls are worked out and packed in Perl; it reads them where they are asked for all the same.

AUTHOR

PetaMem s.r.o. <info@petamem.com>

COPYRIGHT

Copyright (c) 2026 PetaMem s.r.o.

LICENSE

This package is free software, dual-licensed under the Artistic License 2.0 and the BSD 2-Clause License. See the LICENSE file of the distribution.