- Music/Stroke - Fix increment time type
- MIDI writer - Fix apply static duration from tempo
- JSON exporter: Fix some malformed UTF-8
- Music/Measure: refactor some methods
- Importer: fix exporting lyrics to JSON and import with
fromString
causes warnings with null values in Lyric, Marker and Text.
- Music models - Enforce types
- Music models - Remove Exception when getting non existing beats and measures
- Importer - Fix bad type for track name
- Fix bad type for division time conversion
- All musics models now work with strict types
PhpTabs\Music\Lyric::getLyrics()
now returns a string (before an array of strings)PhpTabs\Music\Beat
- Fix missing import forException
PhpTabs\Component\Serializer
Enforce implementation with abstract methods- Docs : fix some typos and missing labels
- Fix a warning when rendering an empty tabs
- Fix a malformed class name in the test suite
- Add symfony/thanks dependency
- Docs - Reorganize folders
A new manual at https://phptabs.readthedocs.io/
This release contains some new features, new shortcuts to ease usages, fixes in the core and removals.
PhpTabs::onlyTrack()
andPhpTabs::sliceTracks()
PhpTabs::onlyMeasure()
andPhpTabs::sliceMeasures()
Special thanks to @MrChros who asked and gave an implementation for this feature.
See manuals for slice methods and only methods
You may load file contents from database or a stream.
This can be done with IOFactory::fromString()
and
PhpTabs::fromString()
See manual for fromString
You may need to load contents from a previously parsed song.
This can be done with IOFactory::fromArray()
and
PhpTabs::fromArray()
See manual for loading from arrays
You can make IOFactory::fromFile()
or new PhpTabs()
with more file
formats.
See manual for parsing from files for all available formats.
Phptabs::save('filename.json')
will implicitly convert to JSONPhpTabs::save('filename.ser')
will implicitly convert to PHP serializedPhpTabs::save('filename.txt')
will implicitly convert to TEXTPhpTabs::save('filename.xml')
will implicitly convert to XMLPhpTabs::save('filename.yml')
will implicitly convert to YAML
See manual for saving to files for all available formats.
Phptabs::save('filename.dat', 'json')
will convert to JSON
Explicitly converting to YAML, XML, JSON and PHP serialized is now available.
Phptabs::convert('json')
Phptabs::convert('ser')
Phptabs::convert('txt')
Phptabs::convert('text')
Phptabs::convert('xml')
Phptabs::convert('yaml')
Phptabs::convert('yml')
See manual for all available formats
PhpTabs::toAscii($options)
PhpTabs::toVextab($options)
See manuals for rendering to ASCII and rendering to VEXTAB
PhpTabs::toJson($flags)
PhpTabs::toSerialized()
PhpTabs::toText()
PhpTabs::toXml()
PhpTabs::toYaml()
PhpTabs::toGuitarPro3()
PhpTabs::toGuitarPro4()
PhpTabs::toGuitarPro5()
PhpTabs::toMidi()
See manual for all available shortcuts
PhpTabs::save()
. This method now requires a pathname. Previously, calling it with no pathname was the same asPhpTabs::convert()
with no parameter.
-
PhpTabs::import()
andIOFactory::import()
have been removed and replaced byfromArray()
, more explicit about what it expects. -
PhpTabs::exportTrack()
has been removed. It was not really exporting a track. Indeed, it was exporting a song with a targeted track as an array. See PhpTabs::onlyTrack() instead. -
PhpTabs::export()
. It had a mixed signaturearray|string
which may be confusing. Furthermore, it was redundant withconvert()
method. So if you want an array seePhpTabs::toArray()
. For other formats, shortcuts have been created. For instance, exporting to JSON can be made withPhpTabs::toJson()
andPhpTabs::convert('json')
-
PhpTabs::save('php://output')
is not yet supported. It was the same thing as doing anecho PhpTabs::convert()
(with no parameter) -
getError()
,hasError()
,setError()
methods for PhpTabs and Tablature instances.
Trying to write a MIDI file with an empty song now throws an exception.
A new PhpTabs\Component\InputStream
class has been introduced to
handle content streams
File errors or parsing failures always throw \Exception.
- A new website at https://phptabs.readthedocs.io/
- More examples and manual for each part of the internal music model
Enforce test suite, code coverage > 80%
- Fix from scratch scenarios to Guitar Pro 3, 4 and 5 that gives
TypeError
exceptions for meta informations #12
- Type declarations have been specified
- Core : rewrite a large part of MIDI writer classes
- Fix MidiWriter corrupted files #12 #13 #6
- Fix some MIDI timing problems. There are still some work to fix some complex timings
- Fix some PHP8 deprecated messages
- Fix some MIDI reader types
- Add support for PHP 8.0RC
- Add auto assignement of the track number when it's stacked in a Song
- Enforce string types when massive assignment
- Support for PHP 7.4 : ASCII renderer was not working
- Automatically attach a Song dependency to a Track when it's added
Track::getMeasure($index)
now throws an Exception when index is not defined
- Remove PHP5 and HHVM support
- PHPUnit 7 is now the minimal supported version for testing
- Render as an ASCII tablature
- IOFactory tool to simplify instanciations
- getVersion() method
- getTime() method to simplify reading of beat durations in seconds
- Support for PHP 7.3
MidiReader is considered as stable whereas MidiWriter still has some bugs. It sometimes generates some corrupted MIDI files.
- #5 Special thanks to @motniemtin who asked for duration calculations
- A lot of bug fixes
- Render a tablature
- export() method
- exportTrack() method
- import() method
- fromJson() method
- fromSerialized() method
- Support for PHP 7.2
- Parser are now 20% faster than previous release, even more with PHP7 :)
- dump() method has been removed and replaced by export(). It has the same properties but it's a more coherent name (import() method)
Reader/Writer are made for external formats (Guitar Pro, MIDI) whereas Importer/Exporter are dedicated to internal formats (array, JSON, serialized, etc...).
- #1 and #2 Special thanks to @comarius who asked for a vextab renderer
- save() method
- convert() method
- dump() method (XML, JSON, YAML, Text, PHP array, PHP serialized)
- Add support for PHP 7.1
- Add support for code coverage (>70%)
- Code optimizations
- Remove a lot of dead code
- f9a703a Fix measure start must be an integer
- ee57ecc Fix tempo type
- Fresh documentation website
- Support of Guitar Pro 5 file format
- Support of MIDI file format
- Improved performance for all parsers
- More code comments
- Support of Guitar Pro 4 file format
- Access to instruments
- countInstruments()
- getInstruments()
- getInstrument($index)
- Fixes for Guitar Pro 3 file format
- Reader and writer for Guitar Pro 3 format