Giter Club home page Giter Club logo

3d-piano-player's People

Contributors

reality3d 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

3d-piano-player's Issues

inaccurate song name

The song "Sonata No. 11 A major (Alla Turca), Mozart" actually play the first movement of Sonata No. 11 A major (K331). The Alla Turca is the thrid movement of K331.

Change Instrument and Using Multi Instrument

MIDI.loadPlugin({
targetFormat: "ogg",
instrument: "orchestra_hit",
callback: function () {
MIDI.Player.timeWarp = 1.0; // speed the song is played back
MIDI.Player.loadFile("midi/" + controls.song);

                MIDI.Player.addListener(function (data) {
                    var pianoKey = data.note - MIDI.pianoKeyOffset - 3;
                    if (data.message === 144) {
                        key_status("_" + pianoKey, keyState.note_on);
                    }
                    else {
                        key_status("_" + pianoKey, keyState.note_off);
                    }
                });

                // Close the MIDI loader widget and open the GUI                                        
                MIDI.loader.stop();
                songsToFiles = {
                    "Game Of Thrones Theme, Ramin Djawadi": "game_of_thrones.mid",
                    "Mario Overworld Theme (Super Mario Bros 3), Koji Kondo": "mario_-_overworld_theme.mid",
                    "He's a Pirate (Pirates of the Caribbean), Klaus Badelt": "hes_a_pirate.mid",
                    "Hedwigs Theme (Harry Potter), John Williams": "hedwigs_theme.mid",
                    "Something There (Beauty and the Beast), Alan Menken": "something_there.mid",
                    "Cruel Angel Thesis (Neon Genesis Evangelion)": "cruel_angel__s_thesis.mid",
                    "Me cuesta tanto olvidarte (Mecano)": "me_cuesta.mid",
                    "Sonata No. 14 C# minor (Moonlight), Beethoven": "mond_1.mid",
                    "For Elise, Beethoven": "for_elise_by_beethoven.mid",
                    "Asturias (Leyenda), Albeniz": "alb_se5_format0.mid",
                    "Aragon (Fantasia), Albeniz": "alb_se6.mid",
                    "Prelude and Fugue in C major BWV 846, Bach": "bach_846.mid",
                    "Fantasia C major, Schubert": "schub_d760_1.mid",
                    "Sonata No. 16 C major, Mozart": "mz_545_1.mid",
                    "Sonata No. 11 A major (K331, First Movement), Mozart": "mz_331_1.mid",
                    "March - Song of the Lark, Tchaikovsky": "ty_maerz.mid",
                    "Piano Sonata in C major, Hoboken, Haydn": "haydn_35_1.mid",
                    "Etudes, Opus 25, Chopin": "chpn_op25_e1.mid",
                    "Polonaise Ab major, Opus 53, Chopin": "chpn_op53.mid",
                    "No. 2 - Oriental, Granados": "gra_esp_2.mid",
                    "Bohemian Rhapsody, Queen": "bohemian1.mid",
                };
                var gui = new dat.GUI({ width: 625 });
                //gui.add(controls, 'key_attack_time', 2.0 , 40.0);
                //gui.add(controls, 'key_max_rotation',0.2 , 1.0);                             
                var song = gui.add(controls, 'song', songsToFiles);
                var noteOnColorControl = gui.addColor(controls, 'noteOnColor');
                noteOnColorControl.onChange(function (value) {
                    noteOnColor = new THREE.Color().setRGB(controls.noteOnColor[0] / 256.0, controls.noteOnColor[1] / 256.0, controls.noteOnColor[2] / 256.0);;
                });

                song.onChange(function (value) {
                    MIDI.Player.stop();
                    MIDI.Player.loadFile("midi/" + value, MIDI.Player.start);
                });

                // make sure to remove any key pressed when changing the octave
                var octave = gui.add(controls, 'octave', 0, 4).step(1);
                octave.onChange(function (value) {
                    for (keyCode in keys_down) {
                        var note = keyCode_to_note(keyCode);
                        key_status(note, keyState.note_off);
                    }

                });

                gui.add(controls, 'play');
                gui.add(controls, 'stop');
            }
        });
    };

E & G# & B

Hi!
When I'm playing, for example, E & G & B - it's working just fine.
Or E & Gb & B.

But, when I'm trying to play E & G# & B - at least one of notes doesn't press.

Firefox 36.0 for linux.
Tried with chromium browser - 3d-piano doesn't work at all.

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.