[Csnd] change iphs dinamically
Date | 2019-10-17 13:47 |
From | Ital |
Subject | [Csnd] change iphs dinamically |
I'm sorry, I'm not an expert of csound yet. I'm stuck on trying to change dynamically the phase of an oscili opcode through a spinbox.
sr = 44100 thanks a lot Sent from the Csound - General mailing list archive at Nabble.com. Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2019-10-17 14:26 |
From | Rory Walsh |
Subject | Re: [Csnd] change iphs dinamically |
You can do this with reinit, but note that it will result in clicks in the audio...note that I changed the invalue to a chnget so I could test it with Cabbage.. ksmps = 32 nchnls = 1 0dbfs = 1 ; Instrument #1 - a basic oscillator. instr 1 ktrig init 1 kamp = .5 kcps = 300; invalue "spinbox1" kphs chnget "spinbox2" ifn = 1 if changed(kphs) == 1 then reinit resetPhase endif resetPhase: iphs = i(kphs)/360 print iphs; [, iarg1] [, iarg2] [...] a1 oscili kamp, kcps, ifn, 0 a2 oscili kamp, kcps, ifn, iphs out a1 + a2 endin On Thu, 17 Oct 2019 at 13:48, Ital <ital.rolando@gmail.com> wrote: I'm sorry, I'm not an expert of csound yet. I'm stuck on trying to change dynamically the phase of an oscili opcode through a spinbox. |
Date | 2019-10-17 16:01 |
From | Ital |
Subject | Re: [Csnd] change iphs dinamically |
these error occurred
Sent from the Csound - General mailing list archive at Nabble.com. Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2019-10-17 16:38 |
From | john |
Subject | Re: [Csnd] change iphs dinamically |
Looks like a parsing thing, with attempt to use afunctional form in a Boolean expression. I never tried that.a On Thu, 17 Oct 2019, Ital wrote: > these error occurred > > instr 1 error: illegal opcod from expr anal, line 20: > if changed(kphs) == 1 then > error: input arg '#k0' used before defined, line 20: > if changed(kphs) == 1 then > 2 syntax errors in orchestra. compilation invalid > > > ______________________________________________________________________________ > Sent from the Csound - General mailing list archive at Nabble.com. > Csound mailing list Csound@listserv.heanet.ie > https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to > https://github.com/csound/csound/issues Discussions of bugs and features can > be posted here > Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2019-10-17 17:13 |
From | Rory Walsh |
Subject | Re: [Csnd] change iphs dinamically |
I think I'm using 6.14, and it works for me? On Thu 17 Oct 2019, 17:39 john, <jpff@codemist.co.uk> wrote: Looks like a parsing thing, with attempt to use afunctional form in a |
Date | 2019-10-19 20:27 |
From | Ital |
Subject | Re: [Csnd] change iphs dinamically |
Yes your version works. Thnks a lot
Sent from the Csound - General mailing list archive at Nabble.com. Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |