An open API service indexing awesome lists of open source software.

https://github.com/umjammer/vavi-sound-nsf

🔊 NSF (NES Sound File) Java sound SPI
https://github.com/umjammer/vavi-sound-nsf

java java-ports jitpack nsf pure-java sound spi

Last synced: 6 months ago
JSON representation

🔊 NSF (NES Sound File) Java sound SPI

Awesome Lists containing this project

README

          

[![Release](https://jitpack.io/v/umjammer/vavi-sound-nsf.svg)](https://jitpack.io/#umjammer/vavi-sound-nsf)
[![Java CI](https://github.com/umjammer/vavi-sound-nsf/actions/workflows/maven.yml/badge.svg)](https://github.com/umjammer/vavi-sound-nsf/actions/workflows/maven.yml)
[![CodeQL](https://github.com/umjammer/vavi-sound-nsf/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/umjammer/vavi-sound-nsf/actions/workflows/codeql-analysis.yml)
![Java](https://img.shields.io/badge/Java-17-b07219)

# vavi-sound-nsf

nes logo© Nintendo

[NSF](https://www.nesdev.org/wiki/NSF) Java Sound SPI powered by [nsf](https://github.com/orangelando/nsf) and festalon (wip)

### chips

| name | status | comment |
|------|:------:|---------|
| AY | | |
| FDS | ️ | |
| MMC5 | ️ | |
| N106 | ️ | |
| OPLL | ️ | |
| VRC6 | | |
| VRC7 | ️ | |

## Install

* [maven](https://jitpack.io/#umjammer/vavi-sound-nsf)

## Usage

```java
AudioInputStream ais = AudioSystem.getAudioInputStream(Paths.get(nsf).toFile());
Clip clip = AudioSystem.getClip();
clip.open(AudioSystem.getAudioInputStream(new AudioFormat(Encoding.PCM_SIGNED, 44100, 16, 1, 2, 44100, false, props), ais));
clip.loop(Clip.LOOP_CONTINUOUSLY);
```

### properties for target `AudioFormat`

* `track` ... specify track # in the file to play
* `maxPlaySecs` ... specify max play time in \[sec]

## References

* [nsf](https://github.com/orangelando/nsf)
* [Festalon original](https://projects.raphnet.net/)
* [Festalon github](https://github.com/ahefner/festalon)

## TODO

* ~~improve decoding speed (i7 imac)~~
* on m2 ultra mac no problem
* ~~use jpl instead of jul~~
* ~~festalon~~
* spi
* fidlib