Administrator Guide
Check the installation instructions for a quick overview of the process. Please consult the README and INSTALLATION files included in the archive. In addition, you can ask questions or report problems in the issues page on Github.
The application takes several steps when a file is imported. These steps prepare the file, populates the required fields in the database and creates auxiliary files to allow working with this files from a web browser. The steps are:
- The file is checked to see that it is a valid soundfile. This check is done with the application SoX.
- Technical data of the file (duration, format, number of channels, bit rate, sampling rate) are extracted using the utility soxi and stored in the database.
- Waveform and a spectrogram images are created using a Python script.
- An mp3 version of the file is created using LAME. This allows to hear the file over the web.
The following figure illustrates a typical flow of the data in the application. The sounds are recorded and then stored as digital files, preferably in an uncompressed format like wav. The soundfiles in wav format can be compressed using the lossless format FLAC, which reduces the file size by about 50%. Then the files are imported to the application to populate the database and create the auxiliary files.
Development
This section includes topics like:
- General development concepts behind the application
- Why some things were done the way they were
- Some notes about the database structure
Additional options for the config.php file
The config.php file requires, at the least, the credentials for the MySQL database.
#Database settings $host = "localhost"; $user = ""; $password = ""; $database = "";
The rest of these settings are optional:
Custom logo
$app_logo="images/logo2.png";
Custom logo link
$homelink = "http://www.example.com/somedir/";
Name for the tag for the marking tool
$mark_tag_name = "Species";
Use R
$useR = FALSE; #TRUE or FALSEIf true, you can set the custom path for the R installation you want to use and other Rscript arguments. Can be left as it is to use the default:
$Rscript = "Rscript --vanilla ";For ADI calculation, set these variables:
#ADI settings $R_ADI_db_value = "-50"; #dBFS ##The spectrogram should be drawn from 0 to this ## frequency, in Hertz. Default is 10000 Hz. $R_ADI_max_freq = "10000"; #in Hz ##How wide is each frequency band $R_ADI_freq_step = "1000"; #in Hz
Use Wordpress for users
$login_wordpress = FALSE; #TRUE or FALSE $wordpress_require = '/wp-blog-header.php';
Set as a no login website?
$no_login=FALSE; #TRUE or FALSE
Force login?
$force_login=FALSE; #TRUE or FALSE
Disable viewer
$special_noopen=FALSE;
Disable background processes
$special_noprocess=FALSE;
Integration with other software
The application is intended to be used as a stand-alone installation or as part of an already-existing sounds database.
The script file_obtain.php will manage a sound file from another sound database, archive or even from anywhere in the web!
Obtaining files from the web
To obtain a sound file from the web you need to install GNU Wget (if its not already installed). Using any language, just provide file_obtain.php with 3 variables using GET:
- file: full file path and file name
- method=2
- fileid: a numeric id that identifies the file
Its important to note: don't include the http:// part in the file path. The script will use wget to obtain the file. Then another script will check that the file is a valid sound file or delete it from the server if it can not determine that it is valid.
Example using a Cuckoo sound sample from birdsongs.it:
http://www.localserver.com/pumilio/file_obtain.php?file=www.birdsongs.it/songs/cuculus_canorus/call1.wav&method=2&fileid=101
Obtaining files from the same server
Using any language, just provide file_obtain.php with 3 variables using GET:
- file: full file path (internal) and file name
- method=1
- fileid: a numeric id that identifies the file
Its important to note: the path name must be the internal path, for example /var/www/.... The script will copy the file. Then another script will check that the file is a valid sound file or delete it from the server if it can not determine that it is valid.
Example:
http://www.localserver.com/pumilio/file_obtain.php?file=/var/www/anotherapp/sounds/sound1.wav&method=1&fileid=101