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 … 56 57 58 59 60 … 79 Next »

Using Small Note Lengths to Represent Sound Samples?

Thread tools
Using Small Note Lengths to Represent Sound Samples?
Frank Offline
Grey Hat Script Kiddie who can Compose Music
388 Posts:
 
#3
10-07-2018, 10:17 AM (This post was last modified: 10-07-2018, 10:18 AM by Frank.)
Darn, I have to get in on this.
He left his "notes", good gracious.
"note length = (note frequency)/26.7(100bpm 1/16 note hz)*4(inspect grid value)"
In my own terms,
bpm/26.7/notefrequency
because as bpm increases length also has to increase.
I have done
##942716

CODE
Code:
// ==UserScript==
// @name         HZ?!
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to hz over the world!
// @author       Frank
// @match        https://onlinesequencer.net/
// @grant        none
// @run-at       context-menu
// ==/UserScript==

'use strict'
var typeToHZ = {};
for(var i = 0; i < window.piano.length; i++){
   var type = window.piano[i];
   typeToHZ[type] = 440 * Math.pow(2, (38 - i) / 12)
}
window.song.addNote = function(note, notOG){
   if (note.instrument == 2 && !notOG) {
       var length = window.bpm / 26.7 / typeToHZ[note.type];
       if (!length) return;
       for(var time = note.time; time < note.time + note.length; time += length){
           window.song.addNote(new window.Note(window.song, note.type, time, length, 2), true)
       }
   }
   else {
       var noteIndex = window.piano.indexOf(note.type);
       if(noteIndex != -1){
           this.notes.push(note);
           this.update(note);
           this.moveNote(note, undefined, note.instrument, undefined, note.time, undefined, note.type);
           this.updateLoopTime();
       }
   }
}


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

Messages In This Thread
Using Small Note Lengths to Represent Sound Samples? - by TryMePls - 10-06-2018, 05:12 PM
RE: Using Small Note Lengths to Represent Sound Samples? - by Jacob_ - 10-06-2018, 05:36 PM
RE: Using Small Note Lengths to Represent Sound Samples? - by Frank - 10-07-2018, 10:17 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