Old 12-18-2017, 10:26 AM   #1
Michael Ellis
Human being with feelings
 
Michael Ellis's Avatar
 
Join Date: Nov 2015
Location: Weaverville NC
Posts: 62
Default Tbon music notation language.

Hi folks, it's been a while since I last posted here. I want to briefly announce an open source notation language that may (or may not) be useful for other Reaper users.

I designed it as a quick way to write out melody and harmony parts and produce MIDI files that import cleanly into REAPER (and other programs). Its biggest strength is ease of use when dealing with projects that have frequent changes of time signature and tempo.

If you're curious, the code and docs are at https://github.com/Michael-F-Ellis/tbon. There's also a link to a live demo where you can explore the language.

Cheers,
Mike
__________________
Write music faster with Tbon. https://github.com/Michael-F-Ellis/tbon
Mac mini, 2.3 Ghz core i7, 16GB Ram, Linnstrument #437, Technics P30
"What survives every change of system is melody." -- Igor Stravinsky

Last edited by Michael Ellis; 12-18-2017 at 12:20 PM.
Michael Ellis is offline   Reply With Quote
Old 12-18-2017, 01:19 PM   #2
TonE
Human being with feelings
 
Join Date: Feb 2009
Location: Reaper HAS send control via midi !!!
Posts: 4,031
Default

Dear Mike, thanks for sharing this, looks really interesting how you defined the language, very efficient. Not sure how it compares to mup? But your tbon seems to be even more efficient.

I liked for example this:
----
Similarly, ccc would be a triplet beat, cccc four sixteenths, ccccc a quintuplet and so on. Want to divide a beat into notes of different length? No problem, just use dashes. Here's a dotted-eighth + sixteenth division: c--c. The first 'c' gets 3/4 of the beat and the second one gets the remaining 1/4 of the beat.
----
Also ^ shows nicely visually where the melody is going up, very clever, simple and efficient.

Especially for simple melodies this seems to be very efficient, thanks.
TonE is offline   Reply With Quote
Old 12-18-2017, 04:13 PM   #3
ijijn
Human being with feelings
 
ijijn's Avatar
 
Join Date: Apr 2012
Location: Christchurch, New Zealand
Posts: 482
Default

Hi Mike,

Thank you so much for sharing this, it looks really fantastic! I can definitely see myself using this in some capacity and I'll be following along with keen interest.

I'll add my love to the pile for your elegant separation of the space-delimited beat into an arbitrary number of equal parts, and the usefulness of "holds" in general.

I did wonder about support for complex or Bartok-style time signatures, such as 2+2+3/8 (7/8), which require fine granularity for the B=x directive. But hey, the following seems to work:

K=C
B=4 c d B=4. e-e | B=4 d e B=4. c-c |

Bravo!
ijijn is offline   Reply With Quote
Old 12-18-2017, 08:28 PM   #4
pipelineaudio
Mortal
 
pipelineaudio's Avatar
 
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
Default

Seriously, this is outstanding! I'd love to see a page explaining it to noobs like me
pipelineaudio is offline   Reply With Quote
Old 12-18-2017, 09:32 PM   #5
Michael Ellis
Human being with feelings
 
Michael Ellis's Avatar
 
Join Date: Nov 2015
Location: Weaverville NC
Posts: 62
Default

Hi TonE and ijijn,
Thanks very much to both of you for the positive feedback! Hope you continue to find tbon useful.

TonE, thanks also for mentioning mup. I've only glanced at it just now but I'll take a deeper dive to see if there are some concepts that might benefit tbon. At first glance, it strikes me as somewhere between ABC and LilyPond in terms of representational capabilities. All three feature direct creation of printed scores; something tbon doesn't do yet (and might never as long as other programs can reliably import its MIDI output).

ijijn, thanks for pushing the envelope with the complex time signature test! It's a question I've been ignoring because the MIDI file time signature spec doesn't have a concept of anything more complicated than a single numerator and denominator. I'm pleased that tbon didn't choke on B=x between beats and even more pleased it produced the right rhythms.

Alas, it doesn't produce a correct time signature because the compiler doesn't make a decision about time signatures until it sees the barline at the end of the each measure. At that point it uses the most recent beat note value and the number of beats seen in the measure to insert a time signature. For your example the time signature gets incorrectly computed as 9/8 because there were three beats and the most recent beat note was a dotted quarter.

I need to think a bit about how and whether to handle these cases. As a workaround, you can break it into multiple measures, e.g.

B=4 c | d | B=4. e-e | B=4 d | e | B=4. c-c |


which will give 1/4 + 1/4 + 3/8 signatures or, possibly,

B=4 c d | B=4. e-e | B=4 d e | B=4. c-c |


to get 2/4 + 3/8

The midi files for both cases will sound the same as long as the de-emphasis directive is left defaulted at D=0.0 (downbeats unaccented) but the accent differences will be audible at, say, D=0.2. So the choice depends on your musical intent.

Again, thanks for trying tbon!

Cheers,
Mike
Attached Images
File Type: png complex-time.png (18.8 KB, 522 views)
File Type: png complex-time2.png (17.7 KB, 529 views)
__________________
Write music faster with Tbon. https://github.com/Michael-F-Ellis/tbon
Mac mini, 2.3 Ghz core i7, 16GB Ram, Linnstrument #437, Technics P30
"What survives every change of system is melody." -- Igor Stravinsky
Michael Ellis is offline   Reply With Quote
Old 12-18-2017, 09:46 PM   #6
Michael Ellis
Human being with feelings
 
Michael Ellis's Avatar
 
Join Date: Nov 2015
Location: Weaverville NC
Posts: 62
Default

Quote:
Originally Posted by pipelineaudio View Post
Seriously, this is outstanding! I'd love to see a page explaining it to noobs like me
Hey pipeline, thanks for the compliment! Have you taken a look at the Tutorial?

https://github.com/Michael-F-Ellis/tbon#tutorial

I want to make the docs for tbon as useful as possible, so I'm wide open for suggestions to improve them and I'm happy to answer specific questions in this forum.
__________________
Write music faster with Tbon. https://github.com/Michael-F-Ellis/tbon
Mac mini, 2.3 Ghz core i7, 16GB Ram, Linnstrument #437, Technics P30
"What survives every change of system is melody." -- Igor Stravinsky
Michael Ellis is offline   Reply With Quote
Old 12-18-2017, 10:46 PM   #7
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

"mup", "Tbon", .... what will be the next "Standard".

Really pointless stuff

(As today you alway will use some software to edit notes, human readability does not make much sense, hence Music XML will rule.)

-Michael
mschnell is offline   Reply With Quote
Old 12-18-2017, 10:49 PM   #8
Michael Ellis
Human being with feelings
 
Michael Ellis's Avatar
 
Join Date: Nov 2015
Location: Weaverville NC
Posts: 62
Default

Quote:
Originally Posted by mschnell View Post
"mup", "Tbon", .... what will be the next "Standard".

Really pointless stuff
-Michael
I'm not trying to push Tbon as a standard. Merely offering it to anyone who finds it useful.

Cheers,
Mike
__________________
Write music faster with Tbon. https://github.com/Michael-F-Ellis/tbon
Mac mini, 2.3 Ghz core i7, 16GB Ram, Linnstrument #437, Technics P30
"What survives every change of system is melody." -- Igor Stravinsky
Michael Ellis is offline   Reply With Quote
Old 12-19-2017, 08:05 AM   #9
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,686
Default

I see.

Thanks !
-Michael
mschnell is offline   Reply With Quote
Old 12-19-2017, 08:32 AM   #10
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Good stuff, Michael. I will definitely be checking this out.

I have tinkered around with a similar text/music language here and there and an alternative music notation, but I haven't gotten anywhere near as complete with mine as you have with yours.

I think there is definitely a need for a text/music language and an alternative music notation. It looks like maybe your system fills the text/music half of it and possibly the other.

Thanks for sharing it. Also I didn't know about mup, so thanks to TonE for mentioning it.

Edit: Just glancing over the language. So far, it seems brilliant.
__________________
It's time to take a stand against the synthesizer.

Last edited by brainwreck; 12-19-2017 at 08:55 AM.
brainwreck is offline   Reply With Quote
Old 12-19-2017, 08:49 AM   #11
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

In case the benefits of this text/music system are being missed, here are a couple of them:

Music can be written with nothing but a text editor; no other software required. And there are no commands to learn (unless you find the commands of your text editor useful). Just raw text, at the speed of thought/typing ability, and without a giant learning curve for those who aren't already proficient at reading standard notation.

Music in this language could also be written very quickly with pencil and *any* paper, no special paper required.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 12-19-2017, 09:24 AM   #12
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Hey Michael, a question on the python interpreter. I entered this (Happy Birthday) in the live demo, but I'm getting an error:

Code:
K=F
T=100

z - 55 | 6 5 1 | 7 - 55 | 6 5 ^2 | 1 - 55 |
^5 3 1 | 7 6 ^44 | 3 1 2 | 1 - - |
Just wondering what might be the cause of the error, as the error message is pretty cryptic.

Code:
return 1 + (order.index(pname1) - order.index(pname0)) % len(order) ValueError: tuple.index(x): x not in tuple "]
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 12-19-2017, 09:45 AM   #13
Michael Ellis
Human being with feelings
 
Michael Ellis's Avatar
 
Join Date: Nov 2015
Location: Weaverville NC
Posts: 62
Default

Quote:
Originally Posted by brainwreck View Post
Hey Michael, a question on the python interpreter. I entered this (Happy Birthday) in the live demo, but I'm getting an error:

Code:
K=F
T=100

z - 55 | 6 5 1 | 7 - 55 | 6 5 ^2 | 1 - 55 |
^5 3 1 | 7 6 ^44 | 3 1 2 | 1 - - |
Just wondering what might be the cause of the error, as the error message is pretty cryptic.

Code:
return 1 + (order.index(pname1) - order.index(pname0)) % len(order) ValueError: tuple.index(x): x not in tuple "]
Your notation is correct but In the demo, you need to choose '1234567' as the "Pitch characters."



and, yeah, that message is way too cryptic! I need to work on error messaging in general, but that one I can fix this afternoon.

Thanks for reporting that one and for taking an interest in Tbon.
Attached Images
File Type: png pitchorder.png (34.2 KB, 427 views)
__________________
Write music faster with Tbon. https://github.com/Michael-F-Ellis/tbon
Mac mini, 2.3 Ghz core i7, 16GB Ram, Linnstrument #437, Technics P30
"What survives every change of system is melody." -- Igor Stravinsky
Michael Ellis is offline   Reply With Quote
Old 12-19-2017, 09:45 AM   #14
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Doh! Thanks.

Edit: One thought on the above. Detection of absolute and relative pitch in the parser. Maybe something as simple as, if (first note is letter)... and, if (first note is number)..., along with a simple error message for a mixed case, if (letters AND numbers)...

Additional thought: It also might be nice to have the ability to mix letters and numbers, for educational purposes. But there might be lots of things to consider for this.
__________________
It's time to take a stand against the synthesizer.

Last edited by brainwreck; 12-19-2017 at 10:06 AM.
brainwreck is offline   Reply With Quote
Old 12-19-2017, 11:01 AM   #15
Michael Ellis
Human being with feelings
 
Michael Ellis's Avatar
 
Join Date: Nov 2015
Location: Weaverville NC
Posts: 62
Default

Quote:
Originally Posted by brainwreck View Post
Doh! Thanks.

Edit: One thought on the above. Detection of absolute and relative pitch in the parser. Maybe something as simple as, if (first note is letter)... and, if (first note is number)..., along with a simple error message for a mixed case, if (letters AND numbers)...
New version committed and uploaded. The error message now looks like

Code:
ValueError: Invalid pitch character, '5'. (Can't mix numeric and alpha pitches in same file.)
But note that entering a totally invalid pitchname like, 'x', will result in a message about an 'IncompleteParseError' with an indication of the line and column where the parser gave up.

Quote:
Additional thought: It also might be nice to have the ability to mix letters and numbers, for educational purposes. But there might be lots of things to consider for this.
Hold that thought :-).
__________________
Write music faster with Tbon. https://github.com/Michael-F-Ellis/tbon
Mac mini, 2.3 Ghz core i7, 16GB Ram, Linnstrument #437, Technics P30
"What survives every change of system is melody." -- Igor Stravinsky
Michael Ellis is offline   Reply With Quote
Old 12-19-2017, 11:05 AM   #16
brainwreck
Human being with feelings
 
Join Date: Jul 2006
Posts: 20,859
Default

Quote:
Originally Posted by Michael Ellis View Post
New version committed and uploaded. The error message now looks like

Code:
ValueError: Invalid pitch character, '5'. (Can't mix numeric and alpha pitches in same file.)
But note that entering a totally invalid pitchname like, 'x', will result in a message about an 'IncompleteParseError' with an indication of the line and column where the parser gave up.



Hold that thought :-).
Very cool. Thanks for your work.
__________________
It's time to take a stand against the synthesizer.
brainwreck is offline   Reply With Quote
Old 12-19-2017, 03:43 PM   #17
Philbo King
Human being with feelings
 
Philbo King's Avatar
 
Join Date: May 2017
Posts: 3,201
Default

This is pretty cool. Although, as a self taught musician, I've always felt the reliance on the diatonic major scale was rather limiting; other scales have to be shoehorned in by using accidentals. I don't have the answers, but maybe a chromatic foundation would be a way to go...
Philbo King is offline   Reply With Quote
Old 12-19-2017, 07:34 PM   #18
Michael Ellis
Human being with feelings
 
Michael Ellis's Avatar
 
Join Date: Nov 2015
Location: Weaverville NC
Posts: 62
Default

Quote:
Originally Posted by Philbo King View Post
This is pretty cool. Although, as a self taught musician, I've always felt the reliance on the diatonic major scale was rather limiting; other scales have to be shoehorned in by using accidentals. I don't have the answers, but maybe a chromatic foundation would be a way to go...
Thanks, Philbo! If you feel like pursuing a chromatic foundation, it wouldn't be hard to make a fork of tbon and add some letter names for the black keys of the piano. 'hijkl', anyone?

Another alternative would be to look into LilyPond, which already has chromatic pitch names and can print scores with almost any note symbols you can dream up. Things like quarter-tone accidentals, for instance, are already built-in.

I'm planning to stick with conventional pitch names in the main line of tbon development but I would never discourage anyone from trying to innovate something better.
__________________
Write music faster with Tbon. https://github.com/Michael-F-Ellis/tbon
Mac mini, 2.3 Ghz core i7, 16GB Ram, Linnstrument #437, Technics P30
"What survives every change of system is melody." -- Igor Stravinsky
Michael Ellis is offline   Reply With Quote
Old 12-20-2017, 11:58 AM   #19
Michael Ellis
Human being with feelings
 
Michael Ellis's Avatar
 
Join Date: Nov 2015
Location: Weaverville NC
Posts: 62
Default

Looks like this thread is going dormant. My thanks to everyone who took the time to read, comment and try tbon!

I'll close with a quick illustration of one of tbon's cooler capabilities ...

Code:
/* Polytonal Polyrhythms */
/* Strong de-emphasis to bring out downbeats both parts. */

/* Voice one C major, 6/8 time */
P=1 K=C D=0.4 B=4.
^abc abc | abc abc | abc abc | abc abc | B=4 - - - - |

/* Voice two in C minor, 4/4 time */
P=2 K=c D=0.4 B=4 
/c d e cg | ^d e c da | ^e c d ec | D=0.0 cc zc c - |
You can paste it into the live demo page and play it. (Try with the metronome, too.).

The midi files insert successfully into Reaper and Musescore, Both format it as 4/4 time in all parts, but the accented downbeats come through so it still sounds right.

Cheers and happy holidays to all,
Mike
__________________
Write music faster with Tbon. https://github.com/Michael-F-Ellis/tbon
Mac mini, 2.3 Ghz core i7, 16GB Ram, Linnstrument #437, Technics P30
"What survives every change of system is melody." -- Igor Stravinsky
Michael Ellis is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.