Online Sequencer Make music online
  • Sequences
  • Members
  • Chat
  • Forum
  • Wiki

Existing user? Sign In Create account
Login at Online Sequencer Forums

Online Sequencer Forums › Online Sequencer › Online Sequencer Discussion
« Previous 1 … 55 56 57 58 59 … 79 Next »

Vocal/Harmonics challenge.

Thread tools
Vocal/Harmonics challenge.
Frank Offline
Grey Hat Script Kiddie who can Compose Music
388 Posts:
 
#4
11-05-2018, 07:43 PM
##966556
Code:
var el = $('<input type="file" accept="audio/*">');
$(document.body).append(el);

el.on('change', function(e) {
    loadInstrument(14)
    var reader = new FileReader();
    reader.onload = function(e) {
        var context = new AudioContext();
        context.decodeAudioData(e.target.result, function(buffer) {
            var audioData = new Float32Array(buffer.length);
            buffer.copyFromChannel(audioData, 0);
            var sampleRate = buffer.sampleRate;
            var noteLength = 0.01;
            //60 * 4 = 240 BPM = 1 Measure / Second. There are 16 notes per measure.
            song.setBPM(240 * sampleRate * noteLength / 16);
            for (var i = 0; i < audioData.length; i++) {
                if (audioData[i] > 0) {
                    song.addNote(new Note(song, "C2", i * noteLength, noteLength, 14));
                }
            }
        });
    }
    reader.readAsArrayBuffer(e.target.files[0]);
});

el.click();
Failure.


Kim Wrote:##878337 + https://js-game.glitch.me + Doesnt take peopel serious if their has badly speling gramer puntuatin
Reply

Messages In This Thread
Vocal/Harmonics challenge. - by Lopyt - 11-05-2018, 03:23 PM
RE: Vocal/Harmonics challenge. - by Lopyt - 11-05-2018, 03:25 PM
RE: Vocal/Harmonics challenge. - by Frank - 11-05-2018, 06:41 PM
RE: Vocal/Harmonics challenge. - by Frank - 11-05-2018, 07:43 PM
RE: Vocal/Harmonics challenge. - by Lopyt - 11-06-2018, 06:49 AM



Users browsing this thread:   1 Guest(s)


  •  Return to Top
  •  Contact Us
  •   Home
  •  Lite mode
© Rush Crafted with ❤ by iAndrew
Powered By MyBB, © 2002-2025 MyBB Group.
Linear Mode
Threaded Mode
View a Printable Version
Subscribe to this thread
Add Poll to this thread
Send thread to a friend