• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
was: HELP!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

was: HELP!


  • Subject: was: HELP!
  • From: Steve Majewski <email@hidden>
  • Date: Wed, 30 Aug 2006 22:27:27 -0400


On Aug 30, 2006, at 8:58 PM, jbrave wrote:

Hmm - forgive my ignorance of the deeper aspects of OS X, but couldn't someone write a little C proggy that waits for midi inputs, and stores the result somewhere that his applesscript could check - like a text file with a flag 0 if none, keypress, 1 if there is, followed by the note #, his script would launch the program which would run in the background, and then his script would just check the text file periodically? Is that really impossible to do? Then he could just hire someone to write the little app for him, and he could continue writing his script, without having to learn the nitty gritty of java etc?


I didn't say, nor did I mean to imply, that it was impossible.

The "No" was in response to his very specific question:

So, being that I'm no C, C++, Obj C or Java programmer is there anyway to easily create a command line executable that can be called from AppleScript's 'do shell script' command to:-

1. run in the background waiting for a key press
2. return the decimal value of the key pressed
3. exit/quit

No -- There's not an easy way for a non-(whatever)-programmer to write that program,
and if it were written to those specifications, it also might not quite work as required.


But perhaps I was trying too subtly to imply what Jeff Moore just simply said:

Perhaps you ought to step back and explain what you are trying to do and perhaps folks can chime in on ways to make it work.


The original poster seemed impatient in his second message, that no- one had yet answered the
question in his first message a day earlier. I suspect that one reason for the initial silence was
the way he asked the question, and that since "No" doesn't seem like a very useful answer,
most people are likely to just not reply at all. ( And since I didn't want to leave it at just "No"
myself, I tried to describe the easiest path that came to mind, even if it doesn't fit his stated
requirements. )


-- Steve M.


On Aug 29, 2006, at 8:48 PM, Steve Majewski wrote:


On Aug 29, 2006, at 6:51 PM, djl wrote:

Can anyone please advise on my previous request/post/message?

Many thanks in advance ...


I think the answer to your very specific question is: No.

Hi there,
I'm after some advice/help and would appreciate your comments.
Basically, I'm trying to create a simple application primarily using FaceSpan (and hence AppleScript, not AppleScript Studio) and I need to, if possible, call a command line executable that returns MIDI In data.
I don't need to capture any data other than the MIDI note number of the key pressed eg, I don't need velocity, after-touch, note- off or volume data or even the ability to route the MIDI anywhere.
So, being that I'm no C, C++, Obj C or Java programmer is there anyway to easily create a command line executable that can be called from AppleScript's 'do shell script' command to:-


1. run in the background waiting for a key press
2. return the decimal value of the key pressed
3. exit/quit

Hoping you can help!
Kind regards,



If you want some more general advice, I think writing something in java using javax.sound.midi package
might be somewhat simpler and easier than programming CoreAudio in C/C++/Obj-C.


You can also call java packages from jython ( python in java ) or rhino/javascript, but this isn't exactly
a magic bullet. You have to understand java and the javax.sound.midi package, as well as how the
data corecions between java and the scripting language work to use it, so it's as best, a way of avoiding
having to write everything in java.



But, as Jeff Moore noted, it probably won't work to make a program that runs once to grab a key press and exits.



You seem to have decided on a set of tools and part of a solution before analyzing the problem.
That may be part of the problem.



-- Steve Majewski

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40earthlink.net


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: was: HELP!
      • From: Jeff Moore <email@hidden>
References: 
 >HELP! (From: djl <email@hidden>)
 >Re: HELP! (From: Steve Majewski <email@hidden>)
 >Re: HELP! (From: jbrave <email@hidden>)

  • Prev by Date: Re: HELP!
  • Next by Date: Re: CoreMIDI SysEx & MIDIMonitor
  • Previous by thread: Re: HELP!
  • Next by thread: Re: was: HELP!
  • Index(es):
    • Date
    • Thread