Skip to main content
Topic: New User Tools (Read 20561 times) previous topic - next topic

New User Tools

Is there some instruction that goes with these new user tools? I can't make head nor tail out of what they are or what they can do.  I have downloaded the starter kit and can access the tools - options - user tool command, but that's where it ends for me. Any suggestions?

Re: New User Tools

Reply #1
The user tool mechanism provides a way for custom scripts/programs/utilities to be added to NWC2. These scripts  can analyze and/or modify selected notes in a NWC2 staff, and either replace the selection or give a text report/error message back to the user.

If you are a programmer, you are expected to be able to figure out the format of NWC2 clips given the help and examples provided in the starter kit.

If you are not a programmer, you can still use the tools from the starter kit. They can be quite useful on their own. You can also add any tools that other users care to share (or sell, for that matter). The installation instructions for other tools should accompany the tool/script.

Re: New User Tools

Reply #2
You can find some good examples of the new user tool capabilities here, thanks to clever people :)

Re: New User Tools

Reply #3
I do wish that I were that clever but alas, I'm only a songwriter and must leave the programming to the programmers.  It would be nice if these capabilities could be incorporated into the program without my help, (which would undoubtedly bring on some catastrophic incurable problem causing me immesurable stress). Exactly why I don't fix my own car! Thanks none-the-less.

Re: New User Tools

Reply #4
You will notice that Andrew Purdham is largely responsible for practical user tools, at this date. Three cheers for Andrew!

Re: New User Tools

Reply #5
Yes, many thanks to Andrew, and to NW people too :)

BTW, the 1.11 version of the starter user kit now contains some of Andrew's scripts.

So no need to be a programmer, just use it :D

Re: New User Tools

Reply #6
I would like to be able to program these scripts, but the only manual I have on PHP has no mention of reading STDIN or writing to STDOUT or STDERR, sophisticated checking for sophisticated objects, or building new objects with boiler plate stuff plus info from variables.  What is the best resource for this?  TIA

Re: New User Tools

Reply #7
And it should work equally well with VBScript (the native scripting language of Windows), but again there's no apparent reference to STDIN etc so I can't get started :-(

Re: New User Tools

Reply #8
STDIN is just the technical term for the standard input, so just use the normal input commands (I forget what they are in PHP - I did look at it once).
Similarly, STDOUT is the standard output.
All this means is that NW passes the data as if you had typed it at the keyboard, and takes whatever you would have sent back to the screen.

Re: New User Tools

Reply #9
PS - you do need to know something about Streams to be able to write to StdErr - I'm sure the PHP manual will mention these. If not, get another manual!

Re: New User Tools

Reply #10
PPS - a quick check (i.e. typing it in the address line) reveals this

Re: New User Tools

Reply #11
I missed all the fun on this conversation! (I've been either walking in the bush, or busy at work...)
Thanks to all those who sang my praises! :-)

Warren said:
"I would like to be able to program these scripts, but the only manual I have on PHP has no mention of reading STDIN or writing to STDOUT or STDERR, sophisticated checking for sophisticated objects, or building new objects with boiler plate stuff plus info from variables. What is the best resource for this? TIA"

Warren, PHP is probably not the best programming language to start with. If you are familiar with programming, though, visit
Robin's suggested site at (more specifically) http://www.php.net/manual/en/
to get started.

Yes, Eric's boiler plate stuff uses "object oriented programming" but only in a simple way. If you are courageous (and a programmer), often the best method is to pick a simple thing that _you want done_, and modify an existing php program to do the task.

I agree that "end users" probably need a better interface with the User Tool mechanism, and whilst Eric's parameter interface is a start, I think a single dialog built up from all parameters would have been more 'friendly'.

I hope that some of what I said is of use to you.

Regards,
Andrew

Re: New User Tools

Reply #12
I forgot to ask DGF...
What in particular did you want to achieve with the tools?
Then maybe I can help you. I'm not sure where to start in reply to your 'crie de coeur'.

Re: New User Tools

Reply #13
Here's an example in VBScript. I use it to hide the dynamics in the left hand of the piano. The following text should be saved as [HideDynamics.vbs] in the [Scripts] subdirectory, and the Command in User Tools is [wscript scripts\HideDynamics.vbs].

It probably only works with Win2000 and later though.

Option Explicit
Dim StdErr, StdIn, StdOut, LineIn, LinePos, Count

'Name:    Hide Dynamics
'Command: wscript scripts\HideDynamics.vbs

Set StdErr = WScript.StdErr
Set StdIn = WScript.StdIn
Set StdOut = WScript.StdOut

While Not StdIn.AtEndOfStream
LineIn = StdIn.ReadLine
If Left(LineIn,9) = "|Dynamic|" then
Count = Count + 1
LinePos = InStr(LineIn, "Visibility")
If LinePos = 0 then
LineIn = LineIn & "|Visibility:Never"
else
Select Case mid(LineIn, LinePos + 11, 1)
Case "A"
LineIn = Replace(LineIn, "Always", "Never")
Case "T"
LineIn = Replace(LineIn, "TopStaff", "Never")
Case "N"
'Already hidden
End Select
End If
End If
StdOut.WriteLine LineIn
Wend
MsgBox Count & " dynamics now hidden"

Re: New User Tools

Reply #14
-
Thanks Peter. I think I'm going to modify/use it for hiding the pedal markings.

Is the VBScript interpreter something built into Windows or should we download it as we do the php.exe?
-

Re: New User Tools

Reply #15
WScript is built into Windows 2000 and later. It's a standalone exe file so it would probably run in earlier versions.

From what I can see it has the capability of running other script languages too, and as you can see from my example it has interactive elements so you can prompt users for input  (InputBox) and give alerts (MsgBox).

Deafening silence from the PHP brigade though ;-)

Re: New User Tools

Reply #16
Hi Peter,
Deafening silence from the PHP brigade though ;-)

They're both interpreted languages, not exactly gonna ignite the world with their performance are they?  :)

Brings to mind a little experiment a buddy and I did in early 1993.  At the time Novell login scripts did not support a clearscreen function and I wanted one for neatness as part of a large project we were doing for our employer at the time, so we decided to write a small executable to do it.

The experiment part was to see just how different in efficiency the compiled languages we had at our disposal were.

We used:
Clipper (yes I know, a totally inappropriate language for the function required),
C (large memory model),
C (standard memory model),
C (small memory model),
C (tiny memory model) and
assembly language.

As near as I can remember, the Clipper version was around 140kb, Large 'C' was ca. 70 kb, standard 'C' was ca. 30kb, small 'C' was ca. 15kb, tiny 'C' was 7kb and the assembler version was.... wait for it.... 42 bytes.

They all did the same thing, cleared the screen of text in an 80 by 25 DOS screen - outside of Windows.

Considering at the time C was supposed to be the most efficent language available aside from assembler (and probably still is) it demonstrated to me just how much overhead there is in most compiled languages.

Now you must remember, I cut my teeth in an age where a big desktop computer had 64kb of ram and ran CP/M from a FDD.  Most mainframes had only 8kb!

The advent of HDD's in a desktop machines was a revelation.  So small, efficient programs are a passion for me.

The modern programming culture that results in these huge, fat, inefficient, slow, bug-ridden pieces of junk that we pay for the privilege of beta-testing for major corporates who used to produce tight, efficient and reliable software really gets my goat.  (Could you tell?  :-)  )

So for me an argument about the relative merits of two interpreted languages is hardly worth the effort.

The only point I would make is that a php routine has a better chance of being portable to other platforms.  And who knows?  Maybe Eric can be persuaded to port NWC to linux.  Then php code for user tools would definitly be preferable.

In the meantime it's all good fun...  and thankyou for the VBScript tool for hiding dynamics.  Works a treat.

Lawrie

Re: New User Tools

Reply #17
I know this is going off-topic, but I would like to add a couple of comments.

First, I was a programmer before I retired.  I mostly worked in assembler and (during the last 10 years or so -- late 1970's to 80's) LISP.

The problem in comparing the sizes of compiled vs. assembled code is the fact that most compilers care a large run-time library along with them, whether the specific program needs it or not.  In fact it is possible (and I apologies if you inspected the code, and I am wrong) that the code actually executed by the larger (compiled) versions was of the same order of magnitude as the assembler version.

I would quibble with your memory estimate for mainframe machines unless you meant 8Mb (although you didn't give a date you do imply that they were coexistent with 64kb desktops).  The first computer I worked on, an IBM 650 with primary memory on drum and not a transistor in sight, had a memory or 2000 ten digit decimal numbers which could hold 10kb characters.  In the mid 1960's I was working on an IBM 7010, which was considered a midsized machine, with 100,000 BCD characters (think of them as 3/4 bytes -- six bits of data each).  By the end of the sixties  or early seventies the IBM 360 & 370 machines routinely had 16Mb, and by the eighties we were worrying about converting code which assumed 24 bit addresses to work with 32 bit addresses.  (We had used the high-order byte to hold the data-type in our LISP pointers, and now that would become part of the address!)

Re: New User Tools

Reply #18
Hi Cyril,
continuing off topic.  The files sizes stated were the resultant executables.  We had deliberately created .com files from all of them.  Whether the code actually executed was the same or not, the file sizes were roughly that stated and the system therefore had to parse the entire file in order to do the job.  Far too much excess baggage.

Much waste and potential for bugs...  One of our concerns was always file size because everything we were doing was across a network.  Often only running at 2Mbps (we had many 2Mbps WAN links that diskless workstations accessed their fileservers over - by diskless, I mean they didn't even have boot disks, we remote booted them over those 2Mbps links!  Actually, come to think of it, I seem to recall they booted quicker over the WAN links than they could by floppy anyway).

We even ran Windows 3.11 over those links, with the swap files on the server! - no local HDDs and 8Mhz 80286 PCs with only 640 kb of ram.  A lucky few had 1Mb and an even smaller few had 16Mhz 80386SX machines with a whopping 2Mb and a couple of them even had a local 20Mb HDD!  This was indeed heady stuff!  :)

Actually, while most sites were 10Mbps Ethernet, some smaller sites only had 1Mbps Arcnet LANs.

One "area" had 4 fileservers centrally located and about 7 or 8 sites running from those servers over WAN links.

As for the 8kb statement.  While I personally worked only with terminals and desktops I had opportunity to tour my employers mainframe installations several times during various training courses.  This was during the early to mid 80's.

They had a variety of FACOM (IBMC) and Honeywell (later Honeywell Bull) mainframes as well as many PDP's of various vintages.

It was during one of the tours that my instructor stated categorically (I remember doubting him and asking for confirmation) that the (Honeywell, I think) mainframe we were looking at had only 8kb of RAM.  Everything was continually paged to and from banks of disk packs - which ranged from 5 to 20 Mb capacity and looked like washing machines.

While I will stand by my memory of what he said, it is possible that he was incorrect in his statement...

I have no idea how old the Honeywell machines were at the time, but they weren't new.  As I recall, the newest machines were the FACOMs.

During my apprenticeship I remember being handed a 100 bit (I think - it was certainly no more than 400 bit but I'm pretty sure the matrix was 10 x 10) ferrite core memory.  It was about 4" square.  I have no idea what it was originally used in but it would have been one of the systems my employer had used.

My how things have changed...  :)

The "good ol' days" don't hold a candle to what we have today, I just wish so much processing power wasn't wasted in what I consider poor code.  I'm sorry, I just appreciate efficiency.

Lawrie.

Re: New User Tools

Reply #19
Not a programmer, but...

8KB memory for a large mainframe? Maybe not a LARGE mainframe, but
I seem to recall that the local PDP8 (or was it PDP11) had 8KB memory
(and tape drive for storage). The new-fangled TRS-80 could be upgraded
to 64KB memory, and one could even get a new-fangled floppy (yes,
they were floppy) drive, if you were willing to wait for backorder.

When programmed in Assembler, the PDP could process data faster than
the punch-card reader could read the cards.

Re: New User Tools

Reply #20
More down memory lane.
I cut my programming teeth on a Munro 1620 calculator with 256 bytes of memory and punched cards which you pushed the dots out by hand. We built life tables with them. When some of the dots began falling out on their own...

The IBM System/3 we worked with in 1971 had 32k bytes of core memory 96 col punched cards and a 29Mb interchangeable hard disk pack unit.

Then there was the TRW Datapoint with 2k, 4k or 8k and two built in tape (casette drives). It had a variety of languages including a baby cobol. It had the precursor of the Z80.

The Raytheon 704? was a beast with 16k. I think it was a 16bit machine. It ran a sophisticated multitaking operating system, had exhangeable hard disks and a tiny internal fixed hard drive for paging - I think the numbers were 10k and 10ms.

The Wang 16T was quite powerul too with 4k being standard.
It had 42k of rom with an ultra powerul basic. On the more powerul models you could even do systems programmming at the disk controller interace level. Those terminals were the basis of many accounting systems. There were some clever program generators developed using them and IBM could neer figure it out how application packages could be implemented so
readily with such toys.  If only we had a hard wired operating system and interpreter these days...

Then there is the Zilog I of 1976, a 64k byte Z80, with plotter, digitiser, modded Friden teletype paper tape unit and shugate 360k floppy, running a super version of HP9800 basic that was sold with the sofware for drawing house frame plans and specs.

Re: New User Tools

Reply #21
Of course, one thing to remember is that most of these early machines (IBM 1401-1410-7010 & 7080 exempted -- I actually never used a non-IBM machine, worked from them from '60 to '58, and before that the University had a 650) were not character or byte based.  Thus the 7090 with 32kb of memory had six six bit BCD characters per word, and the 16.7Mb S/360s had four eight bit bytes per word.

So, unless you give the memory model you are comparing apples (pun intended) and oranges.

Re: New User Tools

Reply #22
"... and the assembler version was.... wait for it.... 42 bytes."

What? You needed 42 bytes just to clear the screen? 6 should be enough: b8 03 00 cd 10 c3

Re: New User Tools

Reply #23
Hi Mike,
its a long time ago, but I recall we were pushing and popping registers to the stack just to be sure that other processes weren't interferred with.  We could have done a 6 byte version but it wouldn't have been completely "safe" for other processes that were likely to be interrupted.

Lawrie

Re: New User Tools

Reply #24
Program? What program? With Ansi loaded, all you need is this. Send <Esc>[2J to the screen, and it's clear.
Unfortunately, Ansi is not loaded in on a standard Xp PC.

Re: New User Tools

Reply #25
Hi Rob,
the original problem we had was clearing the screen from inside an early Novell login script.

As I recall the only way we could have sent an ANSI escape sequence would have been to load a secondary command shell in which case we could have just done a "cls".

We wanted something smaller than command.com and the 42 byte "clear.com" we created was it.  The login processor could execute it without having to load a secondary command shell.

Lawrie

Re: New User Tools

Reply #26
WOW! Almost sorry I asked.  I have no idea what y'all are talking about. Way too technical for the likes of me. Like I said, I write music, not programs.  Anyway Andrew P., If I understand correctly ( and that is a big IF), one of these tools is able to transpose chord names that are typed in above the staff, is that right? Doesn't seem possible to me, however it would be a very helpful tool.  I can usually transpose as I play, but not everyone else in our church worship team has it so easy.  The easier I make it for the other musicians in the group, the more willing they are to learn the songs. NWC's response to my inquiry is really no help to me as I do not understand the programming language. It's like speaking fortran to a windows user. Any help is apprciated. Thanks.

Re: New User Tools

Reply #27
Hi DGF,
we do tend to waffle on don't we...  :)

If you have installed the latest user tools available here then I think you already have Andrews "Text Chord Transposing" tool.

Usage instructions are available by pressing <Alt-F8>, help (in the paramater box), <Enter>

Otherwise you could go here and basic use instructions are shown.

I use this for the very same reason you want it for and it works well.

Lawrie

Re: New User Tools

Reply #28
Oops,
that should be:

Usage instructions are available by pressing <Alt-F8>, select the Transpose Chords tool, help [in the paramater box], <Enter>

Lawrie

Re: New User Tools

Reply #29
Thanks Lawrie, I guess I wasn't paying close enough attention to the instructions. It's not as difficult as it sounded. This tool is really going to come in handy! Thanks again, and thank you Andrew. Nice work!

Re: New User Tools

Reply #30
Hi gang!

Geez. I didn't know there were so many programmers out there.

In short, the reasons I chose PHP (an interpreted language - where you can read what is about to be run) over a compiled language was for transparency. Basically, anyone who knew a little about the language could see what they were getting. And everyone else would have those people to trust as a third party.

DGF, if there are any further questions (Lawrie seems to have sorted you out, thanks Lawrie) please don't hesitate to ask. Whilst I have many e-mail addresses, asking me here is probably better for the wide world (though, as I've just shown, it can be a long time between drinks...)

A

Re: New User Tools

Reply #31
In reply 18 Lawrie stated :
"It was during one of the tours that my instructor stated categorically (I remember doubting him and asking for confirmation) that the (Honeywell, I think) mainframe we were looking at had only 8kb of RAM. Everything was continually paged to and from banks of disk packs - which ranged from 5 to 20 Mb capacity and looked like washing machines."

Well, this brings some nice memories to me: I worked from 1972 till 1974 in a company with a 8kb Honeywell computer, with 4 'washing machines'. It was programmed in GESAL (General Electric Symbolic Assembly Language). There was also a huge lineprinter, and while this was printing a line, the executing program would wait until this was completed, before continuing!

Needless to say all input was on punched cards.

'Those were the days my friend, I though they'd never end!' (Who was this girl the Beatles picked up? I can't remember.)

Re: New User Tools

Reply #32
Now I remember, it was Mary Hopkins.
So we are back into music, wich is what this forum is ment to be.

BTW: How do I get bold text in a forum-message? I saw it's  used for quoting, but I can't see any buttons to accomplish that.

Re: New User Tools

Reply #33
G'day Opagust,
bolding and italics isn't actually hard, the instructions are available from the Hints link in the reply window.

You can find out how to link and all sorts of things there...

Lawrie
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.

Re: New User Tools

Reply #34
Mary Hopkins and Cass Elliott had the most amazingly beautiful clear voices, didn't they?

I rediscovered Fool on the Hill as recorded by Sergio Mendes and Brasil '66 the other day.  The girl singers in that group also had lovely, clear voices.  More about the group here http://www.brasil66.com/.  I heard them in live performance in Vancouver in the 1960s - I think they shared a billing with Henry Mancini, but I could be misremembering that.

Re: New User Tools

Reply #35
Ah...'Those were the days my friend'... but today I have a new problem.  I tried to download the new user tool 'Tripletise' but can't seem to get it to work.  I am not sure how to properly change the suffix to a .php extension or I am doing something else wrong. Thx.

 

Re: New User Tools

Reply #36
HI DGF,
I'm guessing here, but you may have to go into folder options in
windows and tell windows to show extensions for known files - I
can't give you the exact click by click at the moment, my windows
box is down with a case of "motherboardus cactusus" - should have
the new one today, and I'm playing with my linux box in the
meantime.

Anyhow, once you can see the full filename - including the extension
- you should be able to rename the file successfully.

Lawrie
I plays 'Bones, crumpets, coronets, floosgals, youfonymums 'n tubies.