-
Hey Ted, First off, thanks for making P5Live. Just fell over it yesterday, while researching how to get 3D into Hydra with P5 and now I see that you've made it possible to get Hydra into P5 in a much more effective way :) Super impressive! Sorry for creating my question as an issue here. Do you have a discord or some other forum you'd prefer discussions to happen? My question: Is it possible to import a separate sketch into a main sketch? (without hosting it outside P5Live) I've been working on a setup for algoraves and one thing I wanted was to use my midi controller (MidiFighter) in an elegant way throughout my performance. I figured out how to use midi inside P5Live. It's super nice, but the setup I'm thinking of would look rather dry and overwhelming for an audience as the first thing they see, so I would like to separate that part of the configuration from my performance code. I would like to create a separate file where I configure all the midi signals into meaningful variables or arrays, that I can then import into all of my projects and easily jam with without having to look at it. Basically so my live code doesn't get polluted by basic configurations. Hope you're having a great weekend |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey @staus – welcome and awesome the hydra examples help (so fun how it can go hydra » p5 or p5 » hydra or crazy combo of both). noo problem making an issue, it gives me the bump i needed to start the 'discussions' feature of github, since i don't use another space for discussing P5LIVE, so this will be it! As for your questions - most definitely! you would import your custom code the same way one can use additional libraries:
There you can have as many libraries (or just scripts) loaded as you want, which are preloaded before your sketch is. Either locally if running offline, or hosted somewhere with CORS access. You'll see an example of this in the demos » libs » voronoi where I didn't want all the coordinates to take up a HUGE header in the code. For live-coding performance, I also have the snippets feature, ie. Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
@staus – FYI, the latest 1.5.0 release now has this snippets GUI that I started quite a long time ago, but got lost behind additional features that kept pushing back the release. check out the docs and hopefully it's explanatory (works both online and offline). Cheers! ![]() |
Beta Was this translation helpful? Give feedback.
Hey @staus – welcome and awesome the hydra examples help (so fun how it can go hydra » p5 or p5 » hydra or crazy combo of both). noo problem making an issue, it gives me the bump i needed to start the 'discussions' feature of github, since i don't use another space for discussing P5LIVE, so this will be it!
As for your questions - most definitely! you would import your custom code the same way one can use additional libraries:
There you can have as many libraries (or just scripts) loaded as you want, which are preloaded before your sketch is. Either locally if running offline, or hosted somewhere with CORS access. You'll see an example of this in the de…