Create curves from Processing to Iannix

Accueil Forums Créer avec IanniX Create curves from Processing to Iannix

  • Ce sujet contient 14 réponses, 2 participants et a été mis à jour pour la dernière fois par Angel Sánchez Borges, le il y a 4 années et 4 mois.
15 sujets de 1 à 15 (sur un total de 15)
  • Auteur
    Messages
  • #3534 Répondre
    Angel Sanchez
    Invité

    Hi there !

    How can I draw a line in Processing that generates a curve in Iannix thru OSC ?

    Thanks !

    #3536 Répondre
    IanniX
    Maître des clés

    Yes, open the Helper window in IanniX and add a curve and move points to see the messages you have to send!

    #3558 Répondre
    Angel Sanchez Borges
    Invité

    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

    #3559 Répondre
    IanniX
    Maître des clés

    iannix.send(“add”, « curve, ”id#”);
    iannix.send(“add”, « trigger, ”id#”);
    iannix.send(“add”, « cursor, ”id#”);

    🙂

    #3560 Répondre
    Angel Sanchez Borges
    Invité

    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 ?

    #3577 Répondre
    IanniX
    Maître des clés

    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.

    #3664 Répondre
    Angel Sanchez Borges
    Invité

    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 !

    #3665 Répondre
    IanniX
    Maître des clés

    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 🙂

    #5501 Répondre
    Angel Sánchez Borges
    Invité

    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 !

    #5505 Répondre
    IanniX
    Maître des clés

    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.

    #5511 Répondre
    Angel Sánchez Borges
    Invité

    Ok, and what is the « 0, » stand for ?

    #5513 Répondre
    IanniX
    Maître des clés

    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.

    #5518 Répondre
    Angel Sánchez Borges
    Invité

    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”);

    #5571 Répondre
    Angel Sánchez Borges
    Invité

    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 !!!

    #5572 Répondre
    Angel Sánchez Borges
    Invité

    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 !!!!!

15 sujets de 1 à 15 (sur un total de 15)
Répondre à : Répondre #5571 dans Create curves from Processing to Iannix
Vos informations :





© IanniX Association

Qu'est-ce que IanniX ? | Téléchargement | Showcase | Forum | Recherche | À propos