Number Beats plugin for semi quavers

Use this forum for all hardware and technical related issues (i.e. sound cards, etc.).
Post Reply
Bewdy
Posts: 8
Joined: Tue Jan 27, 2009 11:08 am

Post by Bewdy » Tue Jan 27, 2009 11:16 am

Hi, new to the forum and I have a question about the number beats text plugin.

I want to be able to use it for automatically generating counting info for drumming scores, but sadly it only seems to work for crotchets and quavers.

It would appear that the plug-in is simply referencing a script, does anyone know how to add further functionlity to this script to include, numbering semi quavers and triplets, with the typical 1 e + d 2 e + d counting notation? this would make this script really useful.

Also, it seems that the positioning of the beat numbering text is always a bit offsett with the positining of the notes, any easy way of adjusting the script to correct this, so it doesn't have to be realligned everytime?

Thanks


Bewdy
Posts: 8
Joined: Tue Jan 27, 2009 11:08 am

Post by Bewdy » Thu Jan 29, 2009 1:38 pm

no one any ideas on this? :?

Sebasian
Posts: 1476
Joined: Mon Feb 13, 2006 5:46 pm

Post by Sebasian » Fri Jan 30, 2009 12:04 am

Bewdy wrote: does anyone know how to add further functionlity to this script
You could make changes yourself, if you have any programming experience. Included in the Resources in the Sibelius folder is the documentation for ManuScript ( the Sibelius scripting language), and you can edit any of the plug-ins (the Plug-in Editor automatically makes a separate copy, so you still have the original to fall back on if all goes wrong).

Bewdy
Posts: 8
Joined: Tue Jan 27, 2009 11:08 am

Post by Bewdy » Fri Jan 30, 2009 7:47 am

Thanks for the reply, scripting languages are a little beyond the scope of my technical know how to be honest. Here's to hoping some one else read this and pick up the guantlet!

jayendra
Posts: 43
Joined: Tue Oct 07, 2008 9:01 pm

Post by jayendra » Sun Mar 08, 2009 11:23 am

yes this would be sweet. '1 e + a' at least.
That would be magic for education puposes
(just found the add note names....giggle)



Here is the plugin maybe we can nut out how to get them in there.
______________________________________________

Code: Select all

// Originally by Andrew Davis.
// Improved by J. Larcombe 31-07-01 to take account of time signature changes
// Now uses the algorithm from Tonic Sol-Fa to find the beat in a bar
// (and works with compound as well as simple time)

if (Sibelius.ScoreCount = 0)
{
	Sibelius.MessageBox(_ScoreError);
	return False;
}

score = Sibelius.ActiveScore;
sysstaff = score.SystemStaff;

selection = score.Selection;
if (selection.IsPassage = False)
{
	Sibelius.MessageBox(_SelectError);
	return False;
}

first_bar = selection.FirstBarNumber;
last_bar = selection.LastBarNumber;

top_staff = selection.TopStaff;
bottom_staff = selection.BottomStaff;

staff = score.NthStaff(top_staff);
sysstaff = score.SystemStaff;
this_bar = first_bar;

score.Redraw = False;

Sibelius.CreateProgressDialog(_PluginMenuName, first_bar, last_bar);

while (this_bar < (last_bar +1)) 
{
	continue = Sibelius.UpdateProgressDialog(this_bar, _Processing);
	if (continue = False)
	{
		Sibelius.DestroyProgressDialog();
		return False;
	}

	bar = staff.NthBar(this_bar);
	beat_number =1;

	// Check first for a time signature change by consulting
	// the corresponding bar in the system staff.
	sysbar = sysstaff.NthBar(this_bar);
	sigchange = False;

	if (this_bar = first_bar)
	{
		sigchange = True;
		newsig = sysstaff.CurrentTimeSignature(first_bar);
	} else
	{
		for each obj in sysbar
		{
			if (obj.Type = "TimeSignature") {sigchange = True; newsig = obj;}
		}
	}

	if (sigchange = True)
	{
		// time sig. change - reset variables appropriately
		numerator = newsig.Numerator;
		denominator = newsig.Denominator;
       unit = Whole / denominator;
		barlength = unit * numerator;
		beat_length = unit;
		beatdivider = 2;
		if (denominator = 4 or denominator = 8 or denominator = 16)
		{
			if (numerator = 6)
			{
				// Compound duple time
				beat_length = barlength / 2;
				beatdivider = 3;
			} else
			{
				if (numerator = 9)
				{
					// Compound triple time
					beat_length = barlength / 3;
					beatdivider = 3;
				} else
				{
					if (numerator = 12)
					{
						// Compound quadruple time
						beat_length = barlength / 4;
						beatdivider = 3;
					}
				}
			}
		}
		if (beat_length = 0)
		{
			beat_length = unit;
			beatdivider = 2;
			// just in case, want to avoid division by zero!
		}
		beats_per_bar = barlength / beat_length;
		//trace("numerator = " & numerator);
		//trace("denominator = " & denominator);
		//trace("unit = " & unit);
		//trace("barlength = " & barlength);
		//trace("beat_length = " & beat_length);
		//trace("beats_per_bar = " & beats_per_bar);
		//trace("beatdivider = " & beatdivider);
		//trace("");
	}
  
	while (beat_number < (beats_per_bar +1)) 
	{
		if (beat_length % 2 = 0 or beat_length % 3 = 0)
		{
			// figure out if there is a note on the half-beat after this main beat
			pos =0;
			nexthalfbeat = (beat_number - 1) * beat_length + (beat_length / beatdivider);
			for each NoteRest chord in bar 
			{
				position = chord.Position;
				if (position = nexthalfbeat and chord.NoteCount > 0) 
				{
					bar.AddText(nexthalfbeat,"+",TechniqueTextStyle);
					if (not((nexthalfbeat + (beat_length / beatdivider) % beat_length = 0)))
					{
						nexthalfbeat = nexthalfbeat + (beat_length / beatdivider);
					}
				}
			}
		}
		bar.AddText(((beat_number-1) * beat_length),beat_number,TechniqueTextStyle);
		beat_number = beat_number +1;
	}
	this_bar = this_bar +1;
}


Sibelius.DestroyProgressDialog();

score.Redraw = True;

jayendra
Posts: 43
Joined: Tue Oct 07, 2008 9:01 pm

Post by jayendra » Sun Mar 08, 2009 11:25 am

'nexthalfbeat' - seems like something - gee I wish I was a programer

jayendra
Posts: 43
Joined: Tue Oct 07, 2008 9:01 pm

Post by jayendra » Sun Mar 08, 2009 11:43 am

I'm reading the code and the only bit I think gives insight the last bit
If we could just copy and paste this - but make 'nextquarterbeat' but is that a manuscript command?

Code: Select all

	{
			// figure out if there is a note on the half-beat after this main beat
			pos =0;
			nexthalfbeat = (beat_number - 1) * beat_length + (beat_length / beatdivider);
			for each NoteRest chord in bar 
			{
				position = chord.Position;
				if (position = nexthalfbeat and chord.NoteCount > 0) 
				{
					bar.AddText(nexthalfbeat,"+",TechniqueTextStyle);
					if (not((nexthalfbeat + (beat_length / beatdivider) % beat_length = 0)))
					{
						nexthalfbeat = nexthalfbeat + (beat_length / beatdivider);
					}
				}
			}
		}
		bar.AddText(((beat_number-1) * beat_length),beat_number,TechniqueTextStyle);
		beat_number = beat_number +1;
	}
	this_bar = this_bar +1;
}

jayendra
Posts: 43
Joined: Tue Oct 07, 2008 9:01 pm

Post by jayendra » Sun Mar 08, 2009 11:48 am


jayendra
Posts: 43
Joined: Tue Oct 07, 2008 9:01 pm

Post by jayendra » Sun Mar 08, 2009 11:35 pm

I asked the author of the plugin .

He said that he hasn't done work for sibelius for 7 years and passed our request onto someone at sibelius.

:)

Bewdy
Posts: 8
Joined: Tue Jan 27, 2009 11:08 am

Post by Bewdy » Mon Mar 09, 2009 8:11 am

wow! well looks like some people have been looking at this post in my absence!

Yeah I had a quick look at the script and I also isolated the last section out as being probably indicative of code to further this plug-in.

Just hope someone who knows what they are doing can look into this soon, as I'm having to write all this counting info in at the moment manually. And there's a LOT of it!!

:wink:

if anyone gets anywhere with this please post it back on here. Ta!

jayendra
Posts: 43
Joined: Tue Oct 07, 2008 9:01 pm

Post by jayendra » Tue Mar 10, 2009 7:20 am

I person at sibelius has just sent me this regarding the plugin

Code: Select all

As it happens, a user on our chat page (at www.sibelius.com/helpcenter) was asking about this very issue a couple of weeks ago, and one of the plug-in developers in the user community was looking at changing the plug-in to do this.

I've dropped him an email, and if he happens to have got this done already, I've asked him to send it to you.

Bewdy
Posts: 8
Joined: Tue Jan 27, 2009 11:08 am

Post by Bewdy » Tue Mar 10, 2009 9:39 am

I hope this happens soon, it would be so helpful to my current project.

Anyone know, who at Sibelius is working on it? and when it might be done.

Cheers

Bewdy
Posts: 8
Joined: Tue Jan 27, 2009 11:08 am

Post by Bewdy » Tue Mar 17, 2009 4:35 pm

just thought I'd bump this topic? anyone any update about this plug ins development at all?

Cheers

jayendra
Posts: 43
Joined: Tue Oct 07, 2008 9:01 pm

Post by jayendra » Sun Feb 20, 2011 8:11 pm

another bump

Post Reply