Project

West (Reaktor) programmer

Started by Phil999 on .

Sign in or create an account to join the conversation.

40 posts

Topic starter
West// is an interesting Reaktor ensemble by Icaro Ferre.

http://www.native-instruments.com/en/community/reaktor-user-library/entry/show/8123/

So I simply had to create a programmer for it in Lemur. It's not quite finished, but it works well.

For setup instructions please read the Reaktor manual. All i/o is via Open Sound Control (OSC).

You can download it here:

http://www.native-instruments.com/en/community/reaktor-user-library/entry/show/8184/
version 0.7.9 with a couple of improvements, also thanks to you Softcore.

The primary idea was to have a functioning programmer for this Reaktor Ensemble, which was rather quickly done. Now this template turns out to be a piece of exercise in graphic design using the Canvas object. I learned many things in the process. I can think of some more improvements (knobs, round corners for the levers, gradients, shadows, etc.), but for the moment I'm happy with the result. Really start to love the Canvas object.

[img]http://i113.photobucket.com/albums/n202/Phil999_02/West79_zps58262d00.jpg[/img]
Hi
Nice work, interesting solutions to some things . . .
Lots of scope for optimisations that might make canvas life a bit easier
Will try to get to have a look soon and send some revised stuff, if you want...
Cheers
MM
hey thank you Macciza, just came back from a trip and saw your slider knob. Only had a quick look at the code and this is something I can use.

Edit: It's my birthday today. This is a nice present. Thanks again.
No worries Phil, happy birthday mate,enjoy ...
A few comments on it all
For loops work well for repeating elements like the lines ...
Splitting stuff out into other functions, ie drawEllipse makes it easier to prototype and to change later ...
This can all also be stuck into a container which simplifys having multiple copies, as all containers have same names internally, and containers wrap the whole thing into one object - can send you a version if you want...

Interesting solution using the slider behind the canvas, but it can also be done natively in canvas without too much drama, again can send you a version if you want . . .

Also this can probably be optimised further, by drawing all the backgrounds only once and only updating faders when they are actually touched
Another thought would be to have the whole interface on one page that you scroll up or down as needed
Does the 'scope' send any data? Would be interesting to see if that could be implemented in lemur somehow ...

Thanks ndivuyo feel free to play with it

Cheers
Macciza wrote: For loops work well for repeating elements like the lines ...
yes I wanted to do that, but I never worked with iteration before. I have to study some examples.
Macciza wrote:Splitting stuff out into other functions, ie drawEllipse makes it easier to prototype and to change later ...
I do this more and more, but could do it even more.
Macciza wrote:Interesting solution using the slider behind the canvas, but it can also be done natively in canvas without too much drama, again can send you a version if you want . . .
that is also planned for a later version. What I did was to keep all the objects and replace them with Canvas objects, just to save time.
Macciza wrote:Also this can probably be optimised further, by drawing all the backgrounds only once and only updating faders when they are actually touched
is this with canvas_save(c)? I've seen this and similar code in a few examples. Didn't understand their meaning but look interesting.
Macciza wrote:Another thought would be to have the whole interface on one page that you scroll up or down as needed
might try that one, but from my experience with my Aalto programmer I found it better to have tabs or opening/closing containers. Scrolling has the disadvantage that the user may not immediately reach the desired parameter. Well, it depends on how it's done. Will think about it. Of course I always try to have everything on one page.
Macciza wrote:Does the 'scope' send any data? Would be interesting to see if that could be implemented in lemur somehow ...
no, unfortunately not. Well that's expected. One would need to send the Reaktor audio to some Max patch that could send OSC/MIDI to Lemur. But I was thinking about blinking LED's for the LFO's. Some day I'm going to dissect the Reaktor Ensemble to see how the LFO is built, how its LED is triggered.

I'm interested in all your ideas. The canvas OSC i/o, optimisations, knobs, sliders, ...
Hi phil
The canvas overlay works well for some things and I incasing them in containers helps there,
I have had issues with my rotary touch controller that is easily fixed with a knob

The canvas_save/restore functions slow you to save the then current state of the canvas and later restore it . . .
This allows you to save, then alter the canvas, draw on it and then restore the previous state...
Remember there are two ways of drawing in different places on the canvas- move the pen or move the canvas...
You can draw something at x,y or canvas_ translate to x,y and draw at 0,0 - it's the same thing in the end...

The drawing optimisations come down to the canvas_refresh function and On demand drawing
Rather then always redrawing it only redraws when told to ie when value changes
Other things might be making single background image and using alias's for the rest,..
Or having common code to draw them all so you can change them all easily etc

Checking out html5 canvas tutorials might help once yo realise ways to translate them to lemur
Cheers
Well done Phil!, glad to see a reaktor project! ;) Will check the instrument + lemur template for sure.

+1 to each Macciza word about of canvas!

Split stuff in subfunctions and get familiarized with save/restore() will help you a lot, specially if you use transformations (translate,rotate,scale,etc), even you can order / positioning stuff more quickly, I've attached a pict as demo, you will see the order of the buttons depending of how they are called in the script.

Captura de pantalla 2014-10-30 a la(s) 14.29.50.png

That said, I think a good way to get familiarized canvas better is "under-layering", using this like a graphical layer/s, even sometimes if you don't need any special "cursor" behaviour , I would say that is even more "efficient" (by refreshing canvas on demand as Macciza says)

I have tried recreating a factory multiball (multisquare) object from scratch, including physics, cursor mode, attributes, etc, I quickly discovered that duplicating the object memory was 1 %, with only two of those objects, however you need 10 Factory multiball objects to fill the same memory, It was a good lesson for me to learn how well optimized and coded are some objects in lemur.

This also avoid some processes like scalling values and then normalizing them again, to send/receive/process MIDI,osc, etc.

HTML's tutorials are very useful for this, I have a canvas book too , I think there some free articles online from that book, I will seach the link.

Thanks for sharing the project !

btw- sorry the off topic, but is radial gradients working for you guys? here in the editor looks fine, but on iPad it doesn't, seems like if radius is not computed correctly.
I've played with the template and ensemble, good work mate! looking forward to your next version, would be interesting to know how this improves. I am interested specially in memory usage, I will keep the track of this project,it already works smooth on ipad retina though!

Here the link for the canvas book I've mentioned, https://www.inkling.com/store/book/html5-canvas-fulton-fulton-1st/?chapterId=be7c3940d3944ae4905646a299fe87df , some cool stuff there,but can't locate the link for the free chapters, but is possible to preview some content.

Cheers
Cheers AB

I would be interested to have a look at some of your multiball work, I've been looking into physics stuff lately including multiball style stuff ....

Phil, check out a variety of tutorials and try to get your head around converting their code to Lemur
Also be aware that you will find different approaches and coding styles at many of them.
Some of these styles transfer easily to Lemur but some don't and require more translation

For the ellipse I did a search on html5 canvas ellipse, read a few sites and hacked something up...
Ideally a whole additional library could be developed to make all these things easier, more on that later . . .

MM
hey Macciza, I should have the initial prototype on my old laptop, I will send, you can find that stuff in the book that I mentioned too, (maths and physics chapter) it needs some work to translate to lemur domain, but it works, there are several examples and routines, wall bouncing, bouncing between balls by collision, etc. I have the spanish version and I've found this very interesting, also there are many pages are not very useful to use on lemur though.

Cheers
Cheers mate,
I have gone through a few physics tuts already and have a few prototypes using different approaches...

Phil,
The sliding single page is now easily achieved by defining a custom interface size, which then provides native scrolling!
Check out the selector in the editor, you can now define your own sizes ....
Also had a look at the ensemble and we can get the LFO lights happening fairly easily too
Will send you some stuff soon
MM
hey that's good news. The interface size is good news I wasn't caring about, and with the LFO LED's I've been struggling. Tried with the new sequencer objects but somehow it didn't work everytime.

Some help would be great with the LFO's.
Joe Soap wrote:Where are the Interface / Project size options Phil?
in the editor, you can choose the project size. iPhone, iPad, Legacy Lemur, etc. And there are custom sizes one can define. Haven't tried this option yet.

Thank you Macciza, but at the moment nothing has arrived yet.

Edit: ah, got it in the mail. Great!