Csound Csound-dev Csound-tekno Search About

out array

Date2015-08-30 13:02
Frompeiman khosravi
Subjectout array
AttachmentsNone  None  
Dear all,

I'm not so used to arrays in Csound so forgive the simple question.

According to the manual the 'out' opcode can take a signal array. But the following code doesn't seem to work.

asig[] diskin2 "$FILE", 100
out asig[]

Is there an example that I can look up somewhere?

Many Thanks
Peiman

Date2015-08-30 13:10
Fromjpff
SubjectRe: out array
AttachmentsNone  None  
Surely that should be "out asig"?

On Sun, 30 Aug 2015, peiman khosravi wrote:

> Dear all,
> 
> I'm not so used to arrays in Csound so forgive the simple question.
> 
> According to the manual the 'out' opcode can take a signal array. But the
> following code doesn't seem to work.
> 
> asig[] diskin2 "$FILE", 100
> out asig[]
> 
> Is there an example that I can look up somewhere?
> 
> Many Thanks
> Peiman
> 
> 
> 
> 
> www.peimankhosravi.co.uk || RSS Feed || Concert News
> 
>

Date2015-08-30 13:15
Fromjoachim heintz
SubjectRe: out array
hi peiman -

for sure, you must create the array first.  did you do something like
   asig[] init 2 (or 8 or whatever) ?

best -
	joachim


Am 30.08.2015 um 14:02 schrieb peiman khosravi:
> Dear all,
>
> I'm not so used to arrays in Csound so forgive the simple question.
>
> According to the manual the 'out' opcode can take a signal array. But
> the following code doesn't seem to work.
>
> asig[] diskin2 "$FILE", 100
> out asig[]
>
> Is there an example that I can look up somewhere?
>
> Many Thanks
> Peiman
>
>
>
>
> *www.peimankhosravi.co.uk  || RSS Feed
>  || Concert News
> *
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>          https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-08-30 13:31
Frompeiman khosravi
SubjectRe: out array
AttachmentsNone  None  
Ah yes that does it: "out asig".

Joachim, I think 'diskin2' will resize the array depending on the number of channels in the file.

Many Thanks
Peiman


On 30 August 2015 at 13:10, jpff <jpff@codemist.co.uk> wrote:
Surely that should be "out asig"?


On Sun, 30 Aug 2015, peiman khosravi wrote:

Dear all,

I'm not so used to arrays in Csound so forgive the simple question.

According to the manual the 'out' opcode can take a signal array. But the
following code doesn't seem to work.

asig[] diskin2 "$FILE", 100
out asig[]

Is there an example that I can look up somewhere?

Many Thanks
Peiman




www.peimankhosravi.co.uk || RSS Feed || Concert News


------------------------------------------------------------------------------

_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



Date2015-08-31 03:34
Fromjoachim heintz
SubjectRe: out array
thanks, peiman; you are perfectly right.  nice feature; i did not know 
this at all.
ciao -
	j

Am 30.08.2015 um 14:31 schrieb peiman khosravi:
> Joachim, I think 'diskin2' will resize the array depending on the number
> of channels in the file.

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-08-31 04:12
FromMichael Gogins
SubjectRe: out array
AttachmentsNone  None  

Your code reads 100 channels. Each slot in an arate array is ksmps in size.

Regards,
Mike

On Aug 30, 2015 8:03 AM, "peiman khosravi" <peimankhosravi@gmail.com> wrote:
Dear all,

I'm not so used to arrays in Csound so forgive the simple question.

According to the manual the 'out' opcode can take a signal array. But the following code doesn't seem to work.

asig[] diskin2 "$FILE", 100
out asig[]

Is there an example that I can look up somewhere?

Many Thanks
Peiman

------------------------------------------------------------------------------

_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


Date2015-08-31 12:29
Frompeiman khosravi
SubjectRe: out array
AttachmentsNone  None  
I've realised how powerful arrays are for reading multichannel files. It's very nice indeed.


On 31 August 2015 at 04:12, Michael Gogins <michael.gogins@gmail.com> wrote:

Your code reads 100 channels. Each slot in an arate array is ksmps in size.

Regards,
Mike

On Aug 30, 2015 8:03 AM, "peiman khosravi" <peimankhosravi@gmail.com> wrote:
Dear all,

I'm not so used to arrays in Csound so forgive the simple question.

According to the manual the 'out' opcode can take a signal array. But the following code doesn't seem to work.

asig[] diskin2 "$FILE", 100
out asig[]

Is there an example that I can look up somewhere?

Many Thanks
Peiman

------------------------------------------------------------------------------

_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


------------------------------------------------------------------------------

_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here



Date2015-08-31 12:51
Frompeiman khosravi
SubjectRe: out array
AttachmentsNone  None  
Just to clarify. 100 in my code is the speed speed at which the file is read. I'm using this to preprepare 'compressed' waveform files for display in a multichannel soundfile  player.


On 31 August 2015 at 12:29, peiman khosravi <peimankhosravi@gmail.com> wrote:
I've realised how powerful arrays are for reading multichannel files. It's very nice indeed.


On 31 August 2015 at 04:12, Michael Gogins <michael.gogins@gmail.com> wrote:

Your code reads 100 channels. Each slot in an arate array is ksmps in size.

Regards,
Mike

On Aug 30, 2015 8:03 AM, "peiman khosravi" <peimankhosravi@gmail.com> wrote:
Dear all,

I'm not so used to arrays in Csound so forgive the simple question.

According to the manual the 'out' opcode can take a signal array. But the following code doesn't seem to work.

asig[] diskin2 "$FILE", 100
out asig[]

Is there an example that I can look up somewhere?

Many Thanks
Peiman

------------------------------------------------------------------------------

_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here


------------------------------------------------------------------------------

_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here




Date2015-08-31 13:36
Fromjpff
SubjectRe: out array
Except of course in a raw input where the number of channels is not given. 
If the array is premade in this case it attemts to read channels to fill 
the array (or at least does since the recent change)


On Mon, 31 Aug 2015, joachim heintz wrote:

> thanks, peiman; you are perfectly right.  nice feature; i did not know
> this at all.
> ciao -
> 	j
>
> Am 30.08.2015 um 14:31 schrieb peiman khosravi:
>> Joachim, I think 'diskin2' will resize the array depending on the number
>> of channels in the file.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-users mailing list
> Csound-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-users
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here
>

------------------------------------------------------------------------------
_______________________________________________
Csound-users mailing list
Csound-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-users
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here