Thursday, November 17, 2011

Bach-Lehman (and Young #1) using electronic tuner, howto

Here's how to use an electronic tuner to tune a harpsichord in Bradley Lehman's Bach temperament, as well as Thomas Young's. They sound so much better than equal temperament (even better than Vallotti)--everyone should try them!

I found Lehman-Bach instructions (taking Vallotti as a starting point) in the section, `Easy way to tune it accurately and mostly electronically' (search for it) of his homepage.

Yet, there is another way. His section, `Electronic device instructions for the Bach' at the bottom
of `Practical temperament instructions by ear' also recommends we, `See the interesting method by David Hitchin', who says his method is useful if one has the `Korg-OT12 or a similar tuner which provides for ET and the Pythagorean, Werkmeister III and Vallotti temperaments.'

Dr. Lehman says the Thomas Young temperament he recommends (Young #1) `is not the more familiar "Young #2"; it is his first and better one...entirely symmetrical, and very simple...Young's #2 [the worse one] is technically [just] a transposition of the entire VALLOTTI temperament upward by a 5th.'

I found these instructions in the `YOUNG #1 1799/1800' section of his `Practical temperament instructions by ear':

1. Tune all of VALLOTTI first.
2. Nick F downward slightly so it's equally tempered between C and Bb.
3. Nick B upward slightly so it's equally tempered between E and F#.

Copyright (c) 2011 Mark D. Blackwell.

Monday, November 14, 2011

Text-label your measures in LilyPond with YAML

Some music (especially some choral music) is somewhat irregular of measure length. Naturally with this kind of music, while entering (and editing, following one's musical sense), often measures will join or split. Then half of the measure numbers are thrown off. This is especially true of early music, and recent music whose source documents were prepared somewhat in a free way.

Often, given multiple voice parts (or instruments), each, for various purposes, necessitates several source files in parallel (if working in LilyPond): such as for adjustments to piano or organ reductions. Many features not yet done (completely and automatically) well by LilyPond necessitate these additional parallel files.

Whenever information is parallel, it requires careful synchronizing of all the measures (and measure lengths). What a bother!

Obviously, if humans are checking and synchronizing something (with difficulty), this is a good opportunity for computers to do the work instead. In that situation, I wrote a computer program allowing measures to be labeled by (text) strings, instead of (only) by measure numbers.

The program fills each measure (completely) with spacer rests (unless told otherwise). This eases synchronization, because you need only include measures with actual content.

The program uses YAML as its data entry format. YAML's noise (the extra characters you enter) is very spare. It seems cleanest for entering LilyPond source (it interferes only minimally) yet allows measures to be labeled easily by text strings.

Available on my GitHub (and written in Ruby), the program is called, 'yaml2lilypond'. Recently, I successfully used it to engrave (typset) a large work--and it helped a lot!

Copyright (c) 2011 Mark D. Blackwell.

Saturday, November 12, 2011

Lean startup

Recently, a project owner I know read with interest the new book, The Lean Startup: How Today's Entrepreneurs Use Continuous Innovation to Create Radically Successful Businesses, by Eric Ries. It just came out September, 2011; his blog is Startup Lessons Learned. Web searching for "lean startup" found:

From `Taking the guesswork out of startup success' (by Anne Fisher):

`“[S]tart...with a very basic, sloppy site, and...continually change it according to what users tell [you] they like and don’t like.” [E]very single week[,] invite customers in, plunk them down in front of computers, watch them use the site, and ask them questions about it. The (often surprising) answers then get built into the product.'

From Jeff Shuman's comment #40 in `Teaching a “Lean Startup” Strategy' (by Carmen Nobel):

`In Peter Drucker's 1985 book Innovation and Entrepreneurship, he noted that “When a new venture does succeed, (more often than not) it is in a market other than the one it was originally intended to serve, with products or services not (quite) those with which it had set out, bought in large part by customers it did not even think of (when started), and used for a host of purposes besides the ones for which the products were first designed.”'

From `Four myths about the Lean Startup' (by Eric Ries):

`Lean not blindly do what customers tell them, nor do they mechanically attempt to optimize numbers. They use...actionable analytics as vehicles for to make their vision successful.'

From `Top 5 myths about the lean startup' (by Eric Ries):

`Lean startups are driven by a compelling vision, and they are rigorous about testing each element of this vision against reality...with every tool available...They use customer development, split-testing, and in-depth analytics as vehicles for learning about how to make their vision successful. Along the way, they pivot away from the elements of the vision that are delusional [emphasis added].'

`Lean...refers to a process of building companies and products based on lean manufacturing principles, but applied to innovation. That process involves rapid hypothesis testing, learning about customers, and a disciplined approach to product development.'

`[A] startup is [any] human institution creating a new product or service under conditions of extreme uncertainty.'

From Brian Mcfarlane's comment:
`getting out from behind you[r] computer and talking to real people will reward you with unresolved problems you may not of thought of to help you get to a product-market fit sooner.'

From `The Promise of the Lean Startup' (by Eric Ries):

`In parallel to [the] work by the “solution team”...there is a new kind of “problem team”...that is asking the bigger questions, such as: Who will our customers be? What problem does our product solve for them? How many of them are there? And how will we reach them?'

`The promise of the lean startup is that instead of building our companies according to myths, we can guide them with facts and the knowledge required to use those facts well. Or put another way, that we won’t waste our time building products or services that nobody wants.'

`The ultimate goal of a lean startup is to identify where its vision intersects with what reality can accommodate...It tries out new ideas with a fraction of customers in order to prioritize using facts, not opinions. Its unit of progress is that of validated learning about its customers. [Thus] the practice of entrepreneurship can be put on solid, rigorous, footing.'

`Instead of seeing process as a synonym for bureaucracy, it sees it as a synonym for discipline. Focusing all of its energy on only those activities that matter, it frees up time and energy for true productivity.'

Other references:
Why Lean Startups are Hard Part 1 – Our Genes Aren’t Lean - Kevin Dewalt
Perfection By Subtraction – The Minimum Feature Set - Steve Blank

Copyright (c) 2011 Mark D. Blackwell.

Wednesday, November 9, 2011

IPv6 aware, Linux iptables cloud hand-firewall for Debian lenny, howto

Recently, I set up a Linux software firewall by hand for a virtual machine instance running Debian lenny.

Reasonable, now or in the future, is concern about IPv6 traffic. 'Is your firewall aware?' speaks of some danger: 'You might think that [using iptables to] disallow incoming connections to your server on port 22[,] except from a single trusted IP[,] is sufficient to stop connections hitting your machine, but if it is accessible over IPv6 you'll soon discover this isn't the case.'

Many VM providers have not so far (completely) enabled IPv6. However, for anyone who has written their own firewall script, it is a good idea to be prepared beforehand for the event.

The latest VM's, running on recent kernels, can use regular, IPv6-capable firewalls, though they are somewhat hard to find. For instance, the Debian package, 'shorewall6' implements an IPv6 firewall, which 'requires kernel 2.6.24 or later'. Per their FAQ, 'Linux kernels before 2.6.20 didn't support connection tracking for IPv6'.

My particular VM provider allows me only kernel 2.6.18. So, for my old kernel, I developed a fairly simple firewall script, with goals to:

* Restrict sole use of my VM to a list of authorized, remote IP's
* Block tunneling of IPv6 through IPv4, inbound and outbound
* Ease establishing the same rules for IPv6 as for IPv4
* Learn more about iptables firewalls, and
* Learn something about IPv6

This modular firewall script allows full and easy control over IP addresses, protocols and ports. It was derived, with additions, from James Turnbull's 'Bastion Host Iptables Script' (see References).

In order to simplify, it leaves out denial of service (DOS) protection, because that seems unlikely in casual VM use. And, it assumes your VM's IP address is IPv4.

It is impossible accidentally to be locked out, because VM providers naturally offer direct console access, independent of services running on the VM.

The script is available free of charge from my GitHub account.

Bastion Host Iptables Script: Appendix A (or chapter 2) of James Turnbull's book, _Hardening Linux_. For download, see


6in4 - Wikipedia
6to4 - Wikipedia
Adding proper IPv6 to my home network - Martin F. Krafft
After installation - Securing Debian manual - Debian
Anything in anything - Wikipedia
Basic iptables - howtos - 5dollarwhitebox
Basic iptables - Debian/RedHat (see comments) - HowToForge
Collection of basic Linux firewall iptables rules - LinuxConfig
Debian firewall - Debian
Druidic firewall - I)ruid
Easy firewall generator for iptables - Scott Morizot
Entries in /proc/sys/net/ipv6/ - Linux IPv6 howto - TLDP
Firewalling with netfilter/iptables - Shane Tzen
Firewalls - Debian
Firewalls resources - Center for Education and Research in Information Assurance and Security (CERIAS)
Firewalls tag - DebianAdministration
Getting IPv6 connectivity under Linux - Juliusz Chroboczek
Guidelines for firewall vendors regarding MIPv6 traffic - Internet Engineering Task Force
Internet firewalls: frequently asked questions- Paul D. Robertson, et al
The Internet is a dirty, dirty mistress - Dustin D. Trammell
Invisible IPv6 traffic poses serious network threat - Carolyn Duffy Marsan - Network World
Ip6tables: IPv6 firewall for Linux - Vivek Gite
Iptables - Wikipedia
Iptables(8) - Linux man page - Linux
Iptables firewall - Thomas Pircher - TTY1
Iptables firewall script & configuration files for Linux 2.4.x-2.6.x - Bob Sully
Iptables/firewall setup for clusters - Richard Benson - Dixcart
Iptables howto - Community documentation - Ubuntu
Iptables rules - TheGeekStuff
Iptables tag - DebianAdministration
Iptables tutorial - Oskar Andreasson - Frozentux
IPv6 - Wikipedia
IPv6 & Linux howto - Peter Bieringer
IPv6: Configuration for Debian - lenehan
IPv6 firewalling -
IPv6 firewalls - GetIPv6
IPv6-ready kernel - Linux IPv6 howto - TLDP
IPv6 security considerations and recommendations - Microsoft
IPv6 with Debian - Martin F. Krafft
Is your firewall IPv6 aware? - Debian administration - Steve Kemp
ISATAP - Wikipedia
Learn how to use IPp6tables - TLDP
Links2World howto - Links2World Firewall
Linux 2.4 packet filtering howto - Rusty Russell
Linux iptables avoid IP spoofing & bad addresses attacks - LinuxTitli
Linux iptables block common attacks howto - LinuxTitli
Linux iptables: how to specify a range of IP addresses or ports - Vivek Gite
Linux: IPv6 - Peter Bieringer
Linux IPv6 howto - TLDP
List of IP protocol numbers - Wikipedia
Local area network - Wikipedia
Miredo(8) - Linux man page - Linux
Restoring iptables automatically on boot - Jawnsy - DebianAdministration
Running IPv6 in practice - Gribozavr - DebianAdministration
Securing network access - Securing Debian manual - Debian
Set up Ubuntu server in the cloud howto - dambrosio
The settings statement - Links2world Firewall
Shorewall firewall installation, configuration & understanding - Stephen P. Edwards
System run levels and init.d scripts - Debian
Teredo may render your firewall useless - René Pfeiffer
The Teredo protocol: tunneling past network security & other security implications (PDF) - James Hoagland - Symantec
Teredo tunneling - Wikipedia
Top 5 best Linux firewalls - Ramesh Natarajan - TheGeekStuff
Using iptables to secure your virtual machine - Cloud hosting applications - eApps
Why you want IPv6 - LinuxReviews

Copyright (c) 2011 Mark D. Blackwell.Copyright (c) 2011 Mark D. Blackwell.