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 › Suggestions
« Previous 1 … 38 39 40 41 42 … 48 Next »

Continuous Notes Tool

Thread tools
Continuous Notes Tool
Frank Offline
Grey Hat Script Kiddie who can Compose Music
388 Posts:
 
#8
09-09-2018, 12:09 PM
(09-09-2018, 09:59 AM)Benjobanjo7 Wrote: this is great!  Do you think it would be possible to make a "Cancer Piano" option with this?  It is basically the same pseudo -sustain, but some notes are randomly left out

examples
##475383
this amazing one by Flonk (in which the notes no longer show up  because in his, the notes are on a tiny  grid)

# #541748
this ok on by me (I used the 1/16 grid and did it all by hand)

it would be cool to be able to automatically make this effect

Version 1.1 now has cancer!
Code:
// ==UserScript==
// @name         Continuous sound!
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  CONTINUOUS
// @author       Frank
// @match        https://onlinesequencer.net
// @grant        none
// @run-at       context-menu
// ==/UserScript==

(function() {
    'use strict';
    var notes = selectedNotes.length ? selectedNotes : song.notes;
    var length = parseFloat(prompt("Length of subdivisions? (Inclusive, 16 = 1 Measure.)"));
    var cancer = parseFloat(prompt("Cancer resistance? (1 = no effect, .5 = half destroyed)"))
    switch (true){
        case isNaN(cancer):
            cancer = -1;
            break;
        case cancer > 1:
            cancer = 1;
            break;
        case cancer < 0:
            cancer = 0;
    }
    notes = notes.filter(x => x.length >= length && !instrumentLock[x.instrument]);
    for (var i = 0; i < notes.length; i++){
        var note = notes[i];
        var timeStart = note.time;
        var timeEnd = timeStart + note.length;
        var j;
        if (cancer == 1 || cancer == -1){
            for (j = timeStart; j < timeEnd - length; j += length){
                song.addNote(new Note(song, note.type, j, length, note.instrument));
            }
        }
        else {
            for (j = timeStart; j < timeEnd - length; j += length){
                Math.random() < cancer ? song.addNote(new Note(song, note.type, j, length, note.instrument)) : null;
            }
        }
        Math.random() < cancer ? song.addNote(new Note(song, note.type, j, timeEnd - j, note.instrument)) : null;
        song.removeNote(note);
    }
    SequencerView.repaint()
})();

Example:
##919110


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

Messages In This Thread
Continuous Notes Tool - by Frank - 09-08-2018, 05:01 PM
RE: Continuous Notes Tool - by guest - 09-08-2018, 05:50 PM
RE: Continuous Notes Tool - by guest - 09-08-2018, 05:52 PM
RE: Continuous Notes Tool - by Frank - 09-08-2018, 07:19 PM
RE: Continuous Notes Tool - by guest - 09-08-2018, 07:22 PM
RE: Continuous Notes Tool - by Frank - 09-08-2018, 07:37 PM
RE: Continuous Notes Tool - by Веn - 09-09-2018, 09:59 AM
RE: Continuous Notes Tool - by Frank - 09-09-2018, 12:09 PM
RE: Continuous Notes Tool - by Веn - 09-09-2018, 06:22 PM



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