Happy new year everyone! Be looking for some interface updates this year. We are also planning to restructure the site with bread crumbs, and other stuff that will make it easier for navigation. Hopefully we might see pte 2.0?
As always if you have any questions or suggestions, leave a post in the comments.
Tuesday, January 01, 2008
Monday, November 12, 2007
RE: Extracting Song Information With The Parser
This is in response to a comment left about the php ptparser. Parsing power tab song info and displaying it is pretty easy. See the following code below for example.
<?php
require_once "powertabdocument.php";
$ptb = new PowerTabDocument ();
$ptb->Load ("powertabfile.ptb");
// Example see more functions below:
$ptb->GetHeader()->GetSongArtist();
// GetLessonAuthor()
// GetLessonCopyright()
// GetLessonLevel()
// GetLessonMusicStyle()
// GetLessonNotes()
// GetLessonSubtitle()
// GetLessonTitle()
// GetSongArranger()
// GetSongArtist()
// GetSongAudioReleaseTitle()
// GetSongAudioReleaseType()
// GetSongAudioReleaseYear()
// GetSongAuthorType()
// GetSongBassScoreNotes()
// GetSongBassScoreTranscriber()
// GetSongBootlegDate()
// GetSongBootlegTitle()
// GetSongComposer()
// GetSongContentType()
// GetSongCopyright()
// GetSongGuitarScoreNotes()
// GetSongGuitarScoreTranscriber()
// GetSongLyricist()
// GetSongLyrics()
// GetSongReleaseTitle()
// GetSongReleaseType()
// GetSongTitle()
?>
Labels:
open source,
php,
power tab parser
Sunday, November 11, 2007
Let it Snow! Let it Snow! Let it Snow!
The Holidays are coming! We've updated the main page chock full of Christmas tabs, and a snowy interface. Enjoy! ... and Happy Holidays!
-apt
-apt
Labels:
christmas,
holidays,
site update
Saturday, September 29, 2007
Updates are Coming
Be looking for updates in the next couple of days. We've had to re-sync our DBs with our mother site. Thanks for your patience.
-apt
-apt
Labels:
site update
Wednesday, August 22, 2007
Convert MusicXML to Power Tabs
Here's a source snippet that will allow you to convert "P1" of a MusicXML score to a power tab file. This is just an example of what you can do with the php power tab classes. Keep in mind, you must have the latest version of the PHP ptparser for this to work.
The score will look funny when you open it. Run the score polisher. This will make it readable.
Hopefully this will inspire someone to make a complete converter.
The score will look funny when you open it. Run the score polisher. This will make it readable.
Hopefully this will inspire someone to make a complete converter.
<?
require_once "powertabdocument.php";
$ptb = new PowerTabDocument ();
$durArr = array('64th'=>64, '32nd'=>32, '16th'=>16,'eighth'=>8, 'quarter'=>4, 'half'=>2, 'whole'=>1);
$ptb->Load ("BlankPowerTabFile.ptb");
$guitarScore = &$ptb->GetGuitarScore();
$sxe = simplexml_load_file("music.xml");
$s = -1;
$measureCt = 3;
foreach ($sxe->part->measure as $measure) {
if ($measureCt > 1) {
$guitarScore->m_systemArray[++$s] = new System;
$measureCt = 1;
$p=0;
}
$firstStaff = &$guitarScore->GetSystem($s)->GetStaff(0);
foreach ($measure->note as $note) {
$string = $note->notations->technical->string;
$fret = $note->notations->technical->fret;
$tied = $note->notations->tied["type"];
$dur = $durArr[(string) $note->type];
if ( isset($string,$fret) ) {
if (!$note->chord) {
$thePosition = &$firstStaff->m_positionArray[0][$p];
$thePosition = new Position ();
$thePosition->SetDurationType($dur);
//$thePosition->SetPreviousBeamDurationType($prevDur);
$prevDur = $dur;
++$p;
}
array_push($thePosition->m_noteArray,new Note($string-1, $fret) );
if ($tied=="stop")
$thePosition->m_noteArray[count($thePosition->m_noteArray) - 1]->SetTied();
}
}
$barLines = &$guitarScore->GetSystem($s)->m_barlineArray;
array_push($barLines,new Barline($p) );
++$measureCt;
}
$ptb->Save ("ConvertedFileName.ptb");
?>
Thursday, August 09, 2007
PHP Power Tab Parser

We have just Written and Released a PHP Power Tab Parser. It is in beta, so please leave comments and report any bugs you may have.
This parser is a translation of Brad Larson's "ptparser." You must have PHP v5 or better. This package will only read and write power tab v1.7 files. See the sample script below to get your feet wet. This will load a power tab file and watermark it with a line of text at the top of the guitar score. This script is great if you are serving up power tab file, and you don't want someone stealing your power tabs, and redistributing them.
<?
require_once "powertabdocument.php";
$ptb = new PowerTabDocument ();
$ptb->Load ("powertabfile.ptb"); // Open and Load Power Tab
/* Water Mark File */
$guitarScore = &$ptb->GetGuitarScore(); // get the guitar score
$lastIndex = $guitarScore->GetFloatingTextCount(); // get the position of the last floating text element
$waterMark = &$guitarScore->m_floatingTextArray[$lastIndex];
$waterMark = new FloatingText ();
$rect = array (50,3,230,17); // create a new coordinate element
$waterMark->SetRect($rect);
$waterMark->SetText('File Downloaded @ AllPowerTabs.com');
/* Done Water Marking File */
$ptb->Save ("powertabfile.ptb"); // Save Power Tab File
?>
We have a lot planned for the feature, so keep checking the blog.
Labels:
digg,
php,
power tab parser
Friday, July 06, 2007
Quick Site Update. Search Engine

We have cleaned up the search results page to make it more legible. The font size has been decreased. The highlight function has been changed to bold.
We have also improved the algorithm for spelling correction. (Did you mean?)
Hope this makes your search a little better and easier on the eyes.
-apt
Labels:
search,
site update
Subscribe to:
Posts (Atom)