Csound Csound-dev Csound-tekno Search About

[Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)

Date2009-02-25 13:05
FromAndres Cabrera
Subject[Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)
Hi,

I'm hoping Matt or maybe someone else can help me figure these two things out:

How do you know the name of the file that was double clicked in the
finder and opens an application (on windows and linux it's easy since
it is a command line argument, but on OS X, the only argument is
something like a program id...)

What is the character code (in Unicode) used for line breaks in
MacCsound? I've seen it as capital A with circumflex accent, but I
don't really know much about Unicode so I can't figure out how to use
it or reference it.

Cheers,
Andrés

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-25 19:25
FromAnthony Kozar
SubjectRe: [Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)
Andres Cabrera wrote on 2/25/09 8:05 AM:

> Hi,
> 
> I'm hoping Matt or maybe someone else can help me figure these two things out:
> 
> How do you know the name of the file that was double clicked in the
> finder and opens an application (on windows and linux it's easy since
> it is a command line argument, but on OS X, the only argument is
> something like a program id...)

This might depend on which framework the program was written in (Carbon,
Cocoa, etc.)  I know that all Carbon applications (such as MacCsound) are
sent one of two Apple Events when they are launched.  An application that is
itself double-clicked in the Finder is sent an "Open Application" event
which many apps respond to by opening a new blank document.  If the
application was launched by clicking on one or more of its documents, then
it is sent an "Open Documents" event.  Carbon apps must register handlers
(callbacks) for these and other common Apple Events in their init code.



I don't know how it works for Cocoa or Java applications on OS X.

> What is the character code (in Unicode) used for line breaks in
> MacCsound? I've seen it as capital A with circumflex accent, but I
> don't really know much about Unicode so I can't figure out how to use
> it or reference it.

Probably is a carriage return (ASCII 13 or 0x0d; '\r' in C).  This is the
traditional line ending for the Classic MacOS.

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-02-25 20:12
FromAndres Cabrera
SubjectRe: [Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)
Hi Anthony,

On Wed, Feb 25, 2009 at 2:25 PM, Anthony Kozar
 wrote:
> Andres Cabrera wrote on 2/25/09 8:05 AM:
>
>> Hi,
>>
>> I'm hoping Matt or maybe someone else can help me figure these two things out:
>>
>> How do you know the name of the file that was double clicked in the
>> finder and opens an application (on windows and linux it's easy since
>> it is a command line argument, but on OS X, the only argument is
>> something like a program id...)
>
> This might depend on which framework the program was written in (Carbon,
> Cocoa, etc.)  I know that all Carbon applications (such as MacCsound) are
> sent one of two Apple Events when they are launched.  An application that is
> itself double-clicked in the Finder is sent an "Open Application" event
> which many apps respond to by opening a new blank document.  If the
> application was launched by clicking on one or more of its documents, then
> it is sent an "Open Documents" event.  Carbon apps must register handlers
> (callbacks) for these and other common Apple Events in their init code.
>
>  /intro_aepg/chapter_1_section_1.html>
>
> I don't know how it works for Cocoa or Java applications on OS X.
>

Thanks that was exactly the pointer I needed, I've found more
information on how to set this up using Qt.

>> What is the character code (in Unicode) used for line breaks in
>> MacCsound? I've seen it as capital A with circumflex accent, but I
>> don't really know much about Unicode so I can't figure out how to use
>> it or reference it.
>
> Probably is a carriage return (ASCII 13 or 0x0d; '\r' in C).  This is the
> traditional line ending for the Classic MacOS.
>

I was not clear... I mean the character used for line returns within
widget lines. Since MacCsound has one widget per line, line returns
for text in the widgets are represented by an unusual character. It is
this character which I'm trying to find (particularly how it can be
represented or used in Unicode.

Thanks,
Andrés


> Anthony Kozar
> mailing-lists-1001 AT anthonykozar DOT net
> http://anthonykozar.net/
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel
>



-- 


Andrés

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-08 20:23
Frommatt ingalls
SubjectRe: [Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)
sorry for late reply.
good news is that i am finally going to get some time off [ hopefully  
not permanently ] and am looking forward to getting back into csound  
dev!
(including an intel solution for maccsound!!)

BTW - is 5.10 csoundlib still not working with MacCsound?
( Victor i think you said you were going to take a look as to why? )

yes - apple events

that "unusual" character i use in maccsound is:  ¬
(the comment next to this the code is: "yes i know this is lame")

-m

On Feb 25, 2009, at 12:12 PM, Andres Cabrera wrote:

> Hi Anthony,
>
> On Wed, Feb 25, 2009 at 2:25 PM, Anthony Kozar
>  wrote:
>> Andres Cabrera wrote on 2/25/09 8:05 AM:
>>
>>> Hi,
>>>
>>> I'm hoping Matt or maybe someone else can help me figure these two  
>>> things out:
>>>
>>> How do you know the name of the file that was double clicked in the
>>> finder and opens an application (on windows and linux it's easy  
>>> since
>>> it is a command line argument, but on OS X, the only argument is
>>> something like a program id...)
>>
>> This might depend on which framework the program was written in  
>> (Carbon,
>> Cocoa, etc.)  I know that all Carbon applications (such as  
>> MacCsound) are
>> sent one of two Apple Events when they are launched.  An  
>> application that is
>> itself double-clicked in the Finder is sent an "Open Application"  
>> event
>> which many apps respond to by opening a new blank document.  If the
>> application was launched by clicking on one or more of its  
>> documents, then
>> it is sent an "Open Documents" event.  Carbon apps must register  
>> handlers
>> (callbacks) for these and other common Apple Events in their init  
>> code.
>>
>> > /intro_aepg/chapter_1_section_1.html>
>>
>> I don't know how it works for Cocoa or Java applications on OS X.
>>
>
> Thanks that was exactly the pointer I needed, I've found more
> information on how to set this up using Qt.
>
>>> What is the character code (in Unicode) used for line breaks in
>>> MacCsound? I've seen it as capital A with circumflex accent, but I
>>> don't really know much about Unicode so I can't figure out how to  
>>> use
>>> it or reference it.
>>
>> Probably is a carriage return (ASCII 13 or 0x0d; '\r' in C).  This  
>> is the
>> traditional line ending for the Classic MacOS.
>>
>
> I was not clear... I mean the character used for line returns within
> widget lines. Since MacCsound has one widget per line, line returns
> for text in the widgets are represented by an unusual character. It is
> this character which I'm trying to find (particularly how it can be
> represented or used in Unicode.
>
> Thanks,
> Andrés
>
>
>> Anthony Kozar
>> mailing-lists-1001 AT anthonykozar DOT net
>> http://anthonykozar.net/
>>
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San  
>> Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the  
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source  
>> participation
>> -Receive a $600 discount off the registration fee with the source  
>> code: SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>>
>
>
>
> -- 
>
>
> Andrés
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San  
> Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the  
> Enterprise
> -Strategies to boost innovation and cut costs with open source  
> participation
> -Receive a $600 discount off the registration fee with the source  
> code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel

matt ingalls
development@gvox.com




------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-09 16:39
FromAndres Cabrera
SubjectRe: [Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)
Hi Matt,

> BTW - is 5.10 csoundlib still not working with MacCsound?
> ( Victor i think you said you were going to take a look as to why? )
>
I think the problem is that the API version number has been increased
because since 5.09 the API is binary incompatible with previous
versions. Since MacCsound is built for the earlier API, I think this
is the probem.

> that "unusual" character i use in maccsound is:  ¬
> (the comment next to this the code is: "yes i know this is lame")
>

Do you know which Unicode code this character is? I've tried using
\u00AC but it's not working... ( ¬  ¬)

Cheers,
Andrés

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2009-03-10 04:21
FromAnthony Kozar
SubjectRe: [Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)
Andres Cabrera wrote on 3/9/09 12:39 PM:

> Hi Matt,
> 
>> BTW - is 5.10 csoundlib still not working with MacCsound?
>> ( Victor i think you said you were going to take a look as to why? )
>> 
> I think the problem is that the API version number has been increased
> because since 5.09 the API is binary incompatible with previous
> versions. Since MacCsound is built for the earlier API, I think this
> is the probem.

MacCsound *should* work with the 5.10 installers (except doubles build)
anyways because Victor and I included two versions of the framework: 5.1
framework based on Csound 5.08 and 5.2 framework based on Csound 5.10.

That said, I have had trouble with MacCsound and my Leopard build.
MacCsound will launch and work until I try to render.  It then quits
voluntarily (i.e. no crash log) without printing any Csound messages or
displaying any errors, so it is difficult for me to know what is going on.
I am pretty sure that MacCsound is linking to the correct CsoundLib at
runtime because if the 5.1 framework is not installed, it will not launch at
all.

Can anyone say whether this happens with Victor's PPC build for 10.4?

Matt, any chance that you can debug MacCsound on Leopard with my build?

Anthony Kozar
mailing-lists-1001 AT anthonykozar DOT net
http://anthonykozar.net/


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

Date2009-03-10 05:54
Frommatt ingalls
SubjectRe: [Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)
>
> Do you know which Unicode code this character is? I've tried using
> \u00AC but it's not working... ( ¬  ¬)

no idea -- i make it on my keyboard with option-l

matt ingalls
development@gvox.com





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

Date2009-03-10 07:54
FromAnthony Kozar
SubjectRe: [Cs-dev] Two questions about Mac and MacCsound (Particulary for Ma++)
The text editor in MacCsound does not use Unicode though, does it?  If
Andrés is worried about QuteCsound being able to read this character in
MacCsound files, it should assume the same encoding (Mac Roman?).

Anthony

matt ingalls wrote on 3/10/09 1:54 AM:

>> 
>> Do you know which Unicode code this character is? I've tried using
>> \u00AC but it's not working... ( ¬  ¬)
> 
> no idea -- i make it on my keyboard with option-l
> 
> matt ingalls
> development@gvox.com


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

Date2009-03-10 09:29
Fromvictor
SubjectRe: [Cs-dev] Two questions about Mac and MacCsound (Particulary forMa++)
It could be to do with the opcodes OPCODEDIR, I think.They
have different versions and Csound might be looking at the 5.2 one
(although I remember checking this earlier on and it was not the
problem). Thanks for reminding me, I will look at it asap.

Victor


----- Original Message ----- 
From: "Anthony Kozar" 
To: "New Csound Developer list" 
Sent: Tuesday, March 10, 2009 4:21 AM
Subject: Re: [Cs-dev] Two questions about Mac and MacCsound (Particulary 
forMa++)


> Andres Cabrera wrote on 3/9/09 12:39 PM:
>
>> Hi Matt,
>>
>>> BTW - is 5.10 csoundlib still not working with MacCsound?
>>> ( Victor i think you said you were going to take a look as to why? )
>>>
>> I think the problem is that the API version number has been increased
>> because since 5.09 the API is binary incompatible with previous
>> versions. Since MacCsound is built for the earlier API, I think this
>> is the probem.
>
> MacCsound *should* work with the 5.10 installers (except doubles build)
> anyways because Victor and I included two versions of the framework: 5.1
> framework based on Csound 5.08 and 5.2 framework based on Csound 5.10.
>
> That said, I have had trouble with MacCsound and my Leopard build.
> MacCsound will launch and work until I try to render.  It then quits
> voluntarily (i.e. no crash log) without printing any Csound messages or
> displaying any errors, so it is difficult for me to know what is going on.
> I am pretty sure that MacCsound is linking to the correct CsoundLib at
> runtime because if the 5.1 framework is not installed, it will not launch 
> at
> all.
>
> Can anyone say whether this happens with Victor's PPC build for 10.4?
>
> Matt, any chance that you can debug MacCsound on Leopard with my build?
>
> Anthony Kozar
> mailing-lists-1001 AT anthonykozar DOT net
> http://anthonykozar.net/
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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