Myriad Forum « Piano Pedaling »
 Welcome, Guest.
 You can read all messages, but to be able to post,
 please Login or Register.
Nov 14th, 2018, 8:54am 
   Myriad Forum
   MyrScript Language
(Moderator: Forum Administrator)
   Piano Pedaling
« No topic | Next topic »
Pages: 1  Reply | Notify of replies | Print
   Author  Topic: Piano Pedaling  (Read 301 times)
theclarkster
Board Full Member
***





   
Email

Gender: male
Posts: 102
Piano Pedaling  
« on: Aug 18th, 2018, 9:31pm »
Quote | Modify

Hi all!
 
Does anyone want to tackle writing a script that would automatically add pedal marks to a score?  What I'm thinking is that the user would select a staff or staves and start the score playback.  While the score is playing, have the script check to see if the user is holding a key down (i.e. spacebar).  While the key is pressed, then the score would set pedaling to on.  Once released, pedaling is set to off.  I'm not much for programming, so I'm not sure hiw easy something like this would be or if it's even possible.  Just one of those crazy ideas I had last night while I was working on a piano score.
offline
bubu42
Board Master
*****





   


Gender: male
Posts: 9054
Re: Piano Pedaling  
« Reply #1 on: Aug 18th, 2018, 10:35pm »
Quote | Modify

Interesting question...
I wonder whether Myrscript is able to handle the keyboard while a score is playing. Anyway, if it is the case, a script could actually add the pedal marks which are objects like the others.
I'll try to investigate.
offline
theclarkster
Board Full Member
***





   
Email

Gender: male
Posts: 102
Re: Piano Pedaling  
« Reply #2 on: Aug 19th, 2018, 5:05am »
Quote | Modify

Thanks bubu!  I'll be curious to know what your investigations reveal!
offline
bubu42
Board Master
*****





   


Gender: male
Posts: 9054
Re: Piano Pedaling  
« Reply #3 on: Aug 21st, 2018, 11:22am »
Quote | Modify

Good news.  
So far, I've managed to run a very simple script.  
It can play the music, scan the keyboard, react to a key stroke while the music is playing and perform a basic operation (change the note color that's been selected).
Now I have to determine which keys should be used to set the pedal effects (in and out). I think I'll go this way : one key will be used. The first time it will set the "ped" effect and keep the state in memory. Then, on the second key stroke, it will set the "*" effect.
Since all this requires a lot of attention while the music is playing, I'll probably run the thing in a user dialog, so that we can manage other things (like the general tempo, the choice of the staff, etc.)
I keep working on that.
offline
theclarkster
Board Full Member
***





   
Email

Gender: male
Posts: 102
Re: Piano Pedaling  
« Reply #4 on: Aug 23rd, 2018, 11:40am »
Quote | Modify

Thanks for the update and your work on the script!  Sounds like you're making pretty good progress.  Thanks again!
offline
PaulL
Board Senior Member
****




Organist and choir director

   


Gender: male
Posts: 482
Re: Piano Pedaling  
« Reply #5 on: Sep 5th, 2018, 10:04pm »
Quote | Modify

Bubu, if Myrscript can distinguish between key down and key up events. you would only need one key.  Key down would add the "Ped." and key up would add the "*".
 
On the other hand, I suppose a script using two keys could easily be generalizable to adding any effect, dynamic, etc. while playing.
offline

Le silence éternel des espaces infinis m'effraie.
Church musician

HA+VS+PdfToMusic Win 10
bubu42
Board Master
*****





   


Gender: male
Posts: 9054
Re: Piano Pedaling  
« Reply #6 on: Sep 5th, 2018, 10:50pm »
Quote | Modify

on Sep 5th, 2018, 10:04pm, PaulL wrote:
Bubu, if Myrscript can distinguish between key down and key up events. you would only need one key.  Key down would add the "Ped." and key up would add the "*".

That's what I thought first, but I found it easier to use two different keys while building and testing the script. Now, I'm trying to transpose the whole thing into a floating window so that I can use a few other commands. However, since I'm currently working around the house, I have little spare time to complete the script. It's probably a matter of a few days, hopefully. Quote:

On the other hand, I suppose a script using two keys could easily be generalizable to adding any effect, dynamic, etc. while playing.

If the script is run in a floating window, such an option could probably be implemented.
offline
theclarkster
Board Full Member
***





   
Email

Gender: male
Posts: 102
Re: Piano Pedaling  
« Reply #7 on: Oct 19th, 2018, 9:29am »
Quote | Modify

Been awhile since I checked in here, but I wanted to see if there has been any more progress on this?  I'm not in a bit rush.  Take your time.  Just curious on where things are at.  Thanks again!
offline
bubu42
Board Master
*****





   


Gender: male
Posts: 9054
Re: Piano Pedaling   pianopedal01.msa
« Reply #8 on: Oct 20th, 2018, 12:08pm »
Quote | Modify

Ooops... I forgot to post the first version of the script.  
Here is the archive (should place the script in Scripts>Miscellaneous)
I've chosen to handle the whole thing through a dialog window.
You load the score and launch the script. In the window, there's the list of all the staves. Choose one. Then you start the music and click on the On/Off button to place a pedal mark under the note (red by default) that's being played . For speed sake, I do not refresh the score and the marks do not appear instantly. The button automatically toggles between on and off (push/release).
I've also added a few features. You can :
1- choose to erase all the existing pedal marks that are after the play mark
2- choose to apply the pedal effect (audio) to the whole group or only to the staff
3- slow down the original tempo (it'seasier to follow the notes while playing) and retrieve it at the end of the work.
5- manage a vertical and horizontal offset for the piano marks so that they don't clash with the notes.
4- pause the music and restart at the last played note.
A "?" button will sum up the process
Of course, all this can be improved if necessary.
offline
theclarkster
Board Full Member
***





   
Email

Gender: male
Posts: 102
Re: Piano Pedaling  
« Reply #9 on: Oct 23rd, 2018, 6:13am »
Quote | Modify

Thanks bubu!  I'll check it out tomorrow when I have a some free time.  Looking forward to playing around with it!
offline
Pages: 1  Reply | Notify of replies | Print

« No 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 Last update:  (c) Myriad