Csound Csound-dev Csound-tekno Search About

[Csnd] ga-woes

Date2025-02-28 15:32
FromMaximilian Marcoll
Subject[Csnd] ga-woes
Attachmentssmime.p7s  
Hi everyone :)

I have a situation in which my global a-variables don’t behave as I expected them to.
I’m sure I might misunderstand some aspect of their general behaviour, maybe someone can help?

In the following example, instr 10 is creating a ramp to either 1 or 0.
I need the variable ga_tester to stay on its value until the next time instr 10 is being called.
Alas, it doesn’t. In fact, it changes all the time.

What am I missing here?



<CsoundSynthesizer>
<CsInstruments>

sr = 44100
0dbfs = 1
nchnls = 1

ga_tester init 0
giramp = .01
instr 10
p3=giramp
ga_tester linseg 1-p4, p3, p4
endin
instr 81
asine poscil 1, 200
aout = asine * ga_tester
out aout
endin

</CsInstruments>
<CsScore>
i10 1 1 1
i10 3 1 0

i81 0 5
</CsScore>
</CsoundSynthesizer>

________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar













Date2025-02-28 15:51
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] ga-woes
Adding a printk, I see ga_tester climbing to 1 after 1 sec, staying at that value, then climbing down to zero,
as expected. I hear it too. 
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

> On 28 Feb 2025, at 15:32, Maximilian Marcoll  wrote:
> 
> Hi everyone :)
> 
> I have a situation in which my global a-variables don’t behave as I expected them to.
> I’m sure I might misunderstand some aspect of their general behaviour, maybe someone can help?
> 
> In the following example, instr 10 is creating a ramp to either 1 or 0.
> I need the variable ga_tester to stay on its value until the next time instr 10 is being called.
> Alas, it doesn’t. In fact, it changes all the time.
> 
> What am I missing here?
> 
> 
> 
> 
> 
> 
> sr = 44100
> 0dbfs = 1
> nchnls = 1
> 
> ga_tester init 0
> giramp = .01
> instr 10
> p3=giramp
> ga_tester linseg 1-p4, p3, p4
> endin
> instr 81
> asine poscil 1, 200
> aout = asine * ga_tester
> out aout
> endin
> 
> 
> 
> i10 1 1 1
> i10 3 1 0
> 
> i81 0 5
> 
> 
> 
> ________________________________
> 
> Prof. Maximilian Marcoll
> Studio Director
> Studio for Electroacoustic Music (SEAM)
> University of Music Franz Liszt Weimar
> Bauhaus University Weimar
> 
> http://seam.hfm-weimar.de/
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 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

Date2025-02-28 16:05
FromMaximilian Marcoll
SubjectRe: [Csnd] [EXTERNAL] [Csnd] ga-woes
Attachmentssmime.p7s  
Hi!
That’s exactly what I expected, but for some reaaon in my case ga_tester is oscillating rather weirdly all the time.
I went back to 6.18  to see if there’s any difference but there isn’t.

M


________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar












On 28. Feb 2025, at 16:51, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

Adding a printk, I see ga_tester climbing to 1 after 1 sec, staying at that value, then climbing down to zero,
as expected. I hear it too.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 15:32, Maximilian Marcoll <maximilian.marcoll@HFM-WEIMAR.DE> wrote:

Hi everyone :)

I have a situation in which my global a-variables don’t behave as I expected them to.
I’m sure I might misunderstand some aspect of their general behaviour, maybe someone can help?

In the following example, instr 10 is creating a ramp to either 1 or 0.
I need the variable ga_tester to stay on its value until the next time instr 10 is being called.
Alas, it doesn’t. In fact, it changes all the time.

What am I missing here?



<CsoundSynthesizer>
<CsInstruments>

sr = 44100
0dbfs = 1
nchnls = 1

ga_tester init 0
giramp = .01
instr 10
p3=giramp
ga_tester linseg 1-p4, p3, p4
endin
instr 81
asine poscil 1, 200
aout = asine * ga_tester
out aout
endin

</CsInstruments>
<CsScore>
i10 1 1 1
i10 3 1 0

i81 0 5
</CsScore>
</CsoundSynthesizer>

________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar

http://seam.hfm-weimar.de/











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


Date2025-02-28 16:27
FromVictor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: [Csnd] [EXTERNAL] [Csnd] ga-woes
The value of ga_tester is steady here, tested on 6.18. Can you give printout showing the issue? You can add printk 0, ga_tester to instr 81.


Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 16:05, Maximilian Marcoll <maximilian.marcoll@hfm-weimar.de> wrote:

Hi!
That’s exactly what I expected, but for some reaaon in my case ga_tester is oscillating rather weirdly all the time.
I went back to 6.18  to see if there’s any difference but there isn’t.

M


________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar












On 28. Feb 2025, at 16:51, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

Adding a printk, I see ga_tester climbing to 1 after 1 sec, staying at that value, then climbing down to zero,
as expected. I hear it too.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 15:32, Maximilian Marcoll <maximilian.marcoll@HFM-WEIMAR.DE> wrote:

Hi everyone :)

I have a situation in which my global a-variables don’t behave as I expected them to.
I’m sure I might misunderstand some aspect of their general behaviour, maybe someone can help?

In the following example, instr 10 is creating a ramp to either 1 or 0.
I need the variable ga_tester to stay on its value until the next time instr 10 is being called.
Alas, it doesn’t. In fact, it changes all the time.

What am I missing here?



<CsoundSynthesizer>
<CsInstruments>

sr = 44100
0dbfs = 1
nchnls = 1

ga_tester init 0
giramp = .01
instr 10
p3=giramp
ga_tester linseg 1-p4, p3, p4
endin
instr 81
asine poscil 1, 200
aout = asine * ga_tester
out aout
endin

</CsInstruments>
<CsScore>
i10 1 1 1
i10 3 1 0

i81 0 5
</CsScore>
</CsoundSynthesizer>

________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar

http://seam.hfm-weimar.de/











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

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

Date2025-02-28 16:56
FromMaximilian Marcoll
SubjectRe: [Csnd] [EXTERNAL] [Csnd] ga-woes
Attachmentsfavicon.ico  smime.p7s  
Hi!

I am afraid that doesn't illustrate the issue for me because
the “weird oscillation” happens over exactly one k-cycle so that at every  prrink-readout the values are ok.
ksmps = 1 solves the issue (but is not possible in my situation).

This is what the signal looks like after supposedly going back to zero:



________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar





On 28. Feb 2025, at 17:27, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

The value of ga_tester is steady here, tested on 6.18. Can you give printout showing the issue? You can add printk 0, ga_tester to instr 81.


Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 16:05, Maximilian Marcoll <maximilian.marcoll@hfm-weimar.de> wrote:

Hi!
That’s exactly what I expected, but for some reaaon in my case ga_tester is oscillating rather weirdly all the time.
I went back to 6.18  to see if there’s any difference but there isn’t.

M


________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar












On 28. Feb 2025, at 16:51, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

Adding a printk, I see ga_tester climbing to 1 after 1 sec, staying at that value, then climbing down to zero,
as expected. I hear it too.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 15:32, Maximilian Marcoll <maximilian.marcoll@HFM-WEIMAR.DE> wrote:

Hi everyone :)

I have a situation in which my global a-variables don’t behave as I expected them to.
I’m sure I might misunderstand some aspect of their general behaviour, maybe someone can help?

In the following example, instr 10 is creating a ramp to either 1 or 0.
I need the variable ga_tester to stay on its value until the next time instr 10 is being called.
Alas, it doesn’t. In fact, it changes all the time.

What am I missing here?



<CsoundSynthesizer>
<CsInstruments>

sr = 44100
0dbfs = 1
nchnls = 1

ga_tester init 0
giramp = .01
instr 10
p3=giramp
ga_tester linseg 1-p4, p3, p4
endin
instr 81
asine poscil 1, 200
aout = asine * ga_tester
out aout
endin

</CsInstruments>
<CsScore>
i10 1 1 1
i10 3 1 0

i81 0 5
</CsScore>
</CsoundSynthesizer>

________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar

http://seam.hfm-weimar.de/











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

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


Date2025-02-28 17:19
FromEduardo Moguillansky
SubjectRe: [Csnd] [EXTERNAL] [Csnd] ga-woes
Attachmentsfavicon.ico  
I can see the "oscillations" also. Without looking at the source I assume that the offending part is changing p3 and its effects on linseg. This modification gets rid of the oscillations:

instr 10
  ga_tester linseg 1-p4, giramp, p4
  if eventtime() > giramp then
    turnoff
  endif
endin



On Fri, Feb 28, 2025 at 5:57 PM Maximilian Marcoll <maximilian.marcoll@hfm-weimar.de> wrote:
Hi!

I am afraid that doesn't illustrate the issue for me because
the “weird oscillation” happens over exactly one k-cycle so that at every  prrink-readout the values are ok.
ksmps = 1 solves the issue (but is not possible in my situation).

This is what the signal looks like after supposedly going back to zero:



________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar





On 28. Feb 2025, at 17:27, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

The value of ga_tester is steady here, tested on 6.18. Can you give printout showing the issue? You can add printk 0, ga_tester to instr 81.


Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 16:05, Maximilian Marcoll <maximilian.marcoll@hfm-weimar.de> wrote:

Hi!
That’s exactly what I expected, but for some reaaon in my case ga_tester is oscillating rather weirdly all the time.
I went back to 6.18  to see if there’s any difference but there isn’t.

M


________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar












On 28. Feb 2025, at 16:51, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

Adding a printk, I see ga_tester climbing to 1 after 1 sec, staying at that value, then climbing down to zero,
as expected. I hear it too.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 15:32, Maximilian Marcoll <maximilian.marcoll@HFM-WEIMAR.DE> wrote:

Hi everyone :)

I have a situation in which my global a-variables don’t behave as I expected them to.
I’m sure I might misunderstand some aspect of their general behaviour, maybe someone can help?

In the following example, instr 10 is creating a ramp to either 1 or 0.
I need the variable ga_tester to stay on its value until the next time instr 10 is being called.
Alas, it doesn’t. In fact, it changes all the time.

What am I missing here?



<CsoundSynthesizer>
<CsInstruments>

sr = 44100
0dbfs = 1
nchnls = 1

ga_tester init 0
giramp = .01
instr 10
p3=giramp
ga_tester linseg 1-p4, p3, p4
endin
instr 81
asine poscil 1, 200
aout = asine * ga_tester
out aout
endin

</CsInstruments>
<CsScore>
i10 1 1 1
i10 3 1 0

i81 0 5
</CsScore>
</CsoundSynthesizer>

________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar

http://seam.hfm-weimar.de/











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

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

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

Date2025-02-28 17:48
Fromvlz
SubjectRe: [Csnd] [EXTERNAL] [Csnd] ga-woes
ah, ok but ga_tester does not change, it is the same block of ksmps that was last generated. The block may not have a single value sample, but a ramp, and that's what you see oscillating. The way to guarantee a single value at the end is to make sure the envelope stops ramping up before the instrument stops generating it.


Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 16:57, Maximilian Marcoll <maximilian.marcoll@hfm-weimar.de> wrote:

Hi!

I am afraid that doesn't illustrate the issue for me because
the “weird oscillation” happens over exactly one k-cycle so that at every  prrink-readout the values are ok.
ksmps = 1 solves the issue (but is not possible in my situation).

This is what the signal looks like after supposedly going back to zero:



________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar





On 28. Feb 2025, at 17:27, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

The value of ga_tester is steady here, tested on 6.18. Can you give printout showing the issue? You can add printk 0, ga_tester to instr 81.


Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 16:05, Maximilian Marcoll <maximilian.marcoll@hfm-weimar.de> wrote:

Hi!
That’s exactly what I expected, but for some reaaon in my case ga_tester is oscillating rather weirdly all the time.
I went back to 6.18  to see if there’s any difference but there isn’t.

M


________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar












On 28. Feb 2025, at 16:51, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

Adding a printk, I see ga_tester climbing to 1 after 1 sec, staying at that value, then climbing down to zero,
as expected. I hear it too.
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 15:32, Maximilian Marcoll <maximilian.marcoll@HFM-WEIMAR.DE> wrote:

Hi everyone :)

I have a situation in which my global a-variables don’t behave as I expected them to.
I’m sure I might misunderstand some aspect of their general behaviour, maybe someone can help?

In the following example, instr 10 is creating a ramp to either 1 or 0.
I need the variable ga_tester to stay on its value until the next time instr 10 is being called.
Alas, it doesn’t. In fact, it changes all the time.

What am I missing here?



<CsoundSynthesizer>
<CsInstruments>

sr = 44100
0dbfs = 1
nchnls = 1

ga_tester init 0
giramp = .01
instr 10
p3=giramp
ga_tester linseg 1-p4, p3, p4
endin
instr 81
asine poscil 1, 200
aout = asine * ga_tester
out aout
endin

</CsInstruments>
<CsScore>
i10 1 1 1
i10 3 1 0

i81 0 5
</CsScore>
</CsoundSynthesizer>

________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar

http://seam.hfm-weimar.de/











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

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

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

Date2025-02-28 21:19
FromMaximilian Marcoll
SubjectRe: [Csnd] [EXTERNAL] [Csnd] ga-woes
Attachmentssmime.p7s  
Wow, ok, thanks a lot for that explanation!

Like this it works now:


<CsoundSynthesizer>
<CsInstruments>

sr = 44100
0dbfs = 1
nchnls = 1
ksmps = 32

ga_tester init 0
giramp = .01
instr 10
p3=giramp
ga_tester linseg 1-p4, p3-1/kr, p4, 1/kr, p4
endin
instr 81
asine poscil 1, 200
aout = asine * ga_tester
printk 0, k(ga_tester )
out aout
endin

</CsInstruments>
<CsScore>
i10 1 1 1
i10 3 1 0

i81 0 5
</CsScore>
</CsoundSynthesizer>



________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar












On 28. Feb 2025, at 18:48, vlz <viclazzarini@GMAIL.COM> wrote:

ah, ok but ga_tester does not change, it is the same block of ksmps that was last generated. The block may not have a single value sample, but a ramp, and that's what you see oscillating. The way to guarantee a single value at the end is to make sure the envelope stops ramping up before the instrument stops generating it.


Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 16:57, Maximilian Marcoll <maximilian.marcoll@hfm-weimar.de> wrote:

Hi!

I am afraid that doesn't illustrate the issue for me because
the “weird oscillation” happens over exactly one k-cycle so that at every  prrink-readout the values are ok.
ksmps = 1 solves the issue (but is not possible in my situation).

This is what the signal looks like after supposedly going back to zero:



________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar





On 28. Feb 2025, at 17:27, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

The value of ga_tester is steady here, tested on 6.18. Can you give printout showing the issue? You can add printk 0, ga_tester to instr 81.


Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 16:05, Maximilian Marcoll <maximilian.marcoll@hfm-weimar.de> wrote:

Hi!
That’s exactly what I expected, but for some reaaon in my case ga_tester is oscillating rather weirdly all the time.
I went back to 6.18  to see if there’s any difference but there isn’t.

M


________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar












On 28. Feb 2025, at 16:51, Victor Lazzarini <000010b17ddd988e-dmarc-request@LISTSERV.HEANET.IE> wrote:

Adding a printk, I see ga_tester climbing to 1 after 1 sec, staying at that value, then climbing down to zero,
as expected. I hear it too. 
========================
Prof. Victor Lazzarini
Maynooth University
Ireland

On 28 Feb 2025, at 15:32, Maximilian Marcoll <maximilian.marcoll@HFM-WEIMAR.DE> wrote:

Hi everyone :)

I have a situation in which my global a-variables don’t behave as I expected them to.
I’m sure I might misunderstand some aspect of their general behaviour, maybe someone can help?

In the following example, instr 10 is creating a ramp to either 1 or 0.
I need the variable ga_tester to stay on its value until the next time instr 10 is being called.
Alas, it doesn’t. In fact, it changes all the time.

What am I missing here?



<CsoundSynthesizer>
<CsInstruments>

sr = 44100
0dbfs = 1
nchnls = 1

ga_tester init 0
giramp = .01
instr 10
p3=giramp
ga_tester linseg 1-p4, p3, p4
endin
instr 81
asine poscil 1, 200
aout = asine * ga_tester
out aout
endin

</CsInstruments>
<CsScore>
i10 1 1 1
i10 3 1 0

i81 0 5
</CsScore>
</CsoundSynthesizer>

________________________________

Prof. Maximilian Marcoll
Studio Director
Studio for Electroacoustic Music (SEAM)
University of Music Franz Liszt Weimar
Bauhaus University Weimar

http://seam.hfm-weimar.de/











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

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

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