Giter VIP home page Giter VIP logo

heartbeat's Introduction

heartbeat's People

Contributors

abudaan 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

heartbeat's Issues

Errors with recordedEvents/Notes objects around 6395 and 6406 in keyEditor Snapshots

In function KeyEditor.prototype.getSnapshot 'recordedEventsSong' and 'recordedNotesSong' are sometimes undefined throwing an error. This happens when loading new songs and removing old ones

for a quick fix i've added an 'if' block around the objects so they are not called

recordedEventsSong = this.song.recordedEvents;
        **if(recordedEventsSong){**
            length = recordedEventsSong.length;
            for(i = 0; i < length; i++){
                tmp = recordedEventsSong[i];
                if(this.recordedEventsObj[tmp.id] === undefined){
                    tmp.bbox = this.getEventRect(tmp);
                    recordedEvents.push(tmp);
                    this.recordedEventsObj[tmp.id] = tmp;
                }
            }
        }

recordedNotesSong = this.song.recordedNotes;
        **if(recordedNotesSong){**
            length = recordedNotesSong.length;
            for(i = 0; i < length; i++){
                tmp = recordedNotesSong[i];
                if(this.recordedNotesObj[tmp.id] === undefined){
                    this.recordedNotesObj[tmp.id] = tmp;
                    tmp.bbox = this.getNoteRect(tmp);
                    recordedNotes.push(tmp);
                    //console.log('recordedNotes', tmp);
                }else if(tmp.endless === true){
                    tmp.bbox = this.getNoteRect(tmp);
                    recordingNotes.push(tmp);
                    //console.log('endless1', tmp);
                }else if(tmp.endless === false){
                    tmp.bbox = this.getNoteRect(tmp);
                    recordingNotes.push(tmp);
                    //console.log('endless2', tmp);
                    tmp.endless = undefined;
                }
                //console.log(tmp.bbox.width);
            }
        }

Save song as MIDI file might not be working.

I'm just imported and called the save:

const song = window.sequencer.createSong(window.sequencer.getMidiFile('minute_waltz'));

window.sequencer.saveSongAsMidiFile(song);

It saves fine, but when I try to load it here or here it fails. The original midi file works fine.

The original and saved midi archives:

minute_waltz_midi.zip

transposeAllEvents

The 'transposeAllEvents' method can throw an error from Heartbeat. 'you can only transpose note on and note off'

codepen / skypack cdn integration

I tried to require the library in a codepen environment (that requires esmodules via skypack cdn), and I am getting the following error (see pen):

Uncaught ReferenceError: parcelRequire is not defined
    at parcelRequire.ipHv (heartbeat-sequencer.js:60)
    at heartbeat-sequencer.js:63
    at createCommonjsModule (heartbeat-sequencer.js:11)
    at heartbeat-sequencer.js:16

From my understanding, it has to do with some package.json module declaration / this parcel issue.

On the other hand it works fine in codesandbox because it bundles the app via node in a VM, and not directly in the browser.

I understand that it is not strictly related to the module itself, but to access it from codepens makes prototyping / showcasing much faster ^^

Can't 'addPartAt' for empty parts

Using the function 'addPartAt' with an empty part causes the part always to start at position 0 regardless of the ticks sent.

We use this feature when a user creates a new part to start adding notes to. ie. Dragging a 'new part' icon to the position in the sequence where an editor opens allowing notes to be added at that bar.

If I try the same code with a note pre populated into the part it works. This is part of my current workaround.

Workaround

create a NEW part with a note ** HB workaround
currentTrack.addPartAt(part, ['ticks', partPosition]);
update Song
remove all part events ** HB workaround
part is in correct position

Delete the create song issue

Possible bug

1 - Create a song from a midi file
2 - Delete that song
bug?
3 - Now create a song from the same midi file, the song has no notes or tracks

I can create a multiple songs with the same midi file but if I delete a song then the song after that are blank.

Reset track error

Function Track.prototype.reset - around line 19709

this.audio.setSong(null); causes error

temp fix

if(this.audio){
this.audio.setSong(null);
}

MIDI suddenly stops working (OSX)

I've been using heartbeat successfully for the last week using it to communicate Chrome with Ableton Live using the OSX built-in IAC driver. Suddenly the MIDI stopped initializing with no error message whatsoever. Tracing the lines one by one I notice that the line midi.outputs() is the one making the init function stop.

Trying to find out if it's a problem with my program, I tried to run the heartbeatjs.org examples with the same result. Then I tried to use both Chromium and Chrome Canary. both get stuck in the "getting midi ports..." message and display the same error :
screen shot 2014-11-28 at 1 07 22 pm

I tried restarting the sound system, running it with Jazz plugin in FireFox and Safari:

-In Safari with the Jazz plugin, I get the same problem. The examples are stuck in the "getting MIDI ports..." message with no error. (The metronome takes 0s to parse)

-In FireFox (as of this morning) it initializes normally with the Jazz plugin (unexpectedly).

Track IDs can be set, but then not used

Not a bug but, slightly inconsistent maybe.. not important

I can set an id on a track (I did this by mistake). In console logs the id in the track has been updated but using getTrack cannot by used with that id.

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.