Previous Thread
Index
Next Thread
Print Thread
Go To
#176781 10/20/12 12:59 AM
Off-Topic
Joined: Sep 2010
Posts: 8,187
dcuny Offline OP
Veteran
OP Offline
Veteran
Joined: Sep 2010
Posts: 8,187
I recently had need for a (preferably web-based) program to help teach the basics of Chorale/SATB writing. I couldn't really find anything in the cheap/free category. HarmonyBuilder looked cool, but wasn't web-based, and cost Real Money™.

Being a programmer, I naturally figured "How hard can it be to code this myself?". To keep things simple, I limited the program to 4 bars of quarter notes with no accidentals.
    (Internally, the code actually deals with the full chromatic system, but the UI for working with accidentals and scrolling adds a lot of complexity, so I haven't done it... yet.)
It's written in HTML 5, and I've targeted Firefox. The code won't work in IE, and not all the features work in Chrome. I don't have a web server, so it's all static code. That made things like "File Save" particularly interesting to implement (the HTML 5 file system is essentially useless at this point).

This is all alpha software, guaranteed to be buggy. It won't crash your machine (it doesn't do anything malicious), but if you try the audio playback in Firefox, it's likely as not to kill the session. As Wonka says, 'Little surprises around every corner, but nothing dangerous."

If all this hasn't scared you off, check it out: http://webs.lanset.com/dcuny/satb/satb.html

Even if you don't like part writing, it's sort of cool to try stringing together chords. One wrong move, and a spiderweb of errors appear, pointing out parallel fifths and octaves, similar motions and unprepared 7ths. It's cool shifting stuff around and seeing what happens.

Hrm... I should probably include some hints on using it.

When the page initially loads, if the music doesn't initially render, just click on it and it'll appear.
    (Before you tell me - yes, I need to attach a callback to the load event.)
You can click on notes and drag them up and down. Click on the following beat to add another chord. If you want to hear a chord, press the 'P' key. (Don't be surprised if your browser disappears!).

The Save File feature is a real hack. For your safety, JavaScript can't write to your hard drive. So clicking the Save File button causes a link to be displayed that's got the saved version of the music in it. To prevent the browser from opening the text file in another tab when you click it, it's Base64 encoded. So you'll (hopefully) be given a dialog to save the file. You'll want to rename the file, since there doesn't seem to be a way to overwrite the default name the the browser gives it (derived from the Base64 encoding - bleah!)

The "wizard" comes from the ClippyJS library. I still haven't figured out how to make it work the way I want... Yes, "Clippy" is an option, and he's really just as irritating as you remember. If you need, you can click and drag him to another location on the screen.

Also, take the error with a grain of salt. Just because I've implemented a bunch of rules doesn't mean they've been implemented correctly.

Let me know what you think!


-- David Cuny

My virtual singer development blog
Vocal control, you say. Never heard of it. Is that some kind of ProTools thing?

BiaB 2025 | Windows 11 | Reaper | Way too many VSTis.
Off-Topic
Joined: Dec 2011
Posts: 3,361
ROG Offline
Veteran
Offline
Veteran
Joined: Dec 2011
Posts: 3,361
Hi David.

It works just fine in Chrome, except for playing the current chord. For some reason this isn't working on my machine.

Great program! Any plans to make it play the chord sequence?

Thanks for posting.

ROG.

Off-Topic
Joined: Sep 2010
Posts: 8,187
dcuny Offline OP
Veteran
OP Offline
Veteran
Joined: Sep 2010
Posts: 8,187
Quote:

Any plans to make it play the chord sequence?



Yes - I've read somewhere it's fairly easy to add timed events using a JQuery animation, so I'll look into doing that. It should be fairly trivial since it's all quarter notes. There's a music library for JavaScript, but timing on anything other than Chrome has been described as sounding like a drunken sailor playing piano, so I don't think I'll get too ambitious. Simple playback of a chord sequence should be more than sufficient.

But first I need to figure out why it's crashing. I think it's because it's not releasing the buffers before it tries to reuse them, so I'm fiddling with stuff to see if I can fix that.

I may eventually get around to figuring out why it doesn't play back in Chrome as well... It's not doing anything particularly clever, just loading a .wav file and playing it back. Perhaps Chrome hasn't implemented the same sort of audio objects.

Actually, Chrome handles the key events slightly differently than Firefox, too. When you drag in Chrome, the pointer turns into a insertion beam, which isn't really what I want. So I'll probably need to look into handling that as well.

Thanks for the feedback!


-- David Cuny

My virtual singer development blog
Vocal control, you say. Never heard of it. Is that some kind of ProTools thing?

BiaB 2025 | Windows 11 | Reaper | Way too many VSTis.
Off-Topic
Joined: Sep 2010
Posts: 8,187
dcuny Offline OP
Veteran
OP Offline
Veteran
Joined: Sep 2010
Posts: 8,187
Hrm... Other than audio and key alphanumeric key handling, it looks like it runs in Opera as well.

Things look really broken in IE - Clippy doesn't even show up. I see there is a canvas tag emulation layer that I could in theory use, but really I've just been focused on a single platform. There's so much that's not well supported in JavaScript (at least, for static applications) that it's all a big hack anyway.

I don't want to get too carried away with this project. I just plan to add enough features to make it "useful enough", and try to be happy with that. (Famous last words!)


-- David Cuny

My virtual singer development blog
Vocal control, you say. Never heard of it. Is that some kind of ProTools thing?

BiaB 2025 | Windows 11 | Reaper | Way too many VSTis.
Off-Topic
A
Anonymous
Unregistered
Anonymous
Unregistered
A
Quote:

I recently had need for a (preferably web-based) program to help teach the basics of Chorale/SATB writing. I couldn't really find anything in the cheap/free category.




You've always come off as a pretty good guy here, and I hate taking this cheap shot, but it's kind of like seeing a $20 laying on the ground. SOMEONE has to pick it up. Ready?

If you don't want to buy a piece of software to do what you need done, I think we have found something in the "cheap" category.....

There. It's done. Now on to business.

It seems like what you need is just any scoring program as far as making the sheet music. The rest is your ear and your ability to take what's in your head and translate it to paper. Finale will let you play your music in on a keyboard and print it out. Finale isn't cheap (I don't know what it costs), but if you are a teacher, it's a "work equipment" expense report item, right?

Off-Topic
Joined: Sep 2010
Posts: 8,187
dcuny Offline OP
Veteran
OP Offline
Veteran
Joined: Sep 2010
Posts: 8,187
Hi, Eddie.

I'm not sure how your solution gets me any closer to meeting my needs.

I'm a computer programmer who's volunteered to teach a class on music theory to a handful of teenagers. I have no budget, and we meet once a month for one hour.

When I asked them what they wanted to learn about, they said they wanted to get right to the fundamentals of SATB-style writing. You know - that pedantic 4-part style that they teach you in Music Theory 101, because everyone likes to spend their spare time writing chorales.

One hour is dreadfully short amount of time, especially when I want to make sure people understand the fundamentals. By the time I've explained basic stuff like why similar motion is bad if you're trying to create independent melodic lines, class is already over.

They're chomping at the bit, taking home my copies of Jeppenson's Counterpoint: The Polyphonic Vocal Style of the Sixteenth Century and Kennan's Counterpoint Based on Eighteenth-Century Practice. (I'll confess not making my way through either completely, although I've made a number of valiant attempts).

While they're certainly motivated, I'm not entirely sure their about their comprehension level.

It got me thinking about what I wished I had when I was taking Music Theory 101 in college:



Does this look like Finale to you?

Off-Topic
A
Anonymous
Unregistered
Anonymous
Unregistered
A
Only if you know how to use Finale......

I thought you were a staff teacher at a university or something and would have an expense account to charge.

The main point to using software is that when you have rests like your example shows, every rest looks the same. Also for accuracy in placing events. However, it would take a lot of time playing every measure in 4 times for all 4 voices, and I wonder if it would even be faster than running through it longhand.

When I chart for myself anymore, it is close to my own shorthand rather than traditional music. It's just too much like work to do notation. I will get a guitar tab, write the changes onto staff paper, and then hand write notes like "cres G - G decres", and it's not hard to break the code that I mean "volume swell a G and then fade it".

But formal notation? Nope. Not any more. I'm not going to quit my job to write dots on staff paper all day, so I feel your pain.

Off-Topic
Joined: Sep 2010
Posts: 8,187
dcuny Offline OP
Veteran
OP Offline
Veteran
Joined: Sep 2010
Posts: 8,187
Hi, Eddie.

I think you're missing the point of the program.

This isn't a program for doing charting, it's a program to help learn the fundamentals of SATB chorale writing. That's why it's limited to quarter notes. The rests look the same because they're just placeholders for beats that don't yet hold notes.

Did you try clicking the link and playing with the program? It's JavaScript that runs in a non-IE web browser, so there's nothing to install.


-- David Cuny

My virtual singer development blog
Vocal control, you say. Never heard of it. Is that some kind of ProTools thing?

BiaB 2025 | Windows 11 | Reaper | Way too many VSTis.
Off-Topic
A
Anonymous
Unregistered
Anonymous
Unregistered
A
I did not click.

What I meant about the rests looking the same is that is you draw 1/4 note rests by hand, some look like a rest and some look like a drunken stick figure.

I still don't even know for sure what you are teaching, and that's okay because it's already given me a headache. Fundamentals, by definition, are concepts. Written music is just those thoughts transcribed into an end product, so I am lost. Many years removed from college music classes..... like 40.

Off-Topic
Joined: May 2000
Posts: 15,944
PG Music Staff
Offline
PG Music Staff
Joined: May 2000
Posts: 15,944
Hi David,

http://webs.lanset.com/dcuny/satb/satb.html

That's a really cool program. Worked well on Firefox. Keep improving it!


Have Fun!
Peter Gannon
PG Music Inc.
Off-Topic
Joined: Jul 2000
Posts: 27,513
Veteran
Online Happy
Veteran
Joined: Jul 2000
Posts: 27,513
This is a very nice first cut. Good job. As ROG mentioned, it would be nice to hear the sequence, and even export to MIDI.

How about an option to distinguish informational messages from rule breakers?

How do you do a sharp or flat?


BIAB 2026 Win Audiophile. Software: Fender Studio One 8, Swam horns, Acoustica-7, Notion 6, Song Master Pro, Win 11 Home. Hardware: Intel i9, 32 Gb; Presonus Quantom HD8 & Faderport 8, Royer 121, Adam Sub8 & Neumann 120 monitors.
Off-Topic
Joined: Jul 2002
Posts: 3,736
P
Veteran
Offline
Veteran
P
Joined: Jul 2002
Posts: 3,736
Quote:

I don't have a web server



not sure if this is by choice or if this link will be helpful
Create your own personal website sandbox
http://www.lullabot.com/videos/three-local-web-servers


Lenovo YOGA 900 Window s 10 Home 64bit M4 pro Mac mini 1tb HD 24GB mem casio wk7500 presonus audiobox i2 usb interface
casio wk-7500
biab & realband 2025 everything pk both with Current builds
Off-Topic
Joined: Sep 2010
Posts: 8,187
dcuny Offline OP
Veteran
OP Offline
Veteran
Joined: Sep 2010
Posts: 8,187
Thanks for the feedback!

The program is "stand alone", in the sense that you could run it from your desktop (which is where I'm developing it). So not having a web server is actually a feature. Java would have been the better choice, but I wanted to get some more experience in JavaScript.

As far as accidentals go, you can't currently display them - the UI isn't set up to do that. I'll get around to it, but there are a lot of UI and infrastructure changes that need to be done first.

I don't know about MIDI support - it's not really high on the priority list. If I found a library that did it easily, I'd add it in. As it is, I might create simple MusicXML output.

But I think the fundamental design limitation of quarter notes only will not be going away, which limits the utility for creating "real" music, but doesn't really impact it much as far as a training tool.


-- David Cuny

My virtual singer development blog
Vocal control, you say. Never heard of it. Is that some kind of ProTools thing?

BiaB 2025 | Windows 11 | Reaper | Way too many VSTis.
Off-Topic
Joined: Jul 2003
Posts: 267
Apprentice
Offline
Apprentice
Joined: Jul 2003
Posts: 267
Just to let you know that it works in Chrome running on Linux Ubuntu.


tony
Lenovo lappie, 4Gb RAM, 500Gb HD
Ubuntu 12.04
Running BIAB under WINE
Off-Topic
Joined: Sep 2010
Posts: 8,187
dcuny Offline OP
Veteran
OP Offline
Veteran
Joined: Sep 2010
Posts: 8,187
Thanks! It also works under Ubuntu with Firefox.

The suggestion to differentiate between severity of errors is a good one. I'll look and see if there's some way to color code them. It wouldn't be difficult to add a switch to toggle between 'warnings', 'errors' and 'all' once that was implemented.


-- David Cuny

My virtual singer development blog
Vocal control, you say. Never heard of it. Is that some kind of ProTools thing?

BiaB 2025 | Windows 11 | Reaper | Way too many VSTis.
Off-Topic
Joined: May 2000
Posts: 22,553
Veteran
Offline
Veteran
Joined: May 2000
Posts: 22,553
Looks pretty cool dcuny. Works in FF here. Half works in IE9 if in IE9 document mode. It defaults to quirk mode for some reason, but changing it to IE9 document mode makes it look a little better (via developer tools).
Quirks mode doesn't let Bonzi load, but IE9 doc mode does. IE8 and 7 doc mode doesn't.
Didn't know if that would be helpful. I'm guessing IE10 will probably run it fine. I hear there will be a lot of improvement. Programmers at work are kind of excited to see it coming out. Hopefully it works as planned and people update to 10.

Last edited by rharv; 10/21/12 05:59 AM.

I do not work here, but the benefits are still awesome
Make your sound your own!
Off-Topic
Joined: Sep 2010
Posts: 8,187
dcuny Offline OP
Veteran
OP Offline
Veteran
Joined: Sep 2010
Posts: 8,187
Thanks for the feedback!

Microsoft is also working on a version of JavaScript called TypeScript, which has type inference based on assignment, as well as type declarations. It makes using an IDE much more pleasant when it can "intellisense" the class and show you a list of methods.

I found a JavaScript library called cufon which can convert TrueType fonts into data structures and render them, which means I should be able to replace the static bitmaps I'm using to render notational graphics with vector graphics. It means a rewrite of that portion of the code, but I'll end up with something a lot more flexible. For example, I'll be able to dynamically set the color of items, or change the scaling on the fly. I'll probably use the Gonville font from LilyPond, since it's licensed for that. I've started

It probably won't change the functionality much, but it should make the coding more pleasant, since I'll be able to ask the toolkit for the metrics of glyphs, instead of doing in manually.


-- David Cuny

My virtual singer development blog
Vocal control, you say. Never heard of it. Is that some kind of ProTools thing?

BiaB 2025 | Windows 11 | Reaper | Way too many VSTis.
Previous Thread
Next Thread
Go To

Link Copied to Clipboard
ChatPG

Ask sales and support questions about Band-in-a-Box using natural language.

ChatPG's knowledge base includes the full Band-in-a-Box User Manual and sales information from the website.

PG Music News
Update to Build 10 of RealBand® 2026 for Windows®!

If you're already using RealBand 2026 for Windows, download build 10 to get all the latest additions and enhancements.

Band-in-a-Box® 2025 for Mac® users: Build 904 now available!

If you're already using Band-in-a-Box® 2025 for Mac®, make sure to grab the latest update! Build 904 is now available for download and includes the newest additions and enhancements from our team.

Band-in-a-Box® 2026 for Windows® users: Build 1237 is now available!

Already a Band-in-a-Box 2026 for Windows user? Stay up to date and download the build 1237 to get all the latest additions and enhancements.

PowerTracks Pro 2026 for Windows is Here!

PowerTracks 2026 is here—bringing powerful new enhancements designed to make your production workflow faster, smoother, and more intuitive than ever.

The enhanced Mixer now shows Track Type and Instrument icons for instant track recognition, while a new grid option simplifies editing views. Non-floating windows adopt a modern title bar style, replacing the legacy blue bar.

The Master Volume is now applied at the end of the audio chain for consistent levels and full-signal master effects.

Tablature now includes a “Save bends when saving XML” option for improved compatibility with PG Music tools. Plus, you can instantly match all track heights with a simple Ctrl-release after resizing, and Add2 chords from MGU/SGU files are now fully supported... and more!

Get started today—first-time packages start at just $49.

Already using PowerTracks Pro Audio? Upgrade for as little as $29 and enjoy the latest improvements!

Order now!

Band-in-a-Box 2026 for Windows Special Offers End Tomorrow (January 15th, 2026) at 11:59 PM PST!

Time really is running out! Save up to 50% on Band-in-a-Box® 2026 for Windows® upgrades and receive a FREE Bonus PAK—only when you order by 11:59 PM PST on Thursday, January 15, 2026!

We've added many major new features and new content in a redesigned Band-in-a-Box® 2026 for Windows®!

Version 2026 introduces a modernized GUI redesign across the program, with updated toolbars, refreshed windows, smoother workflows, and a new Dark Mode option. There’s also a new side toolbar for quicker access to commonly used windows, and the new Multi-View feature lets you arrange multiple windows as layered panels without overlap, making it easier to customize your workspace.

Another exciting new addition is the new AI-Notes feature, which can transcribe polyphonic audio into MIDI. You can view the results in notation or play them back as MIDI, and choose whether to process an entire track or focus on specific parts like drums, bass, guitars/piano, or vocals. There's over 100 new features in Band-in-a-Box® 2026 for Windows®.

There's an amazing collection of new content too, including 202 RealTracks, new RealStyles, MIDI SuperTracks, Instrumental Studies, “Songs with Vocals” Artist Performance Sets, Playable RealTracks Set 5, two RealDrums Stems sets, XPro Styles PAK 10, Xtra Styles PAK 21, and much more!

Upgrade your Band-in-a-Box for Windows to save up to 50% on most Band-in-a-Box® 2026 upgrade packages!

Plus, when you order your Band-in-a-Box® 2026 upgrade during our special, you'll receive a Free Bonus PAK of exciting new add-ons.

If you need any help deciding which package is the best option for you, just let us know. We are here to help!

Band-in-a-Box® 2026 for Windows® Special Offers Extended Until January 15, 2026!

Good news! You still have time to upgrade to the latest version of Band-in-a-Box® for Windows® and save. Our Band-in-a-Box® 2026 for Windows® special now runs through January 15, 2025!

We've packed Band-in-a-Box® 2026 with major new features, enhancements, and an incredible lineup of new content! The program now sports a sleek, modern GUI redesign across the entire interface, including updated toolbars, refreshed windows, smoother workflows, a new dark mode option, and more. The brand-new side toolbar provides quicker access to key windows, while the new Multi-View feature lets you arrange multiple windows as layered panels without overlap, creating a flexible, clutter-free workspace. We have an amazing new “AI-Notes” feature. This transcribes polyphonic audio into MIDI so you can view it in notation or play it back as MIDI. You can process an entire track (all pitched instruments and drums) or focus on individual parts like drums, bass, guitars/piano, or vocals. There's an amazing collection of new content too, including 202 RealTracks, new RealStyles, MIDI SuperTracks, Instrumental Studies, “Songs with Vocals” Artist Performance Sets, Playable RealTracks Set 5, two RealDrums Stems sets, XPro Styles PAK 10, Xtra Styles PAK 21, and much more!

There are over 100 new features in Band-in-a-Box® 2026 for Windows®.

When you order purchase Band-in-a-Box® 2026 before 11:59 PM PST on January 15th, you'll also receive a Free Bonus PAK packed with exciting new add-ons.

Upgrade to Band-in-a-Box® 2026 for Windows® today! Check out the Band-in-a-Box® packages page for all the purchase options available.

Happy New Year!

Thank you for being part of the Band-in-a-Box® community.

Wishing you and yours a very happy 2026—Happy New Year from all of us at PG Music!

Forum Statistics
Forums57
Topics86,085
Posts799,946
Members40,030
Most Online44,367
Mar 4th, 2026
Newest Members
roshan2121, Din, AurealiusB, sam31985, jyotish karan
40,030 Registered Users
Top Posters(30 Days)
MarioD 158
DC Ron 94
rsdean 93
WaoBand 86
DrDan 73
Today's Birthdays
bassonjason
Powered by UBB.threads™ PHP Forum Software 7.7.5