Switching between instruments using Program Change messages

You're new to the LinuxSampler world? You don't know where to start and nothing works? Here's the place to ask for help.
ggoodesa
Advanced User
Posts: 116
Joined: Thu Aug 14, 2008 6:48 pm

Switching between instruments using Program Change messages

Post by ggoodesa » Wed Dec 24, 2008 10:55 am

Hi,

I'd like to know if I can create a GIG file with two different instruments and then use MIDI program change message to switch between the two.

For example, I have a rank of samples Pipes from a Pipe organ and two sets of recordings (one plain the other with tremulant). I need to use the same MIDI channel but switch between the two sample sets (instruments) on-the-fly. Is this possible?

Thanks,
GrahamG

ccherrett
Advanced User
Posts: 162
Joined: Wed Jan 23, 2008 11:24 pm
Contact:

Re: Switching between instruments using Program Change messages

Post by ccherrett » Mon Dec 29, 2008 1:52 am

Yes it can be done. I am using the VSL libraries and this is how they have done it with their instruments. One .gig file will have many different articulations of that instrument in one file controlled by program change events.

You can use the event change editor in rosegarden to map change events in the matrix editor.

I am running VSL's Performance tool that does the program changes through a GUI mostly for me.

I hope that helps!
Christopher Cherrett
Founder of The Open Octave Project
http://www.openoctave.org

User avatar
dahnielson
Moderator
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden
Contact:

Re: Switching between instruments using Program Change messages

Post by dahnielson » Mon Dec 29, 2008 4:15 pm

What you're looking for is a MIDI Instrument Map. Welcome to this überthread. :D
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux

ggoodesa
Advanced User
Posts: 116
Joined: Thu Aug 14, 2008 6:48 pm

Re: Switching between instruments using Program Change messages

Post by ggoodesa » Sun Jan 04, 2009 6:17 pm

Hi Anders,

Thanks for the information. I'll get a chance to look at this sometime this week :-)

GrahamG

ggoodesa
Advanced User
Posts: 116
Joined: Thu Aug 14, 2008 6:48 pm

Re: Switching between instruments using Program Change messages

Post by ggoodesa » Fri Jan 16, 2009 9:29 pm

Hi,

I finally got a chance to try this out. I created a GIG with two instruments within. Created the 'chromatic' instrument map in qsampler. Set up Channel 1 with the GIG, preloading instrument 1 by default. Then I saved and reloaded just to make sure everything was in place. Sending the program change did change between the two instruments, BUT NOT 'on-the-fly', i.e. the notes that I was playing on instrument 1 went silent and instrument 2 only started playing when I played new notes. This is using the released version of Linuxsampler and Qsampler.

When using program change with soundfonts and fluidsynth I am able to send the program change and the notes that I am currently playing change to the new instrument. This is what I need to get Linuxsampler to do. Is there a different way to setup the instrument map? Would using Fantasia make a difference?
Any ideas welcome...

GrahamG

User avatar
dahnielson
Moderator
Posts: 632
Joined: Wed Jan 23, 2008 11:25 pm
Location: Linköping / Tranås, Sweden
Contact:

Re: Switching between instruments using Program Change messages

Post by dahnielson » Fri Jan 16, 2009 9:58 pm

You need to set the correct load mode for that behavior. Instrument maps use "ON_DEMAND" by default. If you set it to "PERSISTENT" the instrument will be loaded when the instrument map is loaded, or you can set it to "ON_DEMAND_HOLD" to load on a program change and then not be purged.

For explanation see:

http://www.linuxsampler.org/api/draft-l ... INSTRUMENT
Anders Dahnielson

Ardour2, Qtractor, Linuxsampler, M-AUDIO Delta 1010, Axiom 61, Korg D12, AKAI S2000, E-MU Proteus 2k, Roland R-5, Roland HP 1300e, Zoom RFX-1000, 4GB RAM x86_64 Intel Pentium Dual 1.80GHz Gentoo Linux

ggoodesa
Advanced User
Posts: 116
Joined: Thu Aug 14, 2008 6:48 pm

Re: Switching between instruments using Program Change messages

Post by ggoodesa » Sat Jan 17, 2009 7:33 am

Thanks for the tip, but it still doesn't work when I set them to 'Persistent'. Looks like the new instrument patch needs a new 'Note On' MIDI message for the notes that are being held :-(

Problem:
Set up Instrument Map with 1)Tibia - No Tremulant, 2)Tibia - With sampled Tremulant
Load channel 1 with Tibia - No Tremulant
Play notes on keyboard. Tibia - No Tremulant plays
Play some notes and hold them, change patch from 1 to 2, all sound stops
Play new notes, Tibia with sampled Tremulant plays.

Holding notes does not work with patch change.

Andreas
Developer
Posts: 214
Joined: Sun Feb 03, 2008 8:33 am

Re: Switching between instruments using Program Change messages

Post by Andreas » Sat Jan 17, 2009 9:28 am

That's weird, it should work. The feature was implemeneted 2007-02-03, which is long before latest release.

You should not have to use PERSISTENT or ON_DEMAND_HOLD for it to work either.

kmiya100
Newbie
Posts: 15
Joined: Thu Mar 05, 2009 7:57 pm

Re: Switching between instruments using Program Change messages

Post by kmiya100 » Sun Mar 08, 2009 6:32 pm

ccherrett wrote:Yes it can be done. I am using the VSL libraries and this is how they have done it with their instruments. One .gig file will have many different articulations of that instrument in one file controlled by program change events.

You can use the event change editor in rosegarden to map change events in the matrix editor.

I am running VSL's Performance tool that does the program changes through a GUI mostly for me.

I hope that helps!
Hi,
I recently purchased one of the last of the 1st ed. VSL libraries, and am using it with linuxsampler. The library sounds great, and works flawlessly in linuxsampler. However, I can't get the Performance Tool to work as you seem to. Actually, I can't even download it from VSL as they no longer support their legacy products. I downloaded a torrent version but can't seem to make it work in Ubuntu under wine. I got the same program to work on windows, but don't want to use windows. I want to use the performance set samples, especially legato and portamento, so need the performance tool. Could you give some advice on how to make it work? Thanks!

ccherrett
Advanced User
Posts: 162
Joined: Wed Jan 23, 2008 11:24 pm
Contact:

Re: Switching between instruments using Program Change messages

Post by ccherrett » Sun Mar 08, 2009 11:43 pm

kmiya100 wrote:
ccherrett wrote:Yes it can be done. I am using the VSL libraries and this is how they have done it with their instruments. One .gig file will have many different articulations of that instrument in one file controlled by program change events.

You can use the event change editor in rosegarden to map change events in the matrix editor.

I am running VSL's Performance tool that does the program changes through a GUI mostly for me.

I hope that helps!
Hi,
I recently purchased one of the last of the 1st ed. VSL libraries, and am using it with linuxsampler. The library sounds great, and works flawlessly in linuxsampler. However, I can't get the Performance Tool to work as you seem to. Actually, I can't even download it from VSL as they no longer support their legacy products. I downloaded a torrent version but can't seem to make it work in Ubuntu under wine. I got the same program to work on windows, but don't want to use windows. I want to use the performance set samples, especially legato and portamento, so need the performance tool. Could you give some advice on how to make it work? Thanks!
I just logged into VSLs website and they do still allow the performance tool for download. Go to them for help on downloading and registering it.

Where did you get your copy of 1st Ed? How much was it?

Thanks!
Christopher Cherrett
Founder of The Open Octave Project
http://www.openoctave.org

Post Reply