Manipulating duration of note

• Nov 13, 2022 - 22:08

I want to create a plugin where I scan notes of one music sheet and I want to create the second music sheet where the notes have same pitch but different duration as in the first sheet.

I know how to scan notes in the first sheet and get information I need but IDK how to make a new music sheet and put the new notes there. Can anyone help ?

Alternative could be to scan first track(first line) of the sheet and make second track(second line of the sheet) filled with new notes different duration. How do you move cursor based on track(one line of a sheet) so I dont have to do
nextMeasure ()
nextMeasure ()
nextMeasure ()
nextMeasure ()
this thing

Thank you


Comments

Also, though, in case you weren't aware - there is also Edit / Paste Half Duration (and double), also Paste Special, which changes the duration according to whatever note value is selected on the toolbar.

In reply to by Marc Sabatella

I have a for example 2 notes in music sheet as the attached picture shows. When I change duration of the first note from for example quater note to whole note it works but the second note gets deleted and i cannot change its durations anymore.
How to i keep those notes in score so they dont get deleted when the first one changes ?

Attachment Size
Screen Shot 2022-11-14 at 21.40.43.png 38.65 KB

In reply to by kamilio141414

As Marc just pointed out: you can use Paste Special for this.

  1. Select the notes in a range selection (click first, Shift+click the last).
  2. Edit → Cut
  3. Set duration to whole note (7)
  4. Paste Special (set a shortcut for this in Edit → Preferences → Shortcuts, I chose Ctrl+Shift+V)

In reply to by jeetee

Thank you but Iam trying to make a plugin for my school witch takes selected notes and changes durations of the notes randomly.
it should scan first note, change its duration and put it as a first segment then scan a second note change randomly duration a put it as a second segment. It should do it with all the notes pre-inserted by user.
I can change the first note duration but then all the subsequent notes get deleted and iam left off just with the single note duration change.

How do I fix it please ?

In reply to by kamilio141414

It's not clear what you are trying to change it to or how you'd see a plugin helping. But as mentioned, the existing paste half/double durations commands work great for turning a series of quarter notes into eighths or halves or whatever. Or if it's just a single note you wish to change or a few notes here and there, see the existing Duration Editor plugin.

Do you still have an unanswered question? Please log in first to post your question.