Csound Csound-dev Csound-tekno Search About

[Csnd] expected looping?

Date2018-05-04 10:27
Fromfauveboy
Subject[Csnd] expected looping?
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
  



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

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

Date2018-05-04 13:16
FromJohn ff
SubjectRe: [Csnd] expected looping?
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  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
>  
>
>
>
>--
>Sent from:
>http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html
>
>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

Date2018-05-04 14:34
Fromfauveboy
SubjectRe: [Csnd] expected looping?
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
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

Date2018-05-04 14:40
FromSteven Yi
SubjectRe: [Csnd] expected looping?
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  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
> 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

Date2018-05-04 16:24
Fromjpff
SubjectRe: [Csnd] expected looping?
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
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

Date2018-05-04 17:16
Fromjpff
SubjectRe: [Csnd] expected looping?
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
> 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

Date2018-05-04 17:31
FromSteven Yi
SubjectRe: [Csnd] expected looping?
Ah I missed that that in looking at the example.

On Fri, May 4, 2018 at 11:24 AM, 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
> 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

Date2018-05-05 10:56
Fromfauveboy
SubjectRe: [Csnd] expected looping?
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
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

Date2018-05-05 12:01
Fromjpff
SubjectRe: [Csnd] expected looping?
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
> 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

Date2018-05-05 12:11
Fromjpff
SubjectRe: [Csnd] expected looping?
ike this
Tested and works






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






;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







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
>> 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