Giter Site home page Giter Site logo

band.js's People

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  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

band.js's Issues

New Rhythm Pack: Latino American

Hi. I arrange the times in this image: [http://i.imgur.com/IQURaxM.png]
And I created the Latino American Rhythm Pack to simplify the composition.

// Latino American Rhythm Pack - Image reference: http://i.imgur.com/IQURaxM.png

module.exports = {
    1: 0.0625,
    2: 0.125,
    3: 0.1875,
    4: 0.25,
    5: 0.3125,
    6: 0.375,
    7: 0.4375,
    8: 0.5,
    9: 0.5625,
    10: 0.625,
    11: 0.6875,
    12: 0.75,
    13: 0.8125,
    14: 0.875,
    15: 0.9375,
    16: 1
};`

Please do this.

After try your project.I decide to use your project to audio for my game project. Could you please add a new feature which could export audio data to different audio source type. Of course, you can ignore or close this :)

Just a suggestion

Hi, I'm new to GitHub so I don't understand how to use it so I'm sorry if this is the wrong place to post a suggestion, I haven't found that button.
I'm new making music and I was trying to analyze the music produced by band.js but I didn't found a method to do that, so I create mine as I could, (I'm also new in this field).

This is how I make it. I was thinking maybe it could be added because with an audio context analyser is possible to make a visualization of the music (e.g: to make a visualization addon?).

On conductor.js after line 67:

    conductor.analyser = conductor.audioContext.createAnalyser();
    conductor.bufferLength = conductor.analyser.frequencyBinCount;
    conductor.dataArray = new Uint8Array(conductor.bufferLength);

On noises.js in line 20 add the parameter analyser like:

function NoisesInstrumentPack(name, audioContext, analyser) {

And change the createNote statement of line 32 to:

createNote: function(destination) {
	    let tmp;
            switch (name) {
                case 'white':
                    tmp = createWhiteNoise(destination);
		    break;
                case 'pink':
                    let tmp = createPinkNoise(destination);
                    break;
                case 'brown':
                case 'brownian':
                case 'red':
                    let tmp = createBrownianNoise(destination);
                    break;
            }
	    tmp.connect(analyser);
	    return tmp;
        }

On oscillators.js add the parameter analyser in line 18 like this:

function OscillatorInstrumentPack(name, audioContext) {

And in line 31 add:

o.connect(analyser);

On instrument.js add a parameter conductor.analyser to line 73 as:

instrument.instrument = conductor.packs.instrument[pack](name, conductor.audioContext, conductor.analyser);

And then do something on player.js, not sure exactly what but for example add an interval in play function (line 243):

setInterval(function(){
            conductor.analyser.getByteTimeDomainData(conductor.dataArray)
            console.log(conductor.dataArray);
        }, 100)

P.S: Sorry for my English.

Chords?

To play chords would I have to have multiple instruments?

Recalculate note lengths on tempo change

In my recent tests, it appears that Band.js doesn't recalculate note lengths when a tempo is changed. Thus, if you change the tempo without creating a new instance, the notes either overlap or there are gaps.

Add LFO

Would be awesome to have an option to adjust pitch LFO length and range. With code that could do this, you could also add arpeggiation and a phaser.

Uncaught TypeError: undefined is not a function

I'm getting said error after the changes introduced in commit d11a5e5:

Uncaught TypeError: undefined is not a function.

If I unmangle the build, it's on lines 326 and 209.

Here:

        function updateTotalPlayTime() {
            totalPlayTime += ac.currentTime - currentPlayTime;
            var seconds = Math.round(totalPlayTime);
            if (seconds != currentSeconds) {
                setTimeout(function() {
                    tickerCallback(seconds); // Here.
                }, 1);
                currentSeconds = seconds;
            }
            currentPlayTime = ac.currentTime;
        }

And here:

        this.stop = function(fadeOut) {
        // .....
            } else {
                totalPlayTime = 0;
                reset();
                setTimeout(function() {
                    tickerCallback(currentSeconds); // And here.
                }, 1);

Add in articulations

Add the ability to mark a note as Tenuto, Marcato, Staccato, Legato, Sforzando, etc.

Bad argument assumptions

In setMasterVolume it accepts either 0-1 or 1-100, it should either one or the other.
This is because someone might want to have the volume set to 1 which it will assume you meant is 100%

Possible addition to a plugins object...

I was wondering what your thoughts are on plugins (as part of the core library). For instance, I've created a fade in/out plugin (function), and thought it might be a cool idea to bundle it like:

const instruments = [
    instrument1
]

const from = 0
const to = 50
const steps = 8

BandJS.plugins.fade(instruments, from, to, steps, function() {
    instrument1.repeatStart()
    instrument1.note("quarter", "C3")
    instrument1.note("quarter", "D3")
    instrument1.repeat(3)
})

I could create a pull request, for this, if you think it's a good idea...

Impossible to update notes without recreating the BandJS instance

I cant grasp my head around this. If I try to load() a song, it works perfectly the first time. But if I load() another song after (without recreating a new BandJS() object), it looks like the previous notes are still in the buffer (I can hear them over the new ones !).

I hope it's understandable and I didn't overlook something in the documentation.

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).

Originally located at: meenie/8bit.js#9

Ability to layer notes within one instrument

This is mostly for piano music, but the easiest way to explain is if you wanted to play a whole note with your thumb and then on the 2nd, 3rd, and 4th, beat of a 4/4 time signature play quarter notes with your ringer and middle fingers. So the whole note would be held over that whole bar, while also the quarter notes are layered on as well.

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.