SVG Repetitions
-
You put the function in on init (like all functions that you write) then you call it from inside your panel's paint routine.
-
I don't understand what you are saying-David
I will try something else - thanks for your effort -
@MikeB Have you ever written your own function?
-
-
not in this complexity - in javascript every now and then - but that's not quite the same here as I noticed.
-
do you have a video on this topic?
-
as I have mentioned many times before, I am a visual learner - I need to see the things to understand them.
-
should the whole thing be a snippet in this category to help others with the problem of displaying the LFO waveforms in the GUI.
-
the idea came from your suggestion @d-healey said in Drawing Sine Waves:
@Natan Yes, but why not just use an svg path?
- I have now created all 5 waveforms in Adobe Illustrator and would like to use them as SVG for the representation of the LFO in the GUI.
To use the full frequency range, the waves are 9000 px long - which as SVG code is almost half a page. That's why I had the idea to take only a section and then repeat it several times.
I learned this from a Mr Healey here - to keep the code effective :-)
I have actually already solved the whole thing but unfortunately not very efficiently - Therefore here again the question for a more elegant solution.
-
-
@MikeB said in SVG Repetitions:
not in this complexity - in javascript every now and then - but that's not quite the same here as I noticed.
You should be writing lots of functions, so go practice :)
do you have a video on this topic?
I use functions in a lot of my videos. Scripting 101 is where you sohuld start.
as I have mentioned many times before, I am a visual learner - I need to see the things to understand them.
You can create visuals yourself ;) Go and play and see what works and what doesn't. I do this all the time, when I need to learn a new aspect of scripting I make a little sandbox project and experiment.
I have now created all 5 waveforms in Adobe Illustrator and would like to use them as SVG for the representation of the LFO in the GUI.
Ah this is different to what I thought you were asking for. The function I posted is for creating a tiled background, repeating an image over a square. I think you only need to repeat it horizontally, correct?
To use the full frequency range, the waves are 9000 px long
Can you show me the image?
-
@d-healey see snippet
It would be nice if it would be possible to achieve the same behaviour as with the long version of the SVG (move Knob1 and 2).
with the short version by repetition.HiseSnippet 4447.3oc0b0rjbbajtZR1xbJuzgrW8.Tg1KC2sIYATn9KXnfiEIGFbME4Dpo3tanPgbwtqdlJXOcMp6ZnDsBEgeA12k8QXeNzAG6IeYu32.uYBT+.THQKZZpC6PQwoyDIvWl4GRfFci5js0KJ2sqdq2jCd9atnzax+vz4uYSyY2+rhpMdO9A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9hGto.BCK06jSNqXWYKIQI9+4O7Q+o6c+K20TedGVjOIRlCDNYkiIe4zDwsgeV8uf++76C+unm8940diSkW8sKURj9txaIc6eTlI6SYXN88JiK7s9wxh2eSHtmO8+CP7ud5IUMKNidNM0zEOue1wa6y8laL8gqVUtnY.rWa5w+6+7+PtwSskwS+rhlsUXMxmd44ygkUVTBHYCr7EtclIWAWrP85P70xo3kaVJeweE9oUICe8jVkrNkP02Eaq+5EpMMfSJttTBfoMxGvPGL8yvWGzuOAbUYXsjpkUe8hEXn3VPXj1F96fMQuC1HdGrI9cvlj2AaReGrIau1fOqk9sWB0dUSS.Am7PUU2I8UumbUu+OJcSwnA
-
I'd stick with the long version. The problem with repeating the short version is you'll need to also calculate the scaling for each image which sounds like a headache.
-
Not if it is possible to duplicate the short SVG e.g. 5 times before and then to compress the whole thing again as as a coherent element (frequency) or to shift it (offset).
This does not have to take place in the same panel - I thought a panel image - attached to each other which is then compressed in a paren panel.
Would that be possible?
-
@MikeB said in SVG Repetitions:
Not if it is possible to duplicate the short SVG e.g. 5 times before and then to compress the whole thing again as as a coherent element (frequency) or to shift it (offset).
It isn't possible. Just use the big version, it doesn't make a noticable performance difference.
-
Besides, it is not one long version but five - Sine, Square, Saw, Triangle, Random.
-
@MikeB said in SVG Repetitions:
Besides, it is not one long version but five - Sine, Square, Saw, Triangle, Random.
That's fine.