Git Product home page Git Product logo

8bit.js's People

Contributors

jaaprood avatar lukasolson avatar meenie avatar xyproto 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

8bit.js's Issues

[enhancement] Add missing bower.json.

Hey, maintainer(s) of meenie/8bit.js!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library meenie/8bit.js is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "meenie/8bit.js",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

It doesn't work for me (Chrome, Safari)

Tried the online demo and cloned the repo to try the example locally. But I always get this error in JS console of my browser:

Error: 'undefined' is not a function (evaluating 'p.createGain()')

Tried with Safari and Chrome.

Extrapolating 8bit.js into a modular library called Band.js

I have decided that 8bit.js needs to be more than just oscillator sounds because the Web Audio API is much more. I have spent the last couple of hours refactoring code and pulling sections into their own files. It now gives people the opportunity to write their own Rhythm, Tuning, or Instrument Packs and use them to compose music. For rhythms, Band.js ships with North American (whole, half, quarter) and European (Semibreve, Minim, Crotchet) Rhythms. For tuning, it only ships with Equal Temperament tuning (should be fine as most modern music uses this). And for instruments it ships with Oscillators and Noises (white, pink, brown). What this means is anyone can write an instrument to use and share it with the community.

The library is located here: https://github.com/meenie/band.js

Please uses this issue to discuss. Or open up a new issue in the new Band.js library repo.

Should fade() use AudioParam automation methods instead?

I was wondering how your fade (in/out) worked, and noticed that you are using:

                    if (i > 0) {
                        i = i - 2;
                        i = i < 0 ? 0 : i;
                        var gain = 'up' === direction ? masterVolumeLevel * 100 - i : i;
                        masterVolume.gain.value = gain / 100;
                   ...

Would it be less verbose/painful and probably more efficient to use one of the specified audioparam automation methods from http://www.w3.org/TR/webaudio/#methodsandparams-AudioParam ?

I think linearRampToValueAtTime() would do pretty much the same thing you are doing here.

Have you tried the methods and found them to not be usable, or did you not know about them? This could be interesting feedback to us in the W3C Audio WG.

Feature request: load music data from JSON / JS Objects

For example:

var music = new EightBit();
var mario = {
  signature: [2, 2],
  tempo: 200,
  instruments: {
    left: 'square',
    right: 'square'
  },
  notes: [
    { instrument: 'right', type: 'note', time: 'quarter', data: 'E5, F#4' },
    { instrument: 'right', type: 'note', time: 'quarter', data: 'E5, F#4' },
    { instrument: 'right', type: 'rest', time: 'quarter' }
    // ... etc ...
  ]
};

music.load(mario);
music.play();

LilyPond/ABC notation support

LilyPond and ABC are music typesetting engines with some MIDI support. They have relatively-simple notation formats.

It would make composition/transcription simpler if the library could support notation in either format (I'm partial to LilyPond myself).

Noise channel

Original NES had 5 channels:

  • 2 pulse channels
  • triangle channel
  • noise channel
  • DPCM

Source: http://battleofthebits.org/lyceum/View/NES/

With your library you can currently achieve the 2 pulse channels and the triangle channel. As for DPCM I don't care. It could be neat if the library would support the NES noise channel, but it certainly will be tricky. What do you think about that?

Some resources about the NES noise channel:
http://wiki.nesdev.com/w/index.php/APU_Noise
http://forums.nesdev.com/viewtopic.php?t=3879
http://www.youtube.com/watch?v=la3coK5pq5w
http://bobrost.com/nes/files/nessound.txt

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.