Author |
Topic: Add.Staff - Standard drumset ? (Read 1173 times) |
|
express
Board Newbie
WWW |
Posts: 38
|
|
Add.Staff - Standard drumset ?
« on: Jun 30th, 2015, 4:53am » |
Quote | Modify
|
I am trying to add in my script a new staff as Standard Drumset. In the manual it says: -------------------------------------------------------------- Score.AddStaff(...) Description : Create a new empty staff. Parameters : Optional : staff type as defined in MSDefine STAFF_TYPE_DRUM=8 Clef type as defined in CLEF_TYPE_TREBLE=1 CLEF_TYPE_BASS=2 CLEF_TYPE_UT=3 String : the title of the staff Number : the standard id of the instrument. A new instrument with this ID is created and related to the staff. Boolean : true if this staff has to be displayed right now, false otherwise. False is quicker (default) with an example of myStaff=myScore.AddStaff(STAFF_TYPE_STANDARD,CLEF_TYPE_TREBLE,"new staff",0) ------------------------------------------------------------------------ -- No wider reference is made concerning the DRUMS. myStaff=myScore.AddStaff(STAFF_TYPE_DRUM,CLEF_TYPE_TREBLE,"standard drumset",0) will create the staff for drums, but the staff remains with instrument piano... I can only switch it manually to be standard drumset via clicking a "X" in DRUMS in the SELECT INSTRUMENT DIALOG. What I am missing in the "Score.AddStaff" to complete this standard drumset selection automatically? Should 0 be replaced by some instrument number for stadard drumset? What about CLEF_TYPE?
|
« Last Edit: Jul 1st, 2015, 1:30am by express » |
offline |
My music: https://vesavaltonen.com (in English) Mi música: https://vesavaltonen.co (en español) My live music Radio: https://vesavaltonen.com/radio-vesa-valtonen
|
|
|
express
Board Newbie
WWW |
Posts: 38
|
|
Re: Add.Staff - Standard drumset ?
« Reply #1 on: Jun 30th, 2015, 11:43pm » |
Quote | Modify
|
I may have found it by trying different things! Can anyone tell me, if this is correct? Anyway this seams to work somehow... myStaff=myScore.AddStaff(STAFF_TYPE_DRUM,CLEF_TYPE_TREBLE,"Standard Drumset",20035,true) myStaff.CreateDefaultDrumRules() I replaced the instrument number with 20035 Boolean "true" issues the drumstaff instantly. I added "myStaff.CreateDefaultDrumRules()" as well. My only worry now is that all this coding still will not insert an "X" in the DRUMS in the Instrument Dialog. So I think, I may still be missing something...
|
|
offline |
My music: https://vesavaltonen.com (in English) Mi música: https://vesavaltonen.co (en español) My live music Radio: https://vesavaltonen.com/radio-vesa-valtonen
|
|
|
Geo
Board Master
Gender:
Posts: 2488
|
|
Re: Add.Staff - Standard drumset ?
« Reply #2 on: Jul 1st, 2015, 7:21am » |
Quote | Modify
|
Bonjour Je ne sais pas si cela répond à vos questions, j'ai retrouvé ceci dans un script pour indiquer le rythme : -- Ajout de la portée : xylophone 1300 porteePilote=partition.AddStaff(STAFF_TYPE_DRUM,CLEF_TYPE_TREBLE,"Pilote ",1300) ... Pour ajouter des "notes" : -- ajout des temps : high bongo et cowbell r= porteePilote.AddRule(20056) r.Title = "cowbell" r.TitleDisplayMode = 1 r.AngloSaxonPitchCriterion = "E5" r.AppliedShape = 0 r.IsPitchCriterion = 1 r.IsShapeCriterion = 1 r.IsSeparateBuffer = 1 r.PitchCriterion = "Mi5" r.LatinPitchCriterion = "Mi5" r= porteePilote.AddRule(20060) --porteePilote.LastRule.Title = "high bongo" r.Title = "high bongo" r.TitleDisplayMode = 1 r.AngloSaxonPitchCriterion = "E4" etc. Je ne sais pas ce qui est utile ou pas.
|
« Last Edit: Jul 1st, 2015, 7:22am by Geo » |
offline |
|
|
|
sbarrera
Board Newbie
Email
Posts: 29
|
|
Re: Add.Staff - Standard drumset ?
« Reply #3 on: Feb 4th, 2021, 4:14pm » |
Quote | Modify
|
Dear Express: I was looking for a way to add a metronome track in a script to later export the mp3 file. I had reviewed the manual and the forum, and tried everything until I got to this post. Your way to add a drum staff is very clever, and I thank you very much for it. However, I wonder how you figured it out, specially that obscure number: 20035. Very grateful, Sergio
|
|
offline |
|
|
|
|