[Csnd] Syncphasor question
Date | 2008-06-04 19:55 |
From | Steve Bradley |
Subject | [Csnd] Syncphasor question |
Hello Csounders, I have been playing with this example of syncphasor from the manual: instr 1 ; Use two syncphasors - one is the "master", ; the other the "slave" ; master's frequency determines pitch imastercps = cpspch(p4) imaxamp = 10000 ; the slave's frequency affects the timbre kslavecps line imastercps, p3, imastercps * 3 ; the master "oscillator" ; the master has no sync input anosync init 0.0 am, async syncphasor imastercps, anosync ; the slave "oscillator" aout, as syncphasor kslavecps, async adeclick linseg 0.0, 0.05, 1.0, p3 - 0.1, 1.0, 0.05, 0.0 ; Output the slave's phase value which is a rising ; sawtooth wave. This produces aliasing, but hey, this ; this is just an example ;) out aout * adeclick * imaxamp endin I got it to work fine, but I am confused about two of the parameters on the master and slave oscillator. First what is "am" on the master oscillator? And what is "as" on the slave Oscillator? They don't seem to be connected to anything else. I have one ideal that they are just the labels for audiomaster and audioslave but then why would they be put in the places for aphase and asyncout? Any help on this would be greatly appreciated. Regards, Steve Bradley It’s easy to add contacts from Facebook and other social sites through Windows Live™ Messenger. Learn How. |
Date | 2008-06-05 19:19 |
From | Steve Bradley |
Subject | [Csnd] RE: Re: Syncphasor question |
Hi Andres, I understand what the opcode is doing now thanks to your explanation. Cheers back to you, Steve
Search that pays you back! Introducing Live Search cashback. Search Now! |
Date | 2008-06-05 19:24 |
From | Anthony Kozar |
Subject | [Csnd] Re: Re: Syncphasor question |
Attachments | CZresonance.csd CZresonance2.csd resonance3.csd |
Yes. "am" and "as" are not used anywhere else in the instrument. The names are arbitrary and they are just there as Andres said because you have to supply a variable name for each output parameter. When I designed the syncphasor opcode, I wanted a flexible way to chain together any number of oscillators with hard sync. I also wanted to be able to use other signals as sync inputs or to use the "sync state" of any given oscillator as an input to other opcodes. So, instead of having the syncphasor opcode read the phase of another oscillator and try to figure out when it is "zero" (which is harder than it sounds), I made the opcode take an explicit "binary" sync input signal (always 0 or 1) and output the same about its own internal state. This allows you to do all sorts of potentially interesting things such as summing multiple sync outs and feeding them to another syncphasor. Andres is right about not using the output of phasors as audio signals. In this case though, the "classic" hard sync sound is created with two sawtooth oscillators and that is essentially what a phasor is (although unipolar instead of bipolar). Even if you do take the output of the syncphasors in the example and read a table with them, you will still likely end up with strong aliasing. Obtaining non-aliased hard sync in the digital realm requires a very different technique. I have attached two examples to this email though that show how to use syncphasor to index a table and minimize the aliasing and a third example that shows how to obtain granular textures with the opcode. Feel free to ask more questions if any of this is still unclear. Anthony Kozar mailing-lists-1001 AT anthonykozar DOT net http://anthonykozar.net/ Andres Cabrera wrote on 6/5/08 1:10 PM: > Hi, > The two outputs (on the left) of syncphasor are compulsory (you must provide > a variable for both), but when you want a phasor that syncs to another one > will only use the first one, but you will use both from the phasor that will > be the "master". > The second output argument asyncout only takes the value of 1 when the > phasor starts a new cycle. This argument is designed to be put as input > argument async in, so that the second phasor syncs to the first one. > Also bear in mind that phasors aren't really designed to be oscillators, but > more to dictate phase values for table reading, see the entry for phasor. > On Wed, Jun 4, 2008 at 1:55 PM, Steve Bradley |
Date | 2008-06-06 01:42 |
From | Steve Bradley |
Subject | [Csnd] RE: Re: Re: Syncphasor question |
Wow, thanks Anthony. I will check those instruments out. Cheers to you for being generous and helpful. Steve > Date: Thu, 5 Jun 2008 14:24:07 -0400 > From: mailing-lists-1001@anthonykozar.net > To: csound@lists.bath.ac.uk > Subject: [Csnd] Re: Re: Syncphasor question > > Yes. "am" and "as" are not used anywhere else in the instrument. The names > are arbitrary and they are just there as Andres said because you have to > supply a variable name for each output parameter. > > When I designed the syncphasor opcode, I wanted a flexible way to chain > together any number of oscillators with hard sync. I also wanted to be able > to use other signals as sync inputs or to use the "sync state" of any given > oscillator as an input to other opcodes. So, instead of having the > syncphasor opcode read the phase of another oscillator and try to figure out > when it is "zero" (which is harder than it sounds), I made the opcode take > an explicit "binary" sync input signal (always 0 or 1) and output the same > about its own internal state. This allows you to do all sorts of > potentially interesting things such as summing multiple sync outs and > feeding them to another syncphasor. > > Andres is right about not using the output of phasors as audio signals. In > this case though, the "classic" hard sync sound is created with two sawtooth > oscillators and that is essentially what a phasor is (although unipolar > instead of bipolar). Even if you do take the output of the syncphasors in > the example and read a table with them, you will still likely end up with > strong aliasing. Obtaining non-aliased hard sync in the digital realm > requires a very different technique. > > I have attached two examples to this email though that show how to use > syncphasor to index a table and minimize the aliasing and a third example > that shows how to obtain granular textures with the opcode. > > Feel free to ask more questions if any of this is still unclear. > > Anthony Kozar > mailing-lists-1001 AT anthonykozar DOT net > http://anthonykozar.net/ > > Andres Cabrera wrote on 6/5/08 1:10 PM: > > > Hi, > > The two outputs (on the left) of syncphasor are compulsory (you must provide > > a variable for both), but when you want a phasor that syncs to another one > > will only use the first one, but you will use both from the phasor that will > > be the "master". > > The second output argument asyncout only takes the value of 1 when the > > phasor starts a new cycle. This argument is designed to be put as input > > argument async in, so that the second phasor syncs to the first one. > > Also bear in mind that phasors aren't really designed to be oscillators, but > > more to dictate phase values for table reading, see the entry for phasor. > > > On Wed, Jun 4, 2008 at 1:55 PM, Steve Bradley <steve5840@hotmail.com> wrote: > > > >> Hello Csounders, > >> > >> I have been playing with this example of syncphasor from the manual: > > >> I got it to work fine, but I am confused about two of the parameters on the > >> master and slave oscillator. First what is "am" on the master oscillator? And > >> what is "as" on the slave Oscillator? They don't seem to be connected to > >> anything else. I have one ideal that they are just the labels for audiomaster > >> and audioslave but then why would they be put in the places for aphase and > >> asyncout? > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" Search that pays you back! Introducing Live Search cashback. Search Now! |