Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ullenius/gbs-lib
A Java library for reading GBS-files and reading / manipulating the tags
https://github.com/ullenius/gbs-lib
gameboy gameboy-color gbs java lgplv2 maven tagger
Last synced: 24 days ago
JSON representation
A Java library for reading GBS-files and reading / manipulating the tags
- Host: GitHub
- URL: https://github.com/ullenius/gbs-lib
- Owner: ullenius
- License: lgpl-2.1
- Created: 2020-04-09T14:22:57.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-14T06:36:37.000Z (over 4 years ago)
- Last Synced: 2024-11-08T10:50:39.606Z (3 months ago)
- Topics: gameboy, gameboy-color, gbs, java, lgplv2, maven, tagger
- Language: Java
- Homepage: https://ullenius.github.io/gbs-lib/
- Size: 125 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# gbstag-lib : Java library for GBS-files (Game Boy Sound)
A Java library for reading gbs files and reading / manipulating the tags.
GBS-files are sound files containing ripped chiptune music from Game Boy and
Game Boy Colour games. GBS stands for Game Boy Sound System.## Features
* :heavy_check_mark: 100% Java (Java 8) :coffee:
* :heavy_check_mark: Supports UTF-8 encoding in the tags!
* ImplementsComparable
for sorting out of the box!## How to use it
### Opening a gbs file
```javaGbs gbsfile = new GbsFile("/tmp/supermarioland.gbs");
Tag tag = gbsfile.getTag();System.out.println("Version number: " + tag.getVersionNumber());
System.out.println("This gbs file contains: " + tag.getNumberOfSongs() + " songs");
System.out.println("The first one is no. " + tag.getFirstSong());System.out.println("Author:\t" + tag.getAuthor());
System.out.println("Title:\t" + tag.getTitle());
System.out.println("Copyright:\t" + tag.getCopyright());
```### Saving a gbs file
```java
gbsfile.save();
```### Setting tag values
```java
Gbs gbsfile = new GbsFile("/tmp/supermarioland.gbs");
SimpleGbsTag tag = gbsfile.getTag();tag.setAuthor("Koji Kondo");
tag.setCopyright("2000 Nintendo");
tag.setTitle("Wario Land 5");
```### Sorting tags
```java
List myTags = new ArrayList<>();
myTags.add(superMarioLand);
myTags.add(warioLand3);
myTags.add(donkeyKongLand);
myTags.sort(null); // That's it! :)
```## Build
This is a Maven project.To build simply run
```sh
mvn install
```To run the tests run
```sh
mvn test
```## Development
For command-line or GUI programs see [gbstag](https://www.github.com/ullenius/gbstag) and [jbstag](https://www.github.com/ullenius/jbstag)### Interface-segregation principle
There are a number of interfaces included for theGbsTag
class.1.
Tag
- read/write all tags. Reads low-level tags
1.LowLevel
- read only, low-level tags
1.ReadOnlyGbsTag
- read only, all tags
1.ReadOnlySimpleGbsTag
- read only author, title and copyright
1.SimpleGbsTag
- read/write author, title and copyright### Documentation
Please refer to the [Javadocs provided](https://ullenius.github.io/gbs-lib/) for further details.## Licence
LGPL v2.1 onlySee [COPYING](COPYING)
Further reading:
* [The perils of LGPLv3](https://nikmav.blogspot.com/2013/03/the-perils-of-lgplv3.html)
* FSF [LGPL compatibility matrix](http://gplv3.fsf.org/dd3-faq#gpl-compat-matrix)### Libraries and copyright
* Image by [Flappiefh](https://fr.wikipedia.org/wiki/Utilisateur:Flappiefh) (2013) from Wikimedia Commons. [Creative Commons Attribution-Share-Alike 3.0 Unported licence](https://creativecommons.org/licenses/by-sa/3.0/deed.en).