Hello,<br><br>I don't know if this is the right place to put this on but, this code is crashing randomly on my tests:<br><br>MAUI_View window;<br>MAUI_Slider knob_0;<br><br>window.size(300,300);<br>window.name("Test");
<br>window.position(0,100);<br><br>knob_0.range(0,127);<br>knob_0.size(150,knob_0.height());<br>//cut_knob_0.position(0,0);<br>knob_0.name("Knob 0");<br>knob_0.displayFormat(MAUI_Slider.integerFormat);<br>// impulse to filter to dac
<br><br>Impulse i => BiQuad f => Pan2 p => dac;<br>// set the filter's pole radius<br>.99 => f.prad; <br>// set equal gain zeros<br>1 => f.eqzs;<br>// set filter gain<br>.5 => f.gain;<br><br><br>window.addElement
(knob_0);<br><br>window.display();<br><br>1 => int device;<br><br>MidiIn min;<br>MidiMsg msg;<br><br>if( !min.open( device ) ) {<br> <<< "erro ao iniciar device:" , device >>> ;<br>} else {
<br> <<< "device inicializado:" , min.num() , " -> " , min.name() >>>;<br>}<br><br>public void controlKnob_0() {<br> while(true) {<br> while ( min.recv(msg) ) {<br>
msg.data1 => int msg_1;<br> msg.data2 => int msg_2;<br> msg.data3 => int msg_3;<br> <br> if(msg_2 == 3) {<br> knob_0.value(msg_3);
<br> }<br> }<br> min => now;<br> } <br>}<br><br>public void Distortion() {<br> while(knob_0.value()) {<br> knob_0.value() => float value;<br> value * 39 =>
f.pfreq;<br>// value => i.next;<br> }<br> min => now;<br>}<br><br><br> <br>spork ~ controlKnob_0();<br>spork ~ Distortion();<br><br><br>while ( true ) {<br> 1.0 => i.next;<br>// Std.rand2f
( 250, 5000 ) => f.pfreq;<br> Std.rand2f( -1, 1 ) => p.pan;<br> 100::ms => now;<br>}<br><br><br>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?
<br><br>Thanks<br><br>Piero<br>