Skip to content

Instantly share code, notes, and snippets.

View HaraldJoerg's full-sized avatar

Harald Jörg HaraldJoerg

  • Munich
View GitHub Profile
@HaraldJoerg
HaraldJoerg / pdl_sound.pl
Created April 12, 2023 18:36
(Linux) sound with Perl and a few lines of PDL
use PDL;
my $freq = 440;
my $rate = 8000; # default for aplay
my $samples = pdl[0..$rate-1];
open (my $aplay,'|-','aplay');
my $raw_sound = byte(zeroes($rate));
my $amplitude = 64;
@HaraldJoerg
HaraldJoerg / opaddb.pm
Last active March 9, 2022 14:09
Extend the Perl debugger to display Object::Pad objects
package dumpvar;
=encoding utf8
=head1 NAME
Devel::opaddb.pm - Display Object::Pad objects in Perl's debugger
=head1 SYNOPSIS