Accueil › Forums › Créer avec IanniX › Create curves from Processing to Iannix
Hi there !
How can I draw a line in Processing that generates a curve in Iannix thru OSC ?
Thanks !
Yes, open the Helper window in IanniX and add a curve and move points to see the messages you have to send!
Now I understand how to add and object with OSC, but can´t find how to use the second parameter to add a curve or a cursor in Processing, all the time any number I put is a trigger…
iannix.send(« add », ?, »id# »);
Please help
iannix.send(“add”, « curve, ”id#”);
iannix.send(“add”, « trigger, ”id#”);
iannix.send(“add”, « cursor, ”id#”);
🙂
But Processing say that in the second parameter is expecting a float value not a string, and return an error, that´s why I thought they were represented by numbers, when I write any number it works but only triggers…what I’m missing here ?
Yes sorry I posted without testing before. In fact, you have to send OSC Messages using OSC P5. You can have some help in the
OscMessage iannixMessage = new OscMessage("/iannix/add");
iannixMessage.add("curve");
iannixMessage.add(id);
…
oscManager.send(iannixMessage, iannixLocation);
assuming oscManager
and iannixLocation
have been declared. See samples in IanniX class provided with the example.
It´s working ! Here´s my code with a moving point:
———–
a = a + 1;
float move1 = map(sin(a), -1, 1,-10,20);
float move2 = map(cos(a), -1, 1,-3,13);
iannix.send(« setpointat », 0, 2, move1, move2 );
if(keyPressed){
if(key == ‘q’){
OscMessage iannixMessage = new OscMessage(« /iannix/add »);
iannixMessage.add(« curve »);
iannixMessage.add(0);
oscManager.send(iannixMessage, iannixLocation);
}
}
————–
Now the question is: how can I choose to add a straight or a smooth curve ?
: )
Thanks !
It depends on the setPointAt arguments. In IanniX, open the Help panel and place manually a smooth curve in the score. You’ll see in the Help panel (scroll down) the exact syntax for Processing 🙂
Three years later and I´m returning to this. Ok. Here’s my question:
Processing creating a cursor on a curve:
iannix.send(« setcurve », 1, 0);
iannix.send(« setpattern », 1, 21, 0, 1, -1);
Please, could you give me a practical example how should assign a MIDI message to this cursor based on this?
iannix.send(« setmessage », « selection », « 0, », « midi://midi_out/ccf », 1, 1, « cursor_value_x »);
Thanks !
Hi,
Your message is right… excepted the ‘selection’ which means you target the current selected object. You can replace this value with the ID of the object (you can see it in inspector), or ‘current’ which means the last targeted object.
Ok, and what is the « 0, » stand for ?
0 stands for 0ms, 0ms between the last sent message. If you put a bigger value — let’s say 10ms — IanniX will only send an OSC message if the previous trig of the trigger was more than 10ms before.
I don´t know what I´m doing wrong but processing says not applicable method »:
¿Is « 0, » expecting a float value?
Sorry but I don´t get it 🙁
Is it something like this?
iannix.send(“setmessage”, 1, .2, “midi://midi_out/ccf”, 1, 1, “cursor_value_x”);
Hi:
It’s me again, one year later. 😉 I can’t solve yet the sintaxis of this line to assign a MIDI message from Processing to a Iannix cursor. I copied:
iannix.send(“setmessage”, “selection”, “0,”, “midi://midi_out/ccf”, 1, 1, “cursor_value_x”);
So I understand to change it like this:
iannix.send(“setmessage”, 1, 20, “midi://midi_out/ccf”, 1, 1, “cursor_value_x”);
But Processing said it’s wrong:
« Method it’s not applicable »
So, obviously it has to do with the string or float or int in the argument…
But which parameter is wrong ?
I can do it thru the script editor
run(« setMessage 1 20, midi://midi_out/ » + « ccf » + » 1 2 cursor_value_y »);
and it works fine but I reaaaally do need to make it thru P55:
Please help me !!!
I just found out !!!!!
This is the right line:
iannix.send(« setmessage 1 20, midi://midi_out/ccf 1 1 cursor_value_y »);
Just one parameter and all is just a string !!!!!
© IanniX Association
Qu'est-ce que IanniX ? | Téléchargement | Showcase | Forum | Recherche | À propos
Cookie | Durée | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |