The Kyma Forum is no longer active. Please visit the Kyma Community.
![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Hard Syncing Oscillators |
Timothy McGuinness Member |
![]() ![]() ![]() I'm trying to emulate two analogue oscillators; one hard synced to the other. I almost have it by pasting one oscillator. Osc 2 into the 'reset' of the other, Osc 1 and then adjusting oscillator 1's frequency but there's is a constant beating that I can't get rid of. PS I tried to upload my sound and got an error message. IP: Logged |
pete Member |
![]() ![]() ![]() Hi Timothy. I suspect what is happening is that the reset is a hot parameter running at control rate (1kHz). This will beat with the actual frequency of the controlling oscillator. You need the oscillators reset to run at sample rate. To get things running at sample rate in Kyma you need to knit modules together and avoid hot parameters. If you had Petes DSP modules you could use at the up/down counter feeding a a wave shaper but as they only work with the capybara we need to get a bit more tricksy. There are all different approaches, but this may be one way of achieving it, but will need a bit of experimentation. The oscillator module has a sample rate FM sound input. This is actually a sample rate Phase control input (FM is really Phase modulation) and if you set the MI hot parameter to 2*PI then -1 in the modulation sound input will equate to 0 deg phase shift, 0 will equate to 180 deg phase shift and +1 to 360 deg phase shift (which is the same as 0 degs). Now this means that you can quickly jump phases by changing the DC value fed to this input. But you don't want to jump to a precise phase relative to the oscillators current position, you instead want to move the phase by just the right amount that will put the oscillator back to 0 degs and stay with that offset until the next trigger comes along. Now it gets even more complicated. You need to know what phase the oscillator is at the time of trigger if there was no phase shift on it, so if you have a third oscillator with a full ramp as it's waveform, that has exactly the same frequency controls as the signal oscillator, then it's output will give a value which equates to the un-shifted current phase of the signal oscillator. If you sample and hold this ramping value (when the sync trigger comes along) then the inverted value will equate to just the right amount of phase shift needed to get the signal oscillator to jump back to 0 degs. So all together. First you need you triggering oscillator which is pasted into a triggered sample and hold modules trigger hot parameter, but with the "L" deleted. (this is one of the few hot parameters that run at sample rate if the delete the "L" and use no formulas). You then have another oscillator with a full ramp as it's wave form, feeding the normal input of the triggered sample and hold module. The output of the sample and hold module goes through a mixer with the levels set to -1 to act as an inverter. This then feeds the modulation input of a third oscillator which has the waveform you need for you output signal. This oscillator must have the modulation switch on and 2*pi in the MI hot parameter field. All frequency controlling information that is set up in this oscillator must also be copied to the ramp oscillator in exactly the same way so that they work in unison. BTW this will not be an anti aliasing form of oscillator. I have been thinking for a long time how one would make an anti aliased sync trigger type oscillator and have not yet been able to come up with an answer. I hope this makes sense. Pete IP: Logged |
Timothy McGuinness Member |
![]() ![]() ![]() Many thanks Pete. I'm going to save this page, digest your valuable contribution & then try what you suggest. I am using a Capybara as a matter of fact. Does that make a difference? I can't thank you enough for taking the time to write out your description of how to achieve this. It's bigly appreciated. Cheers, Timothy McGuinness IP: Logged |
pete Member |
![]() ![]() ![]() Hi Timothy. if your using a capybara, it's much easier. If you download Petes DSP modules which can be found in the Kyma tweaky (free of charge), you have a module in there called UpDownCounter. You need to download both the sounds and the code(in a .asy file which you put in the kyma folder). By using the UpDpwnCounter you have sample rate control of everything and you can produce full scale ramps. By setting the down rate to instant and varying the up rate you can control the frequency and you can reset it by putting your reset oscillator in the reset input. You may need to use a gate to trigger module between the control oscillator and the rest input and this is also found in Petes DSP modules. There are instructions in the modules help. You then feed this ramp into a wave shaper module with the waveform of the output wave you want. and that is your output. regards Pete. IP: Logged |
Timothy McGuinness Member |
![]() ![]() ![]() Thanks Pete, I'll download those files later today and try out what you suggest. Looking forward to making this work. Thanks for the help and taking the time to respond. Timothy IP: Logged |
simon smith Member |
![]() ![]() ![]() test IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.