Re: string->number scheme
Ok..and Thank You.. On Wed, Nov 13, 2013 at 4:58 PM, Janek Warchoł wrote: > So, to answer David's question: > > 2013/11/13 David Kastrup : > > You could start by explaining what is wrong with the solution at the > > bottom of > > http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00456.html>. > > This is not doing what Stjepan wants because he cannot use \bpm as a > value for a header field. > > See this bug: > http://code.google.com/p/lilypond/issues/detail?id=3658 > I believe that to solve Stjepan's problem we'd have to solve this bug. > > best, > Janek > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > -- *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18* ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
2013/11/13 Stjepan Horvat : > Yes..this is exactly what i mean.. Good! But please be careful about quoting original messages. Don't let gmail do whatever it's doing by default, because it's not the right thing. Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
Yes..this is exactly what i mean.. On Wed, Nov 13, 2013 at 4:49 PM, Janek Warchoł wrote: > 2013/11/13 David Kastrup : > > Stjepan Horvat writes: > > > >> So..any idea how i could achive it..?! I wanted to use my little > knowlidge > >> to write a simple scheme function that could achive it..with no > succsess.. > > > > You could start by explaining what is wrong with the solution at the > > bottom of > > http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00456.html>. > > I think i understand what this is about. > > Stjepan would like to have the tempo value used both in header as well > as in actual tempo definition. It is possible to define a variable > and use it in the header: > > trololo = 123 > > \header { > title = #(string-append > "bang! " > (number->string trololo) > " foobars in a bottle") > } > > The problem is, as David already noticed, that a variable cannot be > used in \tempo command: > > { > % this crashes: > \tempo 4 = \trololo > c' > } > > Stjepan, is this what you mean? > > Janek > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > -- *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18* ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
So, to answer David's question: 2013/11/13 David Kastrup : > You could start by explaining what is wrong with the solution at the > bottom of > http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00456.html>. This is not doing what Stjepan wants because he cannot use \bpm as a value for a header field. See this bug: http://code.google.com/p/lilypond/issues/detail?id=3658 I believe that to solve Stjepan's problem we'd have to solve this bug. best, Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
2013/11/13 David Kastrup : > Stjepan Horvat writes: > >> So..any idea how i could achive it..?! I wanted to use my little knowlidge >> to write a simple scheme function that could achive it..with no succsess.. > > You could start by explaining what is wrong with the solution at the > bottom of > http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00456.html>. I think i understand what this is about. Stjepan would like to have the tempo value used both in header as well as in actual tempo definition. It is possible to define a variable and use it in the header: trololo = 123 \header { title = #(string-append "bang! " (number->string trololo) " foobars in a bottle") } The problem is, as David already noticed, that a variable cannot be used in \tempo command: { % this crashes: \tempo 4 = \trololo c' } Stjepan, is this what you mean? Janek ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
Look i know i'm maybe compliating here..but it would be helpfull if i could for once achive what i have imagine.. I can always use the software as is..and its great..i confirm.. On Wed, Nov 13, 2013 at 4:42 PM, Stjepan Horvat wrote: > Try putting bpm = \tempo 4 = 123 in the header.. > > > On Wed, Nov 13, 2013 at 4:36 PM, David Kastrup wrote: > >> Stjepan Horvat writes: >> >> > So..any idea how i could achive it..?! I wanted to use my little >> knowlidge >> > to write a simple scheme function that could achive it..with no >> succsess.. >> >> You could start by explaining what is wrong with the solution at the >> bottom of >> > http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00456.html>. >> >> -- >> David Kastrup >> >> >> ___ >> lilypond-user mailing list >> lilypond-user@gnu.org >> https://lists.gnu.org/mailman/listinfo/lilypond-user >> > > > > -- > *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. > Izreke 12:18* > -- *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18* ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
Try putting bpm = \tempo 4 = 123 in the header.. On Wed, Nov 13, 2013 at 4:36 PM, David Kastrup wrote: > Stjepan Horvat writes: > > > So..any idea how i could achive it..?! I wanted to use my little > knowlidge > > to write a simple scheme function that could achive it..with no > succsess.. > > You could start by explaining what is wrong with the solution at the > bottom of > http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00456.html > >. > > -- > David Kastrup > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > -- *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18* ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
Stjepan Horvat writes: > So..any idea how i could achive it..?! I wanted to use my little knowlidge > to write a simple scheme function that could achive it..with no succsess.. You could start by explaining what is wrong with the solution at the bottom of http://lists.gnu.org/archive/html/lilypond-user/2013-11/msg00456.html>. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
So..any idea how i could achive it..?! I wanted to use my little knowlidge to write a simple scheme function that could achive it..with no succsess.. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
Stjepan Horvat writes: > I'm sorry for replayings..no..i'm using gmail's default settings. Gmail's default setting is _not_ to secretly append all of an old posting to your new mail. Gmail's default setting is to _quote_ the old mail into your new mail buffer when you make a reply so that you can write replies to the parts as they are needed as context, and delete the rest, just like I am doing now. > Your right about \tempo = 123..it is a typo.. > I defind my custom header..and i wanted to have some kind of tempo inside > my header..so before i had my custom header i used poet variable for > it..but becouse i now have my own custom header i defined my own varible > names that have meanning to what they are reflecting.. > this is why my variable is inside header.. Non sequitur. \header variables typically describe stuff used in page headers. > do i have to make a global variable to be seen in both header and > score blok? Likely. > so image i have made a custom variable bpm = "123"..now i would like to > include it in the header block AND in the score block..(this is where the > string number conflict comes) The \header block can perfectly well contain numeric variables. That the \header variable "title" does not interpret numbers is not terribly surprising, at least not to me. It still _accepts_ setting the variable, and one can read it out again. It's just the titling itself that wants to see a string here. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
I'm sorry for replayings..no..i'm using gmail's default settings. Your right about \tempo = 123..it is a typo.. I defind my custom header..and i wanted to have some kind of tempo inside my header..so before i had my custom header i used poet variable for it..but becouse i now have my own custom header i defined my own varible names that have meanning to what they are reflecting.. this is why my variable is inside header.. do i have to make a global variable to be seen in both header and score blok? so image i have made a custom variable bpm = "123"..now i would like to include it in the header block AND in the score block..(this is where the string number conflict comes) i'm sorry for missunderstanding (appropriate song http://www.youtube.com/watch?v=HHjKzr6tLz0)..when i read it, it has sense to me..:) ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
Stjepan Horvat writes: > ok.. > > i would want to insert the tempo one time..inside the header block..and > that it would apply to other tempo variables.. > > \header { > bpm = "123" > } > > \relative c' { > \tempo = \bpm "%the header bpm variable > c'4 > } First: it is impossible to guess what you want here since \tempo = "123" would not be a valid command, and neither would be \tempo = 123. Second: why do you have bpm defined inside of \header? Header variables are not visible in the score. I just tried bpm = 123 \relative c' { \tempo 4 = \bpm "%the header bpm variable c'4 } and found out that variables are not permitted in this place. Which is probably an oversight rather than anything intentional. Feel free to file a bug report. It might be quite simpler, however, just to write bpm = \tempo 4 = 123 \relative c' { \bpm c'4 } And can you _please_ _please_ _please_ stop appending the whole thing you are replying to at the bottom of your mails? -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
If i insert print \header { title = 123 } { c' } it doesnt show up..this is why i wanted to convert string to number..for later usege.. On Wed, Nov 13, 2013 at 3:18 PM, Stjepan Horvat wrote: > ok.. > > i would want to insert the tempo one time..inside the header block..and > that it would apply to other tempo variables.. > > \header { > bpm = "123" > } > > \relative c' { > \tempo = \bpm "%the header bpm variable > c'4 > } > > till now i didnt create any scheme function successfully..:P > > > On Wed, Nov 13, 2013 at 3:11 PM, David Kastrup wrote: > >> Stjepan Horvat writes: >> >> > header won't display numbers..i'm using lastest development version.. >> >> [unedited useless fullquote below deleted] >> >> Please try harder to explain the problem, preferably with a minimal >> example, or at the very least responding to the individual suggestions >> with the details of why they don't work for you. >> >> When someone goes to the pain of writing up an elaborate answer with >> details for each cited problem, the above one-line reply does not >> suggest you are taking this seriously. >> >> -- >> David Kastrup >> > > > > -- > *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. > Izreke 12:18* > -- *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18* ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
ok.. i would want to insert the tempo one time..inside the header block..and that it would apply to other tempo variables.. \header { bpm = "123" } \relative c' { \tempo = \bpm "%the header bpm variable c'4 } till now i didnt create any scheme function successfully..:P On Wed, Nov 13, 2013 at 3:11 PM, David Kastrup wrote: > Stjepan Horvat writes: > > > header won't display numbers..i'm using lastest development version.. > > [unedited useless fullquote below deleted] > > Please try harder to explain the problem, preferably with a minimal > example, or at the very least responding to the individual suggestions > with the details of why they don't work for you. > > When someone goes to the pain of writing up an elaborate answer with > details for each cited problem, the above one-line reply does not > suggest you are taking this seriously. > > -- > David Kastrup > -- *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18* ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
Stjepan Horvat writes: > header won't display numbers..i'm using lastest development version.. [unedited useless fullquote below deleted] Please try harder to explain the problem, preferably with a minimal example, or at the very least responding to the individual suggestions with the details of why they don't work for you. When someone goes to the pain of writing up an elaborate answer with details for each cited problem, the above one-line reply does not suggest you are taking this seriously. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
header won't display numbers..i'm using lastest development version.. On Wed, Nov 13, 2013 at 2:56 PM, David Kastrup wrote: > Stjepan Horvat writes: > > > Hi guys.. > > I would want to make a simple function that would convert my string to > > number..wha? > > > > i have a a variable inside header that is called bpm. inside bpm is my > > tempo but in string. > > Why? > > > for example: > > > > \header { > > bpm = "123" > > } > > > > { > > \tempo 4 = \bpm > > c'4 > > } > > > > or in midi block > > > > \midi { \tempo 4 = \bpm } > > > > i had an idea of converting string to number using string->number.. > > #(define bpm "123") > > #(define bpmInt (string->number bpm) > > Missing closing paren, it would seem. > > > but it didnt work nor > > > > bpmInt = > > #(define-music-function > > (parser location bpm > > (string?) > > (string->number bpm))) > > The body of define-music-function needs to return music, so you probably > would want define-scheme-function instead. > > > any ideas.? > > I have no idea why you don't just write > > bpm = 123 > > and that's that. Why go through a string in the first place? > > -- > David Kastrup > > > ___ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > -- *Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18* ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: string->number scheme
Stjepan Horvat writes: > Hi guys.. > I would want to make a simple function that would convert my string to > number..wha? > > i have a a variable inside header that is called bpm. inside bpm is my > tempo but in string. Why? > for example: > > \header { > bpm = "123" > } > > { > \tempo 4 = \bpm > c'4 > } > > or in midi block > > \midi { \tempo 4 = \bpm } > > i had an idea of converting string to number using string->number.. > #(define bpm "123") > #(define bpmInt (string->number bpm) Missing closing paren, it would seem. > but it didnt work nor > > bpmInt = > #(define-music-function > (parser location bpm > (string?) > (string->number bpm))) The body of define-music-function needs to return music, so you probably would want define-scheme-function instead. > any ideas.? I have no idea why you don't just write bpm = 123 and that's that. Why go through a string in the first place? -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user