Page 1 of 1
Java API via OSC interface
Posted: Thu Jan 08, 2009 2:43 am
by heuermh
It's probably too early to announce this, but I am writing a java API for SooperLooper that uses the OSC interface. The OSC messages are wrapped in java-style method names, e.g.
Code: Select all
SooperLooper sooperLooper = new SooperLooper("http://localhost:9999");
sooperLooper.setRecordThreshold(0.8f);
sooperLooper.hitRecord(1);
sooperLooper.saveSession("session.sl");
GPL license. Requires java 1.5 or later and maven 2.0.x to build.
If others are interested, I can put this up on sf.net, google code, or git-hub. Or I can just attach updates here.
michael
Re: Java API via OSC interface
Posted: Thu Jan 08, 2009 9:21 pm
by jesse
Interesting, are you also writing a custom GUI or some other interface using Java?
Re: Java API via OSC interface
Posted: Tue Jan 13, 2009 12:27 am
by heuermh
My motivation is that I built one of these
http://www.cycling74.com/story/2007/10/16/1252/3782
but ended up with only two working switches (my soldering skills are to blame). I need to manage some state in code such that the same two keystrokes can be mapped to different OSC commands in different situations. I am most proficient in java, so I thought I would start there. A nice side-effect will be a library that Processing can use.
If all goes well, I will do the same for ChucK.
Newer version attached, all the "push" code is there. I still need to come up with a good pattern for handle the "polling" parts of the OSC interface.
michael
Re: Java API via OSC interface
Posted: Sat Mar 07, 2009 4:49 pm
by heuermh
In ChucK:
Code: Select all
SooperLooper sl;
sl.connect();
2::second => now;
sl.downRecord();
8::second => now;
sl.upRecord();
4::second => now;
sl.hitUndo();
Or in Processing:
Code: Select all
SooperLooper sl = new SooperLooper();
delay(2000);
sl.downRecord();
delay(8000);
sl.upRecord();
delay(4000);
sl.hitUndo();
I see the timer in the SooperLooper user interface go up to around 11 seconds on the record and up to around 6 seconds on the undo. I would expect it to stop at 8 and 4 seconds respectively.
Is the significant delay in the ChucK or Java --> SooperLooper engine OSC message or in the SooperLooper engine --> SooperLooper interface OSC message(s)?
michael