"compose" package (music composition) for Puppy Linux

Stuff that has yet to be sorted into a category.
Message
Author
jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

"compose" package (music composition) for Puppy Linux

#1 Post by jeffrey »

[[NOTE: compose.pet split into two parts less than 1MB and attached later in this forum topic]]

It's only 2MB yet includes Philip's Music Writer (PMW 4.12) with my special script wrapper enabling you to compose sheet music and listen to it as you build up the music and lyrics. It's not the best integrated music composing environment, but it works and it's free!

Compose requires timidity (2.13.0 is good). This is 10MB but once you've got that installed the rest is easy. The only catch is that petget makes a miscalculation of the disk space required when installing before a pup_save file is created. To resolve that either 1/ save to disk and reboot, then install timidity, or 2/ edit /usr/sbin/petget replacing 3 with 1 on line 1627.
Timidity can be downloaded using a rick-click and Save Link Target on the following link:
http://distro.ibiblio.org/pub/linux/dis ... 2.13.0.pet

Compose has been tested with Puppy Linux 2.17.1 and has been developed since 2.14, so it may work with earlier releases (and hopefully future ones too!).

Installs to Multimedia menu as Compose. If you want a desktop icon drag /usr/local/bin/compose to the desktop and set the icon to /usr/local/lib/X11/pixmaps/compose48.png.

Bugs: The Help button on the Control window sometimes kills the program, but I don't think that that's my fault...

No licensing issues (that I'm aware of). Executable only provided in my package but the source is freely available on the Internet.
PMW by Philip Hazel. http://www.quercite.com/pmw.html

Have fun.
Jeffrey
Attachments
compose-sample-snapshot2.png
(99.66 KiB) Downloaded 1551 times
Last edited by jeffrey on Fri 24 Aug 2007, 20:48, edited 8 times in total.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#2 Post by Lobster »

there is a 2MB (I think it is is) limit

try this
http://www.murga-linux.com/puppy/viewto ... 9400#99400
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

zygo
Posts: 243
Joined: Sat 08 Apr 2006, 20:15
Location: UK

Where?

#3 Post by zygo »

jeffrey,

This looks very interesting. I'd like to download it. What's the url?

jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

#4 Post by jeffrey »

Hi zygo.
I wish I could post it.
It is really good. Not as pretty as some music composers, no doubt, but quite comprehensive. It can even be fun - you get to see and hear the music as you write it! (well every time you save the text file anyway). Not that I've done much except to compile it and write a reasonable wrapper to make it useable.
I've uploaded it to John Murga's FTP server and asked him to attach it to this post, but he must be busy or isn't reading his messages.
If you want to pull it down by FTP see the post below for details of how to access it. I've placed it in sub-directory 'jeffrey'.
http://murga-linux.com/puppy/viewtopic. ... 9400#99400
Any ideas on how to attach it would be appreciated.
Jeffrey

jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

compose package now attached in two pieces (and a script)

#5 Post by jeffrey »

Thanks to muggins for the notification of the 1MB limit which I didn't see when posting originally (perhaps due to my existing screen snapshot attachment?). I tried again and now see the limit displayed at the top of the message when it is exceeded.
So I split compose into two parts by opening the pet package and separating the directories into two new tar files. These are attached and are both a little under 1MB.

To re-create and install the package:

1. Download both files (compose-1.0.1A.tar.gz and compose-1.0.1B.tar.gz) say to my-documents
2. Extract them both to the single directory (from rxvt) with
gunzip compose*.gz
tar -xf compose-1.0.1A.tar
tar -xf compose-1.0.1B.tar
3. Create the PET package from the merged directory
tar -cf compose-1.0.1.tar compose-1.0.1
gzip compose-1.0.1.tar
tgz2pet compose-1.0.1.tar.gz
4. Install the PET package by clicking on the file from rox (the file manager program)

Note: If steps 2 and 3 are too hard, simply download the attached build-compose.gz script to the same directory as the two compose files and click on it to extract it, and click on the extracted build-compose script to build the PET package. Then install it as per step 4.

Once installed restart JWM to get the Compose entry to appear on the Multimedia menu.

Note that 'compose' uses 'gv' to display the PDF sheet music, but the copy of 'gv' released with Puppy does not have an option to update the display if the PDF changes (which it does in the course of developing the music). Therefore 'compose' renames the released 'gv' as 'gv.orig' and copies in a better version of 'gv'. Perhaps that's being heavy-handed. I may improve on that in a subsequent release.
Attachments
build-compose.gz
(313 Bytes) Downloaded 614 times
Last edited by jeffrey on Mon 27 Aug 2007, 10:00, edited 1 time in total.

zygo
Posts: 243
Joined: Sat 08 Apr 2006, 20:15
Location: UK

#6 Post by zygo »

jeffrey,

I'm unable to install timidity-2.13.0.pet because petget says it hasn't enough memory as you describe. I want to try your second remedy but I am using Puppy 2.17.1 and line 1627 of /usr/sbin/petget has no digit to start with. Can you tell me how to fix my petget. Please.

Also I had to give build-compose execute rights.

jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

#7 Post by jeffrey »

Thanks, zygo.

Apologies for giving insufficient info to modify petget. Open /usr/sbin/petget with geany and search for EXPNEEDB. If you select Find All it will probably be the 4th occurrence. The line in question is
EXPNEEDB=`expr $EXPFILEB \* 3` #.gz can expand about x2, need twice temp space.
Change that "3" to a "1", save the file, and try installing timidity again.

Looks like I transferred the file via VFAT and Windows which dropped the executable bit. [Edit - this has been fixed and the attached file updated.]

ricstef
Posts: 52
Joined: Wed 02 Aug 2006, 02:25
Location: Woodstock, ON. Canada

Compose script

#8 Post by ricstef »

@jeffrey,
I've been trying out the Compose/PMW package that you submitted. I like what I've seen so far. Was wondering if you are interested in some observations? I noticed you select the page size to be "A4" , which is fine until you want to print out the score onto "Letter" size paper that some of us use. Perhaps you could add a choice of A4/Letter on the "Enter a short title" dialog? Also, somewhat less important; a "Re-play" button would be nice perhaps on the "Music Composition Control Window". This would facilitate practicing (singing along). I believe this package has real potential and deserves some more attention.
Cheers,
Richard.

jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

#9 Post by jeffrey »

Hi Richard.
Thanks for the feedback.
I've attached an updated 'compose' script which may do what you want. It creates a .compose-settings file in the my-documents/music directory indicating what the default page size should be. This can be edited manually if you want it to be something other than A4, A3, or Letter.
It also allows the music to be played again without having to change the music definition file.
To use it download the file, click on it to change it from compose.gz to compose, and move it to /usr/local/bin/compose, overwriting the existing copy.
Let me know if that's what you wanted or not.
Jeffrey
Attachments
compose.gz
(3.82 KiB) Downloaded 585 times

ricstef
Posts: 52
Joined: Wed 02 Aug 2006, 02:25
Location: Woodstock, ON. Canada

Compose package

#10 Post by ricstef »

Hi Jeffrey,
Got your update ...
It does everything I asked for. This is cool.
Thank you so much.

Cheers,
Richard

ricstef
Posts: 52
Joined: Wed 02 Aug 2006, 02:25
Location: Woodstock, ON. Canada

"Compose" script

#11 Post by ricstef »

Hi Jeffrey,
1) I belong to a church choir, so I am finding "Compose" quite useful to help me work on songs that are new to me. Now, I have a bunch of songs entered and its becoming obvious that it sure would be nice to group these songs in different directories by genre or type. Something similar to what you did for selecting a new or existing song, could work. Just ask to select a "directory / category" instead of filename.
2) I like the fact that you provide the location of the PMW document. I find myself going to it frequently. Would it be possible to use the address that's provided in the "Help" dialog and turn it into an active URL, which one could click on directly ? Or, perhaps associate it with a button to click which would then display that pdf file ? Is that hard to do with xdialog ?
3) Where can I find a tutorial on xdialog. I'd like to be able to better understand its capabilities.

Cheers,
Richard.

jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

#12 Post by jeffrey »

I'll think about 1 and 2.
3 is pretty easy: http://xdialog.dyns.net/
I find typing "Xdialog" produces a useful help page (which is what I usually use once I've got an idea of the features.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

why two files?

#13 Post by mcewanw »

Hello Jeffrey

I keep meaning to download your package - looks very interesting; I've just been a bit too busy of late.

One thing I am surprised about is that you need to supply it in the form of two separate pieces. Couldn't you upload it to ftp.servage.net and have it made available for download as one file from dotpups.de by asking MU to host it there for you?

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: Compose script

#14 Post by mcewanw »

ricstef wrote:I believe this package has real potential and deserves some more attention.
Cheers,
Richard.
I have tried your package now, Jeffrey. I most certainly agree with Richard.

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

can the instrument be changed?

#15 Post by mcewanw »

Is there a way to change instrument from piano to something else? I've skimmed through the help readme for pmw (i.e. pmw_spec.pdf, but can't see how to do it (assuming it has that facility).

jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

#16 Post by jeffrey »

mcewanw, I did upload the package and asked Mark to make it available (via a personal message) but got no response, hence my rather clumsy solution of providing it in two parts. The piano voice is timidity's default. If you want something else modify the timidity call in the compose script to use a different 'voice' - there's a sample line there for banjo instead - look in the directory indicated to see what the possible voice names are.

Richard, I've attached a modified compose for you to try. This gives sub-directories. I could probably improve on it but it's a start. The Help button in Xdialog doesn't seem to give the option to link to a URL. I'll think about that...
Attachments
compose-1.0.3.gz
(4.2 KiB) Downloaded 354 times

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

he must have missed your message I think

#17 Post by mcewanw »

jeffrey wrote:mcewanw, I did upload the package and asked Mark to make it available (via a personal message) but got no response
Hmmm, I uploaded a couple of apps via Mark recently with no such problem. I suspect he missed your message. I can imagine he gets a lot of mail. I suggest you try again, if you like; its such a good package, I think it would be good to have it stored as one big file.
jeffrey wrote:modify the timidity call in the compose script to use a different 'voice' - there's a sample line there for banjo instead - look in the directory indicated to see what the possible voice names are.
That's great. Thanks. Aaaaagh, music to my ears, I have it playing bagpipes now! :-)

timidity -id -Od $Music.midi --polyphony=2 -x 'bank 0\n0 /usr/local/share/timidity/instruments/bagpipes.pat'
[extract from the slightly modified /usr/local/bin/compose script]

Sorry to pester you with another question, since I'm sure I could find documentation for timidity somewhere on the net. But to save time, the next step up: can it play more than one instrument at a time? Timidity is a pretty big package, so I'm imagining it must be so capable. I'll do a google anyway.

Well, I still don't know how to use two or more instruments from timidity commandline options, but it seems to be possible according to web pages on timidity. For example, the windows frontend to timidity, shown at the link below, clearly shows several tracks, each with a different instrument. If you can point me to more definite info I'd be grateful, thanks. My daughter is learning/playing sax in school jazz-band; she is going to love this program I'm sure!. Windows OS frontend images:

http://timidity.s11.xrea.com/index.en.html#cfgs

ricstef
Posts: 52
Joined: Wed 02 Aug 2006, 02:25
Location: Woodstock, ON. Canada

Compose pkg feature to categorize your music

#18 Post by ricstef »

Hi Jeffrey,
I am a little unsure what all you intended with the "sub directories" feature. Could you please elaborate on how you want us to understand the second dialog.

Code: Select all

"Enter a short title for the music e.g. 'my_music', 'classics/beethoven5'" 
Cheers,
Richard

jeffrey
Posts: 168
Joined: Mon 16 Jan 2006, 04:20
Location: Christchurch, New Zealand

#19 Post by jeffrey »

mcewanw, timidity is able to map different channels to different instruments (but I don't know how to do that either); pmw can produce output for different midi channels using the midichannel directive, although the author does indicate that his midi output is basic. Search through the PMW specification PDF for "midi" and that should give you a good lead. Look especially at midichannel. If you work i out a posting would be appreciated. Some URLs that may help are:
http://linux.die.net/man/1/timidity
http://www.zogotounga.net/GM/GMtimidity.html
Once the current changes settle I'll re-issue it and ask Mark again so that it can be downloaded as one pet file.

Richard, the idea of the sub-directories is that the separate pieces can be grouped by directory. You can have one directory for classics, one for pop, and one for personal. This would give you the option for grouping your pieces by genre, eg genre1/piece1, genre1/piece2, genre2/piece1, genre2/sub-genre1/piece1, etc. Not very pretty but it should work. If this is an important extension I should probably change the music selection window to a more general file browsing window.
Let me know if it's any use. If not, let me know what would work.

I'd be interested in hearing how easy/difficult it is to write music with this interface. Is it next to useless, as good as anything else out there, or really fast and efficient? I'm not trained in music, don't have perfect pitch, etc, so it's a laborious effort for me to generate even the simplest piece, but a musician may have a different perspective.

ricstef
Posts: 52
Joined: Wed 02 Aug 2006, 02:25
Location: Woodstock, ON. Canada

compose pkg

#20 Post by ricstef »

Jeffrey,
Ok, we are talking about the same functionality / need. I think you are trying to do too much for the user and coding too strictly to how I worded my previous request. It wasn't till I played with it for a while that it dawned on me that I find myself at the directory selection window for more than one reason. Each reason invoking different needs.
a) If I want to enter a new song, then what you did is the most efficient way to get there. However,
b) If I'm looking for a song that I entered some time ago and I don't remember how I spelled the name, (whether I used abbreviations or not, or underscores etc) then I can't get there from here. [ I exaggerate for effect ]

So, what I'm thinking now is: a two step selection system works better for the end user to find previously entered songs. And it's no burden for someone wishing to enter a new song either. How I envision it is:
1) The first dialog displays the option for creating a new directory plus the contents of your $BasDir which shows all the already established categories (directories). The same as you had for selecting a file name. I like this method: 1-click-selection ... no spelling mistakes !!
2) The second dialog: exactly the same as you had originally done. I can see what's in that folder. a) if it's not there: create new file. b) if it's there: 1-click-to-select ... no spelling mistakes !! So, the file opens and then comes ... music to my ears. ;-)

Please understand that I am enthusiastic about this concept based on what I have learned so far. It won't hurt my feelings one bit if you tell me that I missed something which invalidates my suggestion. I believe that by this kind of dialogue the functionality can grow and improve incrementally to most peoples satisfaction. Most of the hard technical concerns seem to be solved already. Making the user interface really intuitive is the next challenge and can be just as challenging as the technical nitty gritty.

You mention:
" If this is an important extension I should probably change the music selection window to a more general file browsing window. "
I leave the choice up to you. If you know that this kind of functionality is better realized by that means, fine.
I'm just making suggestions that seem relevant to me. I am sure others will come up with more and different ideas still.

Cheers,
Richard.

Post Reply