HomeProductsDownloadOrderSupportSearch
  
Myriad Forum « Double WOW »
 Welcome, Guest.
 You can read all messages, but to be able to post,
 please Login or Register.
Apr 24th, 2024, 6:59pm 
   Myriad Forum
   MyrScript Language
(Moderator: Forum Administrator)
   Double WOW
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Print
   Author  Topic: Double WOW  (Read 4444 times)
dewdman42
Board Full Member
***






  Dewdman42   Dewdman42


Posts: 106
Double WOW  
« on: Jan 10th, 2003, 8:47am »
Quote | Modify

I have to agree..  WOW.   This is really going to open up a lot of possibilties for HA in the future.
 
I have some suggestions coming to mind as I read the docs, but I am going to think about it a few days and organize my thoughts...  I'm seriously impressed with the level of detail.  You are basically making nearly every single feature of HA directly accessible from LUA, which I never expected to see that much detail, so I'm very excited about the prospects of what might be done.  Hopefully I respond tomorrow with some suggestions...and if not, then after I return from vacation in a week..
offline
Dave Cho
Beta-tester
Board Full Member
***






   
WWW |

Gender: male
Posts: 152
Re: Double WOW  
« Reply #1 on: Jan 11th, 2003, 6:19pm »
Quote | Modify

Dear all,
 
I think this is a very powerful features! Myriad Team let us happy again! For I am not really know how to write program, but I know that many of user can help Myriad Team to improve Harmony! Yeah!
offline
Fredrik Andersson
Board Full Member
***






143529402 143529402    
WWW | Email

Gender: male
Posts: 159
Re: Double WOW  
« Reply #2 on: Jan 11th, 2003, 9:29pm »
Quote | Modify

This sounds like a really good feature, I have a few questions though,  
how will these scripts be implemented ? - Will there be a menu where all the scripts show up ? or will they appear on a custom palette ?  
 
Is is possible to have a script executing a "playtime", like would it be possible to create a "realtime arpeggio generator" or similar ?  
 
(I read trough the prerelease documentation, but I didn't find any details on these questions, but.. perhaps I missed the answers, as I read trough quite quickly.)
offline
Didier Guillion
Administrator
*****






   
WWW | Email

Gender: male
Posts: 8420
Re: Double WOW  
« Reply #3 on: Jan 12th, 2003, 4:40am »
Quote | Modify

on Jan 11th, 2003, 9:29pm, Fredrik Andersson wrote:
This sounds like a really good feature, I have a few questions though,  
how will these scripts be implemented ? - Will there be a menu where all the scripts show up ? or will they appear on a custom palette ?  

The scripts will appear in a "Scripts" menu (new entry in the menu bar). Scripts can be organised hierarchicaly on the Hard drive and the menu hierarchy refelect this. The manual chapter which describe this in detail is at page 9.
 
Quote:

Is is possible to have a script executing a "playtime", like would it be possible to create a "realtime arpeggio generator" or similar ?  

It depend of the source you want to use. For example, I recently build a script which scan the MIDI In port, get a key from it and send a complete chord on the MIDI out according to the key.
 
But scripts are not really designed to change the way the music is playing in real time, there is already mechanism for this (parameters curves, rules...)
 
Keep In mind that Scripts automate some complex operations you can make by hand. For example, add the note name to all selected notes.
But a Script can't use a feature which is not already in the program...
 
Best regards
 
Best regards
« Last Edit: Jan 12th, 2003, 4:46am by Didier Guillion » offline

Myriad Team
Fredrik Andersson
Board Full Member
***






143529402 143529402    
WWW | Email

Gender: male
Posts: 159
Re: Double WOW  
« Reply #4 on: Jan 12th, 2003, 3:20pm »
Quote | Modify

Alright, sounds good.
 
And yes, that's what I mean, if it's possible to write a script similar to your "choord" creation script.
« Last Edit: Jan 12th, 2003, 3:28pm by Fredrik Andersson » offline
dewdman42
Board Full Member
***






  Dewdman42   Dewdman42


Posts: 106
Re: Double WOW  
« Reply #5 on: Jan 19th, 2003, 10:19am »
Quote | Modify

Well, I went on vacation and meant to think about this, but alas i was having too much fun on vacation..  but here are some things I jotted down about MyrScript and what I WISH it could do....  
 
1 - Ability to create toolbar buttons that call scripts.
 
2 - Ability to create toolbar buttons that toggle on/off to maintain
      script-accessible boolean variables.
 
3 - Global variables or way to store data that can be shared between scripts.  This could potentially be hidden data in the score document or actual memory variables that exist outside of the score, but its important to be able to have a way for a script to set values which do not appear anywhere in the score, but need to be remembered for later processing, even when another script is later called or the same script is called over again.
 
4 - I would REALLY REALLY REALLY like to see the ability to trap certain user events and be able to assign a "scriptlet" to execute when those events occur.  For example, when the user does a PASTE, i would like to be able to have a signal or trap or something that calls an event which enables me to provide script code to intercept the stuff being pasted in order to modify it at that moment or perhaps block it from happening if it breaks a rule i have specified in script code, or perhaps use the event to trigger the auto-insertion of other symbols in other parts of the score (perhaps other notes in chord, etc..).
 
there are other kinds of events as well: symbol insertions, deletions, modifications; note-change-to-rest (and visa versa), mouse-click, key-presses, Rule processing, etc..  it would be key to have these events processed BEFORE the event is completed so that the script can deny the event or change the data inline; and before the screen is redrawn.  
 
Other types of events would be things like HA-detected "conflicts" that are normally handled a certain way by HA.  For example, if someone tries to insert a note at the end of a measure that is already full and the single measure editing feature is turned in.  this raises an exception in HA that results in feedback that the note cannot be inserted.  but if an event were fired off which provided a way to call a a script at this moment, then we could handle the situation however we see fit with script code any number of ways.  there are many other events that I'm sure the Myriad guys can think of which could be intercepted and allow a user script to override or tweak the default behavior in some way.
 
I have a lot of things I would really like to do which would really require this level of interaction.  Of course I can write one massive script that has an event loop and runs in the background, but then i would have to duplicate a lot of the stuff that HA already does and I'm not even sure it would work very well that way because the PDF states that if a background script changes the score at the same time that HA does..it will crash!  that's a seperate issue, but it would be very clean and simple to write little "Scriplets" that handle certain kinds of events that are important to me the user.   This means that the script will need access to the clipboard contents and other data values which are not in the actual score yet but are part of the current pending transaction taking place, as well as the score itself and this little scriptlet would NOT run in the background, rather HA would wait for it to do whatever it needs to do before continuing.
 
Perhaps another simple approach would be simply for a script to be able to tell HA to wait.  So, for example, if I have a massive script running in the background and listening for mouse clicks, I can have a script that decides if a certain mouse click should tell HA to wait while the script tweaks data in the buffer, clipboard or score and then tells HA to continue.  that would be a "hard-way" of intercepting events.  it would be much cleaner to let HA call "scriplets" when they are assigned to events in a way that can be managed by HA...rather than having a massive script contol HA.  In fact, the more that event-rules can be used to define what constitutes an event that needs to be trapped(in a data driven way), the less that script code will be called unneccessarily to handle situations.
 
 
5 - User definable "Rules" and actions where scriptlet code can be used to specify if/then statements for whether or not a "rule" is a match and script code can be used to modify the playback.  basically its a catchall way to provide a way do just about anything the mind can conceive of that the existing Rules engine doesn't already provide for.  Potentially this could be used for doing appegiator types of things.
 
6 - Programmatic access to the album with MyrScript.  Maybe that is already there and I missed it?
 
7 - make absolutely sure that if a script is running in the background it wil not modify the score at the same time as HA is doing it and create crash.  There should be a locking mechanism like a semaphore (sorta) so that HA and a script can both interact with the score document.  Otherwise, you can't allow background scripts to run at the same time as HA.  
 
(continued on next page)
 
« Last Edit: Jan 19th, 2003, 10:39am by dewdman42 » offline
dewdman42
Board Full Member
***






  Dewdman42   Dewdman42


Posts: 106
Re: Double WOW  
« Reply #6 on: Jan 19th, 2003, 10:20am »
Quote | Modify

(continued)
 
8 - one thing I would like to write is a script that can figure out functional analysis and/or figured bass.  this is the roman numeral notation that usually appears below the staves being analayzed.  i would like to ALSo see the same chord symbols that HA already puts above the music, but having the functional analysis below would be very handy and scripts can be written to do this.   However I can't think of any way to do this without having a lyric line on the bottom staff and sometimes this won't work unless the bottom line has a note for every single chord..  suggestions?
 
9 - ability for a script to call another script and return back to the original calling script
 
10 - if scriplets are used to process events and/or rules, have the ability to look ahead or behind in the musical score from the current point, using script code.  Basically, if the calling event has a sort of handle that points to the current point in the score, then the script can look ahead or behind if it needs to in order to make decisions.
 
11 - Ability for a script to tell whether or not any symbol is currently selected and highlighted...or if a range of symbols is selected so that the script can be asked to process just those symbols.
 
is that enough for now?  B-)
 
ps - These are just ideas.  Take it for whatever its worth.  if any of this inspires you...then great.   the main thing i am hoping for is the possibility to create scripts that interact with the user as they are entering music into the score symbol by symbol...
 
-steve
dewdman42
« Last Edit: Jan 19th, 2003, 10:42am by dewdman42 » offline
Sylvain Machefert
Administrator
*****






   
WWW |

Gender: male
Posts: 7103
Re: Double WOW  
« Reply #7 on: Jan 19th, 2003, 2:20pm »
Quote | Modify

I'll be pleased if there is "event", onSelect when start selecting, onDeleteNote which will be called when a note is deleted...
like in JavaScript where we can use event onClick, onChange, onDrag, onMouseOver, onMouseOut....
offline

HA+HQ+VS+PdfToM, Reaper+Audiveris+Transcribe, Win10+Focusrite Scarlet 4i4+Nord Electro 3
Linktree: VS languages, my scripts, my bands, my performances...
Didier Guillion
Administrator
*****






   
WWW | Email

Gender: male
Posts: 8420
Re: Double WOW  
« Reply #8 on: Jan 19th, 2003, 3:12pm »
Quote | Modify

Hi Dewdman42,
 
I 'll try to provide you some answers to your suggestions. Please note however it is my personal "point of vue" on the MyScript project, the Myriad Team can have a different one...
 
1- In the first analysis of the project, scripts was launched by a special palette. Now, scripts are organised in menu because a menu is herarchical and palettes not. We think it will be a lot of scripts and they will not fit in a palette. But we can imagine a palette which will have a script related to each icon.
 
2- If 1 is implemented, 2 will be, because of 3. I am not sure to be clear...
 
3- Scripts can create preferences files to store values. See page 199. In Lua language each script have its own context. A script can 't share global variable with another except when a script launch or Include another script.  
 
4- The scripts launched on events are scheduled for a second step. We even think to add to the scriptable events all the staff events. This will allow a script to manage new staff types. The problem is to determinate if the relation betweeen an event and a script will be defined by the user or by the script itself...
 
 
5- Scheduled as a part of 4 : script launched on events, in this case, the "play" event.
 
6- I am not sure. The album is a personal storage of the user. I don't see what a script can do on the album.
 
7- This kind of mechanism exist but it will never be "absolutely sure". For example if a script got a Score object pointer, close the Score and access to this score,  will certainly crash the program.
 
8- My answer need more deeper analysis of your request because I am not sure to understand your request.
 
9- This a fundation of the Lua language. (see answer to point 3)
 
10- Hmmm... Need deeper analysis too...
 
11-Yes, a script can act on the selection if it want. See page 66.
 
Best regards
« Last Edit: Jan 19th, 2003, 3:23pm by Didier Guillion » offline

Myriad Team
dewdman42
Board Full Member
***






  Dewdman42   Dewdman42


Posts: 106
Re: Double WOW  
« Reply #9 on: Jan 19th, 2003, 7:58pm »
Quote | Modify

Thanks for the detailed response!  Sorry for my tricky english..  Its hard to talk about technical stuff like this without being concise, but when we have a slight language barrier it does make it hard to know for sure if the meaning is clear to everyone..and I'm definitely not an english master.  
 
on Jan 19th, 2003, 3:12pm, Didier Guillion wrote:
Hi Dewdman42,
 
1- In the first analysis of the project, scripts was launched by a special palette. Now, scripts are organised in menu because a menu is herarchical and palettes not. We think it will be a lot of scripts and they will not fit in a palette. But we can imagine a palette which will have a script related to each icon.

 
What I was actually thinking is that maybe all scripts would be on the menu...but that we could have an optional way of putting "a few" toolbar buttons up of only certain scripts we want to do certain kinds of actions.   Think of this like the customize command in MS Outlook where any menu command can be added to or taken off the toolbar.  In this case, maybe we have a special user pallette and then we have the ability to assign which of the menu scripts are going to be on the toolbar.  It would be nice if we could move scripts on/off the toolbar programmatically with MyrScript as well.
 
Quote:

 
2- If 1 is implemented, 2 will be, because of 3. I am not sure to be clear...

 
I'm not sure I understand how the preferences files relate to the toolbar question. ??
 
Quote:

 
3- Scripts can create preferences files to store values. See page 199. In Lua language each script have its own context. A script can 't share global variable with another except when a script launch or Include another script.  
 

 
Right, but different scripts can access the score.  If there was a way to put hidden values into the score document (in memory) then different script instances might be able to access the same data just like it accesses actual visible score data.  It would be an extension of the score object I guess..  Or perhaps you could create another kind of object similar to score that is used just to host variables to share across scripts, but doesn't need to be saved to file or anything like the score object does.  ??
 
 
Quote:

 
4- The scripts launched on events are scheduled for a second step. We even think to add to the scriptable events all the staff events. This will allow a script to manage new staff types. The problem is to determinate if the relation betweeen an event and a script will be defined by the user or by the script itself...
 

 
THAT IS EXCELLENT NEWS!!!!  THANKS!
 
Quote:

 
5- Scheduled as a part of 4 : script launched on events, in this case, the "play" event.
 

 
MORE EXCELLENT NEWS!
 
( continued on next page )
offline
dewdman42
Board Full Member
***






  Dewdman42   Dewdman42


Posts: 106
Re: Double WOW  
« Reply #10 on: Jan 19th, 2003, 8:02pm »
Quote | Modify

(continued)
 
Quote:

6- I am not sure. The album is a personal storage of the user. I don't see what a script can do on the album.
 

 
Well, for one thing the Album can be used as a sort of database.  Scripts can be used to access it, to pull things from it to place in the score.  For example, if I want a script to take a musical phrase I have stored in the album and place it somewhere in the score, transposed according to rules in the script.    
 
What diane is trying to do with multiple files on that other thread is exactly the kind of thing that a script could be used to manage.  But in order to do it, the script will need access to a sharable repository such as an album.  This is also why I wish there was a way to tag entries in the album with identifying keywords or something to label them so that specific entries can be found programmatically.
 
Now that i think about it though, this could easily be accomplished with Lua's ability to open system files and read from them.  So I could actually create my own database file format for saving musical phrases and then create a MyScript interface to open/save those files and present them in a way similar to how Album does now, only with more features.  
 
However,  this will not work unless there is some kind of way to store global data that different script instances can access..
 
Quote:

 
7- This kind of mechanism exist but it will never be "absolutely sure". For example if a script got a Score object pointer, close the Score and access to this score,  will certainly crash the program.
 

 
Ah yes..  Unless you get into tricky smart pointer stuff..that would be hard to manage.  But does Lua actually have "pointers"?  Seems like there ought to be a way to manage that specific problem under the covers so that if someone tries to use a score object that is no longer open it won't happen.  If its too deep inside the Lua implementation..then I understand the problem.  That is actually a different problem then what I was referring to earlier though..which is more about data consistency when two different threads are accessing the same shared resource (in this case we're talking about items in the score).  Understand?  If my english is getting like spagetti, please don't be afraid to pester me until we understand each other.  B-)
 
Quote:

 
8- My answer need more deeper analysis of your request because I am not sure to understand your request.
 

 
Sorry, my bad.  That shouldn't really be on this thread.  I was meaning to say that one thing I definitely want to do with MyrScript and I have seen other requests from other people wishing that HA could already do this is....  I would like to be able to include a functional analysis and/or figured bass line below the system of staves.  This is sort of like the chords above the system of staves except that rather than saying C, Dm, G7, C, it would say (for example), I, ii, V7, I.  It gets a lot more complicated than that..but this functional analysis is very valuable.  There is also the figured bass which indicates the inversions more precisely.  
 
I was hoping to write some MyrScript to do this and create a custom font to do the roman symbols and figured bass, But I think I would have to use a lyric line to do it and there are limitations which would prevent it from happening.  Anyway, that's a seperate discussion, sorry to putting it here.
 
Quote:

 
9- This a fundation of the Lua language. (see answer to point 3)
 

 
GREAT!
 
Quote:

 
10- Hmmm... Need deeper analysis too...
 

 
Did you understand my suggestion there?  By lookahead or behind....I would mean that during a playback event...you could look ahead or behind of the current note being played (and at other notes in the current chord).  
 
Quote:

 
11-Yes, a script can act on the selection if it want. See page 66.
 

 
EXCELLENT!
 
Something else I just thought of...maybe you already thought of this?......  HA has extensive ability to anaylize chords on the fly and to know how to find the other notes that make up a chord.  It would be nice if MyrScript could easily locate the other notes of a chord.  So for example, if MyrScript has located a note, have a command to find the other notes making up the chord at that point(including across multiple staves) and tell us what chord it is.  Maybe that is there already though.
 
Thanks so much for MyrScript.  In any form at all it is going to improve the usefulness of HA a lot.  I only make a lot of suggestions now because its better now than later..
offline
Pages: 1  Reply | Notify of replies | Print

« Previous topic | Next topic »

« Myriad Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB © 2000-2002,
Xnull. All Rights Reserved.

Top of page
Legal information Cookies Last update:  (c) Myriad