Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread David Kastrup
"Hugh S. Myers"  writes:

>> On Sun, Jan 7, 2018 at 7:43 PM, David Kastrup  wrote:
>>
>>> Joshua Netterfield  writes:
>>>
>>> > Hi Andrew,
>>> >
>>> > Absolutely, supporting other versions is on my TODO list, and I'll
>>> > post back here when it's done.
>>> >
>>> > I used the term "unstable" because I saw the term "unstable
>>> > development versions" [1] on the Lilypond website (e.g., at
>>> > http://lilypond.org/development.html), not because I have had any
>>> > issues with 2.19. I interpreted that (perhaps incorrectly — please
>>> > correct me if I'm wrong) as meaning that things are in flux such that
>>> > songs that were valid in one version might not be valid in the next
>>> > version.
>>>
>>> Correct.
>>>
>>> --
>>> David Kastrup
>
> 'OS that is not Windows'…so you are saying to hell with 7 out of 10 users?
> Well, that's one way to cut down on all that annoying customer noise!
>
> --hsm
> p.s. I write *multi-platform* modules for *CPAN *and yes it is a great deal
> of extra work but it is pretty much '*the right thing to do*'…

I have absolutely no idea what you are talking about here and why you
would break out in an operating system tirade because I replied to
Joshua that his idea of our use of "stable" vs "unstable" versions is
correct and thus a stable version seems inherently sensible as default
in connection with his web-based LilyPond editor.

-- 
David Kastrup

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread Andrew Bernard
Hello Hugh.

What are you referring to? Nothing that I can see in this thread?

Andrew

On 8 January 2018 at 16:31, Hugh S. Myers  wrote:

> 'OS that is not Windows'…so you are saying to hell with 7 out of 10 users?
> Well, that's one way to cut down on all that annoying customer noise!
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread Thomas Morley
2018-01-08 6:31 GMT+01:00 Hugh S. Myers :
> 'OS that is not Windows'…so you are saying to hell with 7 out of 10 users?
> Well, that's one way to cut down on all that annoying customer noise!
>
> --hsm
> p.s. I write multi-platform modules for CPAN and yes it is a great deal of
> extra work but it is pretty much 'the right thing to do'…



Let me quote a little more from https://github.com/hacklily/hacklily README

"
[...]
Running locally

Dependencies

You need:

Node -- tested with Node 7, earlier versions may or may not also work
Yarn
Qt 5 -- with qmake in your path (installing using the version from
Qt's website is recommended on macOS)
Docker
an OS that is not Windows (if you make it work, please contribute your fix!)
[...]
"

Sounds a little different, doesn't it?



-Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread Blöchl Bernhard

I am completely confused.

Hackily did not impress me, but due to this "not Windows" discussion I 
opened

https://github.com/hacklily/hacklily
and read
"... It consists of a frontend Lilypond editor using monaco (the editor 
that powers vscode) and a backend Lilypond renderer. ..."
monaco is a visual script editor. Visual script is a Microsoft language 
and available for the Mac, there is a link 
https://code.visualstudio.com/docs/setup/linux, never tried it.

monaco looks interesting, downloaded with
npm install monaco-editor@0.10.1
npm is the package manager for JavaScript and the world’s largest 
software registry. JavaScript is alanguage I am interested and ahe one 
preferece (beside some others).

If I find some time I may check the code for curiosity.

To say it diplomatically, I do not have any problem with "an OS that is 
not Windows" and do not say to appreciate this statement. But beside 
strong liking of other OS, is there a technical reason for this and 
which?


Regards


Am 08.01.2018 10:34, schrieb Thomas Morley:

2018-01-08 6:31 GMT+01:00 Hugh S. Myers :
'OS that is not Windows'…so you are saying to hell with 7 out of 10 
users?

Well, that's one way to cut down on all that annoying customer noise!

--hsm
p.s. I write multi-platform modules for CPAN and yes it is a great 
deal of

extra work but it is pretty much 'the right thing to do'…




Let me quote a little more from https://github.com/hacklily/hacklily 
README


"
[...]
Running locally

Dependencies

You need:

Node -- tested with Node 7, earlier versions may or may not also work
Yarn
Qt 5 -- with qmake in your path (installing using the version from
Qt's website is recommended on macOS)
Docker
an OS that is not Windows (if you make it work, please contribute your 
fix!)

[...]
"

Sounds a little different, doesn't it?



-Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread Blöchl Bernhard

Actually tried https://www.hacklily.org on linux.

The only action is a message in the right window  "Could not connect to 
server ..."


Has anybody successfully tried  hackily on linux? If not, please send me 
a message so I can put that thread on my spam list. Does it work on 
Windows? May be it's such a Mac thingy only working on that platform 
contradicting the spirit of open source?


Regards


PS: The ingredients Docker, Node, Yarn, Qt5, qmake are available and 
running on linux.







Am 08.01.2018 12:23, schrieb Blöchl Bernhard:

I am completely confused.

Hackily did not impress me, but due to this "not Windows" discussion I 
opened

https://github.com/hacklily/hacklily
and read
"... It consists of a frontend Lilypond editor using monaco (the
editor that powers vscode) and a backend Lilypond renderer. ..."
monaco is a visual script editor. Visual script is a Microsoft
language and available for the Mac, there is a link
https://code.visualstudio.com/docs/setup/linux, never tried it.
monaco looks interesting, downloaded with
npm install monaco-editor@0.10.1
npm is the package manager for JavaScript and the world’s largest
software registry. JavaScript is alanguage I am interested and ahe one
preferece (beside some others).
If I find some time I may check the code for curiosity.

To say it diplomatically, I do not have any problem with "an OS that
is not Windows" and do not say to appreciate this statement. But
beside strong liking of other OS, is there a technical reason for this
and which?

Regards


Am 08.01.2018 10:34, schrieb Thomas Morley:

2018-01-08 6:31 GMT+01:00 Hugh S. Myers :
'OS that is not Windows'…so you are saying to hell with 7 out of 10 
users?

Well, that's one way to cut down on all that annoying customer noise!

--hsm
p.s. I write multi-platform modules for CPAN and yes it is a great 
deal of

extra work but it is pretty much 'the right thing to do'…




Let me quote a little more from https://github.com/hacklily/hacklily 
README


"
[...]
Running locally

Dependencies

You need:

Node -- tested with Node 7, earlier versions may or may not also work
Yarn
Qt 5 -- with qmake in your path (installing using the version from
Qt's website is recommended on macOS)
Docker
an OS that is not Windows (if you make it work, please contribute your 
fix!)

[...]
"

Sounds a little different, doesn't it?



-Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread m.tarensk...@zonnet.nl
I tried hacklily on Linux Fedora, not extensively, but it worked.Verzonden vanaf mijn Huawei mobiele telefoon Oorspronkelijk bericht Onderwerp: Re: Introducing Hacklily, another online LilyPond editorVan: Blöchl Bernhard Aan: lilypond-user@gnu.orgCc: Actually tried https://www.hacklily.org on linux.The only action is a message in the right window  "Could not connect to server ..."Has anybody successfully tried  hackily on linux? If not, please send me a message so I can put that thread on my spam list. Does it work on Windows? May be it's such a Mac thingy only working on that platform contradicting the spirit of open source?RegardsPS: The ingredients Docker, Node, Yarn, Qt5, qmake are available and running on linux.Am 08.01.2018 12:23, schrieb Blöchl Bernhard:> I am completely confused.> > Hackily did not impress me, but due to this "not Windows" discussion I > opened> https://github.com/hacklily/hacklily> and read> "... It consists of a frontend Lilypond editor using monaco (the> editor that powers vscode) and a backend Lilypond renderer. ..."> monaco is a visual script editor. Visual script is a Microsoft> language and available for the Mac, there is a link> https://code.visualstudio.com/docs/setup/linux, never tried it.> monaco looks interesting, downloaded with> npm install monaco-editor@0.10.1> npm is the package manager for _javascript_ and the world’s largest> software registry. _javascript_ is alanguage I am interested and ahe one> preferece (beside some others).> If I find some time I may check the code for curiosity.> > To say it diplomatically, I do not have any problem with "an OS that> is not Windows" and do not say to appreciate this statement. But> beside strong liking of other OS, is there a technical reason for this> and which?> > Regards> > > Am 08.01.2018 10:34, schrieb Thomas Morley:>> 2018-01-08 6:31 GMT+01:00 Hugh S. Myers :>>> 'OS that is not Windows'…so you are saying to hell with 7 out of 10 >>> users?>>> Well, that's one way to cut down on all that annoying customer noise!>>> >>> --hsm>>> p.s. I write multi-platform modules for CPAN and yes it is a great >>> deal of>>> extra work but it is pretty much 'the right thing to do'…>> >> >> >> Let me quote a little more from https://github.com/hacklily/hacklily >> README>> >> ">> [...]>> Running locally>> >> Dependencies>> >> You need:>> >> Node -- tested with Node 7, earlier versions may or may not also work>> Yarn>> Qt 5 -- with qmake in your path (installing using the version from>> Qt's website is recommended on macOS)>> Docker>> an OS that is not Windows (if you make it work, please contribute your >> fix!)>> [...]>> ">> >> Sounds a little different, doesn't it?>> >> >> >> -Harm>> >> ___>> lilypond-user mailing list>> lilypond-user@gnu.org>> https://lists.gnu.org/mailman/listinfo/lilypond-user> > > ___> lilypond-user mailing list> lilypond-user@gnu.org> https://lists.gnu.org/mailman/listinfo/lilypond-user___lilypond-user mailing listlilypond-user@gnu.orghttps://lists.gnu.org/mailman/listinfo/lilypond-user___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread Sven Axelsson
On 8 January 2018 at 06:31, Hugh S. Myers  wrote:

> 'OS that is not Windows'…so you are saying to hell with 7 out of 10 users?
> Well, that's one way to cut down on all that annoying customer noise!
>

That simply means that the web site it will not run *as-is* on Windows. It
most certainly is possible to make it work, but since most non-corporate
web servers use Linux, it is most likely not a priority. The following text
that you conveniently omitted, "if you make it work, please contribute your
fix!", makes it sound less harsh, no?

-- 
Sven Axelsson
++[>++>+++>++>++
><-]>.+..>+.>+.<<-.>>+.>.<<.
+++.>-.<<++.>>.<++.>>>++..>>.<.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread Joshua Netterfield

Hi all,

I'm sorry for alienating some of you with the Windows comment. The 
website itself, https://www.hacklily.org should work in many modern 
graphical web browsers, including ones on Windows. Currently, the main 
reason for running the server itself would be to contribute to Hacklily 
(please do contribute, if you are interested!). I don't have a grudge 
against Windows, and would love help from someone to help figure out how 
to enable development there. If you're interested, let me know here or 
in a GitHub issue (or even better yet, PR).


I've toned down some of the wording in the README and added a note that 
the build steps aren't needed if you just want to use Hacklily.


Best,
Joshua Netterfield

On 2018-01-08 08:27, Sven Axelsson wrote:



On 8 January 2018 at 06:31, Hugh S. Myers > wrote:


'OS that is not Windows'…so you are saying to hell with 7 out of
10 users? Well, that's one way to cut down on all that annoying
customer noise!


That simply means that the web site it will not run *as-is* on 
Windows. It most certainly is possible to make it work, but since most 
non-corporate web servers use Linux, it is most likely not a priority. 
The following text that you conveniently omitted, "if you make it 
work, please contribute your fix!", makes it sound less harsh, no?


--
Sven Axelsson
++[>++>+++>++>++
><-]>.+..>+.>+.<<-.>>+.>.<<.
+++.>-.<<++.>>.<++.>>>++..>>.<.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Introducing Hacklily, another online LilyPond editor

2018-01-08 Thread Joshua Netterfield

Hi,

I want to figure out why this isn't working for you. I sent you an email 
directly, which might have ended up in your spam list. To reduce noise 
here, it would be great if you could either reply to me directly or 
create a GitHub issue. (You can reply here if too if those options don't 
work.)


I see that you're using hacklily.org rather than your own copy? Is it 
possible that a connection to hacklily-render.nettek.ca is blocked? What 
addons/FF version do you have installed? If you open the dev tools 
(ctrl+shift+I), go to the network tab, refresh, and filter URLs for 
hacklily-render, what do you see?


I have a small correction to one of your posts — Hacklily uses 
TypeScript, not Visual Script or JavaScript. If you do want to try 
running it locally to contribute, try following the steps on the README. 
Although I've tested the development server on Ubuntu 17.10 a few weeks 
back, if you get stuck, /please/ create an issue/email me.


Best,
Joshua Netterfield

On 2018-01-08 07:19, Blöchl Bernhard wrote:

Actually tried https://www.hacklily.org on linux.

The only action is a message in the right window  "Could not connect 
to server ..."


Has anybody successfully tried  hackily on linux? If not, please send 
me a message so I can put that thread on my spam list. Does it work on 
Windows? May be it's such a Mac thingy only working on that platform 
contradicting the spirit of open source?


Regards


PS: The ingredients Docker, Node, Yarn, Qt5, qmake are available and 
running on linux.







Am 08.01.2018 12:23, schrieb Blöchl Bernhard:

I am completely confused.

Hackily did not impress me, but due to this "not Windows" discussion 
I opened

https://github.com/hacklily/hacklily
and read
"... It consists of a frontend Lilypond editor using monaco (the
editor that powers vscode) and a backend Lilypond renderer. ..."
monaco is a visual script editor. Visual script is a Microsoft
language and available for the Mac, there is a link
https://code.visualstudio.com/docs/setup/linux, never tried it.
monaco looks interesting, downloaded with
npm install monaco-editor@0.10.1
npm is the package manager for JavaScript and the world’s largest
software registry. JavaScript is alanguage I am interested and ahe one
preferece (beside some others).
If I find some time I may check the code for curiosity.

To say it diplomatically, I do not have any problem with "an OS that
is not Windows" and do not say to appreciate this statement. But
beside strong liking of other OS, is there a technical reason for this
and which?

Regards


Am 08.01.2018 10:34, schrieb Thomas Morley:

2018-01-08 6:31 GMT+01:00 Hugh S. Myers :
'OS that is not Windows'…so you are saying to hell with 7 out of 10 
users?

Well, that's one way to cut down on all that annoying customer noise!

--hsm
p.s. I write multi-platform modules for CPAN and yes it is a great 
deal of

extra work but it is pretty much 'the right thing to do'…




Let me quote a little more from https://github.com/hacklily/hacklily 
README


"
[...]
Running locally

Dependencies

You need:

Node -- tested with Node 7, earlier versions may or may not also work
Yarn
Qt 5 -- with qmake in your path (installing using the version from
Qt's website is recommended on macOS)
Docker
an OS that is not Windows (if you make it work, please contribute 
your fix!)

[...]
"

Sounds a little different, doesn't it?



-Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Two conflicting text spanners

2018-01-08 Thread Kieren MacMillan
Hi Neo,

> I have two custom text spanners which overlap - they start and end at the 
> same notes. As LP can't apparently handle both, it gives me a warning.
> "Two simultaneous text-span events, junking this one"
> I imagine there must be some way to deal with it, but my haven't found 
> anything in LP archives.

See the thread at 
.
(And the situation may have been improved even further since then?)

Hope this helps,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Generate Random Pitches and Accidentals?

2018-01-08 Thread Joshua Nichols
I'm looking for a resource that can generate pitches at different octaves,
using different spellings, including accidentals.

Has someone already implemented this? I'm trying not to reinvent the wheel.

--
Josh
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread Karlin High

On 1/8/2018 11:44 AM, Joshua Nichols wrote:
I'm looking for a resource that can generate pitches at different 
octaves, using different spellings, including accidentals.


How will this be used? As an educational tool, perhaps? Describing the 
use case might get better help.

--
Karlin High
Missouri, USA

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread Ben


On 1/8/2018 12:44 PM, Joshua Nichols wrote:
I'm looking for a resource that can generate pitches at different 
octaves, using different spellings, including accidentals.


Has someone already implemented this? I'm trying not to reinvent the 
wheel.


--
Josh


Hi Josh,

What is your end goal with this? School project? Composition tool?

I did something like this once a while back, though it was easier and 
faster for me at the time to just load up Reaper, use a plugin/script to 
generate the random note data, and just export out the notation to pdf 
or musicxml. Then it was all LilyPond after that for my project.


Does this have to be contained *fully* in LilyPond for your purposes?

Give us some more info please :)

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread Joshua Nichols
Hi! This is for education!

On Jan 8, 2018 3:08 PM, "Karlin High"  wrote:

> On 1/8/2018 11:44 AM, Joshua Nichols wrote:
>
>> I'm looking for a resource that can generate pitches at different
>> octaves, using different spellings, including accidentals.
>>
>
> How will this be used? As an educational tool, perhaps? Describing the use
> case might get better help.
> --
> Karlin High
> Missouri, USA
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread Thomas Morley
2018-01-08 18:44 GMT+01:00 Joshua Nichols :
> I'm looking for a resource that can generate pitches at different octaves,
> using different spellings, including accidentals.
>
> Has someone already implemented this? I'm trying not to reinvent the wheel.
>
> --
> Josh


http://lsr.di.unimi.it/LSR/Item?id=274
already fits your needs?

Cheers,
  Harm

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread Joshua Nichols
Unfortunately it does not, and I don't know SCHEME well enough to know what
to do, or even start.

On Jan 8, 2018 5:55 PM, "Thomas Morley"  wrote:

> 2018-01-08 18:44 GMT+01:00 Joshua Nichols :
> > I'm looking for a resource that can generate pitches at different
> octaves,
> > using different spellings, including accidentals.
> >
> > Has someone already implemented this? I'm trying not to reinvent the
> wheel.
> >
> > --
> > Josh
>
>
> http://lsr.di.unimi.it/LSR/Item?id=274
> already fits your needs?
>
> Cheers,
>   Harm
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread David Nalesnik
Hi Josh,

On Mon, Jan 8, 2018 at 4:34 PM, Joshua Nichols  wrote:
> Hi! This is for education!
>
> On Jan 8, 2018 3:08 PM, "Karlin High"  wrote:
>>
>> On 1/8/2018 11:44 AM, Joshua Nichols wrote:
>>>
>>> I'm looking for a resource that can generate pitches at different
>>> octaves, using different spellings, including accidentals.
>>
>>
>> How will this be used? As an educational tool, perhaps? Describing the use
>> case might get better help.
>> --
>> Karlin High
>> Missouri, USA

Here is a worksheet I created with answers and different pitch content
every time you run it.  Perhaps you will find something useful in it.

(Note: if you're running a development version, you can cut out the
definition of the table command.  I included it so I could run
this--and many other "auto" worksheets--using lilybin.

Hope this helps,
David
\version "2.18.2"

% This file generates a customizable number of random white note pitches
% for identification.  Answers can be displayed.

% The following function is copied from scm/define-markup-commands.scm.
% Not needed in newer versions of LilyPond.
#(define-markup-list-command (table layout props column-align lst)
   (number-list? markup-list?)
   #:properties ((padding 0)
 (baseline-skip))

   (define (split-lst initial-lst lngth result-lst)
 ;; split a list into a list of sublists of length lngth
 ;; eg. (split-lst '(1 2 3 4 5 6) 2 '())
 ;; -> ((1 2) (3 4) (5 6))
 (cond ((not (integer? (/ (length initial-lst) lngth)))
(ly:warning
 "Can't split list of length ~a into ~a parts, returning empty list"
 (length initial-lst) lngth)
'())
   ((null? initial-lst)
(reverse result-lst))
   (else
(split-lst
 (drop initial-lst lngth)
 lngth
 (cons (take initial-lst lngth) result-lst)

   (define (dists-list init padding lst)
 ;; Returns a list, where each element of `lst' is
 ;; added to the sum of the previous elements of `lst' plus padding.
 ;; `init' will be the first element of the resulting list. The addition
 ;; starts with the values of `init', `padding' and `(car lst)'.
 ;; eg. (dists-list 0.01 0.1 '(1 2 3 4)))
 ;; -> (0.01 1.11 3.21 6.31 10.41)
 (if (or (not (number? init))
 (not (number? padding))
 (not (number-list? lst)))
 (begin
  (ly:warning
   "not fitting argument for `dists-list', return empty lst ")
  '())
 (reverse
  (fold (lambda (elem rl) (cons (+ elem padding (car rl)) rl))
(list init)
lst

   (let* (;; get the number of columns
   (columns (length column-align))
   (init-stils (interpret-markup-list layout props lst))
   ;; If the given markup-list is the result of a markup-list call, their
   ;; length may not be easily predictable, thus we add point-stencils
   ;; to fill last row of the table.
   (rem (remainder (length init-stils) columns))
   (filled-stils
(if (zero? rem)
init-stils
(append init-stils (make-list (- columns rem) point-stencil
   ;; get the stencils in sublists of length `columns'
   (stils
(split-lst filled-stils columns '()))
   ;; procedure to return stencil-length
   ;; If it is nan, return 0
   (lengths-proc
(lambda (m)
  (let ((lngth (interval-length (ly:stencil-extent m X
(if (nan? lngth) 0 lngth
   ;; get the max width of each column in a list
   (columns-max-x-lengths
(map
 (lambda (x)
   (apply max 0
 (map
  lengths-proc
  (map (lambda (l) (list-ref l x)) stils
 (iota columns)))
   ;; create a list of (basic) distances, which each column should
   ;; moved, using `dists-list'. Some padding may be added.
   (dist-sequence
(dists-list 0 padding columns-max-x-lengths))
   ;; Get all stencils of a row, moved accurately to build columns.
   ;; If the items of a column are aligned other than left, we need to
   ;; move them to avoid collisions:
   ;; center aligned: move all items half the width of the widest item
   ;; right aligned: move all items the full width of the widest item.
   ;; Added to the default-offset calculated in `dist-sequence'.
   ;; `stencils-for-row-proc' needs four arguments:
   ;;stil- a stencil
   ;;dist- a numerical value as basic offset in X direction
   ;;column  - a numerical value for the column we're in
   ;;x-align - a numerical value how current column should be
   ;;  aligned, where (-1, 0, 1) means (LEFT, CENTER, RIGHT)
   (stencils-for-row-proc
(lambda 

Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread David Nalesnik
On Mon, Jan 8, 2018 at 5:19 PM, David Nalesnik  wrote:
> Hi Josh,
>
> On Mon, Jan 8, 2018 at 4:34 PM, Joshua Nichols  
> wrote:
>> Hi! This is for education!
>>
>> On Jan 8, 2018 3:08 PM, "Karlin High"  wrote:
>>>
>>> On 1/8/2018 11:44 AM, Joshua Nichols wrote:

 I'm looking for a resource that can generate pitches at different
 octaves, using different spellings, including accidentals.
>>>
>>>
>>> How will this be used? As an educational tool, perhaps? Describing the use
>>> case might get better help.
>>> --
>>> Karlin High
>>> Missouri, USA
>
> Here is a worksheet I created with answers and different pitch content
> every time you run it.  Perhaps you will find something useful in it.
>
> (Note: if you're running a development version, you can cut out the
> definition of the table command.  I included it so I could run
> this--and many other "auto" worksheets--using lilybin.
>

BTW,

I turned on the accidentals b/c you asked about them.  The point of
the exercise is better served by using the line

test = \questions 30 #(list 0)

instead of the definition of test in the file

(i.e, just white notes)

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread Karlin High

On 1/8/2018 5:19 PM, David Nalesnik wrote:

Here is a worksheet I created with answers and different pitch content
every time you run it.


That thing is... astonishing.

The places where David Nalesnik and Thomas Morley live are going to have 
acute shortages of parentheses any day now.

--
Karlin High
Missouri, USA

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Two conflicting text spanners

2018-01-08 Thread Neo Anderson
Dear Kieren, 
I was afraid that without any instructions the code in that thread would fail, 
but to my surprise it worked beautifully! Thank you! 

I wonder why this isn't coded into LP itself or provided as a snippet 
with the software or in some repository (or am I mistaken?) 

On Monday, January 8, 2018 5:38 PM, Kieren MacMillan 
 wrote:
 

 Hi Neo,

> I have two custom text spanners which overlap - they start and end at the 
> same notes. As LP can't apparently handle both, it gives me a warning.
> "Two simultaneous text-span events, junking this one"
> I imagine there must be some way to deal with it, but my haven't found 
> anything in LP archives.

See the thread at 
.
(And the situation may have been improved even further since then?)

Hope this helps,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


   ___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generate Random Pitches and Accidentals?

2018-01-08 Thread Flaming Hakama by Elaine
> On 1/8/2018 12:44 PM, Joshua Nichols wrote:
>
> I'm looking for a resource that can generate pitches at different octaves,
> using different spellings, including accidentals.
>
> Has someone already implemented this? I'm trying not to reinvent the wheel.
>
> --
> Josh
>
>

There is a discussion of generating random notes in the comments of this
blog post:

http://lilypondblog.org/2014/03/music-functions-1-getting-to-grips-with-scheme-in-lilypond/

The example code is:

#(define myList
  (list
   #{ b2 #}
   #{ c'2 #}
   #{ d'2 #}
   #{ e'2 #}))
mySchemeFunction =#(define-music-function (parser location) ()
  (list-ref myList (random (length myList
mySetSeed = #(define-void-function (parser location) ()
 (let ((time (gettimeofday)))
   (set! *random-state*
 (seed->random-state (+ (car time)
(cdr time))

{
  \mySetSeed c'4 \mySchemeFunction c' \mySchemeFunction c'
\mySchemeFunction c' \mySchemeFunction c' \mySchemeFunction c'}



HTH,

David Elaine Alt
415 . 341 .4954   "*Confusion is
highly underrated*"
ela...@flaminghakama.com
skype: flaming_hakama
Producer ~ Composer ~ Instrumentalist
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user