Replies: 13 comments 15 replies
-
the ui controls could also be integrated into codemirror using decorations: https://codemirror.net/examples/decoration/#boolean-toggle-widgets |
Beta Was this translation helpful? Give feedback.
-
another approach that works much better: https://strudel.tidalcycles.org/?STsblGtree5S |
Beta Was this translation helpful? Give feedback.
-
"maybe there could even be helpers for each param, like |
Beta Was this translation helpful? Give feedback.
-
even simpler idea:
so basically you just have to add |
Beta Was this translation helpful? Give feedback.
-
here's how dittytoy deals with input controls: https://dittytoy.net/ditty/80910da4d2#freq=209 |
Beta Was this translation helpful? Give feedback.
-
This is a very nice idea! Among all the proposals, I personally prefer the syntax I don't like the idea of updating the code when we touch the ui, it's really confusing: it's like playing a videogame that can change the code of the videogame. This circular behavior (code updates ui and ui updates code) will probably break things at some point. Also if I share my music in a repo I don't the files to be updated each time I play it.
And parsing comments is not as powerful as having functions in the code, because it's not possible to have the slider itself defined dynamically. I would also suggest to have a method on the slider object to define a range after its initialization, in order to have one slider updating several parameters. Something like that: my_slider = slider('My slider') // default: min=0, max=1, init=0.5
s("bd sd, hh*8")
.lpf(my_slider.range(200, 8000, 800))
.lpq(my_slider.range(0, 20, 10))
.gain(my_slider.range(0, 1, 0.5)) |
Beta Was this translation helpful? Give feedback.
-
I created a prototype for checkboxes, based on your previous prototype: https://strudel.tidalcycles.org/?6Tno91ORQaq4 We define the initial checkbox state, as well as values for both states: .lpf(checkbox('kick_lpf', { val_off: 2000, val_on: 8000, init: true })) |
Beta Was this translation helpful? Give feedback.
-
Some proposed live coding UI principles:
There could also be UI for manipulating generative music pieces, potentially with some shared resources, but I think it's best to treat that as a separate issue, as the design issues will be totally different. |
Beta Was this translation helpful? Give feedback.
-
potentially related: #646 |
Beta Was this translation helpful? Give feedback.
-
here is a new version of the slider demo, using ref + scaling the value range as with any pattern: https://strudel.tidalcycles.org/?C6ybeBTc_DC9 the arguments could also be flipped to optional ids might be a bit too complicated, maybe id is just required and also acts as label?! edit: using ids as labels seems to be a good idea: https://strudel.tidalcycles.org/?TkZDXKgvmMMy although labels might be less relevant when using https://codemirror.net/examples/decoration/#boolean-toggle-widgets which are inline in the code, so a label might not be required |
Beta Was this translation helpful? Give feedback.
-
another demo with more sliders: https://strudel.tidalcycles.org/?MVpaxiZ0LNDL |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
as talked about in the chat, an easy API to add ui controls for params would be a lot of fun.
Here is a really basic prototype of how it could be possible to control params in real time:
https://strudel.tidalcycles.org?XliW8Yvcw99U (edit: see below for a better approach)
maybe the API could be made more logical / easier to use, something like:
maybe this is only possible with a transpilation step.
The above link will control the params in a way that the new value takes effect on the next hap. maybe there is also a way to control params instantly while nodes are active. this would require plugging the dom events to the web audio nodes directly (and do all the plumbing in between)
Beta Was this translation helpful? Give feedback.
All reactions