[Csnd] expected looping?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd] expected looping?

fauveboy
I am expecting the table (in the code attached) with the wrap around flag
signalled to continue looping for the length of the score duratio. But isnt
happening is this not what wrap around means?

Many thanks

sampler_table.csd
<http://csound.1045644.n5.nabble.com/file/t339654/sampler_table.csd>  



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

jpff
Not at areal computer yet but I see no attempt to loop. The index runs from 0.25 to 1.25 but you need a modulus or such to take the fractional jpart?  Sorry cannot see your code and type a message!  So this may be all wrong

⁣Sent from TypeApp ​

On May 4, 2018, 10:29, at 10:29, fauveboy <[hidden email]> wrote:

>I am expecting the table (in the code attached) with the wrap around
>flag
>signalled to continue looping for the length of the score duratio. But
>isnt
>happening is this not what wrap around means?
>
>Many thanks
>
>sampler_table.csd
><http://csound.1045644.n5.nabble.com/file/t339654/sampler_table.csd>
>
>
>
>--
>Sent from:
>http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
>Csound mailing list
>[hidden email]
>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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

fauveboy
I think thats the issue I cant see how its possible to loop the table? does
it need to be triggered again somehow?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

Steven Yi
I think the problem may be that you are using ixmode of 0 with table
opcode and that you're trying to read sample 0 or 1 instead of looping
through the entire range of samples.

On Fri, May 4, 2018 at 9:34 AM, fauveboy <[hidden email]> wrote:

> I think thats the issue I cant see how its possible to loop the table? does
> it need to be triggered again somehow?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

jpff
On Fri, 4 May 2018, Steven Yi wrote:

> I think the problem may be that you are using ixmode of 0 with table
> opcode and that you're trying to read sample 0 or 1 instead of looping
> through the entire range of samples.
>

He is usinf a phasor denormalised to table length
  ilookup tableng 5 ; get length of sample in samples
  p3 = (ilookup/sr) ; get length in seconds
  aindex phasor 1/p3
...
  aindex = aindex * ilookup; scale back to length of sample

so ixmode raw is correct as far as I ca see.  I need to check with a
reasonable sound example but some printing of values may shine a light.

Pt another way, I cannot see why this does not work!

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

jpff
Not only can I not see any reason for it not to loop. it does loop; ie it
starts  quarter of the way into the sample, gets to the end and then plays
the first quarter.

Is that not what you expect?

==John

On Fri, 4 May 2018, jpff wrote:

> On Fri, 4 May 2018, Steven Yi wrote:
>
>> I think the problem may be that you are using ixmode of 0 with table
>> opcode and that you're trying to read sample 0 or 1 instead of looping
>> through the entire range of samples.
>>
>
> He is usinf a phasor denormalised to table length
> ilookup tableng 5 ; get length of sample in samples
> p3 = (ilookup/sr) ; get length in seconds
> aindex phasor 1/p3
> ...
> aindex = aindex * ilookup; scale back to length of sample
>
> so ixmode raw is correct as far as I ca see.  I need to check with a
> reasonable sound example but some printing of values may shine a light.
>
> Pt another way, I cannot see why this does not work!
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

Steven Yi
In reply to this post by jpff
Ah I missed that that in looking at the example.

On Fri, May 4, 2018 at 11:24 AM, jpff <[hidden email]> wrote:

> On Fri, 4 May 2018, Steven Yi wrote:
>
>> I think the problem may be that you are using ixmode of 0 with table
>> opcode and that you're trying to read sample 0 or 1 instead of looping
>> through the entire range of samples.
>>
>
> He is usinf a phasor denormalised to table length
>         ilookup tableng 5 ; get length of sample in samples
>         p3              = (ilookup/sr) ; get length in seconds
>         aindex phasor 1/p3
> ...
>         aindex = aindex * ilookup; scale back to length of sample
>
> so ixmode raw is correct as far as I ca see.  I need to check with a
> reasonable sound example but some printing of values may shine a light.
>
> Pt another way, I cannot see why this does not work!
>
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

fauveboy
it does start a quarter of the way in. still plays only for the duration of
the sample. I'm expecting it to continue looping round.

Perhaps the phasor could continue to oscillate by returning to zero and
ascending to one again?

I aiming for continuous looping until the program ends. Or perhaps could be
phrased as continuous looping without the duration dictated by the length of
the sample?



--
Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html

Csound mailing list
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

jpff
You set p3 in the instrument to the length of the sample, so it plays just
once

If that is not what you want do not change p3 but use a different
i-variable

==John ff

On Sat, 5 May 2018, fauveboy wrote:

> it does start a quarter of the way in. still plays only for the duration of
> the sample. I'm expecting it to continue looping round.
>
> Perhaps the phasor could continue to oscillate by returning to zero and
> ascending to one again?
>
> I aiming for continuous looping until the program ends. Or perhaps could be
> phrased as continuous looping without the duration dictated by the length of
> the sample?
>
>
>
> --
> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
> Csound mailing list
> [hidden email]
> 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
[hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd] expected looping?

jpff
ike this
Tested and works



<CsoundSynthesizer>
<CsInstruments>

sr = 44100
kr = 4410
ksmps = 10
nchnls = 2
0dbfs = 1


  instr 101

iamp = ampdb(0)

ilookup tableng 5 ; get length of sample in samples

itime = (ilookup/sr) ; get length in seconds

aindex phasor 1/itime

aindex = aindex +  0.25; way in phase to begin

aindex = aindex * ilookup; scale back to length of sample

asigL table aindex, 5, 0, 0, 1
asigR table aindex, 6, 0, 0, 1

asigL = asigL * iamp
asigR = asigR * iamp
  outs asigL, asigR

  endin


;aphas phasor (ilookup * areadposition)

;aphas = aphas * ilookup
;-------------------------
;kdisplay = aphas  ; cast audio signal to krate variable
;outvalue "samp", kdisplay ; send data to pd


</CsInstruments>

<CsScore>

;f 0 360

f5 0 0 1 "kitchen_test.aiff" 0 0 1 ; assuming left channel
f6 0 0 1 "kitchen_test.aiff" 0 0 2 ; assuming right channel

;f 0 360
;e 0 9999999999
i 101 0 18



</CsScore>
</CsoundSynthesizer>


On Sat, 5 May 2018, jpff wrote:

> You set p3 in the instrument to the length of the sample, so it plays just
> once
>
> If that is not what you want do not change p3 but use a different i-variable
>
> ==John ff
>
> On Sat, 5 May 2018, fauveboy wrote:
>
>> it does start a quarter of the way in. still plays only for the duration of
>> the sample. I'm expecting it to continue looping round.
>>
>> Perhaps the phasor could continue to oscillate by returning to zero and
>> ascending to one again?
>>
>> I aiming for continuous looping until the program ends. Or perhaps could be
>> phrased as continuous looping without the duration dictated by the length
>> of
>> the sample?
>>
>>
>>
>> --
>> Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>>
>> Csound mailing list
>> [hidden email]
>> 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
> [hidden email]
> 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
[hidden email]
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