| Here is a very contrived example of what reinit does.
The only difference between i1 (0-10 seconds) and i2 (10-20 seconds) is the reinit call.
The envelopes on each instrument create two tones that get fed into two delays.
In instr 1, the delay lines are cleared between the tones, so we hear each on their own.
In instr 2, rigoto prevents the first delay line from being reinitialized, thus allowing the two different tones to mix.
Sorry about the clicking at reinit and between notes, this is just a rough sketch that could benefit from further amplitude enveloping after the delays.
Aidan Collins wrote:
> I think maybe if you use other labels as well, you could put in chunks
> of code that would not be executed on the first pass, but on
> subsequent passes, where code that is just above your loop in the
> instrument would be executed on that first pass.
>
> for example
>
> rigoto label1
>
> goto label2
>
> label1:
> ;something that you don't want to happen on the first pass
>
> label2:
>
> etc.
>
>
>
>
> On Fri, Jun 17, 2011 at 12:09 PM, Adam Puckett wrote:
>> "So I guess I am still a bit confused as to what rigoto would allow you
>> to do that you couldn't do without it."
>> So am I.
>>
>> On 6/17/11, Aidan Collins wrote:
>>> I moved things around a little bit, it doesn't seem to work if you're
>>> skipping over the reinit call
>>>
>>> instr 1
>>> loop:
>>> ifreq random 100, 1000
>>> timout 0, 1, play
>>> reinit loop
>>>
>>> play:
>>> a1 oscil 1, ifreq, 1
>>>
>>> rigoto skipped
>>> kcf line 6000, p3, 20
>>> skipped:
>>>
>>> afilt butterlp a1, kcf
>>> printk .5, kcf
>>>
>>> outs afilt, afilt
>>>
>>> endin
>>>
>>> I added the printk statement so we can see if the kcf variable is
>>> changing. Here it is only calling the line opcode on the first pass.
>>> However, I putting that line opcode with kcf before the initial
>>> "loop:" label at the top seems to do the same thing, like:
>>>
>>> instr 1
>>>
>>> kcf line 6000, p3, 20
>>>
>>> loop:
>>> ifreq random 100, 1000
>>> timout 0, 1, play
>>> ;rigoto play
>>>
>>> reinit loop
>>>
>>> play:
>>>
>>> a1 oscil 1, ifreq, 1
>>>
>>> afilt butterlp a1, kcf
>>> printk .5, kcf
>>>
>>> outs afilt, afilt
>>>
>>>
>>> endin
>>>
>>> So I guess I am still a bit confused as to what rigoto would allow you
>>> to do that you couldn't do without it.
>>>
>>> -Aidan
>>>
>>> On Fri, Jun 17, 2011 at 11:04 AM, Adam Puckett
>>> wrote:
>>>> So something like this?
>>>>
>>>> ;begin
>>>> instr 1
>>>> loop:
>>>> ifreq random 100, 1000
>>>> timout 0, 1, play
>>>> rigoto play
>>>> kcf line 6000, p3, 20
>>>> reinit loop
>>>> play:
>>>> a1 oscil 1, ifreq, 1
>>>> afilt butterlp a1, kcf
>>>> out afilt
>>>> ;end
>>>>
>>>> And the ftable would of course not be a sine:
>>>>
>>>> ;begin
>>>> f1 0 8192 -7 -1 8192 1 ;saw
>>>> i1 0 12
>>>> ;end
>>>>
>>>> Although I'm not sure where to put the timout statement.
>>>>
>>>> On 6/17/11, Aidan Collins wrote:
>>>>> The manual page suggests that rigoto could be used to bypass elements
>>>>> that you don't want to be reinitialized.
>>>>> I've made a few reinit instruments, so I could describe a situation.
>>>>> I would generally make instruments where the reinit loop is
>>>>> essentially making different notes. I'd call the instrument for 12
>>>>> seconds or so, but internally it's looping every second to make a new
>>>>> pulse or note by reinitializing the envelope opcodes to make a new
>>>>> ADSR for each reinit pass. I think if I wanted an envelope to effect a
>>>>> filter or something across the whole 12 seconds (not the individual 1
>>>>> second note) I would put that envelope after an rigoto statement so it
>>>>> would be skipped on all the reinit passes.
>>>>>
>>>>> Aidan
>>>>>
>>>>>
>>>>> On Fri, Jun 17, 2011 at 9:28 AM, Adam Puckett
>>>>> wrote:
>>>>>> So how could I use rigoto in an instrument?
>>>>>>
>>>>>> On 6/17/11, Oeyvind Brandtsegg wrote:
>>>>>>> Sorry if the explanation was a bit terse.
>>>>>>>
>>>>>>> When you start an instrument, it does an "init pass", in that it
>>>>>>> initializes all i-variables (and some other initialization inside
>>>>>>> opcdes etc).
>>>>>>> The i-variables in an instrument can not take on new values after the
>>>>>>> init pass, they will have constant values until you stop the
>>>>>>> instrument.
>>>>>>>
>>>>>>> When you reinit, you keep running your instrument but you reinitialize
>>>>>>> (set to new values) the i-variables.
>>>>>>> You will also reinitialize other things (clearing delay and filter
>>>>>>> opcode memory for example, unless you explitly have set the opcode to
>>>>>>> "skip reinit", e.g. see the manual for any filter opcode)
>>>>>>> When you do a reinit, we say that you do a "reinit pass", that is,
>>>>>>> going through (passing) all things that should be (re-)initialized.
>>>>>>> This reinit pass will start at the top of your instrument and progress
>>>>>>> down until it reach the endin statement,
>>>>>>> unless you explicitly tell it to stop (using a rireturn statement).
>>>>>>>
>>>>>>> The rigoto conditional branching will be effective only during this
>>>>>>> reinitialization pass.
>>>>>>>
>>>>>>> best
>>>>>>> Oeyvind
>>>>>>>
>>>>>>>
>>>>>>> 2011/6/17 Adam Puckett :
>>>>>>>> "rigoto is a conditional branch only effective during a reinit pass"
>>>>>>>> What does that mean?
>>>>>>>>
>>>>>>>> On 6/17/11, Oeyvind Brandtsegg wrote:
>>>>>>>>> reinit will reinitialize (as if you stop and start the instrument)
>>>>>>>>>
>>>>>>>>> rigoto is a conditional branch only effective during a reinit pass
>>>>>>>>> (should do nothing in all other cases)
>>>>>>>>>
>>>>>>>>> best
>>>>>>>>> Oeyvind
>>>>>>>>>
>>>>>>>>> 2011/6/17 Adam Puckett :
>>>>>>>>>> What's the difference between reinit and rigoto? It seems like they
>>>>>>>>>> do
>>>>>>>>>> the same thing.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>
>>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe
>>>>>>>>>> csound"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>
>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|