Phrasing slur with multiple voices

2018-02-09 Thread Brian Kell
I am just learning LilyPond, and to practice I’m engraving Dvořák’s Humoresque 
No. 1 in E-flat Minor, which is in 2/4 time.

I’m stuck on the top staff in the attached image (measures 70 and 71).



It seems that there are three voices in the last beat of the second measure. 
The phrasing slur needs to extend from the first chord in the first measure to 
the f'8 in the second measure. Since slurs can’t cross voices, I think the 
eighth notes in the second measure need to be in the same voice as the chord in 
the first measure?

The closest I’ve come is the following:

<< { 4\(  | 4 \stemDown gf'8 f'\) } \\
   { s2 | s4 cf' } \\
   { s2 | s4 af' } >>

But this produces a warning from LilyPond: "ignoring too many clashing note 
columns”, and the gf'8 in the second measure is not offset to the right from 
the cf' and af'.

Suggestions?

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


[PHP] Re: Getting data from table as a tree

2004-08-08 Thread Brian Kell
Well, first off, a little bit of formatting (line numbers added for  
clarity):

 1 $tpl-assign(tree,
 2 array(
 3 element = array(
 4 array(
 5 name = test1,
 6 element = array(
 7 array(
 8 name = test1.1
 9 ),
10 array(
11 name = test1.2,
12 element = array(
13 array(
14 name = test1.2.1
15 ),
16 array(
17 name  = test1.2.2
18 )
19 )
20 )
21 )
22 )
23 )
24 )
25 );
It appears that each node is represented as an array. This array contains  
a name and, if the node has any children, another array called element  
that contains the child nodes. In addition, the root node is an element of  
some superroot, which is the array starting on line 2. (So if you want  
to have multiple trees, you can; just define multiple nodes with a pid of  
0.)

I think the following functions should do approximately what you want. I'm  
assuming MySQL here, since that's what I'm used to. If you're not using  
MySQL, you should be able to adapt this to your database easily enough.

function build_tree() {
$subtree = build_subtree(0);
if ($subtree !== NULL)
return array(element = $subtree);
else
return NULL;
}
function build_subtree($pid) {
$result = mysql_query(SELECT id, name FROM tbl WHERE pid='$pid');
if (!$result)
die(Can't query for pid $pid: .mysql_error());
if (mysql_num_rows($result)) {
$subtree = array();
while ($row = mysql_fetch_assoc($result)) {
$node = array();
$node['name'] = $row['name'];
$element = build_subtree($row['id']);
if ($element !== NULL)
$node['element'] = $element;
array_push($subtree, $node);
}
return $subtree;
} else
return NULL;
}
Be careful with this, because I didn't actually test this at all. Run it  
on a few test cases and make sure it gives you what you want.

Brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mySQL SQL query

2004-08-06 Thread Brian Kell
On Thu, 5 Aug 2004 08:48:01 -0500, Jay Blanchard  
[EMAIL PROTECTED] wrote:

[snip]
[snip]
A quickie for you:
How do I say
SELECT * FROM mytable where the sum of this field + this field + this
field  x
I can't say I've done one of those before.
[/snip]
How many SQL queries can a PHP list handle in a day? More than the MySQL
list! Hahahahahaha!
SELECT a + b + c and myTotal FROM myTable HAVING myTotal  x
[/snip]
Sorry, syntax errors
SELECT a + b + c AS myTotal FROM myTable HAVING myTotal  x
you can also do this
SELECT (SUM(foo) + SUM(bar)) AS myTotal FROM myTable GROUP BY thisThing
HAVING myTotal  x
Just say
SELECT * FROM Table WHERE Table.a + Table.b + Table.c  x
That should work, and it will be faster than using a HAVING clause.
Brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: Getting data from table as a tree

2004-08-06 Thread Brian Kell
On Thu, 5 Aug 2004 11:24:57 +0100, Pt2002 [EMAIL PROTECTED] wrote:
Hi
I have a table like this
id, pid, name. When a item has no parent, pid = 0. There is no limit in
depth.
1, 0, Test 1
2, 1, Test 1.1
3, 1, Test 1.2
4, 2, Test 1.1.1
5, 1, Test 1.3
6, 3, Test 1.2.1
I need to read this table and return an array that represents the tree.
Maybe using a recursive function but had no success.
I just need someone to point in the right direction.
TIA
Greets
pt2002
Do you have an idea for representing a tree with arrays? I'm not sure how  
you want to do that. If you can provide an outline of what the finished  
array should look like, I can help you with some code ideas.

Brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DEV] GOTO operator

2004-08-06 Thread Brian Kell
If anyone in this debate hasn't read my independent request for goto and  
break label;, I would appreciate it if you would:

http://bugs.php.net/bug.php?id=29287
I fully support the implementation of goto. Line labels will also  
immensely improve the break statement, which currently requires you to  
count the number of enclosing blocks you want to break out of, and won't  
work the way you expect if you add a new loop or switch inside the loop  
you're trying to break out of. In fact, I would recommend focusing more  
energy on line labels for the break statement than on line labels for  
goto. But, since we already have a goto implementation, I guess that's a  
moot point. :)

Brian
On Sat, 31 Jul 2004 15:16:54 +0800, Tinys Xuefer [EMAIL PROTECTED]  
wrote:

how about: break label; ?
just a thought
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php