Giter Club home page Giter Club logo

mmontag / chip-player-js Goto Github PK

View Code? Open in Web Editor NEW
319.0 5.0 16.0 640.4 MB

Web-based music player for a variety of video game and chiptune music formats.

Home Page: https://chiptune.app

License: GNU General Public License v3.0

JavaScript 1.76% HTML 0.03% CSS 0.10% CMake 1.07% C++ 24.01% C 71.59% Makefile 0.38% Shell 0.15% Roff 0.01% M4 0.11% Assembly 0.54% Python 0.11% Perl 0.02% QMake 0.01% Batchfile 0.07% Dockerfile 0.02%
chiptunes midi music-player video-games retro

chip-player-js's People

Contributors

boukichi avatar chouquette avatar cmatsuoka avatar dependabot[bot] avatar derselbst avatar divideconcept avatar flamefire avatar hexwab avatar jpcima avatar jprjr avatar kode54 avatar loki666 avatar mistydemeo avatar mmontag avatar nosuck avatar nyanpasu64 avatar okaxaki avatar opna2608 avatar pmachapman avatar schellingb avatar sezero avatar shlomif avatar superctr avatar tatokis avatar terriblefire avatar valleybell avatar vitamin-caig avatar wallneradam avatar wiliamsouza avatar wohlstand avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chip-player-js's Issues

Favourite saving doesn't appear to work

Hi
When I attempt to save a song as favourite the little heart icon goes yellow for a second and then reverts back to its original colour. Nothing can be found under the favourites tab.

Naturally, I am logged in.

Here's my user agent string in case that is useful: Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

add repeat function

Please, add repeat function! [ask for a function]

Sometimes, I want to listen to music more than it's length.

License?

Hi, @mmontag ๐Ÿ˜„ .
This is a very interesting and most feature complete javascript based music player.

I am really curious, what is license for this project as I cannot find any license notes here, except at every 3rd party player library project directory?

Thanks.

Repeat-One should use loop points where supported

Follow up to #51. Some formats have native support for looping, i.e. NSF files that run forever, or MIDI with loop points.

Repeat-One mode should take advantage of this, i.e. Repeat-One should have multiple effects:

  • Repeating
    • Lock the sequencer to the current song (advancing the sequencer restarts the song; already implemented)
  • Looping
    • Disable auto-advance when player position reaches end of song. Slider handle should stick at the end of the slider range
    • Enable looping behavior within the player engines that support it

These are two distinct behaviors, but I think it makes sense to link them together under Repeat-One.

More PC game music

I don't know how you would achieve this, but I would like to be able to listen to a few more PC game music tracks e.g:

  • Transport Tycoon
  • Theme Hospital
  • Normality / Normality Inc

Support UI themes/skins

Right now the CSS style situation is scattered.

Most styles are defined in a single styles.css file, but some styles are defined in component-local CSS objects. Some styles are defined inline in JSX.

The local component CSS rules out the possibility of supporting separate skins for the player.

The layout of the player is tightly coupled to the component structure. (Maybe a fixed layout is fine for now.)

In order to support themes, all the CSS needs to exist either in a styles.css file, or using a CSS-in-JS library.

Keep voices updated in MIDI player

The "Voices" panel is slightly different for each player.
In the case of the MIDI player, it displays the initial GM instrument on each MIDI channel (not MIDI tracks).

The instrument played on each channel can change during the course of the song with a "program change" event. The voices displayed in Chip Player then will be incorrect because it does not update.

We should intercept program change events and update a state map of Channel โ†’ Instrument inside the MIDI player.

Mobile "first"

Fix layout on mobile devices.

  • text wraps ugly
  • title is not visible
  • buttons overlap

Visualizer is hidden on mobile. Hide Player Settings too?

Move player controls to top of viewport? Difficult to anchor to bottom of viewport on iOS.

Add catalog directory descriptions

Add some support to display a description.txt/info.txt in each directory.

I want to curate these to add provenance and other details to the main directories of the catalog.
At the root directory, this can be used to display latest updates to the catalog (or to chip player itself).

Slightly different from the TXT link displayed along with individual song files.

NSF ends too early

  • The NSF format doesn't have any built-in notion of song duration.
  • game-music-emu determines the end of an NSF song when 2 seconds of silence is detected.
  • Some NSF repeat forever, so you need a max-length in addition to silence detection.
  • NSF format is fixed at max-length 2:30 in game-music-emu.
  • If you set the max length to something like 99:00, you will end up listening to the repeating songs for a long time.

Fix dirty audio buffer issues

Sometimes there is an audio glitch when switching songs. A player might leave stale sample data in the buffer when switching player engines or switching songs. I don't really know the cause.

Don't ask for WebMIDI until it is needed

It's confusing that the page asks for WebMIDI permission on first load.
This should be requested only as needed, when the user chooses WebMIDI in MIDI Player Settings.

Volume control for external MIDI devices

Why not allow the Chip Player JS volume control to adjust the volume of Web MIDI devices? Even though devices have hardware volume controls, it can be a pain if you have multiple devices.

One of the following methods should work:

  1. Sysex master volume 0xF0 0x7F 0xid 0x04 0x01 0xmm 0xnn 0xF7 (ignoring this if it appears in songs)
  2. Multiply all channel volume events (CC 7) by master volume level
  3. (worst case) Multiply all note velocities by master volume level

This is complicated by MIDI statefulness, but it doesn't have to be perfect. Consider restarting songs acceptable.

Sequencer gets stuck between songs in background tab

It seems that Chrome will suspend XHR requests when a tab is in the background. When the sequencer is playing through a song list, and the player is in a background tab, it gets stuck between tracks. This indicates that the audio process (and JavaScript) continues to run just fine, but something else that only happens between songs (like a network request) is held up by the browser.

Fix inferred metadata

game-music-emu sometimes finds artist metadata.

Yuzo Koshiro - The Super Three
Streets of Rage II - Sega Master System / Game Gear (1993/7/23)

4 bits of information:

  • composer
  • track title
  • game title
  • game system

should be

Game Title - Track Title
Composer - Game System

i.e.

Streets of Rage II - The Super Three
Yuzo Koshiro - Sega Master System / Game Gear (1993/7/23)

some formats have a different set of metadata, such as MIDI, where there is virtually none. Any metadata has to be inferred from file path, which varies in use:

/Piano+E-Competition+MIDI/2014/Cheng+Guang+-+5th+Prize/Rachmaninoff+-+Prelude+in+D+Major,+Op.+23,+No.+4.mid yields

2014 - Rachmaninoff - Prelude in D Major, Op. 23, No. 4.mid
Piano E-Competition MIDI

vs.

/MIDI/Frankie+Valli/December+1963+(Oh+What+a+Night).mid yields

Frankie Valli - December 1963 (Oh What a Night).mid
MIDI

vs.

/Game+MIDI/Ultima+Online/CREATE1.MID

CREATE1.MID
Ultima Online - Game MIDI

A solution

The metadata formatting and fallback behavior should be consolidated in one place. The app, after receiving metadata back from whichever player engine is in use, should combine the info with the file path and reconcile something. The player can return whatever sparse metadata it knows about, but the app is responsible for resolving all this to a "Title" and "Subtitle".

i.e.

getTitleAndSubtitleFromMetadataAndFilepath(metadata, filepath) {
  let title, subtitle;
  // inspect metadata
  if (metadata.artist) { ... }
  ...
  // make a decision about how to put together a title and subtitle
  return { title, subtitle };
}

Channel muting improvements

  1. Channel muting should be reset when a new song starts playing
  2. Alt+click or other key modifier should perform inverse mute (solo)
  3. Fix issues muting channel 1 on MIDI files
  4. Better UI: align channels in two columns

Song still playable with media keys after end of context

Steps to reproduce:

  1. Browse to a folder with a few songs.
  2. Click on the last song.
  3. Press next. The song should end and the context should be removed, disabling the player controls.
  4. Press the play button media key on the keyboard. Last song starts playing, but it should not play anything.

Yarn install error

I clone this repository successful, and cd chip-player-js, run bash-command yarn install, then console tips compile-failed, and output stack-error on console, and I found this error:

node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v83-linux-x64-glibc.tar.gz

How to resolve this? I'm not good at node.js, because node.js dependency is so complex...

System/Software Environment/Runtime:

[root@centos7-console chip-player-js]# cat /etc/redhat-release 
CentOS Linux release 7.8.2003 (Core)

[root@centos7-console chip-player-js]# gcc --version

gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@centos7-console chip-player-js]# npm -v
6.14.8
[root@centos7-console chip-player-js]# yarn -v
1.22.5

[root@centos7-console chip-player-js]# npm config get registry
https://registry.npmjs.org/
[root@centos7-console chip-player-js]# yarn config get registry
https://registry.yarnpkg.com

yarn_install_error.log

Hotkeys guide

Add a link or button somewhere to display keyboard shortcuts.

Arcade VGZ playback voice volume inconsistency issue

On certain VGZ files there's volume inconsistency. One of the prime examples is in Black Knight 2000 main theme. Notice how the vocals, as well as percussion are very quiet compared to the rest of available voices.
https://mmontag.github.io/chip-player-js/?q=black+kni&play=VGM+Rips%2FBlack_Knight_2000_(Williams_System_11B)%2F04+Main+Theme.vgz

Here's the video of the main theme BGM of this pinball machine. Notice how the percussion can be heard, as well as all the vocals.
https://www.youtube.com/watch?v=p61YjWczwLM&t=17s

Rethink catalog.json

Problem

catalog.json is 2.6 MB (740 KB gzipped).
This is a blocking request for the whole player to function (unacceptable).

Brainstorming

What can be done to improve this situation? Anything short of building a backend?
Maybe a backend is okay, but it needs to be extremely simple and fast. PHP, mysql? Go? Node.js?

What about backend as a service? Firebase does not provide full text search in Cloud Firestore. The trie-search functionality is not covered by SQL.

Player appears for a brief moment before disappearing

When I try to open the player it simply disappears shortly during loading process. Once that happens the "Error initializing constant Q transform." error pops up in the developer console.
Zrzut ekranu (44)

This screenshot is made while Chrome is in Incognito Mode to rule out adblock extensions interfering with site's functionality.

Chrome version: 83.0.4103.97 64-bit

Discrete voice audio routing

Export channels to wav files could be a nice feature. Could be possible to do that?
Currently I try to do this job with RYMCast, but the channels completely panned to the right, generate an empty wav file.

Thanks for this amazing project

Include artwork info in catalog.json

The artwork info for each music file should be included in catalog.json (in a compact representation - maybe just a flag to indicate its presence, such as img: 1) so that HTTP requests don't have to be made for every single item played, resulting in a lot of 404s. This will also allow synchronous logic in the case where there is no artwork. User should not have to wait for an HTTP request to 404 in order to see the fallback artwork for a given file.

Problematic songs

List of troublesome files

MIDI

MDX

  • HDV01.MDX: locks up the player.
  • STC30.MDX: timer runs slow, never advances to next track.

VGM

On certain VGZ files there's volume inconsistency. One of the prime examples is in Black Knight 2000 main theme. Notice how the vocals, as well as percussion are very quiet compared to the rest of available voices.

Here's the video of the main theme BGM of this pinball machine. Notice how the percussion can be heard, as well as all the vocals.

MOD

  • saga_musix_-_daydreams.it puts the player in broken state

Fluidsynth MIDI playback is glitchy

I have no idea how this regression was introduced, but my MIDI playback with the SoundFont engine is now glitchy and stuttery.

Doesn't seem correlated to CPU usage. Flame graph looks normal, unless the missing towers are causing the glitches.

image

Drag and drop local files

would love to be able to drag and drop songs and see the visualisation โ€“ it is mesmerising ๐Ÿ˜‹

Search results: folders are not segregated

The search results are interrupted by folders because the entire path is used for sorting.
The comparator should be aware of folders.

Folder/a.v2m
Folder/B/a.v2m
Folder/B/C/b.v2m
Folder/c.v2m
Folder/D/x.v2m

should be

Folder/B/C/b.v2m
Folder/B/a.v2m
Folder/D/x.v2m
Folder/a.v2m
Folder/c.v2m

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.