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 › Completed Suggestions
« Previous 1 2 3 Next »

Pitch Bending

Thread tools
Pitch Bending
Frank Offline
Grey Hat Script Kiddie who can Compose Music
388 Posts:
 
#3
11-10-2018, 02:06 PM
Actually, this would not be hard to implement, because of the way 8-bit instruments are coded. The only problem would be actually making a cool-looking and functional UI.
https://developer.mozilla.org/en-US/docs...ode/detune
1 hour of coding a prototype without UI later
whoops, this isn't even bug-free to my knowledge
it's actually hard-ish
Code:
pitchAuto = [0, 25, 50, 75];

function playSynthNote(context, id, note, length, delay) {
    delay = delay ? delay : 0;
    var oscillator = oscillators[id][note];
    if (oscillator) {
        var gain = oscillator.gain.gain;
        var volume = 0.1 * audioSystem.masterVolume;
        var onTime = context.currentTime + delay + 0.01;
        var offTime = context.currentTime + delay + 0.01 + length;
        var cents = pitchAuto[Math.floor(playTime / 16)];
        if (typeof cents != "undefined") oscillator.detune.setValueAtTime(cents, onTime);
        if (noteOffTime[id][note] > onTime) {
            gain.setTargetAtTime(volume / 2, context.currentTime, 0.01);
            gain.setTargetAtTime(volume, noteOffTime[id][note], 0.01);
        }
        noteOffTime[id][note] = offTime;
        gain.setTargetAtTime(volume, onTime, 0.01);
        gain.setTargetAtTime(0, offTime, 0.01);
    }
}


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

Messages In This Thread
Pitch Bending - by Syntax - 04-20-2018, 03:08 PM
RE: Pitch Bending - by act55555 - 11-09-2018, 09:26 PM
RE: Pitch Bending - by Frank - 11-10-2018, 02:06 PM



Users browsing this thread:   2 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