Author |
Topic: script usage scenarios (Read 6007 times) |
|
StevenW
Board Newbie
Posts: 27
|
|
script usage scenarios
« on: Jan 29th, 2003, 8:58am » |
Quote | Modify
|
Scripting is a very exciting and potentially extremely useful function, and also may reduce the continued requests for upgrades that you folks probably get. I'll be looking for the ability to manually highlight ( "select" ) -- using the keyboard or mouse -- one or more notes or measures across one or more staffs (ideally not necessarily adjacent to each other ) then use a shortcut key to call a script that performs complex modifications on the highlighted notes and marks. Further, the ability to perform highlighting as described above inside a script, and then have the script call standard HA edit functions like copy/paste etc. that include all of the staff data as they currently do. I'd also be vey happy if after running a script, that "undo" still worked. I have not been able to see if script control will extend to actual note placement on the staff. Someone might want to implement a replacement engraver function that applies only to selected measures for example. Cannot tell if scripts will be able to overload standard menu and shortcut key actions. I did not see mention of a debugger, enabling step-execution and breakpoints and variable examination. It that there? Finally, as you know, windows supports a DDE interface in which one program can send control messages to another. Is it worth considering making the script interface DDE aware?
|
|
offline |
|
|
|
Didier Guillion
Administrator
WWW | Email
Gender:
Posts: 8420
|
|
Re: script usage scenarios
« Reply #1 on: Jan 29th, 2003, 10:04am » |
Quote | Modify
|
on Jan 29th, 2003, 8:58am, StevenW wrote:Scripting is a very exciting and potentially extremely useful function, and also may reduce the continued requests for upgrades that you folks probably get. I'll be looking for the ability to manually highlight ( "select" ) -- using the keyboard or mouse -- one or more notes or measures across one or more staffs (ideally not necessarily adjacent to each other ) then use a shortcut key to call a script that performs complex modifications on the highlighted notes and marks. Further, the ability to perform highlighting as described above inside a script, and then have the script call standard HA edit functions like copy/paste etc. that include all of the staff data as they currently do. I'd also be vey happy if after running a script, that "undo" still worked. I have not been able to see if script control will extend to actual note placement on the staff. Someone might want to implement a replacement engraver function that applies only to selected measures for example. Cannot tell if scripts will be able to overload standard menu and shortcut key actions. I did not see mention of a debugger, enabling step-execution and breakpoints and variable examination. It that there? Finally, as you know, windows supports a DDE interface in which one program can send control messages to another. Is it worth considering making the script interface DDE aware? |
| Hi, A Script can apply changes only to selected objects. A script can select/copy/paste/delete as usual. A Script can Preserve the current score status so the user will be able to "Undo" the changes. By the way it is strongly recommanded for a script to allow the undo when it is possible. Note placement (engraver) can be setup by a script but a script can't define its own engraving algorithm. (May be a future extension?) The user can relate a Script to a keyboard shortcut. A script can't change the keyboard shortcuts. A script can add itself to a standard menu, for example in File>Import>XML (if the XML import script exists ) A debugger is provided. It enables to add breakpoints, step in, step out, show local and global variables, even in Dialog box methods. The Script is not DDE aware because a Script can run on many platform like Macintosh. The only thing a script can do for the moment is to tell the system to open a document using another program. Best regards
|
« Last Edit: Jan 29th, 2003, 10:52am by Olivier Guillion » |
offline |
Myriad Team
|
|
|
Grandpa Scorpion
Board Junior Member
WWW | Email
Gender:
Posts: 74
|
|
Re: script usage scenarios
« Reply #2 on: Jan 29th, 2003, 4:17pm » |
Quote | Modify
|
Hi Olivier, "A Script can apply changes ONLY (my emphasis) to selected objects." I'm a bit confused. Saying the script can only operate on a selection implies that it can't alter other notes. The API doc (Section 2.3.6.1) seems to retrieve any symbol and operate on it. Should the ONLY have been left out of the first statement? Thanks, Grandpa
|
|
offline |
|
|
|
Olivier Guillion
Administrator
WWW | Email
Gender:
Posts: 6151
|
|
Re: script usage scenarios
« Reply #3 on: Jan 29th, 2003, 5:04pm » |
Quote | Modify
|
Sorry if the English was not clear enough. You can either process selected objects or all objects in a staff, a score, etc. So you CAN process the selected objects only. Is it what didier should have written, instead of "only the selected objects" ?
|
|
offline |
Olivier Guillion Myriad Software
|
|
|
Grandpa Scorpion
Board Junior Member
WWW | Email
Gender:
Posts: 74
|
|
Re: script usage scenarios
« Reply #4 on: Jan 29th, 2003, 5:22pm » |
Quote | Modify
|
Hi Didier/Olivier, No problem. Your English is light years ahead of my French! ;) The way that you both can respond so quickly and bilingually always impresses me. Thanks, Grandpa
|
|
offline |
|
|
|
Pierpaolo BERNARDI
Beta-tester Board Junior Member
Posts: 89
|
|
Re: script usage scenarios
« Reply #5 on: Jan 30th, 2003, 12:41am » |
Quote | Modify
|
on Jan 29th, 2003, 10:04am, Didier Guillion wrote: The Script is not DDE aware because a Script can run on many platform like Macintosh. The only thing a script can do for the moment is to tell the system to open a document using another program. |
| One thing that I wanted to ask, and I take this occasion to ask, is to have a simple socket interface. This shouldn't be hard to do, right? Personally, I would like to use this for interacting with other programs written by me. I could use HA to display a score that other programs are generating. I can produce a script that I can load successively, but control in real time would be better. There could also be many other possible uses: collaborative work (ok, fun, not work) through the internet, like, many persons working on the same score, or script driven down/up loading of music from sites, an interface to Google for searching midi files, so that one can listen to the incipit of the files to hear if it is what one is searching, etc. Then one can implement a web-browser in HA... 8-) (Just kidding) P.
|
|
offline |
|
|
|
Didier Guillion
Administrator
WWW | Email
Gender:
Posts: 8420
|
|
Re: script usage scenarios
« Reply #6 on: Jan 30th, 2003, 4:10am » |
Quote | Modify
|
Hi, If real time is not the first criterion, you can build a script which run in background and check if a specific file exist. If yes, it open it and process it. The limitations are : - if another script is launched, the first background script will be paused until the second script quit. -if the computer launch a long process, the script will be paused during this. By the same way, a script can run in background and generate a file your external program can scan and use. Hope I understood your question... Best regards
|
|
offline |
Myriad Team
|
|
|
StevenW
Board Newbie
Posts: 27
|
|
Re: script usage scenarios
« Reply #7 on: Jan 30th, 2003, 8:50am » |
Quote | Modify
|
Sounds like most of what I was wishing for you have already considered.. (!!) 1) With respect to the note placement. My concern is based upon other discussions where there has been talk about making a MusicXML export/import translator using a script. After a quick look-through of the MusicXML documentation, note and symbol placement is an element of the format. Since adding a note/symbol display location interface may effect the currently defeined script API, perhaps it would be of value to look at what might be effected now - just to get the API correct, even if placement is not implemented yet. 2) One other thing I did not see - the ability to assign a script to a tool on a palette. Expanding the Style palette to include custom tools tied to scripts would be nice
|
|
offline |
|
|
|
StevenW
Board Newbie
Posts: 27
|
|
Re: script usage scenarios
« Reply #8 on: Jan 30th, 2003, 9:06am » |
Quote | Modify
|
Also, I am thinking that there would be value in allowing "overloading" of stanadrd HA functions with scripts. I can imaging people writing functions like "my stacatto" or "my forte" or "my tie" etc. and wanting to overload the menus, palette functions and key shortcuts.
|
|
offline |
|
|
|
Pierpaolo BERNARDI
Beta-tester Board Junior Member
Posts: 89
|
|
Re: script usage scenarios
« Reply #9 on: Jan 30th, 2003, 3:57pm » |
Quote | Modify
|
on Jan 30th, 2003, 4:10am, Didier Guillion wrote: Hope I understood your question... Best regards |
| Yes, you did. I think working through files, with HA checking periodically, will be real-time enough for the application I have in mind. With sockets there could be a lot more applications, though. Maybe not in the first release, but please consider adding support for sockets: I bet this will produce some very creative inventions by HA users. Consider also, that a socket connection could invite producers of other kind of software to use HA as display, or to use it in other ways, as a complement to other products. This means other possible people interested in HA. I know of no other product that allow this, HA could be the first in a new field. Cheers
|
|
offline |
|
|
|
dewdman42
Board Full Member
Posts: 106
|
|
Re: script usage scenarios
« Reply #10 on: Feb 4th, 2003, 12:13am » |
Quote | Modify
|
on Jan 30th, 2003, 8:50am, StevenW wrote: 2) One other thing I did not see - the ability to assign a script to a tool on a palette. Expanding the Style palette to include custom tools tied to scripts would be nice |
| I agree. I have asked for this too.
|
|
offline |
|
|
|
|