Apologies if this is in a wrong forum.
Say I have midi file that has been generated with Lilypond, with the instrument 'acoustic grand' (one of the choices Lilypond has). This works with the soundfont FluidR3_GM.sf2 (e.g. if I make a wav out of the midi with fluidsynth to use with Audacity).
Now say I wanted to use e.g. http://sonimusicae.free.fr/orguedesalon-en.html soundfont with the generated midi, how would I do that? Is there a way to edit the midi so it could be used with the new soundfont and instruments? Or can Lilypond's midi instrument selection be used somehow? I can see the instruments the soundfont has with Swami.
I use Lilypond to generate sheet music and midi files so I would prefer it for the job, but if this is not possible, how, in general, can I use a given soundfount and its instruments to generate midi files?
(I'll freely admit I'm pretty confused at this point. :D )
Beginner question: midi (editing) and choosing soundfonts/instruments?
Moderators: MattKingUSA, khz
- tenryu
- Established Member
- Posts: 31
- Joined: Tue Dec 30, 2014 6:35 pm
- Location: barjac (30430) France
- Has thanked: 2 times
Re: Beginner question: midi (editing) and choosing soundfonts/instruments?
If I have well understood your question, you ask if it is possible to change your soundfont with your midi file. Just a little explanation on midi files. There is no music in it, just numbers. Thoses numbers have to be read by a program (Theres are many of them, let's say timidity or LMMS). But if you want to hear a sound, you have to tell your program what soundfound you want to use. If you have LMMS ( it's an exemple, because I use it often), you have to import your midi file, and when it's done, you have to choose the soundfile by clicking on the left part of the editing window, where it's written "SF2" in red.
I hope my explanations are not to much confused.
I hope my explanations are not to much confused.
Even if you can't sing well, sing. Sing to yourself. Sing in the privacy of your home. But sing.
"Nachman of Breslov"
"Nachman of Breslov"
Re: Beginner question: midi (editing) and choosing soundfonts/instruments?
The instruments or programs in FluidR3_GM.sf2 follow the General MIDI specification, see
https://en.wikipedia.org/wiki/General_M ... nge_events
Alas, it seems that, in lilypond, \set Staff.midiInstrument only accepts instrument names, not numbers. However, knowing the mapping [program number <-> instrument name] in your non-GM soundfont and comparing it with the GM mapping you could try "translating" directly in the lilypond file from one instrument to another.
Another approach is importing the midi file produced by lilypond into a midi sequencer, like rosegarden, muse, qtractor, ardour... In these sequencers you will be able to insert program changes where you wish.
https://en.wikipedia.org/wiki/General_M ... nge_events
Alas, it seems that, in lilypond, \set Staff.midiInstrument only accepts instrument names, not numbers. However, knowing the mapping [program number <-> instrument name] in your non-GM soundfont and comparing it with the GM mapping you could try "translating" directly in the lilypond file from one instrument to another.
Another approach is importing the midi file produced by lilypond into a midi sequencer, like rosegarden, muse, qtractor, ardour... In these sequencers you will be able to insert program changes where you wish.
-
- Established Member
- Posts: 681
- Joined: Sat Nov 01, 2014 8:15 pm
- Location: The Internet
- Been thanked: 1 time
Re: Beginner question: midi (editing) and choosing soundfonts/instruments?
I would suggest importing the MIDI file in Rosegarden and using Fluidsynth as sampler. Then you'll have the power to choose any soundfont or instrument.
Re: Beginner question: midi (editing) and choosing soundfonts/instruments?
Thank you all for the suggestions. I'll try them the coming weekend.
Re: Beginner question: midi (editing) and choosing soundfonts/instruments?
This worked for me. I used Swami to check the mappings in the soundfont, then looked up the corresponding instrument name in GM, and put that to Lilypond's midi instrument selection. Fluidsynth gave warnings about a nonexistent preset on channel 9 with some soundfonts but the files sounded fine anyway (I made wavs out of the Lilypond generated midis with Fluidsynth). I also had to modify the bank numbers in some soundfonts, as they had the instruments on some other bank than 0 which GM seems to use.Pablo wrote: Alas, it seems that, in lilypond, \set Staff.midiInstrument only accepts instrument names, not numbers. However, knowing the mapping [program number <-> instrument name] in your non-GM soundfont and comparing it with the GM mapping you could try "translating" directly in the lilypond file from one instrument to another.
So this is solved for me. Thank you all again.