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?
TryMePls Offline
Mediocre
7 Posts:
 
#1
10-06-2018, 05:12 PM
Hello, recently I was messing around with small instrument note lengths and i came up with an idea as using 8-Bit instruments as "Samples" (like what a WAV file consists of)


Heres just a quick example of what im trying to get at: 
##942224



Each note represents a sample and when played back at a fast speed it makes it seem like its being played back from a different file format
This only works with the 8-Bit Instruments since the length of the sound scales with the note length.

I know there isn't any practical uses for this but I just thought it would be cool to show and maybe someone more talented than me can do more complicated things using this method.


Reply
Jacob_ Offline
Administrator
343 Posts:
 
#2
10-06-2018, 05:36 PM
You can do this with percussion too!



Reply
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



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