How to give slide effect in guitar
Using SiON we can produce digital sounds of various instruments. But I'm trying to find a way to give the effect of sliding a guitar string from high to low or low to high frequency. In other word; when decay starts I want the frequency of the sound to be increased or decreased continuously.
Using the setPitchModulation function; it produce similar effect but the frequency increases and decreases alternatively. I want the this either decrease or increase.
♥0 |
Line 33 |
Modified 2011-03-26 23:09:44 |
MIT License
archived:2017-03-10 15:48:20
ActionScript3 source code
/**
* Copyright UtilZone ( http://wonderfl.net/user/UtilZone )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/jU7u
*/
package {
import flash.display.Sprite;
import flash.events.*;
import com.bit101.components.*;
import org.si.sion.*;
import org.si.sion.sequencer.SiMMLTrack;
import org.si.sion.utils.SiONPresetVoice;
public class FlashTest extends Sprite {
private var track:SiMMLTrack;
private var driver:SiONDriver;
private var presetVoice:SiONPresetVoice;
private var voice:SiONVoice;
public function FlashTest() {
driver = new SiONDriver();
presetVoice = new SiONPresetVoice();
voice = new SiONVoice();
voice = presetVoice["valsound.guitar"][1];
driver.play();
var btn:PushButton = new PushButton(this);
btn.label = "Play!";
btn.x = 10;
btn.y = 10
btn.addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void {
track = driver.noteOn(60, voice, 0, 0, 0, 0, true);
track.noteShift = 5;
track.pitchShift = 100;
track.velocity = 500;
track.expression = 10;
track.channel.pan = 10;
//track.channel.setPitchModulation(10);
});
}
}
}