Csound Csound-dev Csound-tekno Search About

[Cs-dev] csound->sicvt and csdl.h

Date2014-04-03 19:20
FromGleb
Subject[Cs-dev] csound->sicvt and csdl.h
Hello list!

I am writing a new opcode. It has to produce wave from ftable, so I decided
to take oscil as the main template. At some point we need to increment phase
of table oscillator and in oscil family of opcodes it is done with something
like
inc = MYFLT2LONG(*p->xcps * csound->sicvt);

I am building a plugin opcode, so I include csdl.h, not csoundCore.h. It
doesn't have sicvt, so of course I get error CSOUND has no member named
'sicvt'

Please, tell me what should I use instead. grep -r "sicvt" gives
csound->sicvt = FMAXLEN / csound->esr, so maybe I just use this expression,
but maybe there's some other way

Much thanks!



-----
Gleb Rogozinsky, PhD
Associated Professor
Interactive Arts Department
Saint-Petersburg University of Film and Television

Deputy Director of Medialab
Saint-Petersburg University of Telecommunications
--
View this message in context: http://csound.1045644.n5.nabble.com/csound-sicvt-and-csdl-h-tp5733836.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-03 20:31
FromVictor Lazzarini
SubjectRe: [Cs-dev] csound->sicvt and csdl.h
That is for integral indexing, which is maybe not what you want. Try looking at
Opcodes/uggab.c and the poscil opcodes, which use floating-point indexing, it's simpler
and probably just as fast  in modern machines.

On 3 Apr 2014, at 19:20, Gleb wrote:

> Hello list!
> 
> I am writing a new opcode. It has to produce wave from ftable, so I decided
> to take oscil as the main template. At some point we need to increment phase
> of table oscillator and in oscil family of opcodes it is done with something
> like
> inc = MYFLT2LONG(*p->xcps * csound->sicvt);
> 
> I am building a plugin opcode, so I include csdl.h, not csoundCore.h. It
> doesn't have sicvt, so of course I get error CSOUND has no member named
> 'sicvt'
> 
> Please, tell me what should I use instead. grep -r "sicvt" gives
> csound->sicvt = FMAXLEN / csound->esr, so maybe I just use this expression,
> but maybe there's some other way
> 
> Much thanks!
> 
> 
> 
> -----
> Gleb Rogozinsky, PhD
> Associated Professor
> Interactive Arts Department
> Saint-Petersburg University of Film and Television
> 
> Deputy Director of Medialab
> Saint-Petersburg University of Telecommunications
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csound-sicvt-and-csdl-h-tp5733836.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-03 20:47
FromGleb
SubjectRe: [Cs-dev] csound->sicvt and csdl.h
Victor,

thank you for help!



-----
Gleb Rogozinsky, PhD
Associated Professor
Interactive Arts Department
Saint-Petersburg University of Film and Television

Deputy Director of Medialab
Saint-Petersburg University of Telecommunications
--
View this message in context: http://csound.1045644.n5.nabble.com/csound-sicvt-and-csdl-h-tp5733836p5733850.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-03 22:58
FromAndres Cabrera
SubjectRe: [Cs-dev] csound->sicvt and csdl.h
AttachmentsNone  None  
Hi,

I have found that the integer phase opcodes are still faster on current hardware, in particular on mobile platforms. I had a student do an app which wouldn't run fast enough until he used code from csound's integer phase oscillators (He did need an unusually large number of oscillators, though...).

Cheers,
Andrés


On Thu, Apr 3, 2014 at 12:31 PM, Victor Lazzarini <Victor.Lazzarini@nuim.ie> wrote:
That is for integral indexing, which is maybe not what you want. Try looking at
Opcodes/uggab.c and the poscil opcodes, which use floating-point indexing, it's simpler
and probably just as fast  in modern machines.

On 3 Apr 2014, at 19:20, Gleb wrote:

> Hello list!
>
> I am writing a new opcode. It has to produce wave from ftable, so I decided
> to take oscil as the main template. At some point we need to increment phase
> of table oscillator and in oscil family of opcodes it is done with something
> like
> inc = MYFLT2LONG(*p->xcps * csound->sicvt);
>
> I am building a plugin opcode, so I include csdl.h, not csoundCore.h. It
> doesn't have sicvt, so of course I get error CSOUND has no member named
> 'sicvt'
>
> Please, tell me what should I use instead. grep -r "sicvt" gives
> csound->sicvt = FMAXLEN / csound->esr, so maybe I just use this expression,
> but maybe there's some other way
>
> Much thanks!
>
>
>
> -----
> Gleb Rogozinsky, PhD
> Associated Professor
> Interactive Arts Department
> Saint-Petersburg University of Film and Television
>
> Deputy Director of Medialab
> Saint-Petersburg University of Telecommunications
> --
> View this message in context: http://csound.1045644.n5.nabble.com/csound-sicvt-and-csdl-h-tp5733836.html
> Sent from the Csound - Dev mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/csound-devel


Date2014-04-04 07:55
FromVictor Lazzarini
SubjectRe: [Cs-dev] csound->sicvt and csdl.h
Last time I did a comparison between oscili and poscil on my OSX laptop, there wasn't much difference and at times,
poscil was marginally faster. But I expect that in some platforms it might be faster. For students, also, that's a great
code to learn too.

Victor
On 3 Apr 2014, at 22:58, Andres Cabrera wrote:

> Hi,
> 
> I have found that the integer phase opcodes are still faster on current hardware, in particular on mobile platforms. I had a student do an app which wouldn't run fast enough until he used code from csound's integer phase oscillators (He did need an unusually large number of oscillators, though...).
> 
> Cheers,
> Andrés
> 
> 
> On Thu, Apr 3, 2014 at 12:31 PM, Victor Lazzarini  wrote:
> That is for integral indexing, which is maybe not what you want. Try looking at
> Opcodes/uggab.c and the poscil opcodes, which use floating-point indexing, it's simpler
> and probably just as fast  in modern machines.
> 
> On 3 Apr 2014, at 19:20, Gleb wrote:
> 
> > Hello list!
> >
> > I am writing a new opcode. It has to produce wave from ftable, so I decided
> > to take oscil as the main template. At some point we need to increment phase
> > of table oscillator and in oscil family of opcodes it is done with something
> > like
> > inc = MYFLT2LONG(*p->xcps * csound->sicvt);
> >
> > I am building a plugin opcode, so I include csdl.h, not csoundCore.h. It
> > doesn't have sicvt, so of course I get error CSOUND has no member named
> > 'sicvt'
> >
> > Please, tell me what should I use instead. grep -r "sicvt" gives
> > csound->sicvt = FMAXLEN / csound->esr, so maybe I just use this expression,
> > but maybe there's some other way
> >
> > Much thanks!
> >
> >
> >
> > -----
> > Gleb Rogozinsky, PhD
> > Associated Professor
> > Interactive Arts Department
> > Saint-Petersburg University of Film and Television
> >
> > Deputy Director of Medialab
> > Saint-Petersburg University of Telecommunications
> > --
> > View this message in context: http://csound.1045644.n5.nabble.com/csound-sicvt-and-csdl-h-tp5733836.html
> > Sent from the Csound - Dev mailing list archive at Nabble.com.
> >
> > ------------------------------------------------------------------------------
> > _______________________________________________
> > Csound-devel mailing list
> > Csound-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> Dr Victor Lazzarini
> Senior Lecturer
> Dept. of Music
> NUI Maynooth Ireland
> tel.: +353 1 708 3545
> Victor dot Lazzarini AT nuim dot ie
> 
> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie




------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-04 09:37
FromRichard Dobson
SubjectRe: [Cs-dev] csound->sicvt and csdl.h
A propos of which,

I wrote about the Csound oscili code in the Programming Book (in the
context of the bitwise operators, DVD Ch 3), with the code extracted
as an option in a standalone program ("tabgen2").

Richard Dobson

On 04/04/2014 07:55, Victor Lazzarini wrote:
> Last time I did a comparison between oscili and poscil on my OSX
> laptop, there wasn't much difference and at times, poscil was
> marginally faster. But I expect that in some platforms it might be
> faster. For students, also, that's a great code to learn too.
>


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-04 09:46
FromVictor Lazzarini
SubjectRe: [Cs-dev] csound->sicvt and csdl.h
and an excellent text that one is, fully recommended.
========================
Dr Victor Lazzarini
Senior Lecturer
NUI Maynooth, Ireland
victor dot lazzarini at nuim dot ie




On 4 Apr 2014, at 09:37, Richard Dobson  wrote:

> A propos of which,
> 
> I wrote about the Csound oscili code in the Programming Book (in the
> context of the bitwise operators, DVD Ch 3), with the code extracted
> as an option in a standalone program ("tabgen2").
> 
> Richard Dobson
> 
> On 04/04/2014 07:55, Victor Lazzarini wrote:
>> Last time I did a comparison between oscili and poscil on my OSX
>> laptop, there wasn't much difference and at times, poscil was
>> marginally faster. But I expect that in some platforms it might be
>> faster. For students, also, that's a great code to learn too.
>> 
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel


------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2014-04-04 20:06
FromGleb
SubjectRe: [Cs-dev] csound->sicvt and csdl.h
oh..
thanks much to pointing me to this. It is very useful! 
 



-----
Gleb Rogozinsky, PhD
Associated Professor
Interactive Arts Department
Saint-Petersburg University of Film and Television

Deputy Director of Medialab
Saint-Petersburg University of Telecommunications
--
View this message in context: http://csound.1045644.n5.nabble.com/csound-sicvt-and-csdl-h-tp5733836p5733901.html
Sent from the Csound - Dev mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net