-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature insert time #130
Feature insert time #130
Conversation
Hi @KoltesDigital ! Thanks for proposing a cool feature. I'm also thinking about adding GUI for uniforms to VEDA, yet this is just an idea. Anyways, I don't have enough time to review this PR this week. |
Shortcuts are always a scarce resource... Ctrl+Shift+T reopens the last closed tabs. Haven't we discussed about the right-pane branch some months ago? Anyway yes it would be cool, I used synthclipse and found this feature interesting, I even wrote a tool for making 4k demos using synthclipse because of this feature (https://github.com/CookieCollective/4k-Demo-Oven) and I'd love to use VEDA instead. However in this case I'm not sure to have this into a specific uniform controller. The goal is not to have a full demo timeline, but just being able to do transitions. Do you imagine like a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @KoltesDigital , sorry for late reply.
I read though the changes. It's almost acceptable, but I have a few concerns.
First is about the keybinding.
How about using alt-shift-t
instead? It's not used by Atom.
The second is, i'm not sure inserting text is the best way to send values to GLSL world.
Using uniform float transitionTime
looks better to me.
You can create uniform variables by veda.SetUniform()
.
Would you fix it before merge?
Otherwise I can do that after merging this PR.
BTW, I still wanna add GUI uniform controller to VEDA. (yet the PR is abandoned... I will create another PR😅)
Once we have GUI uniform controller, we might need multiple transitionTime
s...
So we might change the uniform type to uniform sampler2D transitionTime
someday.
src/player-server.ts
Outdated
); | ||
}); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, I just wanted this kind of methods.. this is useful in many situations, like querying available audio inputs from the browser! 😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mirrored your command system. Although I'm concerned with CommandData
... I suggest to change both systems to discriminated unions, so that in the switch (command.type)
cases, the data type would be automatically inferred. Safer and prettier!
I'm fine with any shortcut. BTW atom-terminal also both I'm also fine with the transitionTime uniform. Although I don't see any other use, maybe naming it transitionTime is too specific. A |
BTW, have a look at how synthclipse manages uniform controllers, and value curves over time. It may give you new ideas. |
Oh I overlooked atom-terminal... maybe For naming, How about using |
Whoa, I tried synthclipse once but didn't know it's that powerful... 🙀 I love ISF and I thought extending ISF is the best way to bind uniforms to GUI. |
Well I don't think it's worth to find an unused key combination. The chances of using VEDA with Atom-terminal are almost zero. And if I were to use a terminal, I want it to be outside of Atom. As I understand, FragX only means GLSL + uniform name convention + #include, which you already have anyway (another name convention and glslify). Moreover I prefer a descriptive format, especially in JSON, because it allows for easy manipulation (e.g. https://github.com/marcinbiegun/isf-touchdesigner). So I'm totally for supporting ISF's INPUTS property. What if the panel retrieves the list of active uniforms ( I'm fine with a uniform In the meantime, could you please integrate the first commit in the main branch? Fix convertPathForServer for Windows. I have another feature in mind and I'll have to use it again. |
Ok, I cherry-picked fc652f4 into master and pushed |
OH my god, this is the way to go |
Hello, as the aforementionned "friend who asked for this", I wanted to highlight that one may use many transitions at the same time, not especially starting at the same time. Though the |
Hi @eliemichel ! uniform sampler2D triggerTime;
// If we have 2 transitions
float t1 = texture2D(trigterTime, vec2(0, 0));
float t2 = texture2D(triggerTime, vec2(1, 0));
// If we have 5 transitions
float t1 = texture2D(trigterTime, vec2(0, 0));
float t2 = texture2D(triggerTime, vec2(0.25, 0));
float t3 = texture2D(trigterTime, vec2(0.5, 0));
float t4 = texture2D(triggerTime, vec2(0.75, 0));
float t5 = texture2D(triggerTime, vec2(1, 0)); For now we can't set multiple values since we don't have GUI, so the width of the texture must be 1. VEDA's OSC textures works like this; the width of the OSC textures are detemined by the length of OSC message. |
However, I don't know how you plan to manage multiple triggers within Atom. Multiple shortcuts are a UI flood, while asking which trigger to trigger defeats its purpose. You could achieve that with a MIDI controller and the existing MIDI binding, where you detect a button event by storing the state of the MIDI texture at previous frame using a pass. I think we're trying to push even more information to the user with predefined uniforms, while we're trying at the same time to let users choose what they want with ISF's generic So, why not using Besides, I'm in favor of adding new Regarding webcams, we could introduce an The point is, there would be a preparation step before the performance, where the users need to configure inputs with the panel, and then during the performance the panel shouldn't be used anymore. I still want that current uniforms work out of the box, because it's very nice for new users. Forcing a preparation step would make new users go away. |
I'm thingking about adding these features gradually.
If you agree with this and fix this PR, I'll merge this. |
Actually I wanna let users touch GUI panels during performance. just an idea, though 👻 |
TBH I don't totally get what's wrong with the raw "insert current time" function. This texture-based solution is smart, but feels a bit overkill. As @KoltesDigital noticed, if one wants such an elaborate setup one may use multiple buffers to cache some MIDI/OSC trigger input. Also, I have some small concerns about texture-based input. The first one is about mip maps. I guess there is no mip map at all for those textures, but should I query the pixel at My second point is about performance, and I'm asking because I really don't know if it has any impact: let's say I have an OSC input providing me with the current BPM, and that I use this bpm info in many many places around the code. Is it ok to perform a call to |
Inserting raw float constant is very interesting, but it's too magical, IMO. Inserting code is a completely new feature. Extending text editing features, itself is not bad idea. Also, when we've implemented GUI controller and trigger buttons we'll have 2 different ways to manipulate trigger values - sounds confusing to me. |
It depends on how many times you call texture(). uniform sampler2D osc_foo;
float o0;
float o1;
float o2;
float o3;
float osc(in float ch) {
return texture2D(osc_foo, vec2(ch / 4.));
}
void main() {
o0 = osc(0.);
o1 = osc(1.);
o2 = osc(2.);
o3 = osc(3.);
...
} |
FWIW, I like to write tiny scripts which cooperates with VEDA over OSC. https://twitter.com/amagitakayosi/status/1106768974463668225 |
Thanks for all these replies! :) I understand that you insist on keeping the core design of Veda clean. I care about clean code as well when I take the time to write it, but doing live-coding is a different matter for which tricks like global variable caching will be helpful! |
Hi folks, |
Hi!
The first commit was integrated on a testing branch, but still not on the main one.
The second is a feature proposal for inserting time when pressing Ctrl+Shift+T. A friend asked me for this feature. I watched him use the feature very effectively, in order to trigger nice transitions, so given the code below, he would change
t0
and immediately reload the shader.Because of the server player, I chose to add a new query system. Whereas commands are broadcasted to all clients, queries require that a single browser is connected (i.e. another socket different from the Atom socket).
I think this can be useful!
Requires fand/vedajs#34