NAME
Peta::Synth::Fluid - FluidSynth as a reference: the same events, played from a SoundFont
VERSION
version 0.2610180
SYNOPSIS
use Peta::Synth::Fluid;
die $_ if $_ = Peta::Synth::Fluid::unavailable();
my ($left, $right) = Peta::Synth::Fluid::render(\@events, rate => 48000, length => 48000 * 3);
DESCRIPTION
To hear and measure this synthesizer's instruments against recorded ones: FluidSynth (the program fluidsynth) plays the same MIDI events from a General MIDI SoundFont, by default FluidR3 at /usr/share/soundfonts/FluidR3_GM.sf2. Used by bin/peta-analyze, devbin/compare-fluid and devbin/audit-fluid; nothing else needs it.
FUNCTIONS
unavailable
unavailable($soundfont): the empty string if FluidSynth can play here, else why not.
render
render(\@events, rate => 48000, soundfont => ..., effects => 0, length => $samples): the events (times in seconds, as "schedule" in Peta::Synth::Synth takes them) as FluidSynth plays them, left and right. Its reverb and chorus are off unless effects; length cuts or pads the sound to that many samples (FluidSynth stops at the last event; the sound is rendered to there).
home
home($program): the key a program is compared from (48, the basses 36, the high instruments 72, violin, trumpet, flute and the like 55); its comparisons go two octaves up from it.
render_file
render_file($midi, $wav, %opt): a MIDI file into a WAV file.
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.