lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

string->number scheme


From: Stjepan Horvat
Subject: string->number scheme
Date: Wed, 13 Nov 2013 14:49:16 +0100

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. 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)

but it didnt work nor

bpmInt =
#(define-music-function
    (parser location bpm
    (string?)
    (string->number bpm)))

any ideas.?



--
Nesmotren govori kao da mačem probada, a jezik je mudrih iscjeljenje. Izreke 12:18

reply via email to

[Prev in Thread] Current Thread [Next in Thread]