Download the PHP package maximal/audio-waveform without Composer

On this page you can find all versions of the php package maximal/audio-waveform. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package audio-waveform

Audio waveform generator on PHP with SoX

Install

Install SoX and some of its handlers for different audio formats. Also you need a GD module or other extension providing imagecreatetruecolor() functionality. For example, on Ubuntu:

Install this package using the Composer require command:

or add the package name to the require section in your composer.json file:

and then run:

Use

In your PHP source:

One Phase

To get positive waveform only (i.e. one phase) pass onePhase parameter set to true:

Stereo source:

Mono source:

Settings

All settings are public static members of Waveform class:

Examples

Red waveform with half-transparent peaks:

Red waveform and fully transparent background:

Ubuntu Linux thumbnailer for Nautilus file explorer

  1. Install the package to some directory. For example: /opt/maximal/audio-waveform-php

  2. Place the following code in the file /usr/share/thumbnailers/waveform.thumbnailer

    This repository contains an example thumbnailer file. See: usr/share/thumbnailers/waveform.thumbnailer.

    Also you can add other MIME types to the MimeType section of your thumbnaler file as long as they are supportable by SoX utility.

  3. Clear thumbnail cache and restart Nautilus:

  4. Since then all your audio files with specified MIME types will be shown in Nautilus using its small waveforms. By default they are WAV, MP3 and OGG files.

Integration with other libraries (e.g. wavesurfer.js)

Waveform class has getWaveformData() method for retrieving the waveform data without generating the image. You can use it to integrate with different libraries, for instance, with the great wavesurfer.js.

To get positive values only (i.e. one phase) pass onePhase parameter set to true:

Contact the author


All versions of audio-waveform with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-gd Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maximal/audio-waveform contains the following files

Loading the files please wait ....