Myriad Forum « A few news about MyrScript »
 Welcome, Guest.
 You can read all messages, but to be able to post,
 please Login or Register.
May 22nd, 2013, 6:53pm 
   Myriad Forum
   MyrScript Language
(Moderator: Forum Administrator)
   A few news about MyrScript
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Print
   Author  Topic: A few news about MyrScript  (Read 1693 times)
Olivier Guillion
Administrator
*****






   
WWW | Email

Gender: male
Posts: 5782
A few news about MyrScript  
« on: Jan 15th, 2003, 6:16pm »
Quote | Modify

This week, we are still working on MyrScript.  
You can download the new version of the MyrScript Programmer Manual in PDF format at http://www.myriad-online.com/myrscriptbeta/myrscriptmanual.pdf
This manual has been enhanced and partially proof-read.
 
- The Interface Composer module is now working well. We extended the number of possible item types in dialog boxes by adding sliders, user items (the script programmer can use them to manage any item type that is not provided by default), and lists.
 
- Instrument object type has been completed, and now a script can build its own digital sound. As a matter of example, we wrote a sample script that builds "analog" drums sounds by mathematical calculation.
 
- Tablature object type is about to be fully implemented.
 
- File function set has been completed. It enables a script to perform any file I/O operation, and also to manage standard pathes (to get, for example, the default folder where user settings are located...)
 
Comments are welcome !
offline

Olivier Guillion
Myriad Software
Grandpa Scorpion
Board Junior Member
**






   
WWW | Email

Gender: male
Posts: 70
Re: A few news about MyrScript  
« Reply #1 on: Jan 15th, 2003, 7:52pm »
Quote | Modify

Hello Olivier,
 
This is really exciting!  
 
Just one question:  Will there be an addSymbol function?  I don't see it yet in the manual.
 
Thanks,
Grandpa
offline
Olivier Guillion
Administrator
*****






   
WWW | Email

Gender: male
Posts: 5782
Re: A few news about MyrScript  
« Reply #2 on: Jan 15th, 2003, 8:20pm »
Quote | Modify

Yes, such a function exists.
See : Staff.InsertRest, Staff.InsertNote and Staff.OverlayNote
A problem in the manual building procedure has removed comments about these methods. Here is the explanation :

Staff.InsertRest(...)
Inserts a rest just after the symbol that precedes the given time position.
If there is already a symbol at the given time position, the new rest is inserted in chord with this symbol.
If the time position lies between two symbols, the rest will be inserted after the whole duration of the previous symbol, and will shift the next symbol to the right of the score.
In fact, InsertRest mimics the way a rest is inserted when you click between two notes on a score, using the rest insert tool.
PARAMETERS: Number : Time position
   Number : Rest duration
RETURN: Symbol : Added note
  or nil if the note could not been added.
EXAMPLE:  
   note1=myStaff.InsertNote(0,DURATION_QUARTER,5*12) -- Insert a quarter C at the beginning of the staff
   if note1~=nil then  
    note2=myStaff.InsertRest(note1.Time+DURATION_EIGHTH,DURATION_EIGHTH)
   end
   -- will result in : Time position 0      : A quarter C
   --   Time position DURATION_QUARTER : An eighth rest

Staff.InsertNote(...)
Inserts a new note just after the symbol that precedes the given time position.
If there is already a symbol at the given time position, the new note is inserted in chord with this symbol
If the time position lies between two symbols, the symbol will be inserted after the whole duration of the previous one, and will shift the next symbol to the right of the score.
In fact, InsertNote mimics the way a symbol is inserted when you click between two notes on a score, using the note insert tool.
PARAMETERS: Number : Time position
   Number : Symbol duration
  Following parameter is optional
   Number : Note pitch  
RETURN: Symbol : Added note
  or nil if the note could not been added.
EXAMPLE:  
   note1=myStaff.InsertNote(0,DURATION_QUARTER,5*12) -- Insert a quarter C at the beginning of the staff
   if note1~=nil then  
    note2=myStaff.InsertNote(note1.Time+DURATION_EIGHTH,DURATION_EIGHTH,5*12 +2)
   end
   -- will result in : Time position 0      : A quarter C
   --   Time position DURATION_QUARTER : An eighth D

Staff.OverlayNote(...)
 
Adds a new note at the required time position, without moving notes around.
As a result, the inserted note will be placed at the exact time position you specified, and some rests might have been added in chord with the previous note in order not to move other notes in the staff.
Special consideration : only notes (not rests) can be overlayed
In the provided example below, a new note will be added  
Parameters : Number : Time position
   Number : Symbol duration
  Following parameter is optional
   Number : Note pitch
   
RETURN: Symbol : Added note
  or nil if the note could not been added.
EXAMPLE:  
   note1=myStaff.InsertNote(0,DURATION_QUARTER,5*12) -- Insert a quarter C at the beginning of the staff
   if note1~=nil then  
    note2=myStaff.OverlayNote(note1.Time+DURATION_EIGHTH,DURATION_EIGHTH,5*1 2+2)
   end
   -- will result in : Time position 0      : A quarter C in chord with an eighth rest
   --   Time position DURATION_EIGHTH  : An eighth D  
 

Regards,
offline

Olivier Guillion
Myriad Software
Sylvain Machefert
Administrator
*****




On the road up to September: thesuntrip.com

   
WWW |

Gender: male
Posts: 5823
Re: A few news about MyrScript  
« Reply #3 on: Jan 16th, 2003, 12:36pm »
Quote | Modify

That's sounds really great !
offline

VS languages demos on my MUSL
Grandpa Scorpion
Board Junior Member
**






   
WWW | Email

Gender: male
Posts: 70
Re: A few news about MyrScript  
« Reply #4 on: Jan 16th, 2003, 5:46pm »
Quote | Modify

Olivier,
 
Thanks for the quick response.
 
I sometimes like work with notes that have strange durations like 5 8ths (2.5 qtrs).  Could the note length constrants include something like that?   Say, are the constants additive?  Could I say something like my note.duration = HALF_NOTE + EIGHTH_NOTE
 
Also, will there be a  function to change the duration of a note?
 
I'd like to avoid tieing notes together if that's possible.
 
Also, are there any functions for manipulating bars.  Say I wanted to change bar #3 to be 5/8 and set the beaming a certain way. How would I do that?
 
Also, is there a way to select a certain bar rather than deriving where the bar would be?
 
Thanks,
Grandpa
offline
Didier Guillion
Administrator
*****






   
WWW | Email

Gender: male
Posts: 8054
Re: A few news about MyrScript  
« Reply #5 on: Jan 16th, 2003, 6:11pm »
Quote | Modify

on Jan 16th, 2003, 5:46pm, grandpascorpion wrote:
Olivier,
 
Thanks for the quick response.
 
I sometimes like work with notes that have strange durations like 5 8ths (2.5 qtrs).  Could the note length constrants include something like that?   Say, are the constants additive?  Could I say something like my note.duration = HALF_NOTE + EIGHTH_NOTE
 
Also, will there be a  function to change the duration of a note?

 
The duration can be fixed at any value. Some constants are predefined. For example a whole note equal 161280 time units.
If you want you can use a note duration of 161281...
 
 
Quote:
Also, are there any functions for manipulating bars.  Say I wanted to change bar #3 to be 5/8 and set the beaming a certain way. How would I do that?

 
Time signature changes are not yet implemented.
 
Quote:
Also, is there a way to select a certain bar rather than deriving where the bar would be?

 
I don't understand your question, could you provide a sample ?
 
Best regards
offline

Myriad Team
Grandpa Scorpion
Board Junior Member
**






   
WWW | Email

Gender: male
Posts: 70
Re: A few news about MyrScript  
« Reply #6 on: Jan 16th, 2003, 6:40pm »
Quote | Modify

Hello Didier,
 
Are the functions to select/delete/insert another bar at some  bar in the score (say bar 20).?
 
Thanks,
Grandpa
 
 
offline
Didier Guillion
Administrator
*****






   
WWW | Email

Gender: male
Posts: 8054
Re: A few news about MyrScript  
« Reply #7 on: Jan 16th, 2003, 6:51pm »
Quote | Modify

on Jan 16th, 2003, 6:40pm, grandpascorpion wrote:
Hello Didier,
 
Are the functions to select/delete/insert another bar at some  bar in the score (say bar 20).?
 
Thanks,
Grandpa
 
 

 
Yes, see page 66. TimeBeginSelection and TimeEndSelection values allow you to select any part of a score.
Then the method CopySelection and PasteSelection (page 71) allow you to copy it in the same score or in another score.
 
Best regards
 
offline

Myriad Team
Grandpa Scorpion
Board Junior Member
**






   
WWW | Email

Gender: male
Posts: 70
Re: A few news about MyrScript  
« Reply #8 on: Jan 16th, 2003, 7:30pm »
Quote | Modify

Hi Didier,
 
It would be great if you had a function in the script that gave you the beginning time of a bar, facilitating say select a bar or bars far into a complex score (w/ time sig. + tempo changes).
 
Thanks,
Fred
offline
Didier Guillion
Administrator
*****






   
WWW | Email

Gender: male
Posts: 8054
Re: A few news about MyrScript  
« Reply #9 on: Jan 17th, 2003, 4:29am »
Quote | Modify

Hi,
 
See Score.TimeToBar(...) and Score.BarToTime(...) (page 68 ) which do the job, I think.
 
Best regards
« Last Edit: Jan 17th, 2003, 10:04am by Olivier Guillion » offline

Myriad Team
Grandpa Scorpion
Board Junior Member
**






   
WWW | Email

Gender: male
Posts: 70
Re: A few news about MyrScript  
« Reply #10 on: Jan 17th, 2003, 2:07pm »
Quote | Modify

Didier,
 
Great.
 
Thanks,
Grandpa
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
Last update:  (c) Myriad 2013