Previous topicNext topic

How to start an Oscillator at 0.5 not at 0 ?

Questions, comments, feedback, etc.
Post Reply
friday3000
Posts: 16
Joined: Sun Mar 06, 2022 8:40 pm

How to start an Oscillator at 0.5 not at 0 ?

Post by friday3000 »

I really searched for some time in the forum, I'm pretty sure that there would already be an answer to this, but unfortunately did not find anything.

How to start a Osc at 0.5 ? (so to speak the phase shifted by 90 degrees)
Sadler
Posts: 1188
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by Sadler »

friday3000
Posts: 16
Joined: Sun Mar 06, 2022 8:40 pm

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by friday3000 »

Sadler, thank you so much for your prompt help... but I don't find what I was searching for, maybe I have overread the essential information?!?

My problem is not the scaling of the Osc, I did that with offset -0.5... but then the Osc always "starts" at -0.5

But what I need is an Osc from -0.5 to 0.5 that "starts" at 0
Sadler
Posts: 1188
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by Sadler »

Cosine starts from 1. Try using an Increase with an Expression and cos(x). Does that help?
friday3000
Posts: 16
Joined: Sun Mar 06, 2022 8:40 pm

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by friday3000 »

Sadler wrote:Cosine starts from 1. Try using an Increase with an Expression and cos(x). Does that help?
I am not sure if I understand your help correctly, excuse my lack of understandingand thanks again for your time and help. The following was my test...
oscstart_help.png
oscstart_help.png (23.57 KiB) Viewed 17935 times
This lets the triangle osc start at 1 and goes down to 0.5 but still, when I restart the project (Ctrl + E) it starts from the edge not in the middle of the wave. Maybe it helps if I try to visualize what I want to achieve, and there are other options to get there, for this specific target?
oscstart_help2.png
oscstart_help2.png (3.49 KiB) Viewed 17935 times
Sadler
Posts: 1188
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by Sadler »

Your almost there - swap your triangle oscillator for an increase like this:
Screenshot 2022-11-19 171956.png
Screenshot 2022-11-19 171956.png (26.02 KiB) Viewed 17932 times
Sin and cos are out of phase by π/2 radians. Having a cyclic function (Tri,) drive another cyclic function (cos/sin) will be a more complex motion.
TKS
Posts: 144
Joined: Mon May 17, 2021 10:40 am

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by TKS »

sin(x+pi/6)
friday3000
Posts: 16
Joined: Sun Mar 06, 2022 8:40 pm

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by friday3000 »

Sadler wrote:Your almost there - swap your triangle oscillator for an increase like this:
Sin and cos are out of phase by π/2 radians. Having a cyclic function (Tri,) drive another cyclic function (cos/sin) will be a more complex motion.
TKS wrote:sin(x+pi/6)
Hi Sadler and TKS... Sorry for my delayed response and thanks so much for your help. I am slowly reaching the goal!

Update [30.12.2022]:

sin(x) starts at 0.5
sin(x+pi/6) starts at 0.75
cos(x) starts at 1
friday3000
Posts: 16
Joined: Sun Mar 06, 2022 8:40 pm

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by friday3000 »

I hope all of you had a pleasant Christmas time!

The last weeks of December are always quite busy for me, therefore I did not have time for more testing, how to get the tri and sin in to the same timing (BPM). Now that my holidays have started, I bought a second Magic Music Visuals license for my laptop, to following this up in the mountains. 8-)

Today I tested different ideas, but did not get the SinOsc in sync with the TriOsc. I have already used the TriOsc with a MIDI Trigger File before, so I know that the TriOsc behavies correct, but SinOsc (and also sin(x) expression) don't follow the same timing????

I really would appreciate it, if someone could reach under my arms and lift my mental fog. :roll:

###################################################

I wish everyone already a pleasant transition into the new year!!!

###################################################
Sadler
Posts: 1188
Joined: Sat Aug 02, 2014 7:10 pm
Location: London, UK

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by Sadler »

In your sin and cos expressions multiply the angle, x, by pi.
friday3000
Posts: 16
Joined: Sun Mar 06, 2022 8:40 pm

Re: How to start an Oscillator at 0.5 not at 0 ?

Post by friday3000 »

Sadler wrote:In your sin and cos expressions multiply the angle, x, by pi.
Yes that was the trick for sin and cos to behave like the Tri. Osc in the timing. Thanks so much. :idea:

After the intensive experimenting I have now also noticed that my statements above were not specific enough! Sine Osc has always started in the middle (0.5), it is the Tri. Osc that starts at the edge at (0).
00000000 (Custom).png
00000000 (Custom).png (6.99 KiB) Viewed 17259 times
:!: Here you can find my Osc BPM Timing Prototyping Project, so that hopefully others should also quickly get to know the different properties of the various Osc with BPM sync.
Post Reply