Open desafinadude opened 8 years ago
#174 Could you please share example how to use MIDI.setEffects() in MIDI.js,
Hi
I just put it in a function
function moog() { MIDI.setEffects([{ type: "MoogFilter", bufferSize: 4096, bypass: false, cutoff: 0.065, resonance: 3.5 } ]); }
And then called it with a button click. Worked as expected.
$( "#moog" ).click(function() { moog(); $(this).addClass('on'); });
Hope this helps...now if only I can get it to stop.
It did not work for me, I still don't understand. Where should I call moog() function in below code (basic example from library)? please guide.
`window.onload = function () {
MIDI.loadPlugin({
soundfontUrl: "./soundfont/",
instrument: "acoustic_grand_piano",
onprogress: function(state, progress) {
console.log(state, progress);
},
onsuccess: function() {
var delay = 0; // play one note every quarter second
var note = 50; // the MIDI note
var velocity = 127; // how hard the note hits
// play the note
MIDI.setVolume(0, 127);
MIDI.noteOn(0, note, velocity, delay);
MIDI.noteOff(0, note, delay + 0.75);*/
}
});
};`
Have you tried putting it IN the onsuccess? Before the MIDI.noteOn? That should work.
Yes, it working. I tried same before, but input values of Tuna effects were small to create significant effect. After giving high input values I can hear effect.
Thank you for all your help.
I am not expert but just to share my thought on your question, you can reset effect properties to turn off an effect.
Yip - I thought the same thing. And it probably will work. Essentially a bypass. But just thought there might be a complete remove as well. But, if not, I'll go this route. :-)
In my app, I have a requirement to change (slightly) the frequency of note from standard frequency while playing with MIDI.js (noteOn, noteOff). Is it possible to achieve this with Tuna.js or with other method?
Could you please check issue #176, & guide if you have any suggestion to achieve that
Hi
Is there an opposite of MIDI.setEffects() to turn off an effect?
Thanks