Csound Csound-dev Csound-tekno Search About

[Csnd] Getting output buffer from Csound API

Date2012-12-07 17:14
FromRoger Kelly
Subject[Csnd] Getting output buffer from Csound API
How would I go about getting the audio output buffer using CSoundAPI?

I want to grab the audio as it is running the csd.

Date2012-12-07 17:59
FromMichael Gogins
SubjectRe: [Csnd] Getting output buffer from Csound API
You can grab the low level buffer (ksmps sample frames) or the higher
level buffer. Where is the audio going?

What language are you using?

Regards,
Mike

On Fri, Dec 7, 2012 at 12:14 PM, Roger Kelly  wrote:
> How would I go about getting the audio output buffer using CSoundAPI?
>
> I want to grab the audio as it is running the csd.



-- 
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com

Date2012-12-07 18:28
FromRoger Kelly
SubjectRe: [Csnd] Getting output buffer from Csound API
It is Python. I have looked at many of the functions GetInputBuffer, etc, but can't piece together the sequence of calls needed.

Could you tell me what sequence of calls need to be done?


On Fri, Dec 7, 2012 at 11:59 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
You can grab the low level buffer (ksmps sample frames) or the higher
level buffer. Where is the audio going?

What language are you using?

Regards,
Mike

On Fri, Dec 7, 2012 at 12:14 PM, Roger Kelly <loraxman@gmail.com> wrote:
> How would I go about getting the audio output buffer using CSoundAPI?
>
> I want to grab the audio as it is running the csd.



--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


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"



Date2012-12-08 03:34
FromRoger Kelly
SubjectRe: [Csnd] Getting output buffer from Csound API
I am wanting to bring the audio frame back into the python application.


On Fri, Dec 7, 2012 at 12:28 PM, Roger Kelly <loraxman+csound@gmail.com> wrote:
It is Python. I have looked at many of the functions GetInputBuffer, etc, but can't piece together the sequence of calls needed.

Could you tell me what sequence of calls need to be done?


On Fri, Dec 7, 2012 at 11:59 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
You can grab the low level buffer (ksmps sample frames) or the higher
level buffer. Where is the audio going?

What language are you using?

Regards,
Mike

On Fri, Dec 7, 2012 at 12:14 PM, Roger Kelly <loraxman@gmail.com> wrote:
> How would I go about getting the audio output buffer using CSoundAPI?
>
> I want to grab the audio as it is running the csd.



--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


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"




Date2012-12-08 04:20
FromRoger Kelly
SubjectRe: [Csnd] Getting output buffer from Csound API
Figured it out from oscilloscope example:
cs = csnd.Csound()
cs.Compile("cb.csd")

chn = csnd.floatArray(cs.GetKsmps())
print chn
f = open("test3.wav","wb")
# define callback
def callback(csound):
    a = csound.GetChannel("freq")
    sig = array.array('f')
    cs.ChanOAGet(chn.cast(), 1)
    for i in range(0,cs.GetKsmps()):
      sig.append(chn[i]/32768.0)



On Fri, Dec 7, 2012 at 9:34 PM, Roger Kelly <loraxman+csound@gmail.com> wrote:
I am wanting to bring the audio frame back into the python application.


On Fri, Dec 7, 2012 at 12:28 PM, Roger Kelly <loraxman+csound@gmail.com> wrote:
It is Python. I have looked at many of the functions GetInputBuffer, etc, but can't piece together the sequence of calls needed.

Could you tell me what sequence of calls need to be done?


On Fri, Dec 7, 2012 at 11:59 AM, Michael Gogins <michael.gogins@gmail.com> wrote:
You can grab the low level buffer (ksmps sample frames) or the higher
level buffer. Where is the audio going?

What language are you using?

Regards,
Mike

On Fri, Dec 7, 2012 at 12:14 PM, Roger Kelly <loraxman@gmail.com> wrote:
> How would I go about getting the audio output buffer using CSoundAPI?
>
> I want to grab the audio as it is running the csd.



--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com


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"