Hi, I'd like to know if it is possible to use Hershey vector fonts to create very primitive musical notation. If I can hang some whole notes on these lines X11() plot(0,0, xlim=c(0,10), ylim=c(0,10)) # Staves: for (i in c(seq(from=2,to=2.8,by=0.2),seq(from=4,to=4.8,by=0.2))) { abline(h=i) } it is enough. Best wishes, Atte Tenkanen University of Turku, Finland ___________________________________________________________________ P.S. By the way, right now the demo(Hershey) seems not to work in OSX version R 2.4.1. ... I get a message> i <- i + 1Error in deparse(ei, control = c("showAttributes", "useSource")) : invalid multibyte string
Hi, Atte> De : r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] De la part de Atte Tenkanen > Envoy? : mercredi 3 janvier 2007 09:17 > Hi, > > I'd like to know if it is possible to use Hershey vector > fonts to create very primitive musical notation. > [...]There is an example of a music score produced with R and the Hershey fonts in the book 'R Graphics', by Paul Murrell (Chapman & Hall/CRC, 2005), page 15. The R Code is on the web page for the book: http://www.stat.auckland.ac.nz/~paul/RGraphics/examples-stevemiller.R BTW, I do a lot of things with R but for music scores I use the ABC language (http://www.walshaw.plus.com/abc/). You can output PostScript from it with Jef Moine's abcm2ps (http://moinejf.free.fr/). Happy new year! Christophe -- Christophe Declercq, MD Observatoire r?gional de la sant? Nord-Pas-de-Calais 235, avenue de la recherche BP 86 F-59373 LOOS CEDEX Phone +33 3 20 15 49 24 Fax + 33 3 20 15 10 46 E-mail c.declercq at orsnpdc.org
On Wed, 3 Jan 2007, Atte Tenkanen wrote: [...]> By the way, right now the demo(Hershey) seems not to work in OSX version R 2.4.1. ... > I get a message > >> i <- i + 1 > Error in deparse(ei, control = c("showAttributes", "useSource")) : > invalid multibyte stringBut it does should work in R-devel, which deparses differently. The issue is the use of a UTF-8 locale and the Hershey byte codes are indeed an invalid string in such a locale. Here is a simple example in UTF-8.> x <- "\301" > x[1]Error: invalid multibyte string -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595
Maybe Matching Threads
- Hershey Felder, The Secrets About Musical Instruments And Physics
- problem with Hershey fonts
- How to get special (Hershey) font symbols into plot axis labels? [Revisited]
- Hershey fonts and substitute()
- What is the newline escape sequence when using the Hershey fontfamily?