Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Carl Sorensen


On 7/22/16 7:11 AM, "David Wright"  wrote:

>On Fri 22 Jul 2016 at 08:51:52 (+0200), Mojca Miklavec wrote:
>> I don't have much experience with MIDI. I just tried all the media
>> players on OS X and realized than only QuickTime Player 7 had some
>> very very basic support for playing MIDI files (I cannot even make it
>> play loud enough, let alone do anything else with it). None of the
>> others I have installed worked (VLC, MPlayerX, QuickTime Player,
>> RealPlayer, ...)
>> 
>> So I went on and made a package for TiMidity++ and freepats.
>> 
>> The problem is: I'm still unable to figure out how to change the
>> instrument to anything but Piano.
>> 
>> Here's a minimal example:
[Š]
>
>I do this as a matter of course because I set a lot of SATB music
>on the conventional two staves but need to generate midi teaching
>files with the individual parts highlighted. So I keep an ily file
>with a few definitions in it:

[Š]
>And that way I can add three lines and get a full set of midi teaching
>files for tutti and each and every part.

The Frescobaldi SATB score wizard with piano reduction has this already
set up and is very convenient.  I use it regularly.

Thanks,

Carl


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


Re: \accidentalStyle for common choir notation

2016-07-22 Thread tisimst
On Fri, Jul 15, 2016 at 3:14 AM, David Kastrup [via Lilypond] <
ml-node+s1069038n192707...@n5.nabble.com> wrote:

> David Wright <[hidden email]
> > writes:
>
> > On Thu 14 Jul 2016 at 19:07:41 (+0200), Jonathan Scholbach wrote:
> >> Sorry, guys, for being so rude. But can we talk about LP-features
> >> instead of arguing about best-practice-typesetting? That would be
> >> nice :)
> >> To me, this discussion is somewhat obsolete. A good program should
> >> leave the decision to the user. And that's where LP is failing at
> >> the moment, cause user cannot choose the option very many - not to
> >> say: the very most - engravers of choir scores opted for.
> >
> > I apologise for fighting your corner.
> >
> >> \accidentalStyle piano works in GrandStaff, but is needed in
> >> ChoirStaff. So can somebody please be so kind to invest her energy,
> >> time and skills into this problem instead of wasting her capacities
> >> in a discussion about a question which is at least in part a matter
> >> of personal taste? I tried to manipulate the scm/music-functions.scm
> >> but, since I do not understand it, without success.
> >
> > I don't know whether my contribution could persuade Phil that
> > reputable publishers print what he, as a singer, might find
> > confusing. However, as a LP Main Developer and a member of the
> > Bug Squad, he might be the sort of person to be able to make
> > such a that change if he was won over.
>
> \accidentalStyle is not about figuring out what the best way of
> typesetting things are, but about specifying one way to do it.
>
> So the threshold for a feature is more like "are people going to have a
> reason for wanting it" rather than "is it the best way to typeset this".
>
> Of course, we will save ourselves a lot of discussions if "are people
> going to have a reason for wanting it" does not imply "we need to
> provide an implementation for exactly what they are going to want" but
> if it is reasonably easy to make LilyPond do what you want without your
> particular use case needing to be coded into LilyPond in some manner.
>

Late to the conversation, but watched everything from afar.

So, I went into the file scm/music-functions.scm as well and basically
copied the alist entry for piano:

;; Stone's suggestions for accidentals on grand staff.
;; Accidentals are canceled across the staves
;; in the same grand staff as well
(piano #f
   (Staff ,(make-accidental-rule 'same-octave 0)
  ,(make-accidental-rule 'any-octave 0)
  ,(make-accidental-rule 'same-octave 1)
  GrandStaff
  ,(make-accidental-rule 'any-octave 0)
  ,(make-accidental-rule 'same-octave 1))
   ()
   GrandStaff)

and I figured that adding another entry like the following would make it
possible:

;; Similar to the piano style, accidentals are canceled
;; across the staves in the same choir staff as well
(choral #f
   (Staff ,(make-accidental-rule 'same-octave 0)
  ,(make-accidental-rule 'any-octave 0)
  ,(make-accidental-rule 'same-octave 1)
  ChoirStaff
  ,(make-accidental-rule 'any-octave 0)
  ,(make-accidental-rule 'same-octave 1))
   ()
   ChoirStaff)

But that didn't change anything when I tried

\accidentalStyle choral

or

\accidentalStyle ChoirStaff.choral

or any other combination. What am I missing?

--
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/accidentalStyle-for-common-choir-notation-tp191797p192980.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Resetting page numbers between bookparts

2016-07-22 Thread tisimst
On Sun, Jul 17, 2016 at 9:56 AM, Dosh Doshington [via Lilypond] <
ml-node+s1069038n192760...@n5.nabble.com> wrote:

> Greetings,
>
> I wish to create a single PDF containing all the parts to my work, instead
> of 30-something single PDFs. I would like not to use an external PDF
> merging
> tool since I recompile very often.
>
> This code fails to work since page numbers continue after each page break.
>
> \book {
> \bookOutputSuffix "parts"
> \bookpart {
>  \paper {
>   set-first-page-number = 1
>  }
>  \score { ... }
> }
> % page numbers continue instead of being reset to 1 <--
> \bookpart {
>  paper {
>   set-first-page-number = 1
>  }
>  \score { ... }
> }
> ... % other parts follow
> }
>
> There exist external \paper blocks in a different .ily files but they do
> not
> have page numbering code.
>

I had a look at this a few days ago, but despite all my research and
effort, I couldn't get the 'page:page-number property to manually change at
all either.

Dev team,

I'm not sure if any of you looked at this, but I think my Scheme-fu is just
not quite up to snuff yet. Hopefully I'll get there someday. Is there any
logical reason why that property cannot be re-set like bar numbers can?

Best,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Resetting-page-numbers-between-bookparts-tp192760p192978.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Midi entry (was: Changing and playing a different instrument in MIDI)

2016-07-22 Thread Richard Shann
On Fri, 2016-07-22 at 17:50 +0200, David Kastrup wrote:
> Mojca Miklavec  writes:
> 
> > Off-topic:
> >
> > That said, I wouldn't mind suggestions for some good OpenSource (GUI)
> > MIDI editors. I have a bunch of weird MIDI files that I would like to
> > turn into scores. They sound OK, but I'm not exactly sure if they were
> > just obfuscated on purpose or if they are recordings of "human
> > players" and thus the timings are some horrible (i)rational numbers.
> 
> midi2ly is unsuitable for quantizing human play.  It's really just a
> software-produced Midi reimporter.
> 
> "rumor" is rumored to be a bit better but its website is gone.  It still
> can be installed in Debian and has Info documentation.


Following on from the last time this topic came up I built rumor and ran
it and looked at its source code. The good side is it creates LilyPond
syntax directly, but the down side is that the "u" in Rumor stands for
"Unintelligent" and, indeed I can't believe it will save you time. This
got me thinking that there is quite a lot of software available in these
repositories, so I started digging around and came across FANN a neural
network library. I've created a neural network that classifies each note
in a MIDI track by considering the its timing and that of the previous
and following note.
This is just at the toy stage - it only classifies whole,1/2,1/4 and
1/8th notes with no support for dotted notes, or rests following notes
let alone tuplets. So far it has 500-odd shortish training patterns and
works fairly often. But I'm doubtful is this the right approach - it
seems something I think you (David) mentioned before on this topic -
Hidden Markov Models - would be a better fit to the problem. But sadly
there doesn't appear to be anything approachable-looking in the Debian
repository for making a start on that.
> 
> If you do Emacs, I have code for entering stuff on accordion via Midi
> (without duration, but picking apart the channels for treble and chord
> side and basses and being able to recognize chords and tell them apart
> from legato play).  Emacs' LilyPond mode itself is woefully underpowered
> and in need of some love, however, so this makes mostly sense when being
> able to use Emacs is a reward rather than a penance for you in the first
> place.
> 
> Denemo (which exports to LilyPond) has some Midi entry modes IIRC, there
> might be some Youtube tutorials.

Denemo's tutorials are mostly on vimeo.com. There are some for the MIDI
entry, but again they won't be much use unless you know what the right
rhythmic notation is. (What it *does* do is to let you visualize a MIDI
track as notes dotted along a click-track, so you can make shrewd
guesses as to what the note durations are, stepping through them one at
a time - Denemo makes suggestions which you can just accept if they are
ok). But this is a million miles from being able to give a
performance-generated MIDI file to a program and it generates a
plausible score - you are going through the whole thing note by note.

Richard



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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Noeck
Am 22.07.2016 um 14:41 schrieb Phil Holmes:
> Probably better to follow the instructions in the snippet "Changing MIDI
> output to one channel per voice" in the NR.

Oh, of course, I should have read that (it's a snippet):

http://lilypond.org/doc/v2.18/Documentation/source/Documentation/snippets/midi#midi-changing-midi-output-to-one-channel-per-voice

Joram

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


Midi entry (was: Changing and playing a different instrument in MIDI)

2016-07-22 Thread David Kastrup
Mojca Miklavec  writes:

> Off-topic:
>
> That said, I wouldn't mind suggestions for some good OpenSource (GUI)
> MIDI editors. I have a bunch of weird MIDI files that I would like to
> turn into scores. They sound OK, but I'm not exactly sure if they were
> just obfuscated on purpose or if they are recordings of "human
> players" and thus the timings are some horrible (i)rational numbers.

midi2ly is unsuitable for quantizing human play.  It's really just a
software-produced Midi reimporter.

"rumor" is rumored to be a bit better but its website is gone.  It still
can be installed in Debian and has Info documentation.

If you do Emacs, I have code for entering stuff on accordion via Midi
(without duration, but picking apart the channels for treble and chord
side and basses and being able to recognize chords and tell them apart
from legato play).  Emacs' LilyPond mode itself is woefully underpowered
and in need of some love, however, so this makes mostly sense when being
able to use Emacs is a reward rather than a penance for you in the first
place.

Denemo (which exports to LilyPond) has some Midi entry modes IIRC, there
might be some Youtube tutorials.

Rosegarden, a Midi sequencer, can also export LilyPond if I remember
correctly.

Working yourself into all of these requires time and effort.
Personally, most of them did not save me time.  I do use my Emacs mode
since it gets me the pitches reasonably fast.

> I did try to play with different settings of midi2ly, but didn't yet
> find the magic recipe for fixing the timing of those (obfuscated?)
> MIDIs.

No, it's just that midi2ly's quantizer is just not for human play.  Try
to see whether you get further with Rosegarden, but don't expect too
much.

-- 
David Kastrup

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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread tisimst
On Fri, Jul 22, 2016 at 8:28 AM, Mojca Miklavec [via Lilypond] <
ml-node+s1069038n19296...@n5.nabble.com> wrote:

> Off-topic:
>
> That said, I wouldn't mind suggestions for some good OpenSource (GUI)
> MIDI editors. I have a bunch of weird MIDI files that I would like to
> turn into scores. They sound OK, but I'm not exactly sure if they were
> just obfuscated on purpose or if they are recordings of "human
> players" and thus the timings are some horrible (i)rational numbers.
>
> A friend of mine also has a midi interface for her accordion and I'm
> thinking of asking her to play some of the songs she knows and then
> turn them into nicely typeset scores (hoping that there is a way to do
> that faster than by asking her to play it slowly and write everything
> down as she plays).
>
> I did try to play with different settings of midi2ly, but didn't yet
> find the magic recipe for fixing the timing of those (obfuscated?)
> MIDIs.
>
> I checked some software websites, but the software usually has to be
> compiled/packaged first (I need it for OS X), so I better pick the
> best one from the start before spending hours resolving all
> dependencies and reporting all the compile problems upstream :)
>
> Reasonably priced commercial software would also be fine.
>

I haven't tried this one, but it looks very nice and has a convenient
quantization function to clean things up for you. It's cross-platform for
both Windows and Linux:

http://midieditor.sourceforge.net/

HTH,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Changing-and-playing-a-different-instrument-in-MIDI-tp192943p192967.html
Sent from the User mailing list archive at Nabble.com.___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Mojca Miklavec
On 22 July 2016 at 11:46, Robert Blackstone wrote:
> On 22 Jul 2016, at 08:51 , Mojca Miklavec wrote:
>
>> Hello,
>>
>> I don't have much experience with MIDI. I just tried all the media
>> players on OS X and realized than only QuickTime Player 7 had some
>> very very basic support for playing MIDI files (I cannot even make it
>> play loud enough, let alone do anything else with it). None of the
>> others I have installed worked (VLC, MPlayerX, QuickTime Player,
>> RealPlayer, ...)
>>
>> So I went on and made a package for TiMidity++ and freepats.
>>
>> The problem is: I'm still unable to figure out how to change the
>> instrument to anything but Piano.
>
> Hello Mojca,
> Although I cannot offer a solid solution for your problem with the instrument 
> playing your midi-file I can suggest a hack or at least a way to get what you 
> want to hear.
>
> By accident I found that when I click on a LilyPond midi-file it opens in 
> Finale, giving me the score and the means to play and change the instrument 
> into whatever I like.
> I guess that as  a "LilyPonder" you don't have Finale but maybe one of your 
> friends has it, who can do it for you and save the audio file with the 
> instrument of your choice.

True: I don't have Finale. I'm not a musician, let alone a composer.
But certainly not someone willing to buy expensive software for what
is a mere hobby. Plus, the "plain text" mode of lilypond offers quite
some benefits over commercial solutions / GUI tools, in particular if
we plan to start some collaboration to create an "open source"
collection of national songs (which could then easily be rearranged,
transposed, etc.).

(If this was a "one time need", I could use the opportunity, but I
cannot beg either you or other human being to keep fixing my midi
files on a regular basis.)

It would also be a nice experiment to figure out how to create a sound
font from recordings of the highest quality instrument.

Off-topic:

That said, I wouldn't mind suggestions for some good OpenSource (GUI)
MIDI editors. I have a bunch of weird MIDI files that I would like to
turn into scores. They sound OK, but I'm not exactly sure if they were
just obfuscated on purpose or if they are recordings of "human
players" and thus the timings are some horrible (i)rational numbers.

A friend of mine also has a midi interface for her accordion and I'm
thinking of asking her to play some of the songs she knows and then
turn them into nicely typeset scores (hoping that there is a way to do
that faster than by asking her to play it slowly and write everything
down as she plays).

I did try to play with different settings of midi2ly, but didn't yet
find the magic recipe for fixing the timing of those (obfuscated?)
MIDIs.

I checked some software websites, but the software usually has to be
compiled/packaged first (I need it for OS X), so I better pick the
best one from the start before spending hours resolving all
dependencies and reporting all the compile problems upstream :)

Reasonably priced commercial software would also be fine.

In any case I'll first try to get a bit more out of midi2ly to see
what can reasonably be done automatically. But I'll ask in a different
thread.

> If necessary I could do it for you.

This could be done once, but not on regular basis, so it doesn't really help.

Mojca

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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread David Wright
On Fri 22 Jul 2016 at 08:51:52 (+0200), Mojca Miklavec wrote:
> I don't have much experience with MIDI. I just tried all the media
> players on OS X and realized than only QuickTime Player 7 had some
> very very basic support for playing MIDI files (I cannot even make it
> play loud enough, let alone do anything else with it). None of the
> others I have installed worked (VLC, MPlayerX, QuickTime Player,
> RealPlayer, ...)
> 
> So I went on and made a package for TiMidity++ and freepats.
> 
> The problem is: I'm still unable to figure out how to change the
> instrument to anything but Piano.
> 
> Here's a minimal example:
[...]
> But this doesn't help me in any way.
> 
> Freepats contains
> Tone_000/021_Accordion.pat
> so I tried to set the instrument to "021_Accordion", but that one
> didn't help either.
> 
> It's not neccessarily a LilyPond's fault. It could be that I simply
> misconfigured TiMidity++. I would be grateful for any hints about
> where to look next.

You can move the performer from Staff to Voice level. Here's your example:

\score {
  \new PianoStaff
  <<
\new Voice = "melody" \fixed c'
{
  \set midiInstrument = #"accordion"
  \time 3/4
  f4 g a
}
  >>
  \midi{
\tempo 4 = 100
\context {
  \Staff
  \remove Staff_performer
}
\context {
  \Voice
  \consists Staff_performer
}
  }
}

I do this as a matter of course because I set a lot of SATB music
on the conventional two staves but need to generate midi teaching
files with the individual parts highlighted. So I keep an ily file
with a few definitions in it:

%% a selection of instruments:
midioboe = {
  \set midiInstrument = #"oboe"
  \set midiMinimumVolume = #0.0
  \set midiMaximumVolume = #1.0
} % with dynamics
midisoloclarinet = {
  \set midiInstrument = #"clarinet"
  \set midiMinimumVolume = #0.9
  \set midiMaximumVolume = #1.0
}
midibackingbassoon = {
  \set midiInstrument = #"bassoon"
  \set midiMinimumVolume = #0.3
  \set midiMaximumVolume = #0.4
}
midiclick = {
  \set midiInstrument = #"woodblock"
  \set midiMinimumVolume = #1.0
  \set midiMaximumVolume = #1.0
}

miditempo = "" % default in case I forget to set it specifically

mididyn = \midi {
  \context {
\Staff
\remove Staff_performer
  }
  \context {
\Voice
\consists Staff_performer
  }
}

midinodyn = \midi {
  \mididyn
  \context {
\Voice
\remove Dynamic_performer
  }
}

%% example of its use. This would also be in an ily file with each
%% part being highlighted in turn. (click is for syncopated jazzy music)
\score {
  \unfoldRepeats
  \new Staff <<
\global
\new Voice { \midiclick \click }
\new Voice { \midibackingbassoon \soprano }
\new Voice { \midibackingbassoon \alto }
\new Voice { \midisoloclarinet \tenor }
\new Voice { \midibackingbassoon \bass }
  >>
  \midi {
\midinodyn % uses midinodyn for teaching parts, mididyn for tutti
\miditempo
  }
}

And that way I can add three lines and get a full set of midi teaching
files for tutti and each and every part.

\include "Midi-bits.ily"
%% define the parts' notes here
miditempo = { \tempo 4=72 }
\include "Midi-csatb.ily"

Cheers,
David.

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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread John Gourlay
GarageBand in Mac OS X will play MIDI files.

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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Phil Holmes
- Original Message - 
From: "Noeck" 

To: 
Sent: Friday, July 22, 2016 12:32 PM
Subject: Re: Changing and playing a different instrument in MIDI



Hi,

from the other replies I conclude that the Voice has no midiInstrument
and one cannot change the instrument inside the staff.

Or do you mean 'set' (once for the whole piece) by 'change'?

In both cases, if you want different instruments within the same staff,
you could make a separate midi score using the same music variables
which has more staves. Like (pseudocode):

\score { % for pdf
   staff << { voice1a voice1b }  voice2 >>
}

\score { % for midi
 <<
   staff { voice1a }  with midiInstrument = flute
   staff { s1*n  voice1b } with midiInstrument = accordion
   staff { voice2 } with midiInstrument = guitar
>>
}

HTH,
Joram


Probably better to follow the instructions in the snippet "Changing MIDI 
output to one channel per voice" in the NR.


--
Phil Holmes 



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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Noeck
Hi,

from the other replies I conclude that the Voice has no midiInstrument
and one cannot change the instrument inside the staff.

Or do you mean 'set' (once for the whole piece) by 'change'?

In both cases, if you want different instruments within the same staff,
you could make a separate midi score using the same music variables
which has more staves. Like (pseudocode):

\score { % for pdf
staff << { voice1a voice1b }  voice2 >>
}

\score { % for midi
  <<
staff { voice1a }  with midiInstrument = flute
staff { s1*n  voice1b } with midiInstrument = accordion
staff { voice2 } with midiInstrument = guitar
 >>
}

HTH,
Joram


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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Vaughan McAlley
On 22 July 2016 at 16:51, Mojca Miklavec  wrote:
> Hello,
>
> I don't have much experience with MIDI. I just tried all the media
> players on OS X and realized than only QuickTime Player 7 had some
> very very basic support for playing MIDI files (I cannot even make it
> play loud enough, let alone do anything else with it). None of the
> others I have installed worked (VLC, MPlayerX, QuickTime Player,
> RealPlayer, ...)
>
> So I went on and made a package for TiMidity++ and freepats.
>

I very highly recommend MidiPipe:
http://www.subtlesoft.square7.net/MidiPipe.html

For playing MIDI files, connect a DLS synth module to an SMF player
module. But it is very versatile, and I use it pretty much any time I
do anything with MIDI. For example it connects nicely with
Frescobaldi.

Vaughan

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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Robert Blackstone

On 22 Jul 2016, at 08:51 , Mojca Miklavec  
wrote:

> Hello,
> 
> I don't have much experience with MIDI. I just tried all the media
> players on OS X and realized than only QuickTime Player 7 had some
> very very basic support for playing MIDI files (I cannot even make it
> play loud enough, let alone do anything else with it). None of the
> others I have installed worked (VLC, MPlayerX, QuickTime Player,
> RealPlayer, ...)
> 
> So I went on and made a package for TiMidity++ and freepats.
> 
> The problem is: I'm still unable to figure out how to change the
> instrument to anything but Piano.

Hello Mojca, 
Although I cannot offer a solid solution for your problem with the instrument 
playing your midi-file I can suggest a hack or at least a way to get what you 
want to hear.

By accident I found that when I click on a LilyPond midi-file it opens in 
Finale, giving me the score and the means to play and change the instrument 
into whatever I like.
I guess that as  a "LilyPonder" you don't have Finale but maybe one of your 
friends has it, who can do it for you and save the audio file with the 
instrument of your choice.
-
If necessary I could do it for you.
If you want to give it a try, send me, to test it, a small part of your score. 
In will probably be able to return the saved midi-performance on an instrument 
of your choice (provided it is in the Finale collection of sounds.)

Best regards,
Robert Blackstone


. 




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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread David Kastrup
Gilles  writes:

> On Fri, 22 Jul 2016 08:51:52 +0200, Mojca Miklavec wrote:
>> Hello,
>>
>> I don't have much experience with MIDI. I just tried all the media
>> players on OS X and realized than only QuickTime Player 7 had some
>> very very basic support for playing MIDI files (I cannot even make it
>> play loud enough, let alone do anything else with it). None of the
>> others I have installed worked (VLC, MPlayerX, QuickTime Player,
>> RealPlayer, ...)
>>
>> So I went on and made a package for TiMidity++ and freepats.
>>
>> The problem is: I'm still unable to figure out how to change the
>> instrument to anything but Piano.
>>
>>
>> Here's a minimal example:
>>
>> \score {
>>   \new PianoStaff
>>   <<
>> \new Voice = "melody" \fixed c'
>> {
>>   \set midiInstrument = #"accordion"
>>   \time 3/4
>>   f4 g a
>> }
>>   >>
>>   \midi{ \tempo 4 = 100 }
>> }
>>
>> But this doesn't help me in any way.
>
> \set Staff.midiInstrument = "accordion"

Without further specification, properties are set at "Bottom" level
(usually "Voice" or equivalent.  Properties are inherited downwards, so
a Voice context not having set some property itself sees the property
from the enclosing Staff (or even further up the hierarchy).  Engravers
(for PDF) and performers (for Midi) see properties from the view of the
context that instantiates them.

The performer responsible for setting the midiInstrument is the
Staff_performer which unsurprisingly is grouped at Staff level (see the
Internals Reference or ly/performer-init.ly).

Many properties are interpreted by engravers and performers at lowest
level so one tends to forget that one sometimes needs to set properties
at an explicitly higher level.

-- 
David Kastrup

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


Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Gilles

On Fri, 22 Jul 2016 08:51:52 +0200, Mojca Miklavec wrote:

Hello,

I don't have much experience with MIDI. I just tried all the media
players on OS X and realized than only QuickTime Player 7 had some
very very basic support for playing MIDI files (I cannot even make it
play loud enough, let alone do anything else with it). None of the
others I have installed worked (VLC, MPlayerX, QuickTime Player,
RealPlayer, ...)

So I went on and made a package for TiMidity++ and freepats.

The problem is: I'm still unable to figure out how to change the
instrument to anything but Piano.


Here's a minimal example:

\score {
  \new PianoStaff
  <<
\new Voice = "melody" \fixed c'
{
  \set midiInstrument = #"accordion"
  \time 3/4
  f4 g a
}
  >>
  \midi{ \tempo 4 = 100 }
}

But this doesn't help me in any way.


\set Staff.midiInstrument = "accordion"

HTH,
Gilles


[...]



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


Changing and playing a different instrument in MIDI

2016-07-22 Thread Mojca Miklavec
Hello,

I don't have much experience with MIDI. I just tried all the media
players on OS X and realized than only QuickTime Player 7 had some
very very basic support for playing MIDI files (I cannot even make it
play loud enough, let alone do anything else with it). None of the
others I have installed worked (VLC, MPlayerX, QuickTime Player,
RealPlayer, ...)

So I went on and made a package for TiMidity++ and freepats.

The problem is: I'm still unable to figure out how to change the
instrument to anything but Piano.


Here's a minimal example:

\score {
  \new PianoStaff
  <<
\new Voice = "melody" \fixed c'
{
  \set midiInstrument = #"accordion"
  \time 3/4
  f4 g a
}
  >>
  \midi{ \tempo 4 = 100 }
}

But this doesn't help me in any way.

Freepats contains
Tone_000/021_Accordion.pat
so I tried to set the instrument to "021_Accordion", but that one
didn't help either.

It's not neccessarily a LilyPond's fault. It could be that I simply
misconfigured TiMidity++. I would be grateful for any hints about
where to look next.


Another slightly more straightforward question. TiMidity++ reports
Track name: \new:melody
Is there any simple way to change this to something more meaningful?

Thank you,
Mojca

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