Csound Csound-dev Csound-tekno Search About

Re: [Csnd] Another Android Question

Date2013-02-05 20:55
From"Art Hunkins"
SubjectRe: [Csnd] Another Android Question
Then is setting a .csd's SR to that of an input file as simple as:
 
isr filesr "1.wav"
sr = isr
 
in the orchestra header?
 
If so, would it be possible to set the .csd SR, for example, to the larger of two input files SR's with this code:
 
isr1 filesr "1.wav"
isr2 filesr "2.wav"
isr = (isr1 >= isr2? isr1: isr2)
sr = isr
 
We'd like to set our .csd SR equal to the highest input file SR.
 
Art Hunkins
----- Original Message -----
To: csound
Sent: Tuesday, February 05, 2013 11:21 AM
Subject: Re: [Csnd] Another Android Question

  isr filesr "sample path%"

Art,
Try to use filesr.  This will give you its sample rate.


On Mon, Feb 4, 2013 at 7:19 PM, Art Hunkins <abhunkin@uncg.edu> wrote:
In the context of Android app programming, is there any way of passing input file SR's to a .csd so that Csound can create a wavefile mix at the same SR?

We're using diskin2, so input and output SR's can be as varied as much as one would like. We'd simply like to match SR's for efficiency and fidelity.

Art Hunkins




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-02-05 22:12
FromVictor
SubjectRe: [Csnd] Another Android Question
No, because before filesr is run, the sampling rate must be set. What you can do is run Csound with filesr, report the sr back to the app, then start csound again with the desired sr.



On 5 Feb 2013, at 20:55, Art Hunkins <abhunkin@uncg.edu> wrote:

Then is setting a .csd's SR to that of an input file as simple as:
 
isr filesr "1.wav"
sr = isr
 
in the orchestra header?
 
If so, would it be possible to set the .csd SR, for example, to the larger of two input files SR's with this code:
 
isr1 filesr "1.wav"
isr2 filesr "2.wav"
isr = (isr1 >= isr2? isr1: isr2)
sr = isr
 
We'd like to set our .csd SR equal to the highest input file SR.
 
Art Hunkins
----- Original Message -----
To: csound
Sent: Tuesday, February 05, 2013 11:21 AM
Subject: Re: [Csnd] Another Android Question

  isr filesr "sample path%"

Art,
Try to use filesr.  This will give you its sample rate.


On Mon, Feb 4, 2013 at 7:19 PM, Art Hunkins <abhunkin@uncg.edu> wrote:
In the context of Android app programming, is there any way of passing input file SR's to a .csd so that Csound can create a wavefile mix at the same SR?

We're using diskin2, so input and output SR's can be as varied as much as one would like. We'd simply like to match SR's for efficiency and fidelity.

Art Hunkins




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-02-06 00:42
FromRoger Kelly
SubjectRe: [Csnd] Another Android Question
Interesting problem, it's basically that you are trying to output a file using 'fout' at the same sample rate or the source file?  Is there any change srconv is packaged up as part of csoundlib on Android? 

If so you could just post process the file also and convert the sample rate.


On Tue, Feb 5, 2013 at 4:12 PM, Victor <Victor.Lazzarini@nuim.ie> wrote:
No, because before filesr is run, the sampling rate must be set. What you can do is run Csound with filesr, report the sr back to the app, then start csound again with the desired sr.



On 5 Feb 2013, at 20:55, Art Hunkins <abhunkin@uncg.edu> wrote:

Then is setting a .csd's SR to that of an input file as simple as:
 
isr filesr "1.wav"
sr = isr
 
in the orchestra header?
 
If so, would it be possible to set the .csd SR, for example, to the larger of two input files SR's with this code:
 
isr1 filesr "1.wav"
isr2 filesr "2.wav"
isr = (isr1 >= isr2? isr1: isr2)
sr = isr
 
We'd like to set our .csd SR equal to the highest input file SR.
 
Art Hunkins
----- Original Message -----
To: csound
Sent: Tuesday, February 05, 2013 11:21 AM
Subject: Re: [Csnd] Another Android Question

  isr filesr "sample path%"

Art,
Try to use filesr.  This will give you its sample rate.


On Mon, Feb 4, 2013 at 7:19 PM, Art Hunkins <abhunkin@uncg.edu> wrote:
In the context of Android app programming, is there any way of passing input file SR's to a .csd so that Csound can create a wavefile mix at the same SR?

We're using diskin2, so input and output SR's can be as varied as much as one would like. We'd simply like to match SR's for efficiency and fidelity.

Art Hunkins




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"