Skip to main content
Topic: Change Clef (Read 48699 times) previous topic - next topic

Change Clef

My second effort at a User Tool.

While it is easy enough to change the Clef symbol, the notes stay in the same position on the stave and hence become different notes. This tool changes the clef and adjust all the notes and chords so that they sound the same.

Code: [Select · Download]
<?php
/*******************************************************************************
kbsc_Clef_Change.php Version 1.00

This script changes the Clef and adjusts the positions of the notes on the stave to keep the same note values

Copyright © 2009 by K.B.S. Creer.
All Rights Reserved

HISTORY:
================================================================================
[2009-01-19] Version 1.00: Initial release
*******************************************************************************/
require_once("lib/nwc2clips.inc");

function help_msg_and_exit()
{
echo "Called as:
php kbsc_Clef_Change.php <clef>=|help|Treble|Bass|Alto|Tenor|Percussion| <octave>=|None|Octave Up|Octave Down|

Notes are defined in Noteworthy by their position on the stave.
If the Clef is changed, the notes remain in the same position and hence represent different note values.
This User Tool changes the Clef and adjusts the positions of the notes to keep the same note values.

The first clef symbol in the selection (or the whole tune if no selection is made) is changed and all subsequent
notes are adjusted up to the next clef symbol or the end of the tune, whichver comes first." ;
exit(NWC2RC_REPORT) ;
}

$noteTypes = array ("Note", "Chord", "RestChord");
$clefShift = array ("Treble" => -6, "Alto" => 0, "Tenor" => 2, "Bass" => 6, "Percussion" => 6);
$octaveShift = array ("None" => 0 , "Octave Up" => -7 , "Octave Down" => 7);

$clip = new NWC2Clip('php://stdin');

$arg = array('clef' => 'Treble','octave' => 'None');
foreach ($argv as $k => $v) {
if (!$k) continue;

if (preg_match('/^\/([a-z]+)\=(.*)$/',$v,$m)) {
$argname = $m[1];
$argvalue = $m[2];
$arg[strtolower($argname)] = $argvalue;
}
}
if ($arg["clef"] == "help") help_msg_and_exit() ;

echo $clip->GetClipHeader()."\n";
//
$firstClefFound=FALSE;
$secondClefFound=FALSE;
foreach ($clip->Items as $item) {
$o = new NWC2ClipItem($item);
$oType = $o->GetObjType();

if ($secondClefFound) {
echo $item;
continue;
}
if ($oType=="Clef") {
if ($firstClefFound) {
echo $item;
$secondClefFound=TRUE;
} else {
$startPos = $clefShift[$o->Opts['Type']];
$endPos = $clefShift[$arg['clef']];
if (isset($o->Opts['OctaveShift'])) {
$startOctave = $octaveShift[$o->Opts['OctaveShift']];
} else {
$startOctave = 0;
}
$endOctave = $octaveShift[$arg['octave']];
$shiftPos = $endPos - $startPos + $endOctave - $startOctave;
$o->Opts['Type'] = $arg['clef'];
$o->Opts['OctaveShift'] = $arg['octave'];
echo $o->ReconstructClipText()."\n";
$firstClefFound=TRUE;
}
} else {
if ($firstClefFound) {
if (in_array($oType, $noteTypes)) {
if ($oType=="Note") {
$notepitchObj = new NWC2NotePitchPos($o->Opts["Pos"]);
$notepitchObj->Position += $shiftPos;
$o->Opts["Pos"] = $notepitchObj->ReconstructClipText();
echo $o->ReconstructClipText()."\n";
} else {
if (isset($o->Opts["Pos"])) {
$c=count($o->Opts["Pos"]);
for ($i = 0; $i < $c; $i++) {
$notepitchObj = new NWC2NotePitchPos($o->Opts["Pos"][$i]);
$notepitchObj->Position += $shiftPos;
$o->Opts["Pos"][$i] = $notepitchObj->ReconstructClipText();
}
}
if (isset($o->Opts["Pos2"])) {
$c=count($o->Opts["Pos2"]);
for ($i = 0; $i < $c; $i++) {
$notepitchObj = new NWC2NotePitchPos($o->Opts["Pos2"][$i]);
$notepitchObj->Position += $shiftPos;
$o->Opts["Pos2"][$i] = $notepitchObj->ReconstructClipText();
}
}
echo $o->ReconstructClipText()."\n";
}
} else {
echo $item;
}
} else {
echo $item;
}
}
}

echo NWC2_ENDCLIP."\n";
exit(NWC2RC_SUCCESS);
?>

All feedback welcome.

Bryan

Re: Change Clef

Reply #1
Hello Bryan, and welcome to one of the most exclusive clubs on the Internet. You are now one of a half-dozen to post a User Tool here. You can expect almost no feedback from the several hundred other registered denizens here. Don't despair, if there are enough of us, Noteworthy may decide that User Tool development needn't go the way of the RestChord ...

Your program works as advertised on my Win98SE box. I'll test on XP later.

You seem to repeat nearly the same code for 'Notes', and '[Rest]Chords' (and for 'Pos' and 'Pos2'). It seems odd that the PHP tools return an array of positions for 'Chord' and 'RestChord' but not for 'Note'. But no matter, you can fix this with:
  • if ($oType=="Note") settype($o->Opts["Pos"], "array");

A foreach() can be used to process both 'Pos' and 'Pos2', making the end section look like this:
Code: [Select · Download]
<?php
    if ($firstClefFound) {
      if (isset($o->Opts["Dur"])) {
        if ($oType=="Note") settype($o->Opts["Pos"], "array");
        foreach (array("Pos", "Pos2") as $p) {
          for ($i = 0; $i < count($o->Opts[$p]); $i++) {
            $notepitchObj = new NWC2NotePitchPos($o->Opts[$p][$i]);
            $notepitchObj->Position += $shiftPos;
            $o->Opts[$p][$i] = $notepitchObj->ReconstructClipText();
          }
        }
      }
    }
    echo $o->ReconstructClipText()."\n";
  }
}
echo NWC2_ENDCLIP."\n";
// exit(NWC2RC_REPORT); // debug
exit(NWC2RC_SUCCESS);
?>
It also occurs to me that: if ($firstClefFound) { ...
is not the test, but rather: if($shiftPos) { ...
since if you are changing from 'Bass' to 'Percussion', there is nothing to do.

Ah well, isn't this fun ...
Registered user since 1996

Re: Change Clef

Reply #2
Hi Rick

I was beginning to feel that my work of genius was going to pass unmarked by an ungrateful world. It's interesting that Views on the threads reach the thousands but Replies rarely get out of single figures. Perhaps Noteworthy is so good that it doesn't need any User Tools. I happened to find something that was useful for me but I've no idea if it will be of the slightest interest to anyone else. Are Restchords now deprecated? Any debate is before my time.

The repeated code was, indeed, deeply unsatisfactory. It wasn't the array/not array problem that was worrying me. I've tackled the same problem in my ABCgen tool using an idea knicked from one of Andrew Purdam's scripts along the lines of $a= array($a) but that was on a copy of Opts["Pos"] not the real thing. My concern was about how to have common code updating the item object. Your solution is very neat but I'd be a bit concerned about changing the format of the actual object so that it won't be what the code in ReconstructClipText is expecting. Maybe it copes, but I don't KNOW that it will cope.

Took me a while but I'm with you on $shiftPos. Before you hit the first clef, it will be zero and if you're moving between Bass and Percussion, likewise. As an old COBOL programmer, the idea of testing a data field to be true or false makes me feel a little uncomfortable. My instinct would be to test ($shiftPos==0).  Can't get used to these modern ways.

Now if I can just work out how to read a multi-line input file, I can get started on the ABC to Noteworthy converter.

Bryan

Re: Change Clef

Reply #3
My concern was about how to have common code updating the item object. Your solution is very neat but I'd be a bit concerned about changing the format of the actual object so that it won't be what the code in ReconstructClipText is expecting.
ref: nwc2clips.php
NWC2ClassifyOptTag returns NWC2OPT_LIST or NWC2OPT_RAW for "Pos". ReconstructClipText stores the classification in $c but only uses $c to differentiate NWC2OPT_TEXT and NWC2OPT_ASSOCIATIVE from other types. IOW, this is safe.

You can always cast it back to a string before: echo $o->ReconstructClipText()."\n";  if you are a "belt & suspenders type of guy".
Registered user since 1996

Re: Change Clef

Reply #4
G'day Bryan,
I was beginning to feel that my work of genius was going to pass unmarked by an ungrateful world. It's interesting that Views on the threads reach the thousands but Replies rarely get out of single figures. Perhaps Noteworthy is so good that it doesn't need any User Tools. I happened to find something that was useful for me but I've no idea if it will be of the slightest interest to anyone else.

I hadn't replied till now 'cos I was having a problem making it work - knew it must have been me but couldn't figure out what I was doin' wrong...  Also, been so busy that I couldn't really take the time to nut it out properly...

Anyhow, here's the command line I finally ended up with - prompts for input:
Code: [Select · Download]
php\php.exe scripts\kbsc_Clef_Change.php "/clef=<PROMPT: Select Clef:=|help|Treble|Bass|Alto|Tenor|Percussion|>" "/octave=<PROMPT:Select Octave Shift:=|None|Octave Up|Octave Down|>"

The changes needed from your example in the code were:
php\php.exe scripts\kbsc_Clef_Change.php "/clef=<PROMPT: Select Clef:=|help|Treble|Bass|Alto|Tenor|Percussion|>" "/octave=<PROMPT:Select Octave Shift:=|None|Octave Up|Octave Down|>"

Changes bolded - Prior to these changes, no matter what I tried, I couldn't get it to call properly, even with as simple an unprompted command line as I could think of - brain must be fading...

Then I realised:
Code: [Select · Download]
php\php.exe scripts\kbsc_Clef_Change.php "/clef=Alto" "/octave=None"
would give an Alto shift, though:
Code: [Select · Download]
php\php.exe scripts\kbsc_Clef_Change.php <clef>=Alto <octave>=None
as I interpreted from your example would not.  It kept defaulting to Treble...

After all that, thanks for this tool - I don't see myself needing it a lot, but it will certainly see some use.

Can't comment on the code itself - as Rick can attest, as a code cutter, I suck!
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Change Clef

Reply #5
php\php.exe scripts\kbsc_Clef_Change.php <clef>=Alto <octave>=None
as I interpreted from your example would not.  It kept defaulting to Treble...
You interpret far too literally. Can't be right to have 4 redirections ( < > < > ) on one command line. Maybe in UNIX, but not here.
Registered user since 1996

Re: Change Clef

Reply #6
G'day Rick,
You interpret far too literally. Can't be right to have 4 redirections ( < > < > ) on one command line. Maybe in UNIX, but not here.

Umm, called the way that command line is, they should be parameters for the script, not redirections...  I thought...  Certainly other commands seem to work that way when called in the user tool... E.g.:
php\php.exe scripts\adp_Parts.php <PROMPT:Enter your parts expression:=*>

Correction - actually they're directives to the User Tool facility itself - the result of the operations performed on their contents are what is passed to the user tool.  Sorry if I created any confusion...
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Change Clef

Reply #7
I'm too ignorant of php to apply the modifications (...fine tuning...) Rick suggested being confident I got it right the first time.
I need to accurately study the program and make too many guesses about php to put my hands on it and at the moment I have no time.
I had yet no time to check it either!

Anyone kind enough to update the tool?

Re: Change Clef

Reply #8
Anyone kind enough to update the tool?
The original works just fine.

Now if I can just work out how to read a multi-line input file, I can get started on the ABC to Noteworthy converter.
NoteWorthy give this example of reading a file into a buffer:
Code: [Select · Download]
<?php // code snippet        
if (!file_exists($nwctxtFile)) return false;
  $s = file_get_contents($nwctxtFile);
  if (strlen($s) < 10) return false;
 
  $s = preg_replace(array_keys($FindReplace),array_values($FindReplace),$s,-1,$changes);

  if (!$changes) {
    if (!FORCE_NEW_FILES) {
      unlink($nwctxtFile);
      echo "No Change";
      return false;
      }
    }
  else file_put_contents($nwctxtFile,$s);
?>
Once you get the file contents into a variable, just use preg_split() to turn it into an array of lines. This works faster than reading it line by line.
Registered user since 1996

Re: Change Clef

Reply #9
Quote
It also occurs to me that: if ($firstClefFound) { ...
is not the test, but rather: if($shiftPos) { ...
since if you are changing from 'Bass' to 'Percussion', there is nothing to do.

I took the above as a bug fixing.
Sorry for the misunderstanding, Rick.

Re: Change Clef

Reply #10
Ooops! Sorry Lawrie. It seems my genius rating is slipping. I must have edited an existing help_msg_and_exit knicked from someone else and then knicked a command line to make mine. Yours is spot on. You could have saved yourself some trouble by posting and asking "What the £%$@ are you on about?".  Bear with me, I'm on a learning curve.

Rick.  Thinking about it, you are obviously right. ReconstructClipText should be able to cope with string or array for Pos because it already does depending on whether it comes from a Note or a Chord. I'm fighting ingrained cultural ideas from an older style of programming (not all of which need to be thrown out).

I agree with you that it would make more sense for Pos to be returned as an array of one from Note. The syntax of the clip text is the same - e.g. Pos:-2 for a Note and Pos:-2,0,2 for a Chord. Do you think we can work on Eric?

I'll try and implement your suggestion. I'm a bit confused by the test for [Dur]. Is that intended as a way of identifying Note, Chord and RestChord by a common property? If so, Rest has [Dur] as well and lots of things have [Pos] so you can't use that either. I would prefer to be explicit.

Flurmy. Watch this space. New version along soon although not really functionally any different. I might remember to put a few comments in to make it easier to understand (for me as well when I comme back to it in six months).

Perhaps it's worth me saying why I felt the need for this.  I play in a concertina band. Generally, each of us plays a single melody or harmony line.  The baritone instrument that plays the bottom line has exactly the same fingering as the treble and comes out an octave lower so it is easier for them to play from a treble clef than a bass clef. Sometimes the middle line will fit more comfortably, with fewer leger lines, on a tenor clef. On the other hand, we usually get stuff in standard treble and bass arrangements and it's easier to see like that when writing arrangements on Noteworthy as well so converting between clefs comes in handy. Maybe not much use to a lot of people but that's what User Tools are about.

Bryan

Re: Change Clef

Reply #11
G'day Bryan,
Ooops! Sorry Lawrie. It seems my genius rating is slipping. I must have edited an existing help_msg_and_exit knicked from someone else and then knicked a command line to make mine. Yours is spot on. You could have saved yourself some trouble by posting and asking "What the £%$@ are you on about?".  Bear with me, I'm on a learning curve.

No worries mate.  Good to see another playing in this area - I reckon user tools are a vastly underrated feature and would love to see more.

When you get it finalised it would be worthwhile submitting to the Scriptorium.
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Change Clef

Reply #12
I agree with you that it would make more sense for Pos to be returned as an array of one from Note. The syntax of the clip text is the same - e.g. Pos:-2 for a Note and Pos:-2,0,2 for a Chord.
NWC has a legacy of some 15 years. Things that seem strange now made perfect sense then. Ever since custom noteheads were added, it has been obvious to me that a 'Rest' is better described as a note that is always muted and has a custom notehead. Before RestChords and split duration Chords, it probably made sense to distinguish between notes and chords.
I'm a bit confused by the test for [Dur]. Is that intended as a way of identifying Note, Chord and RestChord by a common property? If so, Rest has [Dur] as well and lots of things have [Pos] so you can't use that either. I would prefer to be explicit.
The [Dur] test passes 'Note', 'Rest', 'Chord' and 'Restchord'. The shift code doesn't affect a 'Rest' since it has no [Pos]. count($o->Opts["Pos"]); is always zero. This doesn't offend me, but you may want to use a longer, more explicit test. Much depends on how you are trading off among speed, short code and readable code.
Registered user since 1996

Re: Change Clef

Reply #13
Here's the new version

Code: [Select · Download]
<?php
/*******************************************************************************
kbsc_Clef_Change.php Version 1.00

This script changes the Clef and adjusts the positions of the notes on the stave to keep the same note values

Copyright © 2009 by K.B.S. Creer.
All Rights Reserved

HISTORY:
================================================================================
[2009-01-21] Version 1.01: Improvements to code as suggested by Rick G and Lawrie Pardy
[2009-01-19] Version 1.00: Initial release
*******************************************************************************/
require_once("lib/nwc2clips.inc");

function help_msg_and_exit()
{
echo 'Called as:
php\php.exe scripts\kbsc_Clef_Change.php "/clef=<PROMPT: Select Clef:=|help|Treble|Bass|Alto|Tenor|Percussion|>" "/octave=<PROMPT:Select Octave Shift:=|None|Octave Up|Octave Down|>"

Notes are defined in Noteworthy by their position on the stave.
If the Clef is changed, the notes remain in the same position and hence represent different note values.
This User Tool changes the Clef and adjusts the positions of the notes to keep the same note values.

The first clef symbol in the selection (or the whole tune if no selection is made) is changed and all subsequent
notes are adjusted up to the next clef symbol or the end of the tune, whichever comes first.' ;
exit(NWC2RC_REPORT) ;
}

$noteTypes = array ("Note", "Chord", "RestChord"); //Items to process
$clefShift = array ("Treble" => -6, "Alto" => 0, "Tenor" => 2, "Bass" => 6, "Percussion" => 6); //Position of middle C
$octaveShift = array ("None" => 0 , "Octave Up" => -7 , "Octave Down" => 7); //Position of octaves

$clip = new NWC2Clip('php://stdin');

$arg = array('clef' => 'Treble','octave' => 'None');
foreach ($argv as $k => $v) {
if (!$k) continue;

if (preg_match('/^\/([a-z]+)\=(.*)$/',$v,$m)) {
$argname = $m[1];
$argvalue = $m[2];
$arg[strtolower($argname)] = $argvalue;
}
}
if ($arg["clef"] == "help") help_msg_and_exit() ;

echo $clip->GetClipHeader()."\n";
//
$firstClefFound=FALSE;
$secondClefFound=FALSE;
$shiftPos = 0;
foreach ($clip->Items as $item) {
$o = new NWC2ClipItem($item);
$oType = $o->GetObjType();

if ($secondClefFound) { //After the second clef write everything back unchanged
echo $item;
continue;
}
if ($oType=="Clef") {
if ($firstClefFound) { //You've found a second clef. Stop adjusting
echo $item;
$secondClefFound=TRUE;
} else { //Calculate the amount to shift notes by
$startPos = $clefShift[$o->Opts['Type']]; //
$endPos = $clefShift[$arg['clef']]; //For change of clef
if (isset($o->Opts['OctaveShift'])) {
$startOctave = $octaveShift[$o->Opts['OctaveShift']]; //
} else { //
$startOctave = 0; //For change of octave
} //
$endOctave = $octaveShift[$arg['octave']]; //
$shiftPos = $endPos - $startPos + $endOctave - $startOctave;
$o->Opts['Type'] = $arg['clef']; //Set new clef symbol
$o->Opts['OctaveShift'] = $arg['octave']; //  and octave shift
echo $o->ReconstructClipText()."\n";
$firstClefFound=TRUE;
}
} else {
if ($shiftPos) { //Only if there is a non zero position shift
if (in_array($oType, $noteTypes)) {
if ($oType=="Note") settype($o->Opts["Pos"], "array"); //Note "Pos" is a string, others are array
foreach (array("Pos", "Pos2") as $p) {
if (isset($o->Opts[$p])) {
for ($i = 0; $i < count($o->Opts[$p]); $i++) {
$notepitchObj = new NWC2NotePitchPos($o->Opts[$p][$i]);
$notepitchObj->Position += $shiftPos;
$o->Opts[$p][$i] = $notepitchObj->ReconstructClipText();
}
}
}
echo $o->ReconstructClipText()."\n";
} else {
echo $item;
}
} else {
echo $item;
}
}
}

echo NWC2_ENDCLIP."\n";
exit(NWC2RC_SUCCESS);
?>

And this is the command line courtesy of Lawrie -

php\php.exe scripts\kbsc_Clef_Change.php "/clef=<PROMPT: Select Clef:=|help|Treble|Bass|Alto|Tenor|Percussion|>" "/octave=<PROMPT:Select Octave Shift:=|None|Octave Up|Octave Down|>"

Bryan

Re: Change Clef

Reply #14
NWC has a legacy of some 15 years. Things that seem strange now made perfect sense then. Ever since custom noteheads were added, it has been obvious to me that a 'Rest' is better described as a note that is always muted and has a custom notehead. Before RestChords and split duration Chords, it probably made sense to distinguish between notes and chords.

I wasn't suggesting radical changes to NWC, just that NWC2ClipItem should return Pos as an array of 1 from Note.

count($o->Opts["Pos"]); seems to get upset if Pos isn't there so I had to put in an isset.

From my background in IT, readability is a high priority. The code may next be amended by someone else 5 years later so it needs to be obvious what it does and why. It's even worse when it's yourself five years later. "Who wrote this rubbish? Oh!"

Bryan

Re: Change Clef

Reply #15
count($o->Opts["Pos"]); seems to get upset if Pos isn't there so I had to put in an isset.
Strange. It didn't for me.
Upon further review, isset is needed.
Registered user since 1996

Re: Change Clef

Reply #16
Just done some more testing and if I take out the if (isset($o->Opts[$p])) { test, I get -

Note: [in C:\Program Files\NoteWorthy Composer 2\scripts\kbsc_Clef_Change.php, at line 86]
--> Undefined index:  Pos

on Restchords and the same with Pos2 on Notes and same duration chords. Split duration chords work.

Dontcha just love inconsistent errors?

Bryan

Re: Change Clef

Reply #17
Thanks Bryan,
Change Clef came around just when I needed it.
Had to change SATB into a 10-voices score, with quite a bit of changing of clefs.

I am a regular user of "User Tools" - wouldn't want be without them!
So: My thanks to you, Lawrie, Andrew and Rick - as well as to Nicolas Hatier for his
"mxml2nwcc.exe" which I use to convert XML files from SHARPEYE2 to NWC2.
Haymo.

 

Re: Change Clef

Reply #18
Hi Bryan,

Your clef change user tool is exactly what I want but I can't get it to work.
I have managed to get the file into the file folder, ensure that its name is ".php" and set up a new user tool.

When I try to use it, however, it stops with a box containing 3 options. One called "STDERR" is selected and I see this:
"Command process failed"

If I select the other two I get these results:

Select "STDOUT" and there is nothing

Select "STDIN" and this appears:
!NoteWorthyComposerClip(2.0,Single)
|Clef|Type:Bass
|Note|Dur:4th|Pos:-4
|Note|Dur:4th|Pos:#-4
|Note|Dur:4th|Pos:-3
|Note|Dur:4th|Pos:b-2
|Note|Dur:4th|Pos:n-2
|Note|Dur:4th|Pos:-1
!NoteWorthyComposerClip-End
 
I am afraid I know nothing about php but I have previously managed to get another user tool working. I am running windows XP.

Any suggestions??

Regards

Terry Noone

Re: Change Clef

Reply #19
When I try to use it, however, it stops with a box containing 3 options. One called "STDERR" is selected and I see this: "Command process failed"
Any suggestions??
If you get: Command process failed, then the User Tool Command line is wrong.
For Statistics (nwsw), it should be: php\php.exe scripts\nwsw_StatisticsReport.php
Registered user since 1996

Re: Change Clef

Reply #20
I just downloaded the tool, and it's another gem for me! I do barbershop arranging, which prints out with two voices in the bass clef and two in the treble clef, shifted down an octave. But to examine my harmonies, it's good to be able to put all 4 voices layered in a common staff. I was doing it before, but painfully. Now it's a snap.

By the way, your SwingIt tempo tool is also invaluable to me. Without it, I couldn't generate playback that actually simulates the real thing. Bravo!

Re: Change Clef

Reply #21
Quote from ridedmkt:
 
Quote
By the way, your SwingIt tempo tool is also invaluable to me. Without it, I couldn't generate playback that actually simulates the real thing. Bravo
Swingit : this name suggests that it would also invaluable to me! But where can I download it. I tried the USER TOOL page, I did a search on the forum, but I can't find it.
Always look on the bright side of life!

Re: Change Clef

Reply #22
Quote from ridedmkt:
 Swingit : this name suggests that it would also invaluable to me! But where can I download it. I tried the USER TOOL page, I did a search on the forum, but I can't find it.
Try here:
https://forum.noteworthycomposer.com/?topic=6726.0
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: Change Clef

Reply #23
Thanks, Lawrie.
I managed to install the tool, but how do I use it? And waht's the meaning of the percentage?
Always look on the bright side of life!

Re: Change Clef

Reply #24
Select a range of measures or an entire staff. I make sure that all the measures I've selected are pre-filled with 8 eighth notes. Also, the front of your selection must include a tempo indicator and a time signature - I always use common time.

The percentage is how much of the beat is allocated to the first eighth note n a pair. 66.7% would be pure triiplet, a very hard swing. 50% would mean no swing at all, just straight eighths. Classic American swing is about 60%.

Re: Change Clef

Reply #25
Thanks!
Works perfectly.
Always look on the bright side of life!

Re: Change Clef

Reply #26
Bloomin' marvellous!!  Took me a bit of time to install it as I'm not well up on scripts, but finally managed it and it works perfectly.  Thank you!!