Re: question about transposing an interval of a 4th - Looks like I found the answer
2009/1/17 Chip c...@wiegand.org: I'll take you word for it because I don't know the difference between all the transposition types you mention above, haven't even heard of some of 'em. Actually I've only mentioned two types. Suppose you want to transpose { c d e f g a b c } a fourth lower. You could think of { g a b c d e f g } but this result has the following properties: Firstly it does not sound as a c \major scale as if it had fis instead of f. I call this a 'mode' (namely mixolidian) that is not a \major or \minor scale. Secondly, of course it is not a _constant_ fourth below the c \major scale, because { b f } is an augmented fourth, not a just fourth as all others are in this example and always are inside a \major scale, except { b f }. So this type of transposition is called diatonic, it has not constant fourths apart from your initial scale and it looks as a g \major scale adapted to the c \major note set. \transpose would have produced { g a b c d e fis g }, this is a 'real' transposition, it is always a just fourth interval from { c d e, etc. } and it sounds just like a g \major scale, of course. Your 'manual' adjustment has to bring the 'fis' back to 'f' so you do not go out of the c \major note set, this modifies the type of fourth interval from just to augmented. Keep interval, let scale to be modified -- real transposition. Let interval to result modified, keep scale -- diatonic transposition -- Francisco Vila. Badajoz (Spain) http://www.paconet.org ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th - Looks like I found the answer
I figured it out - without any special trickery or anything else. My piece is arrange as follows, a very truncated version of an 8 horn piece - \include \version \header {} \paper {} global = {\key g \major and more stuff } \trumpetnotes1 = { a b c d e f g } trptnotes1 = \relative c''' { \global \trumpetnotes1 } \trumpetnotes2 = { a b c d e f g } trptnotes2 = \relative c''' { \global \trumpetnotes2 } \book { \score { \new StaffGroup = trumpets \new Staff = trumpetnotes1 \trpt1 \new Staff = trumpetnotes2 \trpt2 } \book { \score { \new Staff = trpt1 \trpt1 }} \book { \score { \new Staff = trpt2 \trpt2 }} \layout { \context { \Score } } For this example the above notes are entered in the transposing instrument key. This is for Bb Trumpet, the concert key is F, the Trumpet key is G. Both parts are entered the same, then this is placed in the section for the 2nd Trumpet - \transpose g d \relative c''' { \transpose d g \trptnotes2 } Thus the above example now looks like this - \include \version \header {} \paper {} global = {\key g \major and more stuff } \trumpetnotes1 = { a b c d e f g } trptnotes1 = \relative c''' { \global \trumpetnotes1 } \trumpetnotes2 = { a b c d e f g } *trptnotes2 = \transpose g d \relative c''' { \transpose d g \global \trptnotes2 }* \book { \score { \new StaffGroup = trumpets \new Staff = trumpetnotes1 \trpt1 \new Staff = trumpetnotes2 \trpt2 } \book { \score { \new Staff = trpt1 \trpt1 }} \book { \score { \new Staff = trpt2 \trpt2 }} \layout { \context { \Score } } What happens is the original key is transposed from G to D (changing the key sig from one sharp to two sharps and dropping the written notes a fourth) before the first {, then inside the {} it is transposed again, this time from D to G (leaving the notes in the new position but changing the key sig back to one sharp). I don't understand how or why this works but it does. And whether the interval is diatonic or harmonic, I don't know, but it gets the job done. Then I can just go in and fix very few individual notes as needed. Regards, Chip ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th - Looks like I found the answer
2009/1/16 Chip c...@wiegand.org: I figured it out - without any special trickery or anything else. Of course, but you do need manual adjustments. \transpose g d \relative c''' { \transpose d g \trptnotes2 } \transpose always does chromatic transposition, ie keeping a fixed interval of the same type of fifth or fourth or whatever. For example, usual fourths inside a scale are not fixed, they vary depending of the steps you consider. What happens is the original key is transposed from G to D (changing the key sig from one sharp to two sharps and dropping the written notes a fourth) before the first {, then inside the {} it is transposed again, this time from D to G (leaving the notes in the new position but changing the key sig back to one sharp). Yes, if I remember correctly I already told you that \transpose does transpose the key sig if it is inside of the block being transposed, and does not transpose the key sig if it does not encounter any key sig to transpose inside the block. So you can obtain the same result by transposing a block without \key in it. I don't understand how or why this works but it does. And whether the interval is diatonic or harmonic, I don't know, but it gets the job done. I'd call it chromatic, fixed or real as opposed to diatonic, modal or adapted to a scale. You are obtaining the first kind but you need the second kind. Then I can just go in and fix very few individual notes as needed. That's the problem, it is not automatic but rather it depends not only on the notes being transposed, also on the interval of transposition. Trust me, you are looking for a diatonic transposition tool. -- Francisco Vila. Badajoz (Spain) http://www.paconet.org ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th - Looks like I found the answer
Francisco Vila wrote: 2009/1/16 Chip c...@wiegand.org: I figured it out - without any special trickery or anything else. Of course, but you do need manual adjustments. I can live with that. Maybe someday a tool will be written and built into Lily to do the transposition, until then, I'll make the few adjustments. \transpose g d \relative c''' { \transpose d g \trptnotes2 } \transpose always does chromatic transposition, ie keeping a fixed interval of the same type of fifth or fourth or whatever. For example, usual fourths inside a scale are not fixed, they vary depending of the steps you consider. What happens is the original key is transposed from G to D (changing the key sig from one sharp to two sharps and dropping the written notes a fourth) before the first {, then inside the {} it is transposed again, this time from D to G (leaving the notes in the new position but changing the key sig back to one sharp). Yes, if I remember correctly I already told you that \transpose does transpose the key sig if it is inside of the block being transposed, and does not transpose the key sig if it does not encounter any key sig to transpose inside the block. So you can obtain the same result by transposing a block without \key in it. Yeah, you probably did mention it and I probably missed it in all the banter going back and forth for so long. I don't understand how or why this works but it does. And whether the interval is diatonic or harmonic, I don't know, but it gets the job done. I'd call it chromatic, fixed or real as opposed to diatonic, modal or adapted to a scale. You are obtaining the first kind but you need the second kind. Then I can just go in and fix very few individual notes as needed. That's the problem, it is not automatic but rather it depends not only on the notes being transposed, also on the interval of transposition. Trust me, you are looking for a diatonic transposition tool I'll take you word for it because I don't know the difference between all the transposition types you mention above, haven't even heard of some of 'em. -- Chip ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
M Watts a écrit : Actually, there is a way, but it's just something to muck around with, and takes a lot longer than scrawling stuff by hand on a sheet of ms paper. Mididings, the python-based midi router from http://das.nasophon.de/mididings/, includes a 'diatonic harmonizer', which allows you to add or substitute a harmony line at a specified interval from the notes being played, with respect to the home key. So you could: 1) download install mididings 2) save the following as test.py # start of file # harmonizer.py - example usage of the diatonic harmonizer # from mididings import * from mididings.extra import Harmonize # substitute a fifth above each note played -- equivalent to a fourth below, this only works upwards --, based on the D Major scale run( Harmonize('d', 'major', 'fifth') ) # end of file 3) start Jack 4) run python ./test.py 5) connect a (virtual) midi keyboard to mididings input; connect mididings output to a recorder or sequencer app capable of saving a midi file 6) run midi2ly on the resulting file Merry Christmas! Ditto. Hi, May be there is a shortest way about this loud and not so elegant workaround: I send the Mididings script i use for the Drummer's Gigsaw. It isn't for diatonic transposition but you have some infos about a few different installation and so the opportunity of changing the lilypond midi file towards a resulting midi file, straightforward. Be aware of: import sys and: process_file(sys.argv[1], sys.argv[2] This script comes from the Mididings's author, Dominic Sacré. For more details subscribe and ask for infos on the linux-audio mailing list. linux-audio-user at lists.linuxaudio.org After getting your midi file you can import it in Rosegarden and export a new lilypond file. HTH. -- Phil. Superbonus-Project (Site principal) http://superbonus.project.free.fr Superbonus-Project (Plate-forme d'échange): http://philippe.hezaine.free.fr #!/usr/bin/python # -*- coding:Utf-8 -*- #Filename : mididings-CC7-to-velocity.py from mididings import * import sys class Volume2Velocity: def __init__(self): self.vol = {} def __call__(self, ev): if ev.type_ == CTRL and ev.param == 7: self.vol[ev.channel] = ev.value return None elif ev.type_ == NOTEON and ev.channel in self.vol: ev.velocity = self.vol[ev.channel] return ev process_file(sys.argv[1], sys.argv[2], Call(Volume2Velocity())) # run(Call(Volume2Velocity())) # # # # About Mididings # These excerpts come from the linux-audio-user mailing list at lists.linuxaudio.org #in the thread: [LAU] transform midi Control Change 7 into velocity events? # # # Support for libsmf must be enabled explicitly at compile time # (./setup.py build --enable-smf). # # jack-smf-utils includes libsmf, but doesn't seem to install it for other # programs to use. You'll need the standalone version of libsmf-1.1. # # If there's no package for libsmf, it's probably easiest to install it # the usual, distro-independent way, i.e. extract the tarball and run #./configure make make install # That will install libsmf to /usr/local. If it's still not found after that, # try export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig # before building mididings. #and export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib in ~/.bashrc # #Then just run it as # python /your/path/mididings-CC7-to-velocity.py /your/path/in.mid /your/path/out+veloc.mid # # #How do you uninstall the previous version? Is there some special way? # # Usually when you install a new version to the same prefix, the old files # will simply be overwritten. # To make sure the old version is really gone, you can go to the package # directory (something like /usr/lib/python2.5/site-packages) and remove the # mididings directory and the file _mididings.so. # # # #As far as I can see, all tracks in your MIDI file are on the same #channel, so CC #7 messages on one track will affect the other tracks as #well. You should probably assign a different channel to each track. #No. Like i have said these are drums patterns written by Lilypond. After #the famous transformation i could join all the tracks in one if i want. #Yes, but then you need to do the transformation one track at a time. If you #play multiple tracks through the same MIDI port on the same channel, some #notes will get the wrong velocity (unless every note event is immediately #preceded by a volume change). # # # # Except from the fact that drums samples are always short ( no need of #sustain, only a triggering), is there some reasons why the drums are #always writing with very short durations? #I don't think there's a technical reason why drum notes couldn't be longer. #There's just no need for it, because the note-off is ignored anyway. #Also, two MIDI notes on the same key can't overlap, and making all notes #very short is an easy way for a sequencer to avoid
Re: question about transposing an interval of a 4th
Would it be possible to use your function to do things like inversion? I don't have lilypond installed where I am right now, but I'm thinking something like this: from = { c d e f g a b } to = { c' b a g f e d } The only problem is to know in what octave to translate the note, because in its actual state, the function puts the note transposed just below the note (inside one octave). So we woud have to imagine a system to change this behaviour. Gilles ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Carl D. Sorensen c_soren...@byu.edu writes: You're right, it would be nice to have this. And fortunately, we do. Hurray! Please look in the file scm/music-functions.scm. Search for music-make-music. Exactly what I asked for. This is a function I'm sure gonna play with! In scheme, it does just what your pseudo-code below does. Except that it works in the scheme language mode, which means it works slightly differently that your pseudocode. Of course. The pseudocode only meant to make my intentions clear (and it worked). But a better way to accomplish something like the diatonic transposition that started all of this would be to define a function that diatonically transposes a single pitch, and apply it to the music with the function music-map, which is also defined in scm/music-functions.scm. Yes, indeed. The music-make-music function is very generic, and has the advantage of explicitly enumeration all kinds of things one can encounter in a music expression. My main reason for this email is to address your request for a music expression copier, and show how in general one would play with a music expression. For which I'm very grateful. Stay tuned for nice examples of (ab)using it ;) -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Tim Reeves wrote: Umm... yeah. The fact that he thinks this answers the question gives me *less* confidence that he knows what he's talking about. If he wanted it a perfect fourth lower, then \transpose does the job. And normally when somebody says a fourth lower, they mean a perfect interval. If he wants it a variable fourth lower, then it's not doable without scheme. - Graham Yes, a variable fourth, if you want to call it that - you finally got it. This is like the not-so-helpful answer You can't get there from here. It just took about 20 messages to get to that conclusion. Actually, there is a way, but it's just something to muck around with, and takes a lot longer than scrawling stuff by hand on a sheet of ms paper. Mididings, the python-based midi router from http://das.nasophon.de/mididings/, includes a 'diatonic harmonizer', which allows you to add or substitute a harmony line at a specified interval from the notes being played, with respect to the home key. So you could: 1) download install mididings 2) save the following as test.py # start of file # harmonizer.py - example usage of the diatonic harmonizer # from mididings import * from mididings.extra import Harmonize # substitute a fifth above each note played -- equivalent to a fourth below, this only works upwards --, based on the D Major scale run( Harmonize('d', 'major', 'fifth') ) # end of file 3) start Jack 4) run python ./test.py 5) connect a (virtual) midi keyboard to mididings input; connect mididings output to a recorder or sequencer app capable of saving a midi file 6) run midi2ly on the resulting file Merry Christmas! Ditto. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 24.12.2008 um 13:26 schrieb M Watts: Tim Reeves wrote: Umm... yeah. The fact that he thinks this answers the question gives me *less* confidence that he knows what he's talking about. If he wanted it a perfect fourth lower, then \transpose does the job. And normally when somebody says a fourth lower, they mean a perfect interval. If he wants it a variable fourth lower, then it's not doable without scheme. - Graham Yes, a variable fourth, if you want to call it that - you finally got it. This is like the not-so-helpful answer You can't get there from here. It just took about 20 messages to get to that conclusion. Actually, there is a way, but it's just something to muck around with, and takes a lot longer than scrawling stuff by hand on a sheet of ms paper. Mididings, the python-based midi router from http://das.nasophon.de/ mididings/, includes a 'diatonic harmonizer', which allows you to add or substitute a harmony line at a specified interval from the notes being played, with respect to the home key. So you could: 1) download install mididings 2) save the following as test.py # start of file # harmonizer.py - example usage of the diatonic harmonizer # from mididings import * from mididings.extra import Harmonize # substitute a fifth above each note played -- equivalent to a fourth below, this only works upwards --, based on the D Major scale run( Harmonize('d', 'major', 'fifth') ) # end of file 3) start Jack 4) run python ./test.py 5) connect a (virtual) midi keyboard to mididings input; connect mididings output to a recorder or sequencer app capable of saving a midi file 6) run midi2ly on the resulting file Merry Christmas! Ditto. Yeah, that's about what he actually did. Except he used sibelius instead of whatever free program you mention. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
James E. Bailey wrote: Am 24.12.2008 um 13:26 schrieb M Watts: Tim Reeves wrote: Yes, a variable fourth, if you want to call it that - you finally got it. This is like the not-so-helpful answer You can't get there from here. It just took about 20 messages to get to that conclusion. Actually, there is a way, but it's just something to muck around with, and takes a lot longer than scrawling stuff by hand on a sheet of ms paper. 6) run midi2ly on the resulting file Merry Christmas! Ditto. Yeah, that's about what he actually did. Except he used sibelius instead of whatever free program you mention. Yeah, at least I gave it a try. The conversion didn't work very well. In fact I would've spent more time editing the resulting mess than just rewriting the whole thing manually, which is what I ended up doing. -- chip ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Gilles, very clever! Would it be possible to use your function to do things like inversion? I don't have lilypond installed where I am right now, but I'm thinking something like this: from = { c d e f g a b } to = { c' b a g f e d } If so, this technique could be used to automate some serialist methods such as retrogrades, and perhaps (with some modifications) tone-row multiplications à la Boulez, etc. http://en.wikipedia.org/wiki/Multiplication_(music) The function John is proposing is still valuable because it would automate diatonic transpositions without needing to set \from and \to, but your function may open up a new realm of pitch-mapping possibilities. Thanks for your contribution! Mark ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 22.12.2008 um 20:57 schrieb Graham Percival: On Sun, Dec 21, 2008 at 09:40:48PM -0800, Mark Polesky wrote: If you cannot, or will not, describe what you actually want, it's very difficult to help you. He already has! He clearly stated that he wants to transpose music down a 4th, diatonically: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00557.html If you don't know what diatonic means, look it up! You must be reading a different email at that URL. Cameron: if your melody is in C and goes {a b c}, do you want to get {e f g} or {e fis g} ? Chip: good question, I'm gonna say diatonic and see how that goes. Chip has previously said that he doesn't know music theory, and his answer is not definite. If he'd said I want {e f g}, diatonic., then the discussion would have ended with not possible without scheme programming. But his I'm gonna say and see how that goes doesn't precisely inspire confidence that he actually wants diatonic. I'll point out that half a dozen other people, including music professors, have asked him for clarification after reading that email. So my confusion is not just me being a jerk. Sorry, perhaps you didn't continue the email thread and read http:// lists.gnu.org/archive/html/lilypond-user/2008-12/msg00571.html The second part I want to transpose also for Trumpet, also in the key of D, but a fourth lower. Or perhaps the email here http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00602.html How much clearer can I make it? The questions are answered in the posts right above the questions. A trumpet part in the key of D but notated a fourth lower, still in the key of D, as described above. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
2008/12/22 Mark Polesky markpole...@yahoo.com: There have been 15 replies to Chip's original message, and NO ONE has answered it yet. This is embarrassing. I did, and asked for more information, but no feedback yet. http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00586.html Also, John started cooking a function to help on diatonic transposition. Very advanced! -- Francisco Vila. Badajoz (Spain) http://www.paconet.org ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
2008/12/22 chip c...@wiegand.org: Not everybody has a programmers mind. I don't. I have no interest whatsoever in programming. A person should be able to use a piece of software without having to be a programmer to do so. If a programming degree is necessary to use Lily then it is either a) not complete enough for the general public to use, and a warning message to this effect should be placed on the web site home page, or b) should be aimed at a different audience - programmers/brainiacs. If you use LilyPond, you are a programmer. LilyPond is a programming language*. It has sequences, loops, nested structures, variables. It follows a syntax and gives you a result. Do not follow the syntax and your output will be faulty or inexistent. Young starters say: I've heard about MS-DOS before :-) -- *Fairly specialized and not Turing-complete (or is it?). -- Francisco Vila. Badajoz (Spain) http://www.paconet.org ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Carl D. Sorensen c_soren...@byu.edu writes: Examples of how LilyPond uses scheme are found in [...] It would be nice to have a boilerplate scheme function that processes an arbitrary music expression and returns a new expression that is an identical copy of the original expression. In some arbitrary pseudo-code: function X takes music-expression Y returns music-expression new Z for each element of Y if element is note append note to Z else if element is rest append rest to Z else ... maybe some more cases ... else append element to Z return Z This would make it easy to experiment with manipulation of music expressions. In Chip's case: ... if element is note subtrackt 4 from pitch append note to Z else ... -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 23.12.2008 um 11:07 schrieb Francisco Vila: 2008/12/22 chip c...@wiegand.org: Not everybody has a programmers mind. I don't. I have no interest whatsoever in programming. A person should be able to use a piece of software without having to be a programmer to do so. If a programming degree is necessary to use Lily then it is either a) not complete enough for the general public to use, and a warning message to this effect should be placed on the web site home page, or b) should be aimed at a different audience - programmers/brainiacs. If you use LilyPond, you are a programmer. LilyPond is a programming language*. It has sequences, loops, nested structures, variables. It follows a syntax and gives you a result. Do not follow the syntax and your output will be faulty or inexistent. Having read the introduction to How to Design Programs everything is programming. I guess we need to distinguish between different types of programming then. I certainly wouldn't call using microsoft word programming, but according to How to Design Programs, it is. I think what he means here is that the programming required to use the Scheme aspect of lilypond requires considerably more pre-existing knowledge about designing software than to the knowledge one needs to program a Microsoft Word Document.___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
James E. Bailey derhindem...@googlemail.com writes: I guess we need to distinguish between different types of programming then. Yes. There's a LP level and a Scheme level. The LP level is accessible to many more people than the Scheme level. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On 22.12.2008 (12:03), Graham Percival wrote: On Mon, Dec 22, 2008 at 06:21:56PM +0100, Eyolf ?strem wrote: 1. Make no mistake about it: using LilyPond IS to be a programmer, to a greater or lesser extent. And even though the plain an simple sheets with a melody line and a title just calls for a scripting language programmer, Not only that, but simply thinking about music expressions requires a certain amount of programmer-like thought. I still see newbies posting here when their misunderstanding traces back to not understanding music expressions... but hopefully that will lessen once 2.12 is out and people read the updated tutorial. Precisely. And there are three levels here, which require different treatment: a) what is a music expression in the first place (a compound something something which can consist of any number of elements of different types denoting musical content, with properties which can be tuned in various ways). This I think is taken well care of in the new docs; b) all the different kinds of properties, the problem here being mainly syntactical: there is a bewildering amount of possibilities, not necessarily easy to find (although it has improved a lot) and every letter has to be EXACTLY RIGHT. This is where a macro layer would be helpful, but as On 22.12.2008 (14:52), Carl D. Sorensen wrote: This may be possible as far as scheme is concerned, but I don't think it's possible for context properties. Until all collisions and spacing can be automatically resolved, users will need access to the context properties in order to resolve collisions or incorrect spacing. Although I don't imagine a macro system *replacing* the direct access, only *simplifying* it. c) scheme functions; the real programming stuff: how to automate tasks, use loops and conditions, etc. Realistically, this is probabaly where a user with no interest in or experience with programming will be lost anyway, so apart from explaining what all those parentheses do, there may not be much more to do than to say learn scheme and point to some good introductions. A macro layer would be helpful, though. As also, on 22.12.2008 (14:52), Carl D. Sorensen wrote: Predefined scheme packages are a great idea, IMO. On 22.12.2008 (12:03), Graham Percival wrote: 2. Minimize the visibility of scheme (and the direct envolvement with LP's context properties etc.) by developing a more complete macro layer between the user and the backend, the way LaTeX sits between TeX and the user. Stuff along those lines are planned for GOP... Good! but just like the extent of doc work in GDP, it all depends on the amount of time and effort that users are prepared to give. Of course. Eyolf -- It is exactly because a man cannot do a thing that he is a proper judge of it. -- Oscar Wilde ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Tue, Dec 23, 2008 at 10:00:21AM +0100, James E. Bailey wrote: Am 22.12.2008 um 20:57 schrieb Graham Percival: I'll point out that half a dozen other people, including music professors, have asked him for clarification after reading that email. So my confusion is not just me being a jerk. Sorry, perhaps you didn't continue the email thread and read http:// lists.gnu.org/archive/html/lilypond-user/2008-12/msg00571.html The second part I want to transpose also for Trumpet, also in the key of D, but a fourth lower. Or perhaps the email here http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00602.html How much clearer can I make it? The questions are answered in the posts right above the questions. A trumpet part in the key of D but notated a fourth lower, still in the key of D, as described above. Umm... yeah. The fact that he thinks this answers the question gives me *less* confidence that he knows what he's talking about. If he wanted it a perfect fourth lower, then \transpose does the job. And normally when somebody says a fourth lower, they mean a perfect interval. If he wants it a variable fourth lower, then it's not doable without scheme. - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Johan, On 12/23/08 3:18 AM, Johan Vromans jvrom...@squirrel.nl wrote: Carl D. Sorensen c_soren...@byu.edu writes: Examples of how LilyPond uses scheme are found in [...] It would be nice to have a boilerplate scheme function that processes an arbitrary music expression and returns a new expression that is an identical copy of the original expression. You're right, it would be nice to have this. And fortunately, we do. Please look in the file scm/music-functions.scm. Search for music-make-music. In scheme, it does just what your pseudo-code below does. Except that it works in the scheme language mode, which means it works slightly differently that your pseudocode. 1. Z is not a separate variable, but stored in the return value of the function. 2. Instead of for each to handle the music expression in a loop, it's handled by recursion with the map function. But you can see in the body of the function what the data structure is for moments, durations, and pitches. It would be possible copy this function and use it as you have suggested. But a better way to accomplish something like the diatonic transposition that started all of this would be to define a function that diatonically transposes a single pitch, and apply it to the music with the function music-map, which is also defined in scm/music-functions.scm. So you'd have something like (define (diatonic-transpose interval music) (if (ly:pitch? music) (diatonic-transposition interval music) (music))) And you'd apply it as (music-map (lambda(x) (diatonic-transpose interval x)) music) Which would recursively apply your diatonic transpose function to every element of the music expression -- and it does nothing to anything but pitches. Note that I still haven't said how the transposition happens -- that magic takes place in diatonic-transposition. And I don't know how to do that yet. But it sounds like John is working on it. My main reason for this email is to address your request for a music expression copier, and show how in general one would play with a music expression. Thanks, Carl ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
I didn't follow all the thread but coming back to the original message, I have tried to make a little scheme function which seems to work. (see attached file) It can be also usefull for changing the mode of a music (major to minor for example). Merry Christmas. Gilles \version 2.11.63 %% change \to to want you want. %% changing the f to fis in \to is equivalent to a traditional \transpose from = { c d e f g a b } to ={ g a b c d e f } %% to = { c d ees f g aes b } %% to test a different mode % If you want to test music with alterations, uncomment that : %% from = {\from \transpose c cis \from \transpose c ces \from } %% to ={ \to \transpose c cis \to \transpose c ces \to } #(define (pair=? pair1 pair2) (or ( (car pair1) (car pair2)) (and (= (car pair1) (car pair2)) (or ( (cdr pair1) (cdr pair2)) (= (cdr pair1) (cdr pair2)) #(define (music-pitch-list music) (let ((res '())) (music-filter (lambda (x) (let ((p (ly:music-property x 'pitch))) (if (ly:pitch? p) (set! res (append res (list (cons (ly:pitch-notename p) (ly:pitch-alteration p)) #t)) music) res )) customTranspose = #(define-music-function (parser location music) (ly:music?) (let ((from-list (music-pitch-list from)) (to-list (music-pitch-list to))) (music-map (lambda (event) (let ((p (ly:music-property event 'pitch))) (if (ly:pitch? p) (let* ((pitch-data (cons (ly:pitch-notename p) (ly:pitch-alteration p))) (data-list (member pitch-data from-list)) (data-index (if data-list (- (length from-list)(length data-list)) (ly:error ~a don't define in from music p))) (new-pitch-data (list-ref to-list data-index )) (new-pitch (if (pair=? new-pitch-data pitch-data) (ly:make-pitch (ly:pitch-octave p) (car new-pitch-data) (cdr new-pitch-data)) (ly:make-pitch (1- (ly:pitch-octave p)) (car new-pitch-data) (cdr new-pitch-data) (ly:music-set-property! event 'pitch new-pitch))) event)) music))) % If you want alterations in music, you have to redefine \from and \to music = \relative { c e g c b a g f e d c b c1 } \score { \new Staff \music \new Staff \customTranspose \music } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Umm... yeah. The fact that he thinks this answers the question gives me *less* confidence that he knows what he's talking about. If he wanted it a perfect fourth lower, then \transpose does the job. And normally when somebody says a fourth lower, they mean a perfect interval. If he wants it a variable fourth lower, then it's not doable without scheme. - Graham Yes, a variable fourth, if you want to call it that - you finally got it. This is like the not-so-helpful answer You can't get there from here. It just took about 20 messages to get to that conclusion. Merry Christmas!___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 22.12.2008 um 05:42 schrieb Graham Percival: Chip, I am 90% convinced that the solution to your problem was posted here: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00586.html http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00585.html With another person trying to figure out what you wanted here: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00581.html None of those solutions involve programming, and they are easily constructed with the knowledge in the LM. If you cannot, or will not, describe what you actually want, it's very difficult to help you. I think what Graham's trying to say (but he has difficulty formulating these kinds of things) is this: \version 2.11.65 notes = { c d e f g a h c } TrptOne = { \key d \major \transpose c d \relative c'' { \notes } } TrptTwo = { \key d \major \transpose d a, { \transpose c d \relative c'' { \notes } } } \score { \relative c'' \notes \TrptOne \TrptTwo } I find it interesting that Graham can't help people--he feels the need to teach them. Sometimes people don't understand how the functions in lilypond work. And then we have the quarterly, Graham, stop being an ass to the newbies email. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
James, this is nice, but I don't think it's right. Chip, correct me if I'm wrong, but I think the second-to-last note in the 3rd staff should be G-natural, not G-sharp. G-sharp is not diatonic in the key of D major. As far as I can tell, only John's proposed (and unfinished) solution avoids this problem. - Mark James E. Bailey wrote: \version 2.11.65 notes = { c d e f g a h c } TrptOne = { \key d \major \transpose c d \relative c'' { \notes } } TrptTwo = { \key d \major \transpose d a, { \transpose c d \relative c'' { \notes } } } \score { \relative c'' \notes \TrptOne \TrptTwo } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Totally didn't even see the sharp sign. It's early. Am 22.12.2008 um 09:39 schrieb Mark Polesky: James, this is nice, but I don't think it's right. Chip, correct me if I'm wrong, but I think the second-to-last note in the 3rd staff should be G-natural, not G-sharp. G-sharp is not diatonic in the key of D major. As far as I can tell, only John's proposed (and unfinished) solution avoids this problem. - Mark James E. Bailey wrote: \version 2.11.65 notes = { c d e f g a h c } TrptOne = { \key d \major \transpose c d \relative c'' { \notes } } TrptTwo = { \key d \major \transpose d a, { \transpose c d \relative c'' { \notes } } } \score { \relative c'' \notes \TrptOne \TrptTwo } ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 22.12.2008 um 03:52 schrieb Graham Percival: On Sun, Dec 21, 2008 at 06:30:18PM -0800, Mark Polesky wrote: Graham, Great, that helps a lot. I haven't got a clue what scheme is. In that case, may I courteously extend an invitation that you read the bloody Learning Manual? Please stop the sarcasm and the indecency. If you're trying to be funny, it isn't working. It's a continuation of this email: http://lists.gnu.org/archive/html/lilypond-user/2008-11/msg00439.html If he doesn't know what scheme is, then he clearly *hasn't* read the LM cover-to-cover yet. This means that he's missed some terminology, missed some of the possibilities of lilypond, and won't be able to communicate with the lilypond community as effectively. Oh, I've read the Learning Manual cover to cover (well, it may have been changed since then, it was some months ago), and I don't understand Scheme. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. What are you doing? Are you trying to turn people away from LilyPond? You seem to be unfamiliar with the phrase an exercise for the reader. The idea is that solving the problem is a useful exercise. I don't think the original question asked for an exercise. There have been 15 replies to Chip's original message, and NO ONE has answered it yet. This is embarrassing. If it were as easy to the rest of us as it obviously is to you, someone would have answered it. A user asks a perfectly legitimate question, and the response is, go figure it out. Give a man a fish, teach a man to fish... Apparently you, valentin, nicolas and John are the only people on this list who know how to fish. And no one's sharing how. But what you're doing is the opposite of helpful. So please, stop. Since it's such an elementary exercise, please provide it, now. I assume it'll only take a minute. Then we can all learn. 1. Look at the selected snippets for \transpose. There's an example that's very close to what he wants. I'm guessing you mean transposing music with minimum accidentals 2. Look at { \displayMusic { a ais d dis } } to get some info about how lilypond treats pitches. The idea is to write a function that translates a ais into d dis. That goes into Scheme. I don't know if it's possible for you, but try reading LM B.1 as if this were your introduction into a programming language, lilypond being your introduction to source code. It's completely confusing. It doesn't explain anything, I have no idea what parser, location, padding, marktext, number? string? $padding +inf, -inf, or any of the other Scheme-specific things there mean. But that's okay, it isn't the Scheme documentation, it's the lilypond documentation. But, to assume that a user could, from the doucmentation in the learning manual understand how to construct anything in scheme. (I, not knowing anything about Scheme assumed I could just type #this is a string and see it printed out.) So, while someone who understands the output of { \displayMusic { a ais d dis } } might be able to figure out how to do what he wants to do, in the interim, can you, o great and wise graham, give us our first lesson in programming and explain what the output of { \displayMusic { a ais d dis } } means so that those of us who have only had musical instruction, and no programming instruction can learn how to fish write a function that translates a ais into d dis 3. Modify the existing example so that instead of producing notes with few accidentals, it changes the notename by the desired interval. - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Cameron Horsburgh ca...@netcall.com.au writes: He wants it diatonic, so it's not that easy. \transpose c' g {a b c} would produce {e fis g} instead of {e f g}. I'd say that deserves an additional function, e.g. \transposePitch #-4 { a b c } I'd also say that it would not be necessary for all LilyPond users to become experienced Scheme programmers. So if someone wants to write this function and share it with us many users will be grateful. -- Johan ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
chip wrote: Am 21.12.2008 um 19:07 schrieb chip: I input in Concert C, transpose to the key of D for Trumpet. \transpose c d {} The First Trumpet part transposes to the key of D just fine. I would like to just copy/paste the first part into the second part. What's the second part? As mentioned just above your question - it's the first trumpet part, just copied/pasted into the 2nd trumpet part. The second part I want to transpose also for Trumpet, also in the key of D, but a fourth lower. In the key of d, but a fourth lower. Do you mean the key of a? Key of A? No, as I said in my post - in the key of D. Or do you want the part in D major, but a fourth lower than the first part? Yes, as I said, a fourth lower, in the key of D. I'm a little confused as to what you want. If it's the the latter, then yeah, it's probably doable in scheme, but I don't know scheme and can't help you there, and I would just say type it a fourth lower. melody = {c d e f g a b} trumpet 1 = {d e fâ g a b câ} trumpet 2 = {a b câ d e fâ gâ} ?? trumpet 2 = {a b câ d e fâ g} ?? If my piece were only 7 notes long that would work just fine. Graham Percival wrote: Chip, I am 90% convinced that the solution to your problem was posted here: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00586.html http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00585.html With another person trying to figure out what you wanted here: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00581.html None of those solutions involve programming, and they are easily constructed with the knowledge in the LM. If you cannot, or will not, describe what you actually want, it's very difficult to help you. How much clearer can I make it? The questions are answered in the posts right above the questions. A trumpet part in the key of D but notated a fourth lower, still in the key of D, as described above. The problem here is that you haven't made it clear whether you want *perfect* fourths or not. The solution I sent to the list did what you said, put the 2nd trumpet part a fourth lower without changing the key signature, but yes it has a G-sharp where the original had a C-sharp. That doesn't mean it changed the key signature, it just has the occasional accidental to maintain the perfect fourths. If you say 4ths, you have to be specific. If you want everything to be *some* kind of fourth that will never create an accidental, then it's harder to do, hence everyone's confusion. Sorry you had to type everything again. Seems like you could copy/paste the whole part, then just change the c-sharps to c naturals if you want the transposed part to have G naturals. Good luck with the rehearsal/performance :) Jon -- Jonathan Kulp http://www.jonathankulp.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Le lundi 22 décembre 2008 à 10:56 +0100, James E. Bailey a écrit : Am 22.12.2008 um 03:52 schrieb Graham Percival: Oh, I've read the Learning Manual cover to cover (well, it may have been changed since then, it was some months ago), and I don't understand Scheme. Indeed: there is currently no thing in all LilyPond documentation that introduces Scheme programming for non-programmers. Give a man a fish, teach a man to fish... Apparently you, valentin, nicolas and John are the only people on this list who know how to fish. And no one's sharing how. We can't share this on this list, but it'd be cool to have an introduction to programming based on Scheme and demonstrating applications in LilyPond; however, even this is a lot of work and there are more urgent and basic things to do in the next 2 months. Cheers, John ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 22.12.2008 um 14:04 schrieb John Mandereau: Le lundi 22 décembre 2008 à 10:56 +0100, James E. Bailey a écrit : Am 22.12.2008 um 03:52 schrieb Graham Percival: Oh, I've read the Learning Manual cover to cover (well, it may have been changed since then, it was some months ago), and I don't understand Scheme. Indeed: there is currently no thing in all LilyPond documentation that introduces Scheme programming for non-programmers. And there shouldn't be, in my opinion. Give a man a fish, teach a man to fish... Apparently you, valentin, nicolas and John are the only people on this list who know how to fish. And no one's sharing how. We can't share this on this list, but it'd be cool to have an introduction to programming based on Scheme and demonstrating applications in LilyPond; however, even this is a lot of work and there are more urgent and basic things to do in the next 2 months. Given that, I'd say that the easiest solution would be to just tell us. Incidentally, he did make it clear, he wants a diatonic fourth. So, c sharp in trumpet one is g natural in trumpet 2, not g sharp. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
If you're looking for a relatively gentle introduction to Scheme, I can make a few suggestions, but as you probably already know, it's not easy to grasp from far away. Maybe just ask questions? Many people, even experienced programmers have great difficulty understanding scheme and other lisp-like languages... Here are some ideas: Want to learn by watching video? - 20 hours of very high quality instruction from the masters of Scheme: http://groups.csail.mit.edu/mac/classes/6.001/abelson-sussman-lectures/ the same thing is available in perhaps easier form as a book: *The Structure and Interpretation of Computer Programs* a.k.a. SICP http://mitpress.mit.edu/sicp/full-text/book/book.html (also available for purchase in stores, amazon, etc.) A detailed overview is on-line at: http://en.wikipedia.org/wiki/Scheme_(programming_language) A great source of reference is: http://www.schemers.org/ Hope this helps! Cheers, GF. -- Forwarded message -- From: James E. Bailey derhindem...@googlemail.com To: John Mandereau john.mander...@gmail.com Date: Mon, 22 Dec 2008 15:14:18 +0100 Subject: Re: question about transposing an interval of a 4th Am 22.12.2008 um 14:04 schrieb John Mandereau: Le lundi 22 décembre 2008 à 10:56 +0100, James E. Bailey a écrit : Am 22.12.2008 um 03:52 schrieb Graham Percival: Oh, I've read the Learning Manual cover to cover (well, it may have been changed since then, it was some months ago), and I don't understand Scheme. Indeed: there is currently no thing in all LilyPond documentation that introduces Scheme programming for non-programmers. And there shouldn't be, in my opinion. Give a man a fish, teach a man to fish... Apparently you, valentin, nicolas and John are the only people on this list who know how to fish. And no one's sharing how. We can't share this on this list, but it'd be cool to have an introduction to programming based on Scheme and demonstrating applications in LilyPond; however, even this is a lot of work and there are more urgent and basic things to do in the next 2 months. Given that, I'd say that the easiest solution would be to just tell us. Incidentally, he did make it clear, he wants a diatonic fourth. So, c sharp in trumpet one is g natural in trumpet 2, not g sharp. ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Le lundi 22 décembre 2008 à 15:14 +0100, James E. Bailey a écrit : Am 22.12.2008 um 14:04 schrieb John Mandereau: Indeed: there is currently no thing in all LilyPond documentation that introduces Scheme programming for non-programmers. And there shouldn't be, in my opinion. Why not? I'm sure a not so small amount of users would like to program with LilyPond, so revising and extending the Scheme tutorial is a solution IMHO. We can't share this on this list, but it'd be cool to have an introduction to programming based on Scheme and demonstrating applications in LilyPond; however, even this is a lot of work and there are more urgent and basic things to do in the next 2 months. Given that, I'd say that the easiest solution would be to just tell us. It's not just a matter of telling you; teaching how to fish (or programming Scheme) takes a long time, and I don't have that much time to teach Scheme on the list for free. GF proposed a lot of links in this thread, I'm sure you'll find something that will fit your needs. Incidentally, he did make it clear, he wants a diatonic fourth. So, c sharp in trumpet one is g natural in trumpet 2, not g sharp. Then wait for the diatonicTranspose function until Christmas :-P John ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On 22.12.2008 (17:37), John Mandereau wrote: Le lundi 22 décembre 2008 à 15:14 +0100, James E. Bailey a écrit : Am 22.12.2008 um 14:04 schrieb John Mandereau: Indeed: there is currently no thing in all LilyPond documentation that introduces Scheme programming for non-programmers. And there shouldn't be, in my opinion. Why not? I'm sure a not so small amount of users would like to program with LilyPond, so revising and extending the Scheme tutorial is a solution IMHO. There are two solutions in the long run, taking two different approaches, which are not necessarily incompatible -- in fact, they should be combined, but they both call for efforts in different areas: 1. Make no mistake about it: using LilyPond IS to be a programmer, to a greater or lesser extent. And even though the plain an simple sheets with a melody line and a title just calls for a scripting language programmer, most people will sooner or later want/need to take one step further. Scheme is -- at least the way LP works at the moment -- an essential part of that. A full-scale scheme-from-the-LilyPond-perspetive tutorial would be nice to have, but a less ambitious solution would be a thorough and precise description of the INTERFACE between the two (How does LP use scheme? or How will an LP user use scheme profitably?), together with a brief description of the most common elements of scheme. I'd add also an outline of which things HAVE to be the way they are (because of requirements within scheme) and which are arbitrary in the sense that they are the way they are because of choices made by the LP developers. 2. Minimize the visibility of scheme (and the direct envolvement with LP's context properties etc.) by developing a more complete macro layer between the user and the backend, the way LaTeX sits between TeX and the user. This might probably be done to a large extent with today's LP, but the full consequence of this approach would be to modularize LP -- let the core program take care of the typesetting mechanics, and make packages for Gregorian chant, for harp music, for lead sheets, etc., i.e. for WHAT to typeset and for how the user communicates with the typesetting backend. One could think of it as an extended and systematized LSR: not just isolated examples of how to solve a particular problem, but a system of task-oriented packages. I'm sure there are disadvantages with this (in addition to the the necessary development time), but there are certainly also advantages -- one of them being to minimize the need for threads like this one. Eyolf -- A wizard cannot do everything; a fact most magicians are reticent to admit, let alone discuss with prospective clients. Still, the fact remains that there are certain objects, and people, that are, for one reason or another, completely immune to any direct magical spell. It is for this group of beings that the magician learns the subtleties of using indirect spells. It also does no harm, in dealing with these matters, to carry a large club near your person at all times. -- The Teachings of Ebenezum, Volume VIII ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 22.12.2008 um 17:37 schrieb John Mandereau: Le lundi 22 décembre 2008 à 15:14 +0100, James E. Bailey a écrit : Am 22.12.2008 um 14:04 schrieb John Mandereau: Indeed: there is currently no thing in all LilyPond documentation that introduces Scheme programming for non-programmers. And there shouldn't be, in my opinion. Why not? I'm sure a not so small amount of users would like to program with LilyPond, so revising and extending the Scheme tutorial is a solution IMHO. Okay. if someone wants to take the time to write it... I mean, I'm not Graham, or anything, but its would seem to me that a Scheme tutorial should be the place to look to learn about Scheme, and the lilypond tutorial would be the place to learn about lilypond. In fact, (having absolutely zero knowledge about Scheme,) I could easily envision the Scheme tutorial in lilypond being a very large project. We can't share this on this list, but it'd be cool to have an introduction to programming based on Scheme and demonstrating applications in LilyPond; however, even this is a lot of work and there are more urgent and basic things to do in the next 2 months. Given that, I'd say that the easiest solution would be to just tell us. It's not just a matter of telling you; teaching how to fish (or programming Scheme) takes a long time, and I don't have that much time to teach Scheme on the list for free. GF proposed a lot of links in this thread, I'm sure you'll find something that will fit your needs. Again, I have no knowledge about Scheme, or programming in general, but I have the feeling it would be like learning how to read music. Something which I definitely do not have the time for or desire to learn. Incidentally, he did make it clear, he wants a diatonic fourth. So, c sharp in trumpet one is g natural in trumpet 2, not g sharp. Then wait for the diatonicTranspose function until Christmas :-P Wow, that sounds awesome. I love it when lilypond does things automagically. John ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Sun, Dec 21, 2008 at 09:40:48PM -0800, Mark Polesky wrote: If you cannot, or will not, describe what you actually want, it's very difficult to help you. He already has! He clearly stated that he wants to transpose music down a 4th, diatonically: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00557.html If you don't know what diatonic means, look it up! You must be reading a different email at that URL. Cameron: if your melody is in C and goes {a b c}, do you want to get {e f g} or {e fis g} ? Chip: good question, I'm gonna say diatonic and see how that goes. Chip has previously said that he doesn't know music theory, and his answer is not definite. If he'd said I want {e f g}, diatonic., then the discussion would have ended with not possible without scheme programming. But his I'm gonna say and see how that goes doesn't precisely inspire confidence that he actually wants diatonic. I'll point out that half a dozen other people, including music professors, have asked him for clarification after reading that email. So my confusion is not just me being a jerk. - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Mon, Dec 22, 2008 at 06:21:56PM +0100, Eyolf ?strem wrote: On 22.12.2008 (17:37), John Mandereau wrote: Why not? I'm sure a not so small amount of users would like to program with LilyPond, so revising and extending the Scheme tutorial is a solution IMHO. It was on the cards for GDP, but was dropped quite early on due to insufficient resources. IIRC at least three people really wanted to rewrite the Scheme chapter, but I had to tell them all to focus on NR 1+2. 1. Make no mistake about it: using LilyPond IS to be a programmer, to a greater or lesser extent. And even though the plain an simple sheets with a melody line and a title just calls for a scripting language programmer, Not only that, but simply thinking about music expressions requires a certain amount of programmer-like thought. I still see newbies posting here when their misunderstanding traces back to not understanding music expressions... but hopefully that will lessen once 2.12 is out and people read the updated tutorial. 2. Minimize the visibility of scheme (and the direct envolvement with LP's context properties etc.) by developing a more complete macro layer between the user and the backend, the way LaTeX sits between TeX and the user. Stuff along those lines are planned for GOP... but just like the extent of doc work in GDP, it all depends on the amount of time and effort that users are prepared to give. Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On 12/22/08 10:21 AM, Eyolf Østrem ey...@oestrem.com wrote: On 22.12.2008 (17:37), John Mandereau wrote: Le lundi 22 décembre 2008 à 15:14 +0100, James E. Bailey a écrit : Am 22.12.2008 um 14:04 schrieb John Mandereau: Indeed: there is currently no thing in all LilyPond documentation that introduces Scheme programming for non-programmers. And there shouldn't be, in my opinion. Why not? I'm sure a not so small amount of users would like to program with LilyPond, so revising and extending the Scheme tutorial is a solution IMHO. There are two solutions in the long run, taking two different approaches, which are not necessarily incompatible -- in fact, they should be combined, but they both call for efforts in different areas: 1. Make no mistake about it: using LilyPond IS to be a programmer, to a greater or lesser extent. And even though the plain an simple sheets with a melody line and a title just calls for a scripting language programmer, most people will sooner or later want/need to take one step further. Scheme is -- at least the way LP works at the moment -- an essential part of that. A full-scale scheme-from-the-LilyPond-perspetive tutorial would be nice to have, but a less ambitious solution would be a thorough and precise description of the INTERFACE between the two (How does LP use scheme? or How will an LP user use scheme profitably?), together with a brief description of the most common elements of scheme. I'd add also an outline of which things HAVE to be the way they are (because of requirements within scheme) and which are arbitrary in the sense that they are the way they are because of choices made by the LP developers. Examples of how LilyPond uses scheme are found in chapter 6 of the Notation Reference. I'm currently tasked with rewriting this chapter, but I haven't got it figured out yet. Perhaps during the Christmas Break 2. Minimize the visibility of scheme (and the direct envolvement with LP's context properties etc.) by developing a more complete macro layer between the user and the backend, the way LaTeX sits between TeX and the user. This might probably be done to a large extent with today's LP, but the full consequence of this approach would be to modularize LP -- let the core program take care of the typesetting mechanics, and make packages for Gregorian chant, for harp music, for lead sheets, etc., i.e. for WHAT to typeset and for how the user communicates with the typesetting backend. One could think of it as an extended and systematized LSR: not just isolated examples of how to solve a particular problem, but a system of task-oriented packages. I'm sure there are disadvantages with this (in addition to the the necessary development time), but there are certainly also advantages -- one of them being to minimize the need for threads like this one. This may be possible as far as scheme is concerned, but I don't think it's possible for context properties. Until all collisions and spacing can be automatically resolved, users will need access to the context properties in order to resolve collisions or incorrect spacing. Predefined scheme packages are a great idea, IMO. Carl ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
I must say I had no idea that this would turn into such a big deal. As for the piece I am working on - I've spent the morning typing in the notes for all the parts long hand, figuring out the intervals as I go, for each individual instrument. If a scheme program, or whatever it's called, is ever written to create intervals, great. But until then, it's many hours of work writing it all out. So be it. At least the piece is ready for the band to site read tonight. -- Chip ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Sat, Dec 20, 2008 at 11:49:10PM -0800, Graham Percival wrote: Then stick a \transpose c' g' in there. Read the doc section about transposition for help. ... I really don't understand this question. If you already know how to transpose from C to Bb, why on earth do you need to ask how to transpose from C to G ?! - Graham He wants it diatonic, so it's not that easy. \transpose c' g {a b c} would produce {e fis g} instead of {e f g}. Even then, the extra \relative makes things get very messy: melody = {a b c d e f g} \relative c''{ \melody \\ {\transpose c' g {\relative c''{\melody}}} } -- Cameron Horsburgh Blog: http://spiritcry.wordpress.com/ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Sun, Dec 21, 2008 at 11:26:16PM +1100, Cameron Horsburgh wrote: On Sat, Dec 20, 2008 at 11:49:10PM -0800, Graham Percival wrote: ... I really don't understand this question. If you already know how to transpose from C to Bb, why on earth do you need to ask how to transpose from C to G ?! He wants it diatonic, so it's not that easy. \transpose c' g {a b c} would produce {e fis g} instead of {e f g}. Oops, I forgot my first-year theory. In this case, he'd need to write a scheme function. Actually, it wouldn't be hard at all... this is a perfect intro-level scheme tweak. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. :) Even then, the extra \relative makes things get very messy: Then omit it. melody = {a b c d e f g} { \melody \\ { \transpose c' g \melody }} Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Graham Percival wrote: Then stick a \transpose c' g' in there. Read the doc section about transposition for help. ... I really don't understand this question. If you already know how to transpose from C to Bb, why on earth do you need to ask how to transpose from C to G ?! - Graham Becuase when I do that it changes the key signature. I want the key signature to remain the same. I input in Concert C, transpose to the key of D for Trumpet. The First Trumpet part transposes to the key of D just fine. I would like to just copy/paste the first part into the second part. The second part I want to transpose also for Trumpet, also in the key of D, but a fourth lower. I was just hoping to be able to have Lily do that so I don't have to rewrite all the notes a fourth lower. If that's how it has to be done then so be it. -- Chip On Sat, Dec 20, 2008 at 07:06:01PM -0700, chip wrote: good question, I'm gonna say diatonic and see how that goes. Cameron Horsburgh wrote: On Sat, Dec 20, 2008 at 06:16:18PM -0700, chip wrote: I am inputing a piece in concert C, the use \transpose to output a part for a Bb Trumpet. Now I want to add second part that will be a fourth lower. Can Lily do this or do I have to figure out all the notes a fourth lower and enter them manually? I'd rather just copy/paste the first part into the second part and let Lily do the transposing of a fourth interval. -- Chip Are you looking for a perfect fourth through the whole piece, or is the fourth to be diatonic to the key? For example, if your melody is in c and goes {a b c} do you want to get {e f g} (diatonic) or {e fis g} (perfect)? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Graham Percival wrote: On Sun, Dec 21, 2008 at 11:26:16PM +1100, Cameron Horsburgh wrote: On Sat, Dec 20, 2008 at 11:49:10PM -0800, Graham Percival wrote: ... I really don't understand this question. If you already know how to transpose from C to Bb, why on earth do you need to ask how to transpose from C to G ?! He wants it diatonic, so it's not that easy. \transpose c' g {a b c} would produce {e fis g} instead of {e f g}. Oops, I forgot my first-year theory. In this case, he'd need to write a scheme function. Actually, it wouldn't be hard at all... this is a perfect intro-level scheme tweak. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. :) Great, that helps a lot. I haven't got a clue what scheme is. I'm a musician, not a programmer. I don't even have years of music theory behind me - I play my instruments and do it well. Programming is for the brainiacs, of which I am not, and I am quite happy with that. -- Chip Even then, the extra \relative makes things get very messy: Then omit it. melody = {a b c d e f g} { \melody \\ { \transpose c' g \melody }} Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Sun, Dec 21, 2008 at 11:11:20AM -0700, chip wrote: Graham Percival wrote: Oops, I forgot my first-year theory. In this case, he'd need to write a scheme function. Actually, it wouldn't be hard at all... this is a perfect intro-level scheme tweak. Great, that helps a lot. I haven't got a clue what scheme is. In that case, may I courteously extend an invitation that you read the bloody Learning Manual? Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 21.12.2008 um 19:07 schrieb chip: I input in Concert C, transpose to the key of D for Trumpet. \transpose c d {} The First Trumpet part transposes to the key of D just fine. I would like to just copy/paste the first part into the second part. What's the second part? The second part I want to transpose also for Trumpet, also in the key of D, but a fourth lower. In the key of d, but a fourth lower. Do you mean the key of a? Or do you want the part in D major, but a fourth lower than the first part? I'm a little confused as to what you want. If it's the the latter, then yeah, it's probably doable in scheme, but I don't know scheme and can't help you there, and I would just say type it a fourth lower. melody = {c d e f g a b} trumpet 1 = {d e f♯ g a b c♯} trumpet 2 = {a b c♯ d e f♯ g♯} ?? trumpet 2 = {a b c♯ d e f♯ g} ?? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Sun, Dec 21, 2008 at 09:47:53AM -0800, Graham Percival wrote: On Sun, Dec 21, 2008 at 11:26:16PM +1100, Cameron Horsburgh wrote: On Sat, Dec 20, 2008 at 11:49:10PM -0800, Graham Percival wrote: ... I really don't understand this question. If you already know how to transpose from C to Bb, why on earth do you need to ask how to transpose from C to G ?! He wants it diatonic, so it's not that easy. \transpose c' g {a b c} would produce {e fis g} instead of {e f g}. Even then, the extra \relative makes things get very messy: Then omit it. melody = {a b c d e f g} { \melody \\ { \transpose c' g \melody }} Hmm... I can see that this works. Having read the documentation so slavishly I assumed it would be needed. From the Known Issues in 1.1.2: The relative conversion will not affect \transpose, \chordmode or \relative sections in its argument. To use relative mode within transposed music, an additional \relative must be placed inside \transpose. This isn't absolute (PNI) then? -- Cameron Horsburgh Blog: http://spiritcry.wordpress.com/ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
chip wrote: Graham Percival wrote: Then stick a \transpose c' g' in there. Read the doc section about transposition for help. ... I really don't understand this question. If you already know how to transpose from C to Bb, why on earth do you need to ask how to transpose from C to G ?! - Graham Becuase when I do that it changes the key signature. I want the key signature to remain the same. I input in Concert C, transpose to the key of D for Trumpet. The First Trumpet part transposes to the key of D just fine. I would like to just copy/paste the first part into the second part. The second part I want to transpose also for Trumpet, also in the key of D, but a fourth lower. I was just hoping to be able to have Lily do that so I don't have to rewrite all the notes a fourth lower. If that's how it has to be done then so be it. -- Chip On Sat, Dec 20, 2008 at 07:06:01PM -0700, chip wrote: I'm not entirely sure I understand what you want, but I'm taking a stab at it. Here's an example of how to use the same notes in different transpositions. %%% \version 2.11.65 notes = { c d e f } trumpetOne = \transpose c d' { \notes } trumpetTwo = \transpose c g, { \trumpetOne } \score { \new Staff \key d \major \context Voice = upper { \voiceOne \relative c' { \trumpetOne } } \context Voice = lower { \voiceTwo \relative c { \trumpetTwo } } \layout {} } % HTH, Jon -- Jonathan Kulp http://www.jonathankulp.com ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
2008/12/21 chip c...@wiegand.org: ... I really don't understand this question. If you already know how to transpose from C to Bb, why on earth do you need to ask how to transpose from C to G ?! Becuase when I do that it changes the key signature. I want the key signature to remain the same. I input in Concert C, transpose to the key of D for Trumpet. The First Trumpet part transposes to the key of D just fine. I would like to just copy/paste the first part into the second part. The second part I want to transpose also for Trumpet, also in the key of D, but a fourth lower. I was just hoping to be able to have Lily do that so I don't have to rewrite all the notes a fourth lower. If that's how it has to be done then so be it. Issue one: undesired key change. When you translate an expression, if it includes the \key command then the key changes, on the other hand if you want the key signature to remain the same, put the \key command outside the transposed block. Issue two: a diatonic fourth or a perfect fourth. From the thread I've still not read what exact type of fourth do you want. So I think it's better for you to post an example of what you desire, starting with { c' d' e' f' g' a' b' c'' } as the original material. -- Francisco Vila. Badajoz (Spain) http://www.paconet.org ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Mon, Dec 22, 2008 at 07:41:35AM +1100, Cameron Horsburgh wrote: melody = {a b c d e f g} { \melody \\ { \transpose c' g \melody }} Hmm... I can see that this works. Having read the documentation so slavishly I assumed it would be needed. From the Known Issues in 1.1.2: The relative conversion will not affect \transpose, \chordmode or \relative sections in its argument. To use relative mode within transposed music, an additional \relative must be placed inside \transpose. This isn't absolute (PNI) then? What does PNI mean? Anyway, I just went on the principle that score is a single music expression. Frankly, I don't really understand that comment, but I use \transpose so rarely that I've never felt the need to experiment. Please do a few experiments and send a clarified warning... if a warning is needed at all. Who knows, maybe whatever the problem is has been fixed? Cheers, - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Sun, Dec 21, 2008 at 02:20:32PM -0800, Graham Percival wrote: On Mon, Dec 22, 2008 at 07:41:35AM +1100, Cameron Horsburgh wrote: melody = {a b c d e f g} { \melody \\ { \transpose c' g \melody }} Hmm... I can see that this works. Having read the documentation so slavishly I assumed it would be needed. From the Known Issues in 1.1.2: The relative conversion will not affect \transpose, \chordmode or \relative sections in its argument. To use relative mode within transposed music, an additional \relative must be placed inside \transpose. This isn't absolute (PNI) then? What does PNI mean? Pun Not Intended. Anyway, I just went on the principle that score is a single music expression. Frankly, I don't really understand that comment, but I use \transpose so rarely that I've never felt the need to experiment. Please do a few experiments and send a clarified warning... if a warning is needed at all. Who knows, maybe whatever the problem is has been fixed? I will. I use it in 90% of my scores, and it's another level of complexity I can live without. Cheers, - Graham -- Cameron Horsburgh Blog: http://spiritcry.wordpress.com/ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Le dimanche 21 décembre 2008 à 09:47 -0800, Graham Percival a écrit : On Sun, Dec 21, 2008 at 11:26:16PM +1100, Cameron Horsburgh wrote: He wants it diatonic, so it's not that easy. \transpose c' g {a b c} would produce {e fis g} instead of {e f g}. Oops, I forgot my first-year theory. In this case, he'd need to write a scheme function. Actually, it wouldn't be hard at all... this is a perfect intro-level scheme tweak. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. :) Ha! I won't give the whole answer either, but as I already analyzed the problem some time ago, I can't resist telling about it here, only figuring out data types and Lily Scheme function to be used (see Scheme functions in the Internals Reference) and the actual Scheme code writing are left now. ly/scale-definitions-init.ly provide a few scale definitions; each scale definition maps a scale degree to a pitch difference (measured in whole tones) against the diatonic scale. Then, diatonic transposition from (scale1 pitch1 degree1) to (scale2 pitch2 degree2) (where pitchx carries both the octave and the tonic) is a matter of composing three functions: - converting each pitch from LilyPond representation (octave note alter) to (octave scale-degree alter) representation using the inverse map of scale1; - mapping (octave scale-degree alter) to ((octave + virtual-new-degree/7) (virtual-new-degree mod 7) alter) where virtual-new-degree = scale-degree + degree2 - degree1 - converting (new-octave new-degree alter) back to a Lily pitch using scale2. Transposition in modes with more than 7 notes is also possible but it's quite harder, unless we use more than 7 note names :-P. Well, diatonic transposition should definitely be a builtin function. If nobody has written it in a few days, I'll take it over. Cheers, John ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Graham, I don't think the tone you're using belongs here: I really don't understand this question. Then don't answer it. why on earth do you need to... Please stop judging users who need things that you don't understand. I can't find this info in the manuals. ... LM 5.3 Scores and parts. Not terribly hard to find. Please stop insulting users. Great, that helps a lot. I haven't got a clue what scheme is. In that case, may I courteously extend an invitation that you read the bloody Learning Manual? Please stop the sarcasm and the indecency. If you're trying to be funny, it isn't working. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. What are you doing? Are you trying to turn people away from LilyPond? Do you work for Finale or something? There have been 15 replies to Chip's original message, and NO ONE has answered it yet. This is embarrassing. If it were as easy to the rest of us as it obviously is to you, someone would have answered it. A user asks a perfectly legitimate question, and the response is, go figure it out. This mailing-list is for users helping other users, not insulting them. Yes, the manual is there, but the relevant information is obviously not where he expects it to be. Meanwhile, his problem still remains -- has it occurred to you he may have a deadline, or that he's forced to do it the long way because it's not worth it for him to start learning Scheme? Providing the answer may in fact help him to learn a thing or two about Scheme. That's been my experience - when someone helps me by giving a solution that works, if I don't understand it, I can study it and learn something from it that way. I've actually learned a lot that way. But what you're doing is the opposite of helpful. So please, stop. Since it's such an elementary exercise, please provide it, now. I assume it'll only take a minute. Then we can all learn. I'm curious myself, and I'm at least an elementary- level Schemer. Chip's question is an interesting one and the solution should be documented. Remember, the LilyPond manual is not a math textbook with exercises left to the reader, it is a manual with answers, not questions. And so should be this mailing-list. - Mark ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Thanks Mark, I was going to reply basically the same way, but from my past experience with this mailing list, it only incites more argumentative/sarcastic replies. I've been using PC's since the '80's, I've been using many, many mailing lists. This list is by far the least friendly of any I have ever used. Unfortunately, it's the place to ask for help with Lily, even though the help is usually not provided, other than a curt rtfm. Tonight I installed Sibelius and input my piece in that, it transposed the second trumpet part a fourth while maintaining the same key sig as the 1st trumpet part, no problem. Yes, the printed parts are ugly as sin, but the manual is certainly more user friendly. I then saved the parts as a midi and imported it to Lily, but the imported file is messed up. But that's another problem for another days non-help on this list. So at this point, looks like I will just have to do the long-hand work of typing in all the notes for the second trumpet part. At least it will be ready for a first reading tomorrow night. -- Chip Mark Polesky wrote: Graham, I don't think the tone you're using belongs here: I really don't understand this question. Then don't answer it. why on earth do you need to... Please stop judging users who need things that you don't understand. I can't find this info in the manuals. ... LM 5.3 Scores and parts. Not terribly hard to find. Please stop insulting users. Great, that helps a lot. I haven't got a clue what scheme is. In that case, may I courteously extend an invitation that you read the bloody Learning Manual? Please stop the sarcasm and the indecency. If you're trying to be funny, it isn't working. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. What are you doing? Are you trying to turn people away from LilyPond? Do you work for Finale or something? There have been 15 replies to Chip's original message, and NO ONE has answered it yet. This is embarrassing. If it were as easy to the rest of us as it obviously is to you, someone would have answered it. A user asks a perfectly legitimate question, and the response is, go figure it out. This mailing-list is for users helping other users, not insulting them. Yes, the manual is there, but the relevant information is obviously not where he expects it to be. Meanwhile, his problem still remains -- has it occurred to you he may have a deadline, or that he's forced to do it the long way because it's not worth it for him to start learning Scheme? Providing the answer may in fact help him to learn a thing or two about Scheme. That's been my experience - when someone helps me by giving a solution that works, if I don't understand it, I can study it and learn something from it that way. I've actually learned a lot that way. But what you're doing is the opposite of helpful. So please, stop. Since it's such an elementary exercise, please provide it, now. I assume it'll only take a minute. Then we can all learn. I'm curious myself, and I'm at least an elementary- level Schemer. Chip's question is an interesting one and the solution should be documented. Remember, the LilyPond manual is not a math textbook with exercises left to the reader, it is a manual with answers, not questions. And so should be this mailing-list. - Mark ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Sun, Dec 21, 2008 at 06:30:18PM -0800, Mark Polesky wrote: Graham, Great, that helps a lot. I haven't got a clue what scheme is. In that case, may I courteously extend an invitation that you read the bloody Learning Manual? Please stop the sarcasm and the indecency. If you're trying to be funny, it isn't working. It's a continuation of this email: http://lists.gnu.org/archive/html/lilypond-user/2008-11/msg00439.html If he doesn't know what scheme is, then he clearly *hasn't* read the LM cover-to-cover yet. This means that he's missed some terminology, missed some of the possibilities of lilypond, and won't be able to communicate with the lilypond community as effectively. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. What are you doing? Are you trying to turn people away from LilyPond? You seem to be unfamiliar with the phrase an exercise for the reader. The idea is that solving the problem is a useful exercise. There have been 15 replies to Chip's original message, and NO ONE has answered it yet. This is embarrassing. If it were as easy to the rest of us as it obviously is to you, someone would have answered it. A user asks a perfectly legitimate question, and the response is, go figure it out. Give a man a fish, teach a man to fish... But what you're doing is the opposite of helpful. So please, stop. Since it's such an elementary exercise, please provide it, now. I assume it'll only take a minute. Then we can all learn. 1. Look at the selected snippets for \transpose. There's an example that's very close to what he wants. 2. Look at { \displayMusic { a ais d dis } } to get some info about how lilypond treats pitches. The idea is to write a function that translates a ais into d dis. 3. Modify the existing example so that instead of producing notes with few accidentals, it changes the notename by the desired interval. - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Not everybody has a programmers mind. I don't. I have no interest whatsoever in programming. A person should be able to use a piece of software without having to be a programmer to do so. If a programming degree is necessary to use Lily then it is either a) not complete enough for the general public to use, and a warning message to this effect should be placed on the web site home page, or b) should be aimed at a different audience - programmers/brainiacs. -- Chip Graham Percival wrote: On Sun, Dec 21, 2008 at 06:30:18PM -0800, Mark Polesky wrote: Graham, Great, that helps a lot. I haven't got a clue what scheme is. In that case, may I courteously extend an invitation that you read the bloody Learning Manual? Please stop the sarcasm and the indecency. If you're trying to be funny, it isn't working. It's a continuation of this email: http://lists.gnu.org/archive/html/lilypond-user/2008-11/msg00439.html If he doesn't know what scheme is, then he clearly *hasn't* read the LM cover-to-cover yet. This means that he's missed some terminology, missed some of the possibilities of lilypond, and won't be able to communicate with the lilypond community as effectively. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. What are you doing? Are you trying to turn people away from LilyPond? You seem to be unfamiliar with the phrase an exercise for the reader. The idea is that solving the problem is a useful exercise. There have been 15 replies to Chip's original message, and NO ONE has answered it yet. This is embarrassing. If it were as easy to the rest of us as it obviously is to you, someone would have answered it. A user asks a perfectly legitimate question, and the response is, go figure it out. Give a man a fish, teach a man to fish... But what you're doing is the opposite of helpful. So please, stop. Since it's such an elementary exercise, please provide it, now. I assume it'll only take a minute. Then we can all learn. 1. Look at the selected snippets for \transpose. There's an example that's very close to what he wants. 2. Look at { \displayMusic { a ais d dis } } to get some info about how lilypond treats pitches. The idea is to write a function that translates a ais into d dis. 3. Modify the existing example so that instead of producing notes with few accidentals, it changes the notename by the desired interval. - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Chip, I am 90% convinced that the solution to your problem was posted here: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00586.html http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00585.html With another person trying to figure out what you wanted here: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00581.html None of those solutions involve programming, and they are easily constructed with the knowledge in the LM. If you cannot, or will not, describe what you actually want, it's very difficult to help you. Now, you've done this in Sibelius so it may seem irrelevant now, but I'm really curious. Please answer this email: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00581.html - Graham On Sun, Dec 21, 2008 at 09:40:34PM -0700, chip wrote: Not everybody has a programmers mind. I don't. I have no interest whatsoever in programming. A person should be able to use a piece of software without having to be a programmer to do so. If a programming degree is necessary to use Lily then it is either a) not complete enough for the general public to use, and a warning message to this effect should be placed on the web site home page, or b) should be aimed at a different audience - programmers/brainiacs. -- Chip Graham Percival wrote: On Sun, Dec 21, 2008 at 06:30:18PM -0800, Mark Polesky wrote: Graham, Great, that helps a lot. I haven't got a clue what scheme is. In that case, may I courteously extend an invitation that you read the bloody Learning Manual? Please stop the sarcasm and the indecency. If you're trying to be funny, it isn't working. It's a continuation of this email: http://lists.gnu.org/archive/html/lilypond-user/2008-11/msg00439.html If he doesn't know what scheme is, then he clearly *hasn't* read the LM cover-to-cover yet. This means that he's missed some terminology, missed some of the possibilities of lilypond, and won't be able to communicate with the lilypond community as effectively. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. What are you doing? Are you trying to turn people away from LilyPond? You seem to be unfamiliar with the phrase an exercise for the reader. The idea is that solving the problem is a useful exercise. There have been 15 replies to Chip's original message, and NO ONE has answered it yet. This is embarrassing. If it were as easy to the rest of us as it obviously is to you, someone would have answered it. A user asks a perfectly legitimate question, and the response is, go figure it out. Give a man a fish, teach a man to fish... But what you're doing is the opposite of helpful. So please, stop. Since it's such an elementary exercise, please provide it, now. I assume it'll only take a minute. Then we can all learn. 1. Look at the selected snippets for \transpose. There's an example that's very close to what he wants. 2. Look at { \displayMusic { a ais d dis } } to get some info about how lilypond treats pitches. The idea is to write a function that translates a ais into d dis. 3. Modify the existing example so that instead of producing notes with few accidentals, it changes the notename by the desired interval. - Graham ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Graham Percival wrote: 1. Look at the selected snippets for \transpose. There's an example that's very close to what he wants. I disagree. That example modifies the enharmonic spelling of notes in an already transposed section. We're looking for a function to transpose each note individually by the appropriate interval determined by its scale- degree within a specfied tonality. input: \relative c' { \key c \major c4 d e f g a b c } output: \relative c' { \key c \major g4 a b c d e f g } 2. Look at { \displayMusic { a ais d dis } } to get some info about how lilypond treats pitches. The idea is to write a function that translates a ais into d dis. Not at all. The idea is to write a function that, given the key of C major, translates a b into e f. 3. Modify the existing example so that instead of producing notes with few accidentals, it changes the notename by the desired interval. How is this helpful? This reminds me of the Monty Python skit on how to play the flute: You blow there and you move your fingers up and down here. Besides, this doesn't account for the fact that different notes will need to be transposed by different intervals. If you cannot, or will not, describe what you actually want, it's very difficult to help you. He already has! He clearly stated that he wants to transpose music down a 4th, diatonically: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00557.html If you don't know what diatonic means, look it up! So far, the only post that offers promise is from John: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00591.html but the programming is too tricky for me. So John, if you get a chance to flesh this out, that would be awesome. Thanks. - Mark ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Am 21.12.2008 um 19:07 schrieb chip: I input in Concert C, transpose to the key of D for Trumpet. \transpose c d {} The First Trumpet part transposes to the key of D just fine. I would like to just copy/paste the first part into the second part. What's the second part? As mentioned just above your question - it's the first trumpet part, just copied/pasted into the 2nd trumpet part. The second part I want to transpose also for Trumpet, also in the key of D, but a fourth lower. In the key of d, but a fourth lower. Do you mean the key of a? Key of A? No, as I said in my post - in the key of D. Or do you want the part in D major, but a fourth lower than the first part? Yes, as I said, a fourth lower, in the key of D. I'm a little confused as to what you want. If it's the the latter, then yeah, it's probably doable in scheme, but I don't know scheme and can't help you there, and I would just say type it a fourth lower. melody = {c d e f g a b} trumpet 1 = {d e fâ g a b câ} trumpet 2 = {a b câ d e fâ gâ} ?? trumpet 2 = {a b câ d e fâ g} ?? If my piece were only 7 notes long that would work just fine. Graham Percival wrote: Chip, I am 90% convinced that the solution to your problem was posted here: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00586.html http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00585.html With another person trying to figure out what you wanted here: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00581.html None of those solutions involve programming, and they are easily constructed with the knowledge in the LM. If you cannot, or will not, describe what you actually want, it's very difficult to help you. How much clearer can I make it? The questions are answered in the posts right above the questions. A trumpet part in the key of D but notated a fourth lower, still in the key of D, as described above. The notes print on the .pdf one fourth lower than what is input in the .ly file. The transposing should not effect the key signature, it starts in the key of D and stays there for the transposed notes. Now, you've done this in Sibelius so it may seem irrelevant now, but I'm really curious. Please answer this email: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00581.html Ok, it's answered above. After all is said and done, the output from Sibelius sucks, so I've done the long-hand work and just typed in the notes a fourth lower in the .ly file so this will be ready for the band tomorrow. I'm gonna re-read those posts your refer to tomorrow morning, and experiment a bit and see how it goes. -- chip - Graham On Sun, Dec 21, 2008 at 09:40:34PM -0700, chip wrote: Not everybody has a programmers mind. I don't. I have no interest whatsoever in programming. A person should be able to use a piece of software without having to be a programmer to do so. If a programming degree is necessary to use Lily then it is either a) not complete enough for the general public to use, and a warning message to this effect should be placed on the web site home page, or b) should be aimed at a different audience - programmers/brainiacs. -- Chip Graham Percival wrote: On Sun, Dec 21, 2008 at 06:30:18PM -0800, Mark Polesky wrote: Graham, Great, that helps a lot. I haven't got a clue what scheme is. In that case, may I courteously extend an invitation that you read the bloody Learning Manual? Please stop the sarcasm and the indecency. If you're trying to be funny, it isn't working. It's a continuation of this email: http://lists.gnu.org/archive/html/lilypond-user/2008-11/msg00439.html If he doesn't know what scheme is, then he clearly *hasn't* read the LM cover-to-cover yet. This means that he's missed some terminology, missed some of the possibilities of lilypond, and won't be able to communicate with the lilypond community as effectively. I leave it as an exercise for the reader. Neil, Trevor, Valentin: please don't give the answer. What are you doing? Are you trying to turn people away from LilyPond? You seem to be unfamiliar with the phrase an exercise for the reader. The idea is that solving the problem is a useful exercise. There have been 15 replies to Chip's original message, and NO ONE has answered it yet. This is embarrassing. If it were as easy to the rest of us as it obviously is to you, someone would have answered it. A user asks a perfectly legitimate question, and the response is, go figure it out. Give a man a fish, teach a man to fish... But what you're doing is the opposite of helpful. So please, stop. Since it's such an elementary exercise, please provide it, now. I assume it'll only take a minute. Then we can all learn. 1. Look at the selected snippets for \transpose.
Re: question about transposing an interval of a 4th
Mark Polesky wrote: Graham Percival wrote: 1. Look at the selected snippets for \transpose. There's an example that's very close to what he wants. I disagree. That example modifies the enharmonic spelling of notes in an already transposed section. We're looking for a function to transpose each note individually by the appropriate interval determined by its scale- degree within a specfied tonality. input: \relative c' { \key c \major c4 d e f g a b c } output: \relative c' { \key c \major g4 a b c d e f g } 2. Look at { \displayMusic { a ais d dis } } to get some info about how lilypond treats pitches. The idea is to write a function that translates a ais into d dis. Not at all. The idea is to write a function that, given the key of C major, translates a b into e f. 3. Modify the existing example so that instead of producing notes with few accidentals, it changes the notename by the desired interval. How is this helpful? This reminds me of the Monty Python skit on how to play the flute: You blow there and you move your fingers up and down here. Besides, this doesn't account for the fact that different notes will need to be transposed by different intervals. If you cannot, or will not, describe what you actually want, it's very difficult to help you. He already has! He clearly stated that he wants to transpose music down a 4th, diatonically: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00557.html If you don't know what diatonic means, look it up! So far, the only post that offers promise is from John: http://lists.gnu.org/archive/html/lilypond-user/2008-12/msg00591.html Thanks Mark, I read that post and it just went in one ear and out the other, figuratively speaking, ehm, writing. When I see technical stuff like that my eyes start to go blurry and I just kind of gaze at it, not understanding a word of it. I'm sure some of the guys smarter about such things understood what he wrote. -- chip but the programming is too tricky for me. So John, if you get a chance to flesh this out, that would be awesome. Thanks. - Mark ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
question about transposing an interval of a 4th
I am inputing a piece in concert C, the use \transpose to output a part for a Bb Trumpet. Now I want to add second part that will be a fourth lower. Can Lily do this or do I have to figure out all the notes a fourth lower and enter them manually? I'd rather just copy/paste the first part into the second part and let Lily do the transposing of a fourth interval. -- Chip ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
On Sat, Dec 20, 2008 at 06:16:18PM -0700, chip wrote: I am inputing a piece in concert C, the use \transpose to output a part for a Bb Trumpet. Now I want to add second part that will be a fourth lower. Can Lily do this or do I have to figure out all the notes a fourth lower and enter them manually? I'd rather just copy/paste the first part into the second part and let Lily do the transposing of a fourth interval. -- Chip Are you looking for a perfect fourth through the whole piece, or is the fourth to be diatonic to the key? For example, if your melody is in c and goes {a b c} do you want to get {e f g} (diatonic) or {e fis g} (perfect)? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user -- Cameron Horsburgh Blog: http://spiritcry.wordpress.com/ ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
good question, I'm gonna say diatonic and see how that goes. Cameron Horsburgh wrote: On Sat, Dec 20, 2008 at 06:16:18PM -0700, chip wrote: I am inputing a piece in concert C, the use \transpose to output a part for a Bb Trumpet. Now I want to add second part that will be a fourth lower. Can Lily do this or do I have to figure out all the notes a fourth lower and enter them manually? I'd rather just copy/paste the first part into the second part and let Lily do the transposing of a fourth interval. -- Chip Are you looking for a perfect fourth through the whole piece, or is the fourth to be diatonic to the key? For example, if your melody is in c and goes {a b c} do you want to get {e f g} (diatonic) or {e fis g} (perfect)? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user
Re: question about transposing an interval of a 4th
Then stick a \transpose c' g' in there. Read the doc section about transposition for help. ... I really don't understand this question. If you already know how to transpose from C to Bb, why on earth do you need to ask how to transpose from C to G ?! - Graham On Sat, Dec 20, 2008 at 07:06:01PM -0700, chip wrote: good question, I'm gonna say diatonic and see how that goes. Cameron Horsburgh wrote: On Sat, Dec 20, 2008 at 06:16:18PM -0700, chip wrote: I am inputing a piece in concert C, the use \transpose to output a part for a Bb Trumpet. Now I want to add second part that will be a fourth lower. Can Lily do this or do I have to figure out all the notes a fourth lower and enter them manually? I'd rather just copy/paste the first part into the second part and let Lily do the transposing of a fourth interval. -- Chip Are you looking for a perfect fourth through the whole piece, or is the fourth to be diatonic to the key? For example, if your melody is in c and goes {a b c} do you want to get {e f g} (diatonic) or {e fis g} (perfect)? ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user ___ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user