403Webshell
Server IP : 170.10.161.225  /  Your IP : 216.73.216.78
Web Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : ON
Directory :  /lib64/perl5/vendor_perl/Prima/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/perl5/vendor_perl/Prima/examples/pitch.pl
use strict;
use warnings;
use Prima;
use Prima::Utils;

=pod

=head1 NAME

examples/pitch.pl - A sound example

=head1 FEATURES

Tests the implementation of apc_beep_tone() function.

=cut


my %octave = (
	'C'  => 523,
	'B'  => 493,
	'A#' => 466,
	'A'  => 440,
	'G#' => 415,
	'G'  => 391,
	'F#' => 369,
	'F'  => 349,
	'E'  => 329,
	'D#' => 311,
	'D'  => 293,
	'C#' => 277,
);

$_ = 'E2D#EF2E2  G#2A4';
#$_ = 'AEAEAG#2 2EG#EG#A2 2EAEAG#2 2EG#EG#A2 AB2 BC2 C2BAG#A2 AB2 BC2 C2BAG#A3';

for ( m/\G([A-G\s][\#\d]*)/g) {
	my $d = (s/(\d+)$//) ? $1 : 1;
	$octave{$_} ?
		Prima::Utils::sound( $octave{$_}, 100 * $d) :
		select(undef,undef,undef,0.1 * $d);
}


Youez - 2016 - github.com/yon3zu
LinuXploit