We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSound,  Music Libraries › Problems with proMidi's sendController()
Page Index Toggle Pages: 1
Problems with proMidi's sendController() (Read 658 times)
Problems with proMidi's sendController()
Jun 22nd, 2006, 3:41pm
 
salut,

i have a problem with sending controllervalues from processing to my sequenzerprogramm (fruityloops). i want to transform the velocity of particles to controllervalues and send them with the sendController-function. for that purpose i installed virtual midiports (i tried it with maple & midiyoke).

Code:
import promidi.*;

MidiIO midiIO;
MidiOut midiOut;

//add controller 11 with value 0
Controller res1 = new Controller(11,0);

void setup()
{
size(127,20);
framerate(24);
background(0);

//get an instance of MidiIO
midiIO = MidiIO.getInstance(this);

//open an midiout, channel 0 on third device
midiOut = midiIO.getMidiOut(0,2);
}

void draw()
{
//transform movement to midi
res1.setValue(mouseX);

//send midi
midiOut.sendController(res1);
}

this is a simplified version for testing, but is also doesn't work. fruityloops receives nothing at controller 11. values seem to arrive at random-controllers and their value seems to be always '0'.

thanks for your help!
hans
Re: Problems with proMidi's sendController()
Reply #1 - Jun 29th, 2006, 6:36pm
 
it seems to work now, but therefore i've to define a new controller each time i want to send a value.

NO: Code:
Controller res1 = new Controller(11,0);
//...
res1.setValue(mouseX);
//...
midiOut.sendController(res1);


YES: Code:
//... forget about creating a controller and changing its value ...
midiOut.sendController(new Controller(11,mouseX));


i informed christian already. maybe its a bug?

salut,
hans
Page Index Toggle Pages: 1