The question is:
Can i somehow find / count how many pixels, in a certain dimensions gem window, pd uses to complete a cycle of a given frequency wave?
How many gem units a certain frequency needs to complete one circle?
(relationship between gem units or pixels and wavelength of a frequency)
Here is the problem:
I want to draw a wave in gem, and i do it by using the [gems.curve.n] object. But i want to be able to adjust the graph for as many periods i want, so it looks sorter or longer. I can manage this by repeating the [gems.curve.n] .
[translateXYZ 1 0 0]
but if i do this, i just repeat the rendering area ("box") in where the wave is being rendered, so every new box begins the wave of a standard phase but it ends at an unknown phase depending on the frequency.T
he visual outcome of this, is not a constant line as wanted but many same lines repeated on a row with gaps among them.
This can be faced by calculating its frequency 's wavelength in the gem window.
This way i can calculate how long is a simple circle of the wave and repeat it every that quantity of space at the X axis:
[translateXYZ "waveLength" 0 0] //** wavelength in gem units
so every new repetition starts at the same phase the previous ended and the visual outcome is a constant line.
Has anybody any idea of how do i do this? (or any other solution to this problem..)