Hello,
I don't know if this is the right place to put this on but, this code is crashing randomly on my tests:
MAUI_View window;
MAUI_Slider knob_0;
window.size(300,300);
window.name("Test");
window.position(0,100);
knob_0.range(0,127);
knob_0.size(150,knob_0.height());
//cut_knob_0.position(0,0);
knob_0.name("Knob 0");
knob_0.displayFormat(MAUI_Slider.integerFormat);
// impulse to filter to dac
Impulse i => BiQuad f => Pan2 p => dac;
// set the filter's pole radius
.99 => f.prad;
// set equal gain zeros
1 => f.eqzs;
// set filter gain
.5 => f.gain;
window.addElement
(knob_0);
window.display();
1 => int device;
MidiIn min;
MidiMsg msg;
if( !min.open( device ) ) {
<<< "erro ao iniciar device:" , device >>> ;
} else {
<<< "device inicializado:" , min.num() , " -> " , min.name() >>>;
}
public void controlKnob_0() {
while(true) {
while ( min.recv(msg) ) {
msg.data1 => int msg_1;
msg.data2 => int msg_2;
msg.data3 => int msg_3;
if(msg_2 == 3) {
knob_0.value(msg_3);
}
}
min => now;
}
}
public void Distortion() {
while(knob_0.value()) {
knob_0.value() => float value;
value * 39 =>
f.pfreq;
// value => i.next;
}
min => now;
}
spork ~ controlKnob_0();
spork ~ Distortion();
while ( true ) {
1.0 => i.next;
// Std.rand2f
( 250, 5000 ) => f.pfreq;
Std.rand2f( -1, 1 ) => p.pan;
100::ms => now;
}
What i'm doing is mapping one knob of my bcd2000 to a MAUI Slider, to see on the screen the position of the knob, as i've posted here before, the midi itself is hanging up using this controller, but I think it might be something i'm doing wrong, anyone can point me out a clue on what could be it?
Thanks
Piero