Ever since I have started participating in LilyPond development, I've known that Guile plays an integral role in LilyPond's overall "functioning". The Guile library, libguile, allows access to Scheme code from C (or C++) code (and vice versa). Guile lies at the heart of LilyPond's infrastructure, so it's critical that LilyPond integrates well with Guile.
Recently, there have some dramatic changes to the Guile code base; basically, Guile has been modernized and now rightfully belongs in the 21st century.
Since Guile has seen such sweeping changes, it's not surprising that there might be some compatibility problems between Guile 1.9 (latest development series) and Lilypond. And... there are many problems. :-)
Some have been fixed. Some might (and hopefully will) be fixed before Guile 2.0 is released. One of the most annoying ones that the Guile devs are aware of is the removal of "currying" define forms. My commit here shows how I'm temporary working around this problem.
So, on to the "bugfix for the bugfix". One of the Guile-compatibility issues is an improvement that LilyPond needs to adapt to. I'm currently have a patch (posted here), but I apparently didn't test it well enough.
For those interested, the "#if !HAVE_GUILE_HASH_FUNC ..." part of the patch is not working because I forgot to include the header "config.hh". Funny thing is, after trying to include config.hh, some previously non-functioning #ifdefs started working, and some of the conditionally compiled code does not compile! :-) Oh, the joys of conditional compilation. I haven't checked yet, but that code has probably been untouched for five years. Compilers have improved tremendously over the past five years, so it doesn't surprise me that previously (supposedly) working code no longer compiles.
In other words, I have to amend my patch by including "config.hh" in the appropriate place, AND by fixing non-compiling code that, before including "config.hh", never compiled and was therefore unnoticed.
Happy Monday night!
05 April 2010
The bugfix for the bugfix
~
Patrick
at
7:17 PM
0
comments
23 March 2010
Updates
I haven't posted an update to this blog in a long time. Well, I've been very busy with school; last term, I accompanied approximately 20 people, so that occupied much of my time.
My work with LilyPond has slowed down a little bit, but there is still a lot to do. The release manager, Graham, wants to release a new stable release 2.14 ASAP, but I'm not quite sure when that will really happen. There are still many critical issues to resolve; I want to help out more with this, but most of them are "over my head". Time invested in discovering solutions to one of these bugs might take me 20 hours, whereas the person who originally introduced the bug might be able to fix it in a half hour. Oh well, we'll get them fixed eventually.
I'm happy to report that LilyPond's SVG output is "production ready". Actually, it has been for a few months, but I haven't discovered any bugs besides this one. Honestly though, it's not too critical of a bug. I have a feeling most people will be using the SVG output for snippets less than a page long, so those use cases are not affected.
For now, my plans are to leave the SVG backend as is, unless I find a fix for #971. After 2.14 is out, then I'll start thinking about it again.
Some of my more immediate LilyPond goals:
- Add a new markup command, "path", that uses SVG path primitives and works for both the PS and SVG backends.
- Fix slur ugliness. My previous attempt to fix these issues failed not because I was off-track, but because a proper solution needs to be more comprehensive. If I claim to have fixed slurs, LilyPond users will really want them to be fixed (and beautiful).
- Port LilyPond to Guile (soon to be) 2.0.
- Start fixing bugs in librsvg, and in the far-off future, consider becoming the maintainer of this project. The entire GNU/Linux community will benefit from improvements to librsvg. All of GNOME uses this library, as well as other important programs like ImageMagick. I am so confused why it is not currently being maintained. :-(
~
Patrick
at
6:18 PM
0
comments
28 September 2009
Free Software
While purchasing my computer science textbook today, one of the cashiers commented about the blurb on the front cover thay says "Free software CD included". Paraphrased, he said something like "Free software...that's funny!"
This really hit home. Though I'm currently not aware if the contents of the included CD consist of free software (in the "GNU" sense, or the "open-source" sense), I took this comment to mean that "software cannot be free, so the statement on the front cover is misleading".
This is how I used to think about software. Five years ago, my understanding of "software" was very limited; I was aware of Microsoft and Apple software, but everything else was foreign to me.
Right here, the real truth should be reiterated: free software is not a myth. Free software exists and is used everyday. There are even different levels of free. Let's consider two different cases:
Internet Explorer. Is it free? Well, it's free to download and typically installed on Windows. There's also a catch here: many people don't understand that Internet Explorer is a piece of software. It is. It is not the internet. Internet Explorer is software, just as Microsoft Word is. Back to the point... For many people, this level of freedom is enough. Most of the time, the reason is that they don't give the matter a second thought. Just trust Microsoft or Apple, right?
LilyPond. This is the other side of the coin. Is it free? Yes, it's free to download from lilypond.org, and it can be installed on the most popular operating systems (Windows, Mac, GNU/Linux, BSD) or compiled from source on almost any operating system. There is a difference of "freedom" between Internet Explorer and LilyPond: Internet Explorer's source code can only be modified by Microsoft, but LilyPond's source code can be modified by anyone and redistributed under the same license. Is this important? It depends on your perspective. From the perspective of a computer programmer, the level of "freedom" a user has with LilyPond might sound more appealing, but a lay user might not give a s*** and just go with the flow. Of course, I am simplifying the issues here, but hopefully this is clear.
Free software exists. You don't have to pay for software. If you have hardware that apparently requires drivers that do not run on your system, or do not respect the level of freedom you require, hire a computer programmer to write drivers for you, or write them yourself if you have this ability. If you use niche software that can't run on your operating system, hire someone to write a program for you that does what you want, or again, do it yourself (if you have the ability, have time, etc.), or post a request to an online forum, newsgroup, etc.
But, wait! Did I just contradict myself? I just suggested that you can hire a programmer...and that requires money! Yes, but this is also free, from a different perspective. You, as a computer user, have the freedom to seek better software that you can use, that fits you. Certainly, programmers will charge you, but you will feel better in the end knowing that your software will work for you, not against you.
P.S. Of course, in the end, I think the cashier misunderstood; the blurb meant "Free CD with software included". A CD is bundled, the CD is free, and the CD contains software. In other words, the "free" description does not refer to the software. :-)
~
Patrick
at
10:29 AM
0
comments
16 September 2009
Google scores again
I have recently noticed Google's interest in spicing up their search result pages, and now (finally), their home page:
Not too much different, but it's standards compliant. It's compliant with HTML 5. Awesome. Go Google!
~
Patrick
at
3:02 PM
0
comments
11 August 2009
Single-letter GDB commands
So, today I have a very boring post for you. I'm simply going to list the single-letter GDB commands, as noted in the post title. To make this list useful, I will separate each command with a hyphen, and then follow it with the "real" command. Enjoy!
b - break c - continue d - delete f - frame h - help i - info j - jump k - kill l - list n - next p - print q - quit r - run s - step t - thread u - until x - examineHave a nice day!
~
Patrick
at
10:49 PM
0
comments
29 March 2009
Source of Thought
Three years ago, I kept a blog on MySpace. I don't remember my exact reasoning behind wanting a blog, but I felt that I had information to share with the world. Well, I'm starting to feel that way again. Regrettably, I deleted my entire blog when I trashed my MySpace account (best choice I've made in years). Some of my posts, in my opinion, were very fascinating, and might have been even more fascinating to me now.
But...I'm beginning to remember some of them. I want to share one of these insights right now.
...
What is the source of thought? We could also ask...where is the source of thought?
We are brought up to believe that we have a brain in our heads (of course, this is true) and that we create our thoughts with our brains. Is this true?
From a reductionist/dualistic point of view, this is not true. In reductionism, there must exist some sort of special arrangement and interaction of small pieces of matter in order for thought to exist. From a nondualistic point of view, this is not true either. Nondualism demands that we take consciousness into account without separating it from matter, chemical reactions, etc. So, in this view, it is not possible to say that we alone create our thoughts, since the I does not exist in the first place.
If the two large schools of thought say that we do not create our thoughts, then, from a subjective point of view, why do we believe that it's true?
I claim that thoughts appear and that we observe and remember them. The problem is that we often believe them and label them as reality. But really, thoughts are ephemeral things that shouldn't be taken for granted.
For example, the only reason you say your name is "Bla" is because you were told this when you were young, repeated it over and over in your mind so that you could never forget it, and then took this "fact" as reality without ever questioning it.
But the fact that you can observe your thoughts implies that you are not your thoughts. Think about that one for a moment.
So, do we actually think? No, we observe and remember thought. New thoughts appear from thin air, just as old thoughts do. By "thin air", I mean consciousness of a universal order.
How can we question thoughts then, if we don't think? Well, we can use the existing thought constructs of logic and reason.
Is this a contradiction? Certainly, but if we understand the true nature of reality, we don't need to worry about it.
The source of thought, then? Not from within. From everywhere.
~
Patrick
at
5:06 PM
2
comments
23 March 2009
Insight into previous post
So, I've been thinking quite a bit about the question raised in my previous post, and I want to touch on something I learned a couple of years ago but only remembered recently.
Q: Is it possible to open a book and not see the words?
A: Certainly. To do so, you must either look through the book or use your peripheral vision.
Both of these actions relax the eyes and prevent you from reading the words. Are you familiar with those 4-D Magic Eye Puzzle books (or whatever they're called)? You use the same technique here as you do to see the pictures. People usually suggest to cross your eyes, but this is not the best way, since it has the potential to strain your eyes. Relaxing the eyes is the better technique.
Is this useful?
IMO, it is incredibly useful to be able to relax the eyes. In fact, this state should be the natural one. For some people, myself included, it is not. Maybe that's why I wear glasses...
We all know what peripheral vision is, but how can this come in handy? One way to think of it is to hold more than one object is your field of vision at once. I'm choosing not to say the word `focus' here, because this act is really the opposite of concentration. One technique is to imagine a line connecting the two objects and observe the entire line at once. For three objects, you can imagine a triangle instead (or still a line if the objects are colinear). Another technique is to not look directly at something before you pick it up.
After all, what would a blind person do?
~
Patrick
at
7:04 PM
0
comments
24 February 2009
Thought
Whooee! Another off-topic post. :-)
I've been contemplating an interesting issue recently...
Assuming that a person is literate, is it possible to open a book (written in his/her native tongue) and not see the words? That is, only seeing the words as scribbles or seeing right through the page?
Is this a reasonable thing to think about?
Another example is the act of observing a photograph. Is it possible not to see a photograph as a photo of something? Maybe just seeing the photograph for what is really is, a flat object on which a seamless collage of colors is imprinted.
Think about these things. Seriously. They are important.
~
Patrick
at
2:30 PM
1 comments
14 February 2009
David Bohm
This is off topic. In other words, it is not related to either GNU/Linux or LilyPond.
I just want to say that David Bohm was a genius. If he was still alive today, I would definitely want to meet him.
His insights into the nature of reality are mind-boggingly original. "All is one movement". This is my interpretation of his philosophy. Yet the implications of these four words are deeply affecting. It applies to thought, the body, Earth, the universe, the entire evolution of history, etc. Since all is one movement, everything is contained within everything else. Another way to put it is that everything is everything else. Even though this is one interpretation of the nature of things, the real truth is all that is important. That was his aim.
Thank you Dr. Bohm, for your wonderful contribution to society. If your books were never published, I might never have understood the meaning of the word "flux". Stating that "all is movement" is deeply profound, and I hope that your words reach many others. Speaking as somebody (in a state of flux) that loves both music and the sciences, your views on the nature of reality resonate perfectly with me. As a music major, I notice, first hand, the disconnect that people feel between music (art) and mathematics (science). But I have always felt differently. Your message is incredibly important.
Though you passed away more than 15 years ago, your message will always be with us. After reflecting on your words though, you have never in fact left us. You are, and will always be, part of the one movement. That is all there is.
~
Patrick
at
7:43 PM
1 comments
27 January 2009
Qualities of Music Notation Software
I have officially decided that LilyPond is superior to all other music notation software, in terms of output quality. Since I have been using LilyPond for so long now, I am used to looking at high-quality printouts. When I look at scores produced by Finale or Sibelius, it's hard for me not to notice the inconsistencies and other problems they have. From what I've noticed, Finale does a little better than Sibelius, but not much.
The downside to LilyPond is that it is difficult to use. It takes a long time to type in all of the notes, articulations, etc. and not have the visual reinforcement to see if everything is okay. Heck, if Finale or Sibelius had the capabilities that LilyPond has, I might consider using them, because visual reinforcement is an absolutely huge thing, and it can save a lot of time.
So should I use the helper programs for LilyPond, that allow you to enter the notes while staring at them, get the visual feedback, and export the stuff to an LY file? NO! This is not visual reinforcement, it's just visual feedback. I would much rather be observing the music as it is going to look when I print it out. The other approach is just cheesy. Plus, these programs don't have a tenth of the capabilities LilyPond has. Do they help? Yes, but this kind of help is not helpful to me. :-)
I make the same case for using Finale or Sibelius, exporting to MusicXML, and importing into LilyPond with musicxml2ly. This is not fun, and to make matters more complicated, musicxml2ly understands MusicXML better than Finale or Sibelius, so the imports will not be clean. This is an unfortunate thing for those that want to follow this route.
So should I use jEdit with the LilyPondTool plugin? No, but I will admit that most beginning LilyPond users should use it. I can't stand jEdit: it is such a memory hog. I don't like to use text editors that are memory hogs. That's why I use Vim. Much nicer, and it responds instantly to every command.
But using Vim with LilyPond can be troublesome too. The editor is great, the Vim plugin and syntax highlighting for LilyPond are (mostly) great. That's not the problem.
I need a solution, most likely in the form of a Graphical User Interface, that knows more about LilyPond than LilyPond does itself.
LilyPond's language is very semantic and very flexible. However, these characteristics make LilyPond difficult to use for a large number of people. The paradigm of "listen to what the user types in, and respond accordingly" is not strict enough for the average computer user.
Users should have access to the complete capabilities of a program at their fingertips. Of course, this has been a usability issue from the birth of the computer. It's a big problem that needs to be solved eventually. The Microsoft Office "ribbon" isn't the answer, and is the "menu" approach it used to use, and so many other programs still use. What is the answer?
The path to discovering the answer lies in learning how to know what the user wants to do at any given moment.
In LilyPond's case, there is definitely a way to do this. At any point in an LY file, there is only a certain number of things you can do. Most of the time, you can't type two consecutive hash marks, unless it's within a string.
But there are also some tricky points. Since Scheme code can be directly embedded within an LY file, a Scheme parser would be needed. Programming languages are open, but the LY language is closed (AFAIK). If it's not closed (maybe it's not), then maybe a program could interpret it as being closed, but still allow this to be a runtime option.
LilyPond users need a program that disallows incorrect input. We want to bypass LilyPond's error checking. The program should be doing the dirty work, weeding out incorrect syntax by default. We don't have time to read LilyPond's error messages, go back and change our file, and try again. That takes too much time.
The user should immediately know if the note they are entering is in the correct octave.
I could continue this list. But hopefully that gives a better sense of what I need from LilyPond. LilyPond could not be easily rewritten. A program written from scratch that competes with LilyPond is unimaginable.
I need a program that provides a helping hand in creating music and doesn't assume the user has read the 1000+ pages of documentation. Some of this help can come from LilyPond itself, in the form of information dumps, but a sizeable amount would need to come from the program itself.
Through this program is currently nonexistent, I created a git repository a while back and pushed a README:
http://repo.or.cz/w/ripple.git
As you can see...it's codename is "Ripple".
~
Patrick
at
12:26 PM
1 comments
24 December 2008
2.12 is out
LilyPond 2.12.0 is out. Go. Download. It. Now. Seriously...it's wonderful! :-)
~
Patrick
at
9:10 AM
1 comments
13 December 2008
The Future of the Internals Reference
I hope you're prepared for another...ahem...*nerdy* post from me. As you have probably noticed, I care about LilyPond a lot. And guess what? The ``Internals Reference'' is a piece of the LilyPond documentation. So again, another post relating to LilyPond. Though LilyPond's Learning Manual and Notation Reference do a good job of explaining how to navigate the Internals Reference, this manual needs some major improvements. And since the Internals Reference is automatically generated from source code, these changes will likely be non-trivial to implement (except for the developers that are proficient in Scheme):
- The ``Music expression'' pages should indicate which ``Music properties'' they support. Implementing a new collection of pages similar to the ``Grob interface'' pages would be nice.
- What are ``Music classes''? I have a vague idea from browsing through the manual, but this concept should be cleared up.
- The list of grob interfaces on the grob pages should be placed above the list of standard settings, i.e. near the top. The current structure is less efficient from a navigation point of view.
- Every grob page should list *precisely* which grob properties the grob supports and *from which* grob interface each grob property belongs. If a grob *supports* an interface, this doesn't mean it supports *every* grob property in the interface; this is why documenting *only* the grob interfaces is less than ideal. However, implementing a system that improves the current setup might require more ``data dumping'' from the C++ side.
- The following items should be differentiated from the source code itself and not hardcoded in Scheme code: (a) Tunable versus internal context properties, (b) Tunable versus internal grob properties, (c) Whether or not a grob support a particular grob interfaces, (d) Precisely which properties a grob supports.
- Brand new sections need to be added to ``4. Scheme functions''. As I noted in an earlier post, there are *many* more Scheme functions available than the ones listed here. However, I admire this section in that it is *truly* auto-generated from source code. Every other section is too hard-coded to be completely useful.
~
Patrick
at
4:09 PM
1 comments
New Glyphs!!
Sweet! Check out these new arrowed-accidental glyphs that have just been added to LilyPond:
These are pretty awesome. I really want to learn Metafont *now*. But there are many programming languages in the queue right now. :-)
Many thanks to Maximilian Albert and Werner Lemberg for adding these glyphs. Cheers!
~
Patrick
at
12:14 AM
1 comments
12 December 2008
Scheme and Lily
A very interesting discussion is happening on the LilyPond Development mailing list (starting here) relating to improving LilyPond's support for tablature notation. LilyPond's syntax, as mandated by the parser, caters more to "note-centric" input; however it seems that tablature notation is best written in terms of "finger positions" without having to worry about what notes are indicated.
This got me thinking about LilyPond's syntax in general. It's "surface" syntax resembles that of TeX or LaTeX, with commands beginning with backslashes and curly braces used as delimiters. But its "beneath-the-surface" syntax uses the Scheme programming language and shows the music events that are taking place. However, this syntax can get pretty wordy and complex.
I think it would be very interesting to try implementing a macro language for the underlying Scheme language using Scheme! After all, that is what Scheme is useful for: building an abstraction on top of another, and another, and another, etc. IMO, this would look very elegant. So instead of typing this:
\version "2.11.65"
I could type this instead:
(version 2.11.65)
And instead of this:
\relative c' { c4 d e f g1 }
I could type:
(relative-to C4 'sequential (c-quarter d e f g-whole))
I don't know yet, but I think it would be kind of neat. :-)
~
Patrick
at
1:06 AM
2
comments
09 December 2008
Millions of Functions
LilyPond's documentation is quite extensive, and it's a great source of information if you're interested in learning how to use the software. Some of LilyPond's documentation is automatically generated straight from Scheme source code. This part of the documentation cover's much of LilyPond's "internals", including a complete list of music expressions, grobs, grob properties, etc. It also covers public functions that are exported to Scheme at runtime from C++ code. All of these functions begin with `ly:', so they are easy to recognize. However, there are *many* functions that are defined in the Scheme source that don't have autogenerated documentation. Some have docstrings, but many do not. Eventually I plan on getting all of these functions documented too, because some of them are incredibly useful. I didn't realize until today that some of these functions are generated *on-the-fly*, so it might be more tricky to document these particular functions. Some examples are `make-simple-markup', `make-bold-markup', etc. In fact, a `make-BLAH-markup' function is created for *every* markup command. So Lily's markup command \simple performs the same operation as `make-simple-markup' would in Scheme. Interesting stuff. I'm slowly becoming more familiar with how LilyPond operates, so the huge number of (unfortunately) undocumented Scheme functions is definitely helping me understand things better.
~
Patrick
at
8:04 PM
1 comments
24 November 2008
Thoughts on operating systems
I have been using Arch Linux now for about 1.5 years. All of the years that I spent in the world of Microsoft Windows is gradually fading from my memory. It's a very strange feeling. I don't have any regrets about using Windows, even though I love my current operating system much more than any Windows system. It was just the natural evolution of things. Windows was what I knew and the only thing I knew. Hell, I loved "tweaking" my system by invoking regedit and deleting or modifying registry keys. It was fun to make Windows faster. But now that I use an operating system that stays fast, at all times, my thinking has thus evolved. I used to have the desire to convert Windows users to GNU/Linux, but that's no longer a desire of mine. I believe, over time, the popularity of GNU/Linux will increase, so the number of users will naturally increase. It would be silly to try and speed up the process. Windows 7...Many people will be switching to it, but I will not. Why? Well, because I'm not really interested in it. My operating system could become Windows-7-esk if I wanted it to be. But no thanks. I would rather have a minimal setup with frequent updates to my favorite applications (one of the perks of Arch Linux); I don't want to pay for it, not have to rely on a commercial company for support, etc. Off to bed...
~
Patrick
at
1:43 AM
1 comments
04 November 2008
Obama is Awesome!!
Congratulations to Mr. Obama for becoming our next President of the U.S.A. YAY!!
~
Patrick
at
8:22 PM
0
comments
26 October 2008
Quote of the Day
My roommate said this earlier (yesterday):
"Buying a laptop with Ubuntu on it was one of the best decisions I've ever made."
I will say nothing further.
~
Patrick
at
12:11 AM
1 comments
25 October 2008
Vim discovery
It will take me a while to get used to this, but I just discovered that <CTRL>+[ is equivalent to <Esc>. OMG. This is amazing. The vimtutor desperately needs to mention this. I'm ecstatic.
~
Patrick
at
11:35 PM
1 comments
23 August 2008
Pushing LilyPond to the extreme!!!
I'm pretty sure that the "shortest" note Sibelius recognizes is the 512th note. I've never *really* used Finale for more than 5 minutes, so I can't tell you how it compares to Sibelius. My *guess* is that it has a similar limit.
Now, LilyPond is a different animal. I knew that LilyPond's limit for *unbeamed* notes is the 64th note, a la:
But, when it comes to *beamed* notes, all I remember hearing is "the sky is the limit". So, I have put LilyPond to the test. Here is a case where LilyPond fares very well with 131072nd notes:
Yes. Now if you ask me, that is FREAKIN' awesome! I won't make you count the beams, but there are 15!!! Trust me! I tried an example with 262144th notes, but the formatting isn't as pleasing:
I'm pretty sure you could squeeze even more extreme note lengths from LilyPond if you use a smaller font size (these examples use the 20pt default). :-P
All I can say is... Take that, Finale and Sibelius!!
(P.S. Click on the images to see them in higher resolution)
~
Patrick
at
4:43 PM
1 comments