Skip to main content
Topic: Development of Rubato User Tool (Read 3303 times) previous topic - next topic

Development of Rubato User Tool

Good day everybody

Having been a NoteworthyComposer user since 1998, I have frequently been on this Website.
However I have never posted anything before. My use for NoteworthyComposer has been to notate my own compositions, and until now I have not really cared much about the playback quality, as I could "hear" the music despite the drawbacks of midi playback. However I now wish to make some of my music available to a wider audience. I have therefore started looking at plugins such as dynamic variance and Rubato. There was a fair amount of struggling to get to grips with the user tools concept and application and use; however that is all behind me now??!.
Warren's Rubato user tool could be quite useful to me. However it only applies between the first and second tempo indications. In a large score of 200 + bars, it is not very useful if it applies to only the first six bars, as the second tempo indication occurs there.
It would be very useful to me if there is a handle or anchor or something attached to the tool, so that the tool could be applied in various places during the score. For example it could be applied before the first tempo indication, before the 4th tempo indication and before the penultimate tempo indication. Hopefully then Rubato will be applied between the first and second indication, between the fourth and fifth tempo indication and between the penultimate and last tempo indication, but not anywhere else. This would also be useful in that the amount of Rubato from petty theft to grand grand larceny could be varied in the different sections. Also, there are certain sections in some works where one would not like Rubato to be applied, for example in marches or tempo giusto sections.
Everyone is busy with their own concerns, so it would not be surprising to me that a user tool that has not received any attention for nigh on 10 years, will not be revisited now.
Anyhow best wishes to everybody, and happy composing /transcribing.
François de Villiers

Re: Development of Rubato User Tool

Reply #1
The tool doesn't have to have a trailing tempo indication. If the final tempo is missing, all generated tempos will be centered around the first (only) tempo. When a trailing tempo is supplied, the center tempo will increase or decrease as appropriate.

If you need a number of "anchor tempi" in a piece, I'll see what I can do.

Whatever this tool does, the results will be fixed in stone, i.e., if it generates a hidden quarter = 71 bpm, it will always have that value until you change it. Perhaps a rubato object? It would playback differently every time.

I don't have a website any more, but Richard recreated my NWC scripts: nwc-scriptorium.org/wp.
Since 1998

 

Re: Development of Rubato User Tool

Reply #2
Hm. Just so that the problem space is clear, I made a little youtube video of a score I have attached below. It consists of four sections, all with the same notes and the same tempo indications.

  • Section A just plays eighths with tempo 100, then with tempo 200.
  • Section B has the same tempo indications, but now, there is a "accel" some time after the 100; and a "rit." after the 200. And now NWC, just so, actually starts to accelerate at the "accel." and reaches a tempo of 200 at that mark; and slows down again from the "rit." to the 100 mark. That's just simple out-of-the-box NWC behaviour
  • Section C shows that NWC actually does not care whether you write "accel." or "rit." - both mean to it only "slowly modify tempo to reach tempo shown at next tempo indicator" - that's just for fun info.
  • In Section D, I tried the rubato tool on the items marked red; i.e., I selected that range (which includes the leading 100 tempo and the 200 tempo at the end), selected "5" as the parameter for the tool ... and presto, something had happened. You can see the effect in the image I have also added below - I actually do not understand what this result means. I would have guessed, from the comment in the tool, that it would do what NWC does, but with some randomization, i.e., it would select other tempi in that range going up and down a little. "quarter=4" is, however, quite far from anything specified, as you can also hear in the video (which I stopped after 3 eighths ...).

@Francois: I'm not sure what you want to accomplish. It seems to me that you only want to have simple linear tempo changes, i.e., what NWC can do with accel./rit. - is that true, or what did I overlook?

@all: I'm not sure what the Rubato tool is supposed to do, and what it actually does - anyone knows it (before someone delves into the code ...)?

H.M.



Re: Development of Rubato User Tool

Reply #3
@all: I'm not sure what the Rubato tool is supposed to do, and what it actually does - anyone knows it (before someone delves into the code ...)?
I guess the code delver would be me.

The heart of the script is in lines 54-67, the playOne script--it returns a number from a gaussian distribution (bell shaped curve). Mostly the numbers it returns will be near 1; numbers higher or lower than 1 are less likely; and the further from 1 numbers are rare. The script prompts for a percentage with a default of 10. A small percentage creates a thin bell and most generated tempi will be near the base while a large percentage will create a wide bell with generated tempos all over the place.
For reference: Gaussian Distribution

There is a bug in line 119 after looking for !NoteWorthyComposerClip-End
Code: [Select · Download]
	{ EndProc = i - 1; break; } // Added break 2023/11/15
Please replace the existing line 119 with the above if it contains "EndProc = i - 1;".
That bug comes into play if there is only one tempo marking in the part of the staff passed to the script.

This was the file created, look for "|Visibility:Never".
Code: (nwc) [Select · Download]
!NoteWorthyComposerClip(2.751,Single)
|Clef|Type:Treble
|TimeSig|Signature:4/4
|Text|Text:"use 5 in rubato"|Font:StaffItalic|Pos:-12.5
|Tempo|Tempo:120|Pos:9.5
|Tempo|Tempo:115|Pos:8|Visibility:Never
|TempoVariance|Style:Accelerando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:121|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:116|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:106|Pos:8|Visibility:Never
|TempoVariance|Style:Accelerando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:128|Pos:8|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:128|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:116|Pos:8|Visibility:Never
|TempoVariance|Style:Accelerando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:117|Pos:8|Visibility:Never
|TempoVariance|Style:Accelerando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:125|Pos:8|Visibility:Never
|TempoVariance|Style:Accelerando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:126|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Text|Text:"use 50 in rubato"|Font:StaffItalic|Pos:-12.5
|Tempo|Tempo:120|Pos:9.5
|Tempo|Tempo:122|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:93|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:4|Pos:8|Visibility:Never
|TempoVariance|Style:Accelerando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:218|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:124|Pos:8|Visibility:Never
|TempoVariance|Style:Accelerando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:210|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:9|Pos:8|Visibility:Never
|TempoVariance|Style:Accelerando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:188|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Tempo|Tempo:180|Pos:8|Visibility:Never
|TempoVariance|Style:Ritardando|Pos:-7|Visibility:Never
|Rest|Dur:Whole
|Bar
|Rest|Dur:Whole
!NoteWorthyComposerClip-End

I'll try to get this updated as soon as possible and Thanks In Advance to Rick.
Since 1998

Re: Development of Rubato User Tool

Reply #4
Good day

Thank you for your prompt replies. I apologize for the delay on my side. In fact Warren's latest reply has overtaken my reply which I have just composed below;

Thank you Warren for the offer to try and establish a Rubato tool where there will be “anchor tempi” This will be much appreciated.
I do not understand the difference between a Rubato object and a Rubato tool. Perhaps you can explain. Thank you.


H.M. Thank you for your work on the project. Your fourth section slows everything down by four times. This is not how the tool worked on the examples that I used. The tool asks you for a percentage Rubato. It then also asks you whether it has to be a smooth or an abrupt transition. If you choose smooth transition, then every note is played at a slightly different tempo depending on the algorithm which is based on the normal distribution, and the percentage which is specified.

What I would like to do is to have noteworthy songs or compositions play back slightly more normally rather than with the metronomic regularity which is built into the program, (And which in most cases is actually what is required).
Thank you

     

Re: Development of Rubato User Tool

Reply #5
Thank you Warren for the latest reply.
I do not understand the programming, but I look forward to the modified user tool.
     

Re: Development of Rubato User Tool

Reply #6
When I can find the time, I plan to start with code to locate all the tempos in the selected staff to put their locations in a table, then run existing code two at a time. The percentage would have to stay the same for all sections.

Math.Random() returns a number between 0 and 1. In the commented out code, I took the sum of 20 random numbers--that method is easier to understand. A low sum or high sum can happen, but not often. When I was working on it, someone on another forum suggested the live code in there now, I'm sorry I didn't give him credit.

The way I use the tool is to fill the measures with whole rests, run the tool, then put notes in. A version to work only on bar lines might be another improvement. I would try it out on Zorba the Greek or Hall of the Mountain King.
Since 1998

Re: Development of Rubato User Tool

Reply #7
My apologies to everyone. When I started working on this, I found it does not work on anything except the default of quarter note = nnn. I need to go into a deep think and outline how to fix this then improve it.
Since 1998

Re: Development of Rubato User Tool

Reply #8
In spite of my problems with my algebra, coding errors, and trying to reuse old code, I finally got something with which to test.
Once unzipped, you can see the source if you open with a text editor (i.e., Notepad) or open with a browser and select "view source" (it's Cntl/U on Chrome).

To use this, open NWC at the same time as your browser. Select your rubato section and cut it to the clipboard (Cntl/X), paste it into the text area, and click "Submit". Select the textarea contents and copy it back to your NWC file. If you used the Alt/Tab shortcut to get to the webpage, your NWC cursor will be right where you left it.

The checkbox brings up my test data.

If you think you will need this tool, please test it. If there are any problems, I will need to have a copy of your input data as well as your notes on what it did or didn't do or how to improve it.  This version has a "seeded" random number generator so you may replicate previous tests.

I won't ask to put this on Scriptorium in either form until I can check it out further and get some feedback.

Enjoy!
Since 1998