Grasshopper

algorithmic modeling for Rhino


Hello everyone,

I'm new to grasshopper and I'm trying to hook up a midi controler in order to be able to control some sliders.

I've seen some posts about this topic but due to my lack of programming skills, I haven't been able to connect my controller to GH... Where should I start?

Best regards.

 

Camilo

Views: 5801

Replies to This Discussion

to take the comma out, use the String Split component perhaps...

I've made a Processing sketch that works in a way similar to Camilo's, it works about half the time...the other half I get the following error:

 

"opening socket failed!
    > address:null, port:6005 [group:null]
    > Address already in use: Cannot bind"

 

6005 is my sending port

6400 is my destination port

 

I'm not sure what to do with this. Is there another port that will work? Sometimes after restarting the computer it will randomly work again, sending data for pitch, velocity, and modulation (I'm working on the note length value). Is it possible that another application could be using this port?

 

I have a question to GHOWL Guys.

 

Does Ghowl will be working with any MIDI - USB device?

I am just wonder if it will work with behringer bcr 2000

http://www.behringer.com/EN/Products/BCR2000.aspx

with 24 knobs and some buttons,

also it would by nice to work with pads, like AKAI MPD 24 with velocity. 

 

How ghowl will respect MIDI instructions?

 

Michal

So many parametric design projects could benefit from having a midi slider board input...

I'm designing a parametric arch kite, to generate power...

It has so many parameters possible, a midi mixing board would be the perfect place to start tweaking. I have my sons akai lpd8. It's a great cheap small midi interface.

but is there now a standard setup forming? e.g. a combination of ghowl, korg, virtual midi driver etc..

What about other standard CAD devices such as the 3D connexion space navigator? it would be cool if you could read the 6 axis of freedom at the point when you click the button.

All the designs for my kite thing are cc3.0 open source hardware, they're here to save the world, so I won't mind spending a wee bit on the solution.

Roderick,

Can any aspect of your setup (hardware / software) transmit data as UDP / OSC?  There are several MIDI to OSC bridge software apps out there and I've had several reports of this working quite well.  I will try to find out a good app and let you know.

Best,

Luis

Luis,

Thank you so much... I've had a look about and just found Touch OSC.

My son also has an android tablet (he's got all the best toys) so hopefully I can borrow and configure that too.

Thanks again and Happy New Year

hey roderick. I have an LDP8 too and would like to connect it. But it's not one of my main goals right now, just a nice sidekick. Plus, I'm pretty low on a technical level, a bad programmer too :D But okay... - I though if one of us makes progress, any case it would make sense to stay in touch..

I saw somebody did what we want with a different but similar akai controller via VVVV (I saw you saw it too ;).

I made an first attempt with Processing instead, since I never really touched VVVV but wrote some simple lines in Processing and Arduino before. 

So far I only installed the themidibus library and got to read signals from my pad into Processing (the midi device has a signal number, the knobs have a channel and they transmit a number, ranging from 1-127 depending on how they are set). 

There's another library called proMIDI for Processing that seems to fit, but I don't really get the differences between them.

Did you have any luck with a direct software solution so far, to get a UDP/OSC signal? 

sorry! Stupid me, that's what has been done by Camilo Cruz already in this very same Thread. His code already made to connection to Ghowl. But I see his problem now too, to save the information and not have it rewritten by the next input. Must be a way to store the data though.

OK: I managed to map all 8 knobs of the LPD8 so I can individually control values in GH, wasn't hard after all. Extremely simple C# Script to assign the values to a different integer, depending on the input co-value.

The rest was pretty much done by Camilo Cruz already!

If there's actually still interest I can clean out the definition soon and provide a little description for the whole setup with processing... 

Didn't manage the Touchpads jet. They don't get a their signal send over by Processing so far and I didn't really get that whole proMIDI components function... 

Good work Christian.

sorry , I have been totally sidelined by kite power design work and funding.

Normally the pads send through midi note and velocity data... but Depending on how you set the LPD8 with the editor software, you can use the program change button and the pads to reconfigure the signals sent out of the lpd8 so with 4 programs available on the pads and 8 knobs you can address 32 ... I think you would normally have that arranged as two midid ports each with 16 channels.

A bad programmer?

Extremely simple C# Script to assign the values to a different integer, depending on the input co-value.

Sounds beyond me can you post the script as a guide please?

Yeah, I didn't really get how to Re-Programm the LPD8 yet. I know you can have a new configuration by the 4 little pads, but I don't fully graps this softwareinterface for assigning notes/values. 

-----

Did you try the package Camilo posted earlier and did you get any input by what he set up for processing? (If not I can give you a short guide, but won't if not necessary, you need to install a few libaries along with processing and set your LPDs device number in the processing sketch.. ).

Anyway - he got an Input from what he did into GH via a UDP signal read by Firefly or Ghowl.

His only problem was, he had the following input when he turned a knob... for instance ... :

Knob 1, turn fully right position: (1;129)

Knob 2, turned to middle: (2; 64)

Kno 2, tuned to left: (3;1)

But when he turned button 2; the first input was "gone" since the second signal arrived via UDP; and so was his parametric value and therefor he couldn't use more than one button to assign different values to his parametric model..

Therefor in GH, the UDP Listener gets connected to split and fed into 2 Item lists.

The item lists get inserted into a c# script (maybe you can do this in GH differently, but I have no idea how....):

Now, you create a C# script in GH. It comes with 2 inputs, I named them "WAHL" for the number channel (which knob), and "wert" for their value.  They get connected to the 2 Lists. Both inputs should be set to integers.

Then zoom in and add  more outputs to the GH C#-component, as many as you have buttons, I named them after LPDs Numeration K1-K8. The code when you doubleclick it as such is, for 2 buttons:

if( WAHL == 1){
a = wert;
}
if( WAHL == 2){
b = wert;
}
 

K1 = a;
K2 = b;
 

// and under the following section I set the following

//<Custom additional code> 
int a = 1;
int b = 1;

Just add more lines for more buttons.

That's it. It just assigns the input value depending on which button is pressed to a reference object in the #c script, so the value won't get lost. 

----

Now my problem is still that through Camilos processing script I don't get any signal from the buttons in the first place, only from the knobs. With the midibus library I did get them though, but his script uses the proMidi library... something to ask around for in the processing forums...   

Hello all working on MIDI connections!  Is it at all possible to compile your experiences into some document / page?  I'd love to make a page with turotials here (I need to update the page of videos).  Adding you experience with hardware / software / interaction would be very cool!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service