Csound Csound-dev Csound-tekno Search About

are true and/or false defined constants in csound?

Date2015-05-09 17:22
FromDavid Worrall
Subjectare true and/or false defined constants in csound?
AttachmentsNone  None  
Hi All,


I'm looking to be able to write

gMyGlobalVar init True

if (gMyGlobalVar) then  …. endif 

rather that

gMyGlobalVar init 1

if (gMyGlobalVar == 1 ) then  …. endif 

are True and False defined for csound instrument building?

thanks,

D.


______________________________________
Prof. Dr. David Worrall
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
www: iis.fraunhofer.de 
---
Adjunct Senior Research Fellow
School of Music, Australian National University







Date2015-05-09 17:47
FromVictor Lazzarini
SubjectRe: are true and/or false defined constants in csound?
AttachmentsNone  None  
You could use a macro perhaps?

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

On 9 May 2015, at 17:22, David Worrall <david.worrall@iis.fraunhofer.de> wrote:

Hi All,


I'm looking to be able to write

gMyGlobalVar init True

if (gMyGlobalVar) then  …. endif 

rather that

gMyGlobalVar init 1

if (gMyGlobalVar == 1 ) then  …. endif 

are True and False defined for csound instrument building?

thanks,

D.


______________________________________
Prof. Dr. David Worrall
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
www: iis.fraunhofer.de 
---
Adjunct Senior Research Fellow
School of Music, Australian National University






------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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-05-09 17:54
FromSteven Yi
SubjectRe: are true and/or false defined constants in csound?
Hi David,

There is actually a boolean type within Csound's engine, but it has
not been exposed to user code.  (Actually there are two boolean types,
b and B, which correspond to init and perf-times).  I've been thinking
recently that it might be nice to have integer and long integer types;
perhaps having booleans exposed would be good too.  I think this would
all have to be done in Csound 7, but it could look like this:

myVar:bool = false
counter:int = 0
counter2:long = 0L

In a later Csound with type inferrance, it would become simpler with:

myVar = false
counter = 0
counter2 = 0L

If interested, you could file an issue and we could look at it for CS7.

steven


On Sat, May 9, 2015 at 12:22 PM, David Worrall
 wrote:
> Hi All,
>
>
> I'm looking to be able to write
>
> gMyGlobalVar init True
>
> if (gMyGlobalVar) then  …. endif
>
> rather that
>
> gMyGlobalVar init 1
>
> if (gMyGlobalVar == 1 ) then  …. endif
>
> are True and False defined for csound instrument building?
>
> thanks,
>
> D.
>
>
> ______________________________________
> Prof. Dr. David Worrall
> International Audio Laboratories Erlangen
> Fraunhofer-Institut für Integrierte Schaltungen IIS
> Am Wolfsmantel 33
> 91058 Erlangen
> www: iis.fraunhofer.de
>          audiolabs-erlangen.de/research/emerging-audio-research
> ---
> Adjunct Senior Research Fellow
> School of Music, Australian National University
> david.worrall@anu.edu.au
>
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> 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
>

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
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-05-09 18:39
FromDavid Worrall
SubjectRe: are true and/or false defined constants in csound?
AttachmentsNone  None  
Hi Steven,
Thanks,

Clearly it would be a nice feature rather than essential.

thanks,

D.




On 09.05.2015, at 18:54, Steven Yi <stevenyi@gmail.com> wrote:

Hi David,

There is actually a boolean type within Csound's engine, but it has
not been exposed to user code.  (Actually there are two boolean types,
b and B, which correspond to init and perf-times).  I've been thinking
recently that it might be nice to have integer and long integer types;
perhaps having booleans exposed would be good too.  I think this would
all have to be done in Csound 7, but it could look like this:

myVar:bool = false
counter:int = 0
counter2:long = 0L

In a later Csound with type inferrance, it would become simpler with:

myVar = false
counter = 0
counter2 = 0L

If interested, you could file an issue and we could look at it for CS7.

steven


On Sat, May 9, 2015 at 12:22 PM, David Worrall
<david.worrall@iis.fraunhofer.de> wrote:
Hi All,


I'm looking to be able to write

gMyGlobalVar init True

if (gMyGlobalVar) then  …. endif

rather that

gMyGlobalVar init 1

if (gMyGlobalVar == 1 ) then  …. endif

are True and False defined for csound instrument building?

thanks,

D.


______________________________________
Prof. Dr. David Worrall
International Audio Laboratories Erlangen
Fraunhofer-Institut für Integrierte Schaltungen IIS
Am Wolfsmantel 33
91058 Erlangen
www: iis.fraunhofer.de 
---
Adjunct Senior Research Fellow
School of Music, Australian National University