Csound Csound-dev Csound-tekno Search About

Re: [Csnd] Problem with linsegr when writing audio to table

Date2023-04-07 07:52
FromScott Daughtrey
SubjectRe: [Csnd] Problem with linsegr when writing audio to table
Well, still not sure why linseg worked but not linsegr, but FWIW sending via global audio to another instr to write to table before going to the instr that reads did work.

Scott

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

Date2023-04-07 08:14
Fromthorin kerr
SubjectRe: [Csnd] Problem with linsegr when writing audio to table
;;or this way,
  instr 1
kEnv  = linsegr(0, .002, .6, p3, .6, 3, 0)
aSig  = wgpluck2(.7, kEnv, cpsmidinn(p4), .2, .3)
atabsig table gaNdx, giFt,1            ;get the current signal in the table
tablew(aSig+atabsig, gaNdx, giFt, 1) ;mix it with the new signal
        // comment out below
        ;outs aSig, aSig
  endin

  instr 2
aFwd  = phasor(1/3)
a1      table3 aFwd, giFt, 1
         tablew(a(0), aFwd, giFt, 1) ;then clear it when done.
        outs a1, a1
  endin

On Fri, Apr 7, 2023 at 4:46 PM Scott Daughtrey <stunes6556@gmail.com> wrote:
Well, still not sure why linseg worked but not linsegr, but FWIW sending via global audio to another instr to write to table before going to the instr that reads did work.

Scott

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

Date2023-04-07 17:22
FromST Music
SubjectRe: [Csnd] Problem with linsegr when writing audio to table
 thanks Thorin. The issue I had (and kinda still am having... ) is that this instr I'm trying to create needs about a 3 second buffer. So it starts playing, goes thru a bunch of processing like reverb etc. & gets reversed. Both the original & processed need to start at the same time & therefore both get written to a table & mixing starts 3 sec later, hence the need for a large buffer. So not sure I could use your idea. I'm pretty novice here.

It's turning into a big pita though. It almost works, the results are promising,  but despite my attempts at enveloping the reversed audio there are clicks occuring at perfectly timed intervals & I can't figure out my. What's odd is that the clicks are of course 3 sec apart but occur by an offset of 1.5 sec, which makes no sense - I would've expected the clicks at say 3, 6, 9 sec not 4.5, 7.5 etc.

But as usual I'm probably I'm making some silly mistake.

Being a newb sucks at times, often my creative reach exceeds my technical grasp.

Scott

ST Music

On Fri, Apr 7, 2023, 3:16 AM thorin kerr, <thorin.kerr@gmail.com> wrote:
;;or this way,
  instr 1
kEnv  = linsegr(0, .002, .6, p3, .6, 3, 0)
aSig  = wgpluck2(.7, kEnv, cpsmidinn(p4), .2, .3)
atabsig table gaNdx, giFt,1            ;get the current signal in the table
tablew(aSig+atabsig, gaNdx, giFt, 1) ;mix it with the new signal
        // comment out below
        ;outs aSig, aSig
  endin

  instr 2
aFwd  = phasor(1/3)
a1      table3 aFwd, giFt, 1
         tablew(a(0), aFwd, giFt, 1) ;then clear it when done.
        outs a1, a1
  endin

On Fri, Apr 7, 2023 at 4:46 PM Scott Daughtrey <stunes6556@gmail.com> wrote:
Well, still not sure why linseg worked but not linsegr, but FWIW sending via global audio to another instr to write to table before going to the instr that reads did work.

Scott

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