Skip to main content
Topic: Percussion splitter (Read 4808 times) previous topic - next topic

Percussion splitter

This tool splits a percussion staff, tipically containing all the percussions, in different staves, one for each "instrument", i.e. note.
The staff to be splitted is the one selected in the editor.
The staves are added at the end of the score. To undo, just delete the staves which were added.

There is an optional parameter.
If the program is called with a parameter value of 1, the "notes" of triangle and hi-hat are grouped so as to use only a single staff each.
If the parameter is 2, also the bongos, congas, timbales, agogo, whistle, guiro, wood blocks and cuica are grouped on a staff each.
If the parameter is 3 or more, also toms and cymbals are grouped.
If there's no parameter or the parameter is <= 0 then there will be no grouping.

N.B. When importing from MIDI you often get two staves for the percussions, one with treble clef and the other with percussion (or bass) clef.
There is no harm in repeating the splitting, so you can split one staff and then the other. The only drawback is that possibly, if you're using grouping, you can have two staves of the same group and you have to merge them manually.
To avoid this you can widen the "maximum single track chord size" so as to have all in a single staff.

This is my first attempt at programming in Lua.
I would never have it done without the great help of Bart.
Thank you, Bart.

Re: Percussion splitter

Reply #1
Very useful tool, thanks! 👍 grouping rocks! 😍

I have some suggestion:
  • keep original staff options (ending bar, volume/pan/muted, playback device, MIDI patch instructions, Default dynamic velocity, ...)
  • take into consideration original staff transposition
  • set smaller upper/lower boundaries between generated staves (=6?)

Re: Percussion splitter

Reply #2
Hello yukulele,
thank you for your suggestions. Here below my comments.

keep original staff options (ending bar, volume/pan/muted, playback device, MIDI patch instructions, Default dynamic velocity, ...)
Well, the default dynamic velocities were already maintaned.  :D
The staff ending bar was set to none (hidden) because that's how I always use it, but it's easy to change it once as needed in the original staff before splitting, so now it copies the original in all the added staves.
I forgot to copy the staff volume.  ;D 
I think it makes no sense to copy the original mute status. You can easily mute and unmute the whole group at once with the NWC muting dialog.
Each percussion "instrument" already has its acoustic position. I don't see why to pan the whole lot. You can pan each single instrument via special MIDI commands, but that's another story...  :D
MIDI patch instructions? Those are "per channel" data and all the percussion we are dealing now are on channel 10! Just set them once.
Playback device? Are you kidding?  :P

take into consideration original staff transposition
Gosh! nwcPlayContext does not take care of that!  >:(  Thank you for having pointed it out.

set smaller upper/lower boundaries between generated staves (=6?)
I considered that, then... I forgot it.  :)

I also fixed a bug when there were partial bars, tipically at the beginning of the score, containing only rests.

Version 1.1 attached below.

(attachement removed - 09/05/2019)

Re: Percussion splitter

Reply #3
I,
Thanks for the update!

I think it makes no sense to copy the original mute status [...]
Each percussion "instrument" already has its acoustic position [...]

You agree for pan and mute.

Playback device? Are you kidding?

I'm not kidding, in some case devices are used to workaround 16 channel midi limitation (by using several virtual midi devices). but I admit that I don't use it very often (and probably never for percussion).

I considered that, then... I forgot it.  :) [upper/lower boundaries]
thanks! but you should keep first upper and last lower to original (12) value.

I also fixed a bug when there were partial bars, typically at the beginning of the score, containing only rests.
I think this fix create a regression in case of time signature change, try it with that:
Code: (nwc) [Select · Download]
!NoteWorthyComposer(2.751)
|AddStaff|Name:"perc"|Group:"Standard"
|StaffProperties|Muted:N|Volume:127|StereoPan:64|Device:0|Channel:10
|Clef|Type:Percussion
|TimeSig|Signature:6/4
|Note|Dur:Half|Pos:-8
|Note|Dur:Half|Pos:-8
|Note|Dur:Half|Pos:-8
|Bar
|TimeSig|Signature:4/4
|Note|Dur:Half|Pos:-7
|Note|Dur:Half|Pos:-7
|Bar
|Note|Dur:Half|Pos:-8
|Note|Dur:Half|Pos:-8
|Bar
!NoteWorthyComposer-End

 

Re: Percussion splitter

Reply #4
Quote
I think this fix create a regression in case of time signature change
Thank you for discovering this bug.
I also fixed another couple, so here attached you can find the new version 1.2.