• 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
Re: HELP!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HELP!


  • Subject: Re: HELP!
  • From: jbrave <email@hidden>
  • Date: Wed, 30 Aug 2006 17:58:30 -0700

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?

Joel


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
  • Follow-Ups:
    • was: HELP!
      • From: Steve Majewski <email@hidden>
References: 
 >HELP! (From: djl <email@hidden>)
 >Re: HELP! (From: Steve Majewski <email@hidden>)

  • Prev by Date: Re: InputCallbacks and buffer size
  • Next by Date: was: HELP!
  • Previous by thread: Re: HELP!
  • Next by thread: was: HELP!
  • Index(es):
    • Date
    • Thread