Csound Csound-dev Csound-tekno Search About

csound api method for sample-rate overwrite

Date2015-06-27 20:46
Frompeiman khosravi
Subjectcsound api method for sample-rate overwrite
AttachmentsNone  None  
Hello,

I've seen "MYFLT CSOUND_PARAMS::sample_rate_override" in the api documentation but cannot find any examples of it being used in java. Any idea really appreciated.

Many Thanks
Peiman


Date2015-06-27 20:55
FromVictor Lazzarini
SubjectRe: csound api method for sample-rate overwrite
best to use -r as in

csoundSetOption(csound, “-r22050”);

to avoid pointers etc
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 27 Jun 2015, at 20:46, peiman khosravi  wrote:
> 
> Hello, 
> 
> I've seen "MYFLT CSOUND_PARAMS::sample_rate_override" in the api documentation but cannot find any examples of it being used in java. Any idea really appreciated. 
> 
> Many Thanks
> Peiman
> 
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors 
> network devices and physical & virtual servers, alerts via email & sms 
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________
> 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


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors 
network devices and physical & virtual servers, alerts via email & sms 
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
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-06-28 09:31
Frompeiman khosravi
SubjectRe: csound api method for sample-rate overwrite
AttachmentsNone  None  
Thanks Victor,

The problem is that if I set the -r flag to anything other than the sr defined in the csd header, compile fails. I've tried --sample-rate too and the same thing happens.

So I tried it in the terminal and this is the error I get:

sr = 44100, kr = 4800, ksmps = 9.1875
error: invalid ksmps value

So it looks like that kr is not changed accordingly, relative to the new sr. I suppose it's not a bug really but perhaps worth making a note in the manual entry for the -r flag. It works when ksmps is also stated explicitly with the ksmps flag.

Thanks
Peiman


On 27 June 2015 at 20:55, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
best to use -r as in

csoundSetOption(csound, “-r22050”);

to avoid pointers etc
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 27 Jun 2015, at 20:46, peiman khosravi <peimankhosravi@gmail.com> wrote:
>
> Hello,
>
> I've seen "MYFLT CSOUND_PARAMS::sample_rate_override" in the api documentation but cannot find any examples of it being used in java. Any idea really appreciated.
>
> Many Thanks
> Peiman
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________
> 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


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
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-06-28 09:52
FromVictor Lazzarini
SubjectRe: csound api method for sample-rate overwrite
AttachmentsNone  None  
This is because if you override one, the system does not try to second guess what you want. So you need to override both if their ratio is not integral. If you do that, it will work. 

Note that this would be the case whatever method you used to set the sr.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 28 Jun 2015, at 09:31, peiman khosravi <peimankhosravi@gmail.com> wrote:

Thanks Victor,

The problem is that if I set the -r flag to anything other than the sr defined in the csd header, compile fails. I've tried --sample-rate too and the same thing happens.

So I tried it in the terminal and this is the error I get:

sr = 44100, kr = 4800, ksmps = 9.1875
error: invalid ksmps value

So it looks like that kr is not changed accordingly, relative to the new sr. I suppose it's not a bug really but perhaps worth making a note in the manual entry for the -r flag. It works when ksmps is also stated explicitly with the ksmps flag.

Thanks
Peiman


On 27 June 2015 at 20:55, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
best to use -r as in

csoundSetOption(csound, “-r22050”);

to avoid pointers etc
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 27 Jun 2015, at 20:46, peiman khosravi <peimankhosravi@gmail.com> wrote:
>
> Hello,
>
> I've seen "MYFLT CSOUND_PARAMS::sample_rate_override" in the api documentation but cannot find any examples of it being used in java. Any idea really appreciated.
>
> Many Thanks
> Peiman
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________
> 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


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
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

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
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-06-28 13:25
Frompeiman khosravi
SubjectRe: csound api method for sample-rate overwrite
AttachmentsNone  None  
Thanks Victor that makes sense.

All working fine!


On 28 June 2015 at 09:52, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
This is because if you override one, the system does not try to second guess what you want. So you need to override both if their ratio is not integral. If you do that, it will work. 

Note that this would be the case whatever method you used to set the sr.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

On 28 Jun 2015, at 09:31, peiman khosravi <peimankhosravi@gmail.com> wrote:

Thanks Victor,

The problem is that if I set the -r flag to anything other than the sr defined in the csd header, compile fails. I've tried --sample-rate too and the same thing happens.

So I tried it in the terminal and this is the error I get:

sr = 44100, kr = 4800, ksmps = 9.1875
error: invalid ksmps value

So it looks like that kr is not changed accordingly, relative to the new sr. I suppose it's not a bug really but perhaps worth making a note in the manual entry for the -r flag. It works when ksmps is also stated explicitly with the ksmps flag.

Thanks
Peiman


On 27 June 2015 at 20:55, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
best to use -r as in

csoundSetOption(csound, “-r22050”);

to avoid pointers etc
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952

> On 27 Jun 2015, at 20:46, peiman khosravi <peimankhosravi@gmail.com> wrote:
>
> Hello,
>
> I've seen "MYFLT CSOUND_PARAMS::sample_rate_override" in the api documentation but cannot find any examples of it being used in java. Any idea really appreciated.
>
> Many Thanks
> Peiman
>
> ------------------------------------------------------------------------------
> Monitor 25 network devices or servers for free with OpManager!
> OpManager is web-based network management software that monitors
> network devices and physical & virtual servers, alerts via email & sms
> for fault. Monitor 25 devices for free with no restriction. Download now
> http://ad.doubleclick.net/ddm/clk/292181274;119417398;o_______________________________________________
> 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


------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
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

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
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

------------------------------------------------------------------------------
Monitor 25 network devices or servers for free with OpManager!
OpManager is web-based network management software that monitors
network devices and physical & virtual servers, alerts via email & sms
for fault. Monitor 25 devices for free with no restriction. Download now
http://ad.doubleclick.net/ddm/clk/292181274;119417398;o
_______________________________________________
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