Csound Csound-dev Csound-tekno Search About

[Csnd] interleaved audio..

Date2013-03-28 11:20
FromRory Walsh
Subject[Csnd] interleaved audio..
Can someone take a look over this UDO and tell me if it will actually
do what I want, which is to split an interleaved audio intput into
left and right? Instrument below...

opcode interleaveItAlone, aa, ai
setksmps 1
kcnt init 0
ain, ichannels xin
aLeft init 0
aRight init 0
if(ichannels==1) then
aLeft = ain
aRight = ain
elseif(ichannels==2) then
aLeft = (kcnt==0 ? ain : aLeft)
aRight = (kcnt==1 ? ain : aLeft)
kcnt = (kcnt==1 ? 0 : kcnt+1)
endif
xout aLeft, aRight
endop


instr 1
a1 chnget "sound"
aLeft, aRight interleaveItAlone a1, 2
outs a1, a1
endin

Date2013-03-28 11:25
Frompeiman khosravi
SubjectRe: [Csnd] interleaved audio..
Isn't interleaved audio only for soundfiles? 

P

On 28 March 2013 11:20, Rory Walsh <rorywalsh@ear.ie> wrote:
Can someone take a look over this UDO and tell me if it will actually
do what I want, which is to split an interleaved audio intput into
left and right? Instrument below...

opcode interleaveItAlone, aa, ai
setksmps 1
kcnt init 0
ain, ichannels xin
aLeft init 0
aRight init 0
if(ichannels==1) then
aLeft = ain
aRight = ain
elseif(ichannels==2) then
aLeft = (kcnt==0 ? ain : aLeft)
aRight = (kcnt==1 ? ain : aLeft)
kcnt = (kcnt==1 ? 0 : kcnt+1)
endif
xout aLeft, aRight
endop


instr 1
a1 chnget "sound"
aLeft, aRight interleaveItAlone a1, 2
outs a1, a1
endin


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-03-28 11:30
Frompeiman khosravi
SubjectRe: [Csnd] interleaved audio..
What I mean is, how is that different from this?

aLeft, aRight    ins
                       outs aLeft, aRight

P

On 28 March 2013 11:25, peiman khosravi <peimankhosravi@gmail.com> wrote:
Isn't interleaved audio only for soundfiles? 

P


On 28 March 2013 11:20, Rory Walsh <rorywalsh@ear.ie> wrote:
Can someone take a look over this UDO and tell me if it will actually
do what I want, which is to split an interleaved audio intput into
left and right? Instrument below...

opcode interleaveItAlone, aa, ai
setksmps 1
kcnt init 0
ain, ichannels xin
aLeft init 0
aRight init 0
if(ichannels==1) then
aLeft = ain
aRight = ain
elseif(ichannels==2) then
aLeft = (kcnt==0 ? ain : aLeft)
aRight = (kcnt==1 ? ain : aLeft)
kcnt = (kcnt==1 ? 0 : kcnt+1)
endif
xout aLeft, aRight
endop


instr 1
a1 chnget "sound"
aLeft, aRight interleaveItAlone a1, 2
outs a1, a1
endin


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




Date2013-03-28 11:46
FromRory Walsh
SubjectRe: [Csnd] interleaved audio..
Because I'm sending an entire stereo audio stream over a single mono
channel. My frontend loads a sound file and then pipes it to Csound on
a single audio channel. Perhaps it is unnecessary or?

Date2013-03-28 16:16
FromOeyvind Brandtsegg
SubjectRe: [Csnd] interleaved audio..
Interesting...,
should perhaps
aRight = (kcnt==1 ? ain : aLeft)
rather be:
aRight = (kcnt==1 ? ain : aRight)
... or maybe I misunderstand how it works(?)
I was thinking, assign ain to aRight if kcnt==1, or else leave aRight untouched
best
Oeyvind


2013/3/28 Rory Walsh <rorywalsh@ear.ie>
Because I'm sending an entire stereo audio stream over a single mono
channel. My frontend loads a sound file and then pipes it to Csound on
a single audio channel. Perhaps it is unnecessary or?


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"




--

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp

Date2013-03-28 17:26
FromRory Walsh
SubjectRe: [Csnd] interleaved audio..
Whoops, I missed that! In the end I think maybe it's better that I
give users the option of retrieving the channels separately rather
than messing with UDOs.

Date2013-03-29 12:45
Frompeiman khosravi
SubjectRe: [Csnd] interleaved audio..
Aha, I didn't know that was possible! I'll have to study your csd more carefully. 

That's quite promising. 

P

On 28 March 2013 11:46, Rory Walsh <rorywalsh@ear.ie> wrote:
Because I'm sending an entire stereo audio stream over a single mono
channel. My frontend loads a sound file and then pipes it to Csound on
a single audio channel. Perhaps it is unnecessary or?


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-03-29 13:04
FromRory Walsh
SubjectRe: [Csnd] interleaved audio..
It was with you in mind that I was trying this out! I was thinking
that it might be nice to stream a files in Cabbage directly to an
instance of Csound. Check out the attached screenshot. The nice thing
is users can load a sound file of any type and stream it directly
across to Csound without having to worry about what format it's in. I
still have to add some funk to it, but it's almost there now. I think
accessing each individual channel is cleaner than worrying about an
interleaved stream.



On 29 March 2013 12:45, peiman khosravi  wrote:
> Aha, I didn't know that was possible! I'll have to study your csd more
> carefully.
>
> That's quite promising.
>
> P
>
> On 28 March 2013 11:46, Rory Walsh  wrote:
>>
>> Because I'm sending an entire stereo audio stream over a single mono
>> channel. My frontend loads a sound file and then pipes it to Csound on
>> a single audio channel. Perhaps it is unnecessary or?
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>

Date2013-03-29 13:11
Frompeiman khosravi
SubjectRe: [Csnd] interleaved audio..
I'm honoured :-) That's very useful. (I think you forgot to attach the screenshot though!). 



On 29 March 2013 13:04, Rory Walsh <rorywalsh@ear.ie> wrote:
It was with you in mind that I was trying this out! I was thinking
that it might be nice to stream a files in Cabbage directly to an
instance of Csound. Check out the attached screenshot. The nice thing
is users can load a sound file of any type and stream it directly
across to Csound without having to worry about what format it's in. I
still have to add some funk to it, but it's almost there now. I think
accessing each individual channel is cleaner than worrying about an
interleaved stream.



On 29 March 2013 12:45, peiman khosravi <peimankhosravi@gmail.com> wrote:
> Aha, I didn't know that was possible! I'll have to study your csd more
> carefully.
>
> That's quite promising.
>
> P
>
> On 28 March 2013 11:46, Rory Walsh <rorywalsh@ear.ie> wrote:
>>
>> Because I'm sending an entire stereo audio stream over a single mono
>> channel. My frontend loads a sound file and then pipes it to Csound on
>> a single audio channel. Perhaps it is unnecessary or?
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-03-29 13:15
FromRory Walsh
SubjectRe: [Csnd] interleaved audio..
AttachmentsUntitled.png  
So I did :0

Date2013-03-29 13:19
Frompeiman khosravi
SubjectRe: [Csnd] interleaved audio..
Oh yeah. Now all we need is a superimposed graph for automating the widgets. 

So with this cabbage instruments can be used standalone?



On 29 March 2013 13:15, Rory Walsh <rorywalsh@ear.ie> wrote:
So I did :0

Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-03-29 13:28
FromRory Walsh
SubjectRe: [Csnd] interleaved audio..
AttachmentsScreenshot - 210213 - 16_37_40.png  
They always could. I hardly bother with a host at all. I know lots of
people prefer to use a host, but I've never really ever used one so it
seems a step too far for me when I can just use Csound! Btw, if you
copy and rename the Cabbage binary to the same name as your csd file
it will open in a special 'standalone' mode when users launch it
(although this is untested on OSX). Check out the screenshot of a
sampler I'm working on.

On 29 March 2013 13:19, peiman khosravi  wrote:
> Oh yeah. Now all we need is a superimposed graph for automating the widgets.
>
> So with this cabbage instruments can be used standalone?
>
> P
>
>
> On 29 March 2013 13:15, Rory Walsh  wrote:
>>
>> So I did :0
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>

Date2013-03-29 13:45
Frompeiman khosravi
SubjectRe: [Csnd] interleaved audio..
This is really great. The only downside without a host is doing automations. 



On 29 March 2013 13:28, Rory Walsh <rorywalsh@ear.ie> wrote:
They always could. I hardly bother with a host at all. I know lots of
people prefer to use a host, but I've never really ever used one so it
seems a step too far for me when I can just use Csound! Btw, if you
copy and rename the Cabbage binary to the same name as your csd file
it will open in a special 'standalone' mode when users launch it
(although this is untested on OSX). Check out the screenshot of a
sampler I'm working on.

On 29 March 2013 13:19, peiman khosravi <peimankhosravi@gmail.com> wrote:
> Oh yeah. Now all we need is a superimposed graph for automating the widgets.
>
> So with this cabbage instruments can be used standalone?
>
> P
>
>
> On 29 March 2013 13:15, Rory Walsh <rorywalsh@ear.ie> wrote:
>>
>> So I did :0
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>

Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-03-29 13:53
FromRory Walsh
SubjectRe: [Csnd] interleaved audio..
This is true. Automation is something most hosts do particularly well.
It's hard to compete with, but I'll keep trying.


On 29 March 2013 13:45, peiman khosravi  wrote:
> This is really great. The only downside without a host is doing automations.
>
> P
>
>
> On 29 March 2013 13:28, Rory Walsh  wrote:
>>
>> They always could. I hardly bother with a host at all. I know lots of
>> people prefer to use a host, but I've never really ever used one so it
>> seems a step too far for me when I can just use Csound! Btw, if you
>> copy and rename the Cabbage binary to the same name as your csd file
>> it will open in a special 'standalone' mode when users launch it
>> (although this is untested on OSX). Check out the screenshot of a
>> sampler I'm working on.
>>
>> On 29 March 2013 13:19, peiman khosravi  wrote:
>> > Oh yeah. Now all we need is a superimposed graph for automating the
>> > widgets.
>> >
>> > So with this cabbage instruments can be used standalone?
>> >
>> > P
>> >
>> >
>> > On 29 March 2013 13:15, Rory Walsh  wrote:
>> >>
>> >> So I did :0
>> >>
>> >>
>> >> Send bugs reports to the Sourceforge bug tracker
>> >>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> Discussions of bugs and features can be posted here
>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> "unsubscribe
>> >> csound"
>> >>
>> >
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>

Date2013-03-29 14:03
Frompeiman khosravi
SubjectRe: [Csnd] interleaved audio..
What's missing in all hosts is something I want badly: to write a little line of code for generating automation functions, like patterns. And with the ability to link parameters globally. Kyma can probably do it. 


On 29 March 2013 13:53, Rory Walsh <rorywalsh@ear.ie> wrote:
This is true. Automation is something most hosts do particularly well.
It's hard to compete with, but I'll keep trying.


On 29 March 2013 13:45, peiman khosravi <peimankhosravi@gmail.com> wrote:
> This is really great. The only downside without a host is doing automations.
>
> P
>
>
> On 29 March 2013 13:28, Rory Walsh <rorywalsh@ear.ie> wrote:
>>
>> They always could. I hardly bother with a host at all. I know lots of
>> people prefer to use a host, but I've never really ever used one so it
>> seems a step too far for me when I can just use Csound! Btw, if you
>> copy and rename the Cabbage binary to the same name as your csd file
>> it will open in a special 'standalone' mode when users launch it
>> (although this is untested on OSX). Check out the screenshot of a
>> sampler I'm working on.
>>
>> On 29 March 2013 13:19, peiman khosravi <peimankhosravi@gmail.com> wrote:
>> > Oh yeah. Now all we need is a superimposed graph for automating the
>> > widgets.
>> >
>> > So with this cabbage instruments can be used standalone?
>> >
>> > P
>> >
>> >
>> > On 29 March 2013 13:15, Rory Walsh <rorywalsh@ear.ie> wrote:
>> >>
>> >> So I did :0
>> >>
>> >>
>> >> Send bugs reports to the Sourceforge bug tracker
>> >>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> >> Discussions of bugs and features can be posted here
>> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> >> "unsubscribe
>> >> csound"
>> >>
>> >
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"



Date2013-03-29 14:09
FromRory Walsh
SubjectRe: [Csnd] interleaved audio..
This could be taken care of by using function tables to create
automation curves no? Using Cabbage or CsoundQT you could just pick a
pattern or curve from a dropdown list and have the table recreated on
the fly. I guess you would still need a quick and dirty way of
creating rough envelopes. This is much needed.