Class Util

Description

Contains static utility methods

  • since: 1.0

Located in /Util/Util.php (line 21)


	
			
Method Summary
static array binaryToHex (binary $byteSequence)
static string binaryToHexCallback (mixed $value)
static string getDeltaByteSequence (int $ticks)
static int getTicksFromDeltaByteSequence (string $byteSequence)
static binary pack ( $ascii, int $ascii,...)
static array unpack (binary $byteSequence, [string $limit = '*'])
Methods
static method binaryToHex (line 115)

Converts a binary (e.g. packed) byte sequence into a hexadecimal string

static array binaryToHex (binary $byteSequence)
  • binary $byteSequence
static method binaryToHexCallback (line 128)

array_map() callback from binaryToHex()

static string binaryToHexCallback (mixed $value)
  • mixed $value
static method getDeltaByteSequence (line 93)

Gets the byte sequence for the given delta value

static string getDeltaByteSequence (int $ticks)
  • int $ticks: The delta value
static method getTicksFromDeltaByteSequence (line 72)

Gets the number of MIDI clock ticks for the given delta binary sequence

static int getTicksFromDeltaByteSequence (string $byteSequence)
  • string $byteSequence: Delta byte sequence in binary
static method pack (line 54)

Packs 8-bit integers into a binary string

static binary pack ( $ascii, int $ascii,...)
  • int $ascii,...: 8-bit unsigned integer
  • $ascii
static method unpack (line 42)

Unpacks a binary string into an array

static array unpack (binary $byteSequence, [string $limit = '*'])
  • binary $byteSequence
  • string $limit: An integer or "*"

Documentation generated on Sun, 25 Oct 2009 22:38:22 -0700 by phpDocumentor 1.4.3