@Jona Hi, the new lissajous sequencer module looks nice and seems to work well.
I added [ofKeyCodeListener] which outputs constant keycode values independent from modifier keys.
Please reinstall ofelia v1.0.8 so you can use this object.
Here's a new version modular.zip. Please try to delete boxes using the backspace key(or del key?) on Windows. If it doesn't work, please let me know the output value of [ofKeyCodeListener] when you press the backspace key. Also, Please let me know the output values of left/right Control keys.
Could you also try "Command + '-'/'+'" on your macbook to zoom? if it doesn't work properly please let me know the output value of [ofKeyCodeListener] when you press '-' and '+'.
And I fixed the position jumping issue when double click and drag a new box. Thanks for finding this.
Now I will try to work on the cord connections. Let me know if you find other issues or have suggestions.
-
Ofelia Jump On Click Slider
-
@cuinjune hi, thanks. deleting works with backspace on windows. also creating objects with control+1 does work now.
Zoom doesnt work for me on macos and windows.
here are my windows keycodes:
shift = 340, control = 341, backspace = 259, del = 261, +(numpad) = 334, -(numpad) = 333, + = 93, - = 47, left = 263, right = 262, up = 265, down = 264.
on my macbook i dont have a numpad, and like on windows , + = 93, - = 47.
edit: if i replace keycode 45 61 with 47 93 zoom does work. -
@Jona Thanks for confirming. I also added 47 and 93 for zooming. modular.zip
Maybe I should change the shortcut for zooming later since -/+ seem to differ by platforms and hardwares. -
Or its fine like you did it now, that you assign two or more keycodes to + and -? if the keycodes do not conflict with another key function it shouldnt be a problem.
I found that the render order only changes if you drag a rectangle directly, if you first select the rectangles with drawSelectBox and then drag them the render order remains the same. In Pure Data the render order is the order of creation, but i think it could be nice if the dragged objects are always in the foreground.
Another question not related to the example: If I use [openpanel] it opens a window behind the ofelia window but in front of the pure data window. Is it possible to change that, so that its also in front of the ofelia screen (not important)? -
Hi, since ofelia isn't working on my operating system yet, i build this modular system with data structures:
It uses [text] instead of arguments to store data. As the modules can be created from that [text], saving and loading of sessions is possible.
Cords can be selected by click (a bit clunky), deleted by backspace and deselected by escape key.
Iemguts external is used for mouse events and object deletion.
Obviously this is just a demo and many things are still unsupported or wouldn't work with data structures anyway. Have fun!
Edit: This version has a demo mode that shows the subpatch where the modules are created. I got tcl errors from dynamic patching until i did vis 1, editmode 1 before disconnecting for example, so i had to do vis 0 afterwards and the modules subpatch is closed. In demo mode it stays open: modular_ds.zip (now working)
-
@ingox thanks. that is great
-
@Jona Yes the keycodes don't conflict with other keys. I will leave it like this then.
Thanks for your finding and suggestion. I applied the change. modular.zip Please check if it's working as expected.
And regarding the last question, I don't think it's currently possible to make the pop up window to appear front when using [openpanel] while ofelia window has focus. And I should note that [openpanel] and [savepanel] won't work if you use them on standalone app created with ofxOfelia. I think these objects are built using Tcl/Tk. And I don't know if there's a good cross-platform solution in openFrameworks(c++) for creating such objects.
What you can do now instead is creating a custom fake openpanel that appears inside ofelia window. It should be possible by using some utility objects. You can take a look at "file" and "directory" subpatches from "ofelia/help-intro.pd".EDIT : fixed small minor bugs. modular.zip
-
@cuinjune thanks, everything works as expected
i think its nice like that. and thanks for the hint with the fake openpanel, i will have a look.
-
@ingox Great work! It works nicely on my macbook. Thanks for sharing this and I look forward to seeing the further updates.
-
@cuinjune i think i found a way to select samples relative to the path of the patch (the example uses [list-idx] from list-abs which is a vanilla abstraction). do you think this method also works with the standalone application? openpath.zip and i also found a nice open frameworks example: https://github.com/openframeworks/openFrameworks/tree/master/examples/input_output/fileOpenSaveDialogExample but i dont know about the cross platform possibilities. and i assume it would be a lot of work to implement it if its possible at all?
-
@Jona Hi Thanks for finding the example. I looked at the code and it seems openFrameworks already has functions that can do [openpanel] and [savepanel].
http://openframeworks.cc/documentation/utils/ofSystemUtils/#show_ofSystemLoadDialog
I haven't tried it yet but I think it will work on all desktop platforms without problem.
I will create the two objects. I can also include ofSystemAlertDialog() and ofSystemTextBoxDialog() as well. I will let you know as soon as I add these objects to ofelia.( I will add them within 24 hours) -
@cuinjune hi, that sounds great
its not that its needed very soon, but its good to know that its possible, this way it could be easier / more flexible to load/save presets/samples/movies(?) etc. from the ofelia window... still, the openpath.pd method is fine for now and could be useful to load static soundbanks, that are located relative to the path of the patch, for example.
-
@Jona Hi I just added the 4 objects to ofelia v1.0.8.
Reinstall ofelia and open "ofelia/help-intro.pd" and then find the [pd system] subpatch in UTILS section.
I also added [ofGetCanvasIndex] since I think it will be useful for implementing the module connection. -
@cuinjune thanks for the work, i think they are really useful. the ofSystemTextBoxDialog example is quite funny
also great to have the ofGetCanvasIndex object.
-
@Jona Hi, I couldn't implement the cord connections yet since I'm currently busy with other thing.
Here's the so far work : modular.zip
I will be able to continue again from next Friday. Just wanted to let you know. -
@cuinjune hi, thanks for everything you did. i didnt expect such a fast progress
all the best with your other things.
-
@Jona Hi, I've been working on the connections but couldn't finish the implementation yet.
Although it should be possible to implement the connections and everything using the existing pd and ofelia objects, I personally think pd is not the easiest tool for handling such a complicated task where you need lots of conditions and state changes.For this reason, I've been writing the code in openFrameworks and C++ first and then translated the code into pd objects which is not so efficient way of working.
Because of this, I'm considering to embed the scripting language Lua to ofelia (using Dan Wilcox's ofxLua) so users can mix text based scripting with visual programming in realtime. And users will be able to directly access all openFrameworks features using it. I think it can be very flexible if I succeed in adding the feature. And I believe it will help me to work more efficiently for creating the modular environment.
I expect it will take about a week or two to add the Lua scripting feature to ofelia. (if everything goes well)
Then I will need a few more days to study basics of the Lua programming language but it looks pretty easy to learn.So if you're not in a hurry to create the modular environment, I suggest we hold off this project for a while until I finish creating the base of the environment after adding the Lua scripting feature.
My goal is to make it possible for you and users to easily design modules using ofelia's gui abstractions(e.g. pdgui) and inlet/outlet abstractions without having to deal with other things.As I've said, this is a complicated project requiring a huge amount of work so I hope you understand my decision and I will keep you updated on my progress.
P.S : The below image is the screenshot of what I've done so far using openFrameworks/C++ which I didn't translate to pd and ofelia. I think the code can be easily translated to Lua later on.
-
@cuinjune hi. thanks for your work and thoughts. there is no hurry at all, and it is totally fine to hold the project off
i also need to focus on another project for university until mid of june. the concept sounds really great but (like you mentioned earlier) more complicated than i thought. i am not aware of the advantages and disadvanteges of doing somthing like this with pd objects vs. c++(of course i could imagine that c++ is more efficient). i think the idea to access all openFrameworks features via Lua sounds great, even independent from the modular project. But I will also have to learn Lua then
At the moment i mainly know pd and a little bit of python and openFrameworks as programming languages, so i am sorry that i am not capable to help with c++ tasks (at the moment).
and of course you need to know if its worth your time, i naivly thought that its a much smaller task. -
@Jona Thanks for your understanding.
I just want to make the project more extensible and maintainable as much as possible.
And you will not need to learn Lua when you create modules later on.
I'm considering to use Lua partially where I think is easier to express than using Pd. (mostly for handling complex logic with many conditions)
But even if you consider learning Lua, I think it won't be that hard since people say it's one of the simplest/easiest languages to learn.
You can think of it as having a more advanced [expr] with additional ability to use openFrameworks classes and methods.
I created a simple prototype yesterday and it seems to work well so far. I need to think more about the design.
-
@cuinjune thanks for the example. the scripting feature looks very useful