HomeProductsDownloadOrderSupportSearch
  
Myriad Forum « [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more »
 Welcome, Guest.
 You can read all messages, but to be able to post,
 please Login or Register.
Mar 29th, 2024, 4:38pm 
   Myriad Forum
   MyrScript Language
(Moderator: Forum Administrator)
   [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more
« Previous topic | Next topic »
Pages: 1  Reply | Notify of replies | Print
   Author  Topic: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  (Read 1150 times)
Sylvain Machefert
Administrator
*****






   
WWW |

Gender: male
Posts: 7065
[ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  
« on: May 16th, 2022, 6:31pm »
Quote | Modify

Ce sujet est en anglais, car déjà assez long comme ça, et adressé aux développeurs de scripts, habitués ou forcés à l'anglais.

 
With my first published script Targets Editor, I install my core libraries and objects.
 
This topic is a quick view on them. Questions, request and bug reports are welcome here.
 
It's named SMCore, SM are my initials.
 


 
Latest version is 2023-11-30.
 
Version history:

  • Full change log is here
  • 2023-11-30: MAJOR release . Better documentation, demo scripts, better error handling...
  • 2022-11-10: Documentation has been moved from the forum to external pages. SMDialog allow you to create sliders and grids. (Grids are still in beta-test and not 100% implemented).
  • 2022-06-16: SMDialog, switch / cases keywords, Map and Collection simultaneous iterators  
  • 2022-05-26: better documentation, parameters check, and removed debugs in Collection:retainsAll
  • 2022-05-16: initial version

 
 


 
1. What is SMCore?
 
It's a collection of .mys files that will be installed into Scripts/Includes directory. Then you can use them freely in every script you need.
 
You don't have to modify them, unless you are crazy developper and want to help me fix a bug.
 
More infos about all files is in the documentation.
 


 
2. How to use SMCore in your scripts?
 
You have to insert a piece of code in your Init function (for floatting window and interface composer) or at the beginning of your script (.mys).
 
The code is here.
 
 
 


 
3. Quick start & documentation
 
Full documentation is available at:
http://sylvain-machefert.myriad-users.com/archive/api/index.html
 
Some code samples for a quick start are here in the home page of the documentation.
 
I may enrich it from times to times.
 
You can have a look to SMJavaCollections-test.mys to see concrete examples.
« Last Edit: Dec 1st, 2023, 10:01am by Sylvain Machefert » offline

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





   


Gender: male
Posts: 10508
Re: [DEV] SMCore objects and libraries  
« Reply #1 on: May 16th, 2022, 7:31pm »
Quote | Modify

Food for thought... No doubt, our brains won't be starving !
offline

Harmony Assistant - Ubuntu + Wine et Windows XP sur machine virtuelle. VS, OMeR, PDF2M
Sylvain Machefert
Administrator
*****






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  
« Reply #2 on: May 27th, 2022, 5:21pm »
Quote | Modify

Hello, new version is published : 2022-05-26
with more security in parameters checks, and Collection/Map documentation fully updated.
 
Enjoy !
« Last Edit: May 29th, 2022, 12:00am by Sylvain Machefert » offline

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






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  
« Reply #3 on: Jun 18th, 2022, 11:42pm »
Quote | Modify

Hi!
 
New version 20220616 is online!
 
What's new?

  • SMDialog - create user interface like Danièl, but easily
  • switch / case keywords
  • Collection and Map iterators accept one argument (not mandatory). This allow to have concurrent (simultaneous) browsing of the same Collection / Map.
    Use the same argument for iterator, hasNext and next calls.

 
More info about SMDialog on this topic

 
« Last Edit: Nov 16th, 2022, 6:33pm by Sylvain Machefert » offline

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






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  
« Reply #4 on: Nov 16th, 2022, 7:48pm »
Quote | Modify

Hi!
 
New version 20221110 is released!
 
Work was focused on SMDialog and rewrite of the documentation.
 

 
Enjoy!
offline

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






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  
« Reply #5 on: Apr 6th, 2023, 4:12am »
Quote | Modify

What's coming in next version?
  • IncludeOnce: Include enhanced for big included files
  • Durations conversions: 256th of quarter to milliseconds, milliseconds to % of a note, etc...
  • GetDynamicsThatApplyToStaff: dynamics may apply to merged staves, group, or whole score. So which ones apply to a specified staff?
  • Collections now accept sorting function for table, but still can't guarantee unicity.

offline

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






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more   sound_picker_ride_bell.png
« Reply #6 on: Apr 15th, 2023, 9:49am »
Quote | Modify

continue teasing
 
  • Grid composant is more functional
  • A little database about instruments: classifications (orchestra, midi, alphabetic...) and their related sound
  • An instrument or sound selector: for 2 scripts I'm planning to write, I need to select an instrument but don't need the sound, the selector then will have only the 2 left lists.

 
The screen capture show the sound selector which is 3 nested lists.
  • The right-most have 2 columns, but it's not yet complete.
  • The "duplicates" drums is the result of comparing all drum sets.
    i.e. the "ride bell" sounds is unique for standard/rock/pop and pop3, but the pop2 set reuse a sound found in another set.
    This may simplify the choice of a sound.
  • work in progress...!

 
As you can imagine, I'm planning to write a script about drums...
But I'm working on another before where I'll need to select only instrument (piano, violin, ..) and don't need the sound.
 
In the future I hope this selector may help share with you some new sounds, a kind of extension of Gold base.
offline


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






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more   spinner-horizontal-left-right-arrows.png
« Reply #7 on: Aug 26th, 2023, 10:17am »
Quote | Modify

I'm working on several scripts so nothing is yet fully finished.
 
Here are new things that will come when I'll do the huge update
  • Spinners: component that act like a menu or a list, but use less space, display 2 arrows for previous/next value, and accept mouse scroll. See image below.
    I had the idea before I saw this kind of buttons in DPDP
  • Music theory (solfege) Chord and Interval objects

 
Interval can calculate the second note. What is second note of C# + diminished fourth ? => F. Second note of C# + major third ==> E#.
This is the core of the algorithm I wrote some years ago in Java for transposition.
 
Chord understands more notations than HA, including Δ (delta) for Maj7, ° for diminished, even weird symbols used by My Chord font (' for half-diminshed, ! for Δ(delta)...).
Chord also understand bass progressions Cm, Cm/Bb, Cm/A...
« Last Edit: Aug 26th, 2023, 10:18am by Sylvain Machefert » offline


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






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  
« Reply #8 on: Dec 1st, 2023, 10:16am »
Quote | Modify

Hi !
 
Here we are! I uploaded my major release of SMCore.
 
It comes with two demo scripts I invite you to download (right click > save as) and try. The .msa files extract to Scripts > Miscellaneous > Dev tools.
They let you play with all arguments and copy the code to paste it in your script.
 
DrawPicture(...)
 
The first demonstrate DrawPicture(...) function from SMGraph.mys.
It's "just" a enhanced version of Graph.DrawPicture(...) with simpler arguments. It can do alignments and scaling in a rectangle, or around a line or dot. More flexible and no more headache!
 
SMGraphDrawPicture.msa
 
 
Grid
 
Grid is an advanced componant which display like Excel spreadsheet.
It internaly use Map and Collection.
It's navigable using keyboard.
It can replace List item if you need several columns, hidden datas, or want to customize display (picture, text color).
 
SMDialogGrid.msa.
 
 
Both scripts require latest version of SMCore. Running them for the first time will download some files in Myriad Documents/Settings/Scripts/Includes, and perform tests.
Next run won't.
 
If you experience problem during the tests, please report it here.
offline

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






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  
« Reply #9 on: Dec 3rd, 2023, 8:23pm »
Quote | Modify

Si quelqu'un a essayé l'un des deux scripts et as eu une erreur dans le log, il suffit de supprimer le fichier
Myriad Documents/Settings/Scripts/Includes/SMCore-version.txt et relancer le script. Il y avait une erreur de fichier à télécharger.
 
If you tried one of the two scripts, you may have seen an error in the log, just remove Myriad Documents/Settings/Scripts/Includes/SMCore-version.txt file and run it again, there was a mistake in the download list of files.
offline

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






   
WWW |

Gender: male
Posts: 7065
Re: [ANN] for devs: SMCore objects and libraries - Collection, Map, strings & more  
« Reply #10 on: Dec 18th, 2023, 9:28am »
Quote | Modify

Coming very soon:
  • Fixed bug if sound base is not Gold 2
  • Improvement of structure of instruments & sounds database
offline

HA+HQ+VS+PdfToM, Reaper+Audiveris+Transcribe, Win10+Focusrite Scarlet 4i4+Nord Electro 3
Linktree: VS languages, my scripts, my bands, my performances...
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