lilypond-user
[Top][All Lists]
Advanced

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

Re: [OT] modify midi


From: Gianmaria Lari
Subject: Re: [OT] modify midi
Date: Tue, 16 Jun 2020 09:53:06 +0200

Thank you Matt, Mark & Gilles.

I had a look to all your propositions and the idea to convert midi to ascii etc. etc. looks interesting and promising. I will make some test to see how much work it needs and if it something that can work.

Thanks a lot!
g.

On Mon, 15 Jun 2020 at 16:58, Matt Wallis <m7956@acumen-it.co.uk> wrote:
On 15/06/2020 12:18, Mark Knoop wrote:
> At 11:09 on 15 Jun 2020, Gianmaria Lari wrote:
>> Sometimes I would like to modify a bit the midi file generated by
>> Lilypond. What stops me from doing that is that in case I modify the
>> lilypond source I lose all the work done on the midi and I have to do
>> it again from scratch.
>>
>> So I was wondering if anyone knows a software that gives you the
>> possibility to record the list of operations I do on a midi file so
>> that I can reapply them "automatically". Of course I understand the
>> limitation that a software like this will have: the midi file you want
>> to apply the change has to be "very similar" to the original one (for
>> example changing only the note pitch etc. etc.).
>
> There are various utilities on the web for converting midi to and from text formats, e.g. http://www.archduke.org/midi/
>
> You could have a potential workflow as follows:
>
> - convert Lilypond's MIDI output to text
> - edit as necessary
> - save diff of the edit
> - convert back to MIDI for playback
> ...
> - edit Lilypond, export new MIDI, convert to text
> - use patch to apply previous diff
> - convert back to MIDI for playback
>
> https://www.pair.com/support/kb/paircloud-diff-and-patch/

I wonder if it's possible to use git.  For example:

- Commit (text version of) original midi in a branch called, say
'from-lilypond'
- Create a new branch called, say 'modifications'
- Make your modifications in the 'modifications' branch (this may
involve another conversion from text to midi and back, depending on how
you make your modifications)
- When you have a new midi from lilypond, commit (a text version of) it
to the 'from-lilypond' branch,.
- Switch to  'modifications' branch, and merge from the branch
'from-lilypond'

In all of the above, you use the same filename for all versions of the
midi, and in both branches.

Well, that's a back of an envelope sketch. I'm not sure if this has any
benefits over the diff-and-patch method described by Mark.
Is git better than diff-and-patch at dealing with this kind of merge? I
don't know. I guess it may be useful to have all versions saved in git.
git also is good at presenting conflicts - but again, I don't know how
this compares with diff-and-patch - I haven't done much with the latter.

Of course, with either method, you'd probably need to automate it (e.g..
using make)

Matt


reply via email to

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