Skip to main content

Topic: How to separate percussion into individual staffs? (Read 616 times) previous topic - next topic

How to separate percussion into individual staffs?
Hey!  I was hoping that somebody maybe knew how to automatically separate every instrument used on a percussion stuff into individual staffs.  I have a performance coming up in a couple months, and the percussion section has been a pain, and my engraver has asked me to do this, but my wrists hurt too much to do this all manually.  I think Musescore used to do this, but it doesn't now, for whatever reason.  Does anyone know of an instant/automatic way to do this?  Maybe a website I can upload my midis to or something?

You've all been really helpful to me in the past, so thanks again in advance!

Re: How to separate percussion into individual staffs?
Reply #1
If it's in Noteworthy, maybe the "Parts" user tool will help?
I plays 'Bones, crumpets, coronets, floosgals 'n youfonymums - gonna lern tubies next

Re: How to separate percussion into individual staffs?
Reply #2
If it's in Noteworthy, maybe the "Parts" user tool will help?

Nah, parts won't work for this.  It would ultimately be slower.  :/

Re: How to separate percussion into individual staffs?
Reply #3
Could you post the score, or an initial part of it, so that we can see what it looks like?

H.M.

Re: How to separate percussion into individual staffs?
Reply #4
Sure!  All for of these staffs are percussion tracks.

https://imgur.com/a/vai4lMB

I want it so that there's a different staff for each "note".  So, that would end up being one for snares, one for hihats, one for tambourines, one for triangles, etc.

Re: How to separate percussion into individual staffs?
Reply #5
One (I) could do this manually in half an hour or so, with a text editor, as follows:

a) Create all the staves; and copy the notes into them.
b) Save as .nwctxt, and then, for each staff:
b.1) With a regular expression editor, replace all the notes that are to remain in the staff with some marker (essentially, replace pattern |Note|...|Pos=N|... with e.g. |XNote|...|Pos=N|..., where N is the position of the note that should survive in this staff).
b.2) Replace all the remaining |Note| with |Rest|.
b.3) Replace all the |XNote| with |Note|.

It worked in a small example I tried. I did not find a tool which could do this programmatically - "Global Modification", it appears, cannot do "type replacements", but maybe I overlooked one.

H.M.

Re: How to separate percussion into individual staffs?
Reply #6
I found myself some cases in which such a tool would have saved me a lot of time.

The top could be if such a tool could also keep in the same staff the "notes" connected to the same instrument.
For example: Mute Triangle - Open Triangle; Closed Hi Hat - Pedal Hi-Hat - Open Hi-Hat...

Top of the tops: option to keep together the similar instruments.
For example: High Timbale - Low Timbale; Hi Bongo - Low Bongo...

Who knows? Maybe a day or the other I'll write it...

Re: How to separate percussion into individual staffs?
Reply #7
You might try this:
  • With the tool: Pitch Mod, move some instruments so that none are within 2 semitones of another
  • Add playing style: Tenuto to the begining of each staff
  • Set each staff to MIDI channel 10
  • Export to MIDI
  • Import the file you just saved specifying a Track Size of 2 semitones
  • Shift the instrument notes moved in step 1 to their desired place
Registered user since 1996

Re: How to separate percussion into individual staffs?
Reply #8
All of these suggestions are decent, but ultimately too time consuming.  I have a total of 30 minutes worth of music to get through though, which is why I'm trying not to do this all by hand.

Re: How to separate percussion into individual staffs?
Reply #9
You might try this:
  • With the tool: Pitch Mod, move some instruments so that none are within 2 semitones of another
  • Add playing style: Tenuto to the begining of each staff
  • Set each staff to MIDI channel 10
  • Export to MIDI
  • Import the file you just saved specifying a Track Size of 2 semitones
  • Shift the instrument notes moved in step 1 to their desired place

Well, unfortunately, I have over 30 minutes worth of music to get through + carpel tunnel syndrome, which is why I'm trying not to do this all by hand.  I was hoping that maybe there was a way to automate the process a bit more, like some tool that would automatically split each "note" into a different staff.  So, for instance, Staff 1 has just the high As (open triangle), Staff 2 has just the low As (cymbal crash), etc, and rests are automatically put into all the blank/leftover spaces

Re: How to separate percussion into individual staffs?
Reply #10
Sooo, suppose you copied the staff to several different staves, one for each instrument, then if you had a tool that could replace a note of any pitch EXCEPT the one specified with a rest that would help?
E.G. on the staff that needs only the notes in POS -4, you have notes in, say, POS 1 2 5 -4 and -6 in a bar and as you only want the notes in POS -4, a tool you could run with a parameter of -4 that would then replace every note except the ones at -4 with a rest of the same duration as the note.

This mightn't be so hard to write.

Of course, you might find yourself with a lot of short rests, but I seem to recall someone writing a tool many years ago that could aggregate rests.
I plays 'Bones, crumpets, coronets, floosgals 'n youfonymums - gonna lern tubies next

Re: How to separate percussion into individual staffs?
Reply #11
Okay, this seems like the best solution to me.  :)  Thanks!  Where is that tool that aggregates rests?

Re: How to separate percussion into individual staffs?
Reply #12
Okay, this seems like the best solution to me.  :)  Thanks!  Where is that tool that aggregates rests?
I'm sorry, I'm not sure - it's just a vague memory from ages ago and it may have been a request from someone rather than an actually created tool.
Perhaps one of the others here have a better recollection.
I plays 'Bones, crumpets, coronets, floosgals 'n youfonymums - gonna lern tubies next

Re: How to separate percussion into individual staffs?
Reply #13
Here is an attempt at the user tool that removes certain noteheads (it took me much longer to write than I hoped - well, I've forgotten almost all of Lua). This does not (yet) do the compaction of rests Lawrie has mentioned; and it may be arbitrarily buggy ...

Usage: You mark a range of notes/chords; the first one indicates which noteheads should survive (typically, you would add an auxiliary grace note for this). Running the tool removes all other heads. See attached gifs for a demo.

H.M.
  • Last Edit: 2019-08-15 11:54 am by hmmueller

  • Bart
  • NWC2 User
Re: How to separate percussion into individual staffs?
Reply #14
User Tool "SplitStaff"

I have been working too on a user tool "SplitStaff".
And I also had more difficulties then initially expected (and it is still not always working as desired).
But in certain/most circumstances it works well, so I nevertheless decided to publish it already in the current (sometimes failing) state.

How to install
Just go to the configuration screen for usertools (Tools\User Tool) and click on the "new" button where the tool can be added.
I added my configuration in SplitStaff.jpg.

How to use
Click in a staff, run the tool, and every item will be copied in added staves, but only if the note/chord is/contains the target "midi-note".  Chords with several different midi-notes will show multiple times.
It is possible to run the tool several times for different staves. The label of the "mid-staves" will be the same, but the staff name is different.
To undo, just delete the generated staves which were added at the end of the score.

And yes, it is possible to have even more than one hundred staves in one NoteWorthyComposer score !!!

CAUTION:
The tool seems to run flawlessly on staves with not too many items. But from a certain number of items (for instance on the whole percussion staff of "stairway to heaven"), the tool doesn't give the desired output anymore on my computer but just shows a window with nothing more then "ERROR".  (see SplitStaff_error.jpg)
I think it must be related with the fact that I allocate too much memory, since after deleting some measures, it works as expected. But if someone recognizes this behavior and knows a work around, I would be happy to learn how to avoid this.

For relatively small scores however, the tool should be useful.

Bart

  • Last Edit: 2019-08-15 06:35 pm by Bart

Re: How to separate percussion into individual staffs?
Reply #15

The tool seems to run flawlessly on staves with not too many items. But from a certain number of items (for instance on the whole percussion staff of "stairway to heaven"), the tool doesn't give the desired output anymore on my computer but just shows a window with nothing more then "ERROR".  (see SplitStaff_error.jpg)

If a window with 'ERROR' is shown, click the radiobutton 'STDERR' to see the error(s).
Always look on the bright side of life!

  • Bart
  • NWC2 User
Re: How to separate percussion into individual staffs?
Reply #16
Thank you, Opagust.

I just checked it, but that is empty, too.
Even STDIN is empty :(

My script had a lot of inefficient code  :-[  and I am now working on another version with a different design.
I will post it soon.

Bart

Re: How to separate percussion into individual staffs?
Reply #17
Bart:
You might try checking: 'Long Task Handling' on your user tool setup.
Registered user since 1996

  • Bart
  • NWC2 User
Re: How to separate percussion into individual staffs?
Reply #18
Thank you, Rick.

Bart:
You might try checking: 'Long Task Handling' on your user tool setup.

Good suggestion!  8)

After accepting "several" times ( >:( ) the warning about a long running script, STAIRWAY_TO_HEAVEN transforms into the attached file.
I never used this option before (and didn't notice that it exists).

Nevertheless, a user tool shouldn't work so long to achieve a decent result, so I will continue to elaborate my redesigned script.

Bart.


  • Bart
  • NWC2 User
Re: How to separate percussion into individual staffs?
Reply #19
The optimized (and corrected) version of SplitStaff.lua is now available.
It now also works for very crowded staves without the 'Long Task Handling' option.

The built-in Module nwcPlayContext gave me hot water instead of the warm water that I was trying to invent.

Bart

CAUTION
Wrong chord handling detected in this version. Script is deleted.
New version can be found in Reply #21.
  • Last Edit: 2019-08-18 03:23 am by Bart

Re: How to separate percussion into individual staffs?
Reply #20
What to say? Wow!
Thank you very much, Bart.

May I add a little detail? (See attachement)

As above.
Script is deleted. New version can be found in Reply #21.
  • Last Edit: 2019-08-18 08:34 am by Flurmy

  • Bart
  • NWC2 User
Re: How to separate percussion into individual staffs?
Reply #21
SplitStaff.lua - with corrected chord handling
RestMultiBar was not yet correctly handled in this version.
For the latest version, see file in Reply #23.
  • Last Edit: 2019-08-20 07:28 pm by Bart

Re: How to separate percussion into individual staffs?
Reply #22
Quote
Bart & Flurmy (09-2019)
Hey Bart, don't hurry!
We're still in August and so I'm still on holidays!  :))

You did a very good work indeed!

  • Bart
  • NWC2 User
Re: How to separate percussion into individual staffs?
Reply #23
New version for SplitStaff.lua with correction for RestMultiBar handling.
Thank you for mentioning, Flumy.

Bart


Re: How to separate percussion into individual staffs?
Reply #24
Probably a bit late for RebeccaETripp, but anyway: https://forum.noteworthycomposer.com/?topic=9924.msg71002