Re: Fw: Importing a soundfont

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Importing a soundfont

Julie Porter
John Beach asks:
" have a question, myself, concerning the first and last Messages in the
sequence below, specifically, Engaged set 176 set 121, and Disengaged set
176, set 123.  My question is this.
Normally, in MIDI a switch function is set to "Off" with (base=0) with "0"
and to  "On" (base=0) with a 127.  I am assuming that "set 121," turns the
Stop (a kind of switch) "On" and that set 123
turns the stop "Off."  Since these two numbers are only two digits apart,
how is this compatible with the Midi concept that 0=off and 127=on?"

Most MIDI Tables use hex-decimal 'computer speak'  notation to notate the functions in a more human readable form.  MIDI is grouped into two 4 bit pairs.  Three of the high 4 bits determine which section the event belongs to when the high bit is set. So note events start with 0x9 when using base 16.  The lower 4 bits are the channel, which jOrgan allocates dynamically for output.  It is used in the MPL for things like what keyboard the note is on. Or how to engage a given connector cable port bank patch to an output device. The above mumbo-jump tells the program exactly where to send the data.

When 176 is converted to hex, this is 0xB0.   These are known as continues controllers. There are 128 controllers possible.  They can be manufacture specific and somewhat proprietary.  These are used for things like volume change over the whole channel.  Since the lower 4 bits are the channel, the global there are no controllers that can effect all the evens in all the channels.  The work around was when track are used, things in track 0 that are often in channel 0 affect everything.   The lack of a master volume is a bit problematic for people learning MIDI.   The spec actually requires each instrument or controller to be responsible for the notes it turns on.  There is a reason for this as on a stage, there can be many devices from many manufactures.  So if one device fails, you do not want to shut the whole show down.  There are also protocols on the wire, so if something is unplugged, it can not tell the other devices it is offline.

0xB0 controllers come in different flavors.  Some like volume are well defined.  Others are known as Registered or Non Registered Parameter.   Since the second 4 bits of a controller are the channel, the next byte is the function. Controllers can also have a third byte.  Since the first bit of an event is set high for an event start condition, only 7 bits of data can be in the second two bits.  So controllers come in high/low pairs.  This gives 128 bits for the third parameter.  MIDI not always following programming notation these are also known as course and fine.   The most common controller is 0x07 which is volume control fine.  There is also a volume control corse.

Some manufactures merge the corse and find parameters to create a 14 but result.   There are two ways to do this. One is to map the 14 bits as two 8 bit values for 16 bits.  Not all the 65000 binary positions are possible,  The other way is to shift the corse
parameter by 7 bits which is a multiply by 128 then add the fine parameter.  This gives a range of 2^14 -1 or 16384 possible values.

There is also a patch or 'instrument'  change event which starts with 0xC0 where the second byte is what patch any of the 16 possible channels of the lower 4 bits of a patch change specify.  These are sometimes called voices or instruments.  As there are more that 128 sound sample set something else was needed.  These became known as banks.  The first controller which is 0 became bank select fine.  A second controller which is 32 or 0x20 is bank select corse.  Not all sound card hardware could have 16384 sound samples, so there are hardware specific 'proprietary' ways that sounds can be loaded into cards to provide an infinite number of sample sets.  The 121 and the 123 are reset controller messages.  Since a given midi device can only affect the channel it is monitoring, there is again the issue with the lack of a global, reset all controllers message.   Bank and patch terms can be used intermixedly as there is no real hierarchy in selecting a given soudn across multiple manufactures hardware and computer operating systems. This is where experience and mentoring comes into play. One has to learn by doing.  

Many pipe organ programs like Allen or Hauptwerk use  NRPN to control the stops.  This is another way to affect bank selects and load sound samples into banks.   jOrgan originally used hardware cards from different manufactures.  So these MPL options are added to the rank selects, for a given card.  Typically the parameters of a Creative soundblaster, for which .sf2 sounfonts were written for.  When soft synths like fluidsynth and Hauptwerk came along, they either mimicked this behavior, or did something else. So it is necessary to read the documentation to see what MIDI events are used to  engage or disengage a given bank/patch combination.  I think the defaults in the jOrgan Customizer are for the Creative sound blaster card.   This is why they are exposed to the novice user, who is expected to be familiar with the spec sheets for the output device sound generation.

For 99 percent of MIDI users, there are some guidelines (think pirates of the carribean's pirate code.) called General MIDI.  These are compromises which mostly work across all manufactures.  This is where things like what sounds are in the first 128 patchs of bank 0 do.  This guideline also assigns the percussive effects to channel 10 and what they are.  Few go beyond this.

In a stage or studio, where many devices and instruments are mixed, there is a master sequencer.   This adds in the concept of ports, which were the outputs on the back of the devices and associated with a given MIDI hardware cables.  This is where the jack program comes into play on linux and window.  Apple in turn used OMS, then built this functionality into the OS through the IAC drivers which can mix audio and MIDI.  To make things even more interesting.  USB adds in the concept of a 'cable' which can have many ports, banks and patches associates with it.   Then one can send MIDI over Ethernet, which adds in another layer of Customization.  This is why when one looks at a mixing desk there are 100s of sliders, button indicators and even a built in computer screen to direct all this.  There are even boards, which still look like a 19th century telephone exchange.  The Hope-Jones brothers would be proud of their achievements.

JOrgan has to be able to handle all of this too.  And it does.  There are a number of folks here who have very complex routing of the sounds.  One can have an Allen organ (unmodified) as an input device, and a Hauptwerk  configured as a box of ranks as output.  These can even be on different computers.  Look at the traffic here, is is all about connecting what to where using off the shelf products.

This may be why it is so difficult to document jOrgan, as there are an infinite number of ways it can be configured, as long as one can continue to add amplifiers, repeaters and devices to the end of the cables.  At least the third party devices are reasonably well documented.












_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user
Reply | Threaded
Open this post in threaded view
|

Re: Fw: Importing a soundfont

jbeach2646
Julie, thanks for the time and detail you gave in that answer.
 
John B.
 
 
 
Sent: Friday, November 2, 2018 3:07 PM
Subject: Re: [jOrgan-user] Fw: Importing a soundfont
 
John Beach asks:
" have a question, myself, concerning the first and last Messages in the
sequence below, specifically, Engaged set 176 set 121, and Disengaged set
176, set 123.  My question is this.
Normally, in MIDI a switch function is set to "Off" with (base=0) with "0"
and to  "On" (base=0) with a 127.  I am assuming that "set 121," turns the
Stop (a kind of switch) "On" and that set 123
turns the stop "Off."  Since these two numbers are only two digits apart,
how is this compatible with the Midi concept that 0=off and 127=on?"
 
Most MIDI Tables use hex-decimal 'computer speak'  notation to notate the functions in a more human readable form.  MIDI is grouped into two 4 bit pairs.  Three of the high 4 bits determine which section the event belongs to when the high bit is set. So note events start with 0x9 when using base 16.  The lower 4 bits are the channel, which jOrgan allocates dynamically for output.  It is used in the MPL for things like what keyboard the note is on. Or how to engage a given connector cable port bank patch to an output device. The above mumbo-jump tells the program exactly where to send the data.
 
When 176 is converted to hex, this is 0xB0.   These are known as continues controllers. There are 128 controllers possible.  They can be manufacture specific and somewhat proprietary.  These are used for things like volume change over the whole channel.  Since the lower 4 bits are the channel, the global there are no controllers that can effect all the evens in all the channels.  The work around was when track are used, things in track 0 that are often in channel 0 affect everything.   The lack of a master volume is a bit problematic for people learning MIDI.   The spec actually requires each instrument or controller to be responsible for the notes it turns on.  There is a reason for this as on a stage, there can be many devices from many manufactures.  So if one device fails, you do not want to shut the whole show down.  There are also protocols on the wire, so if something is unplugged, it can not tell the other devices it is offline.
 
0xB0 controllers come in different flavors.  Some like volume are well defined.  Others are known as Registered or Non Registered Parameter.   Since the second 4 bits of a controller are the channel, the next byte is the function. Controllers can also have a third byte.  Since the first bit of an event is set high for an event start condition, only 7 bits of data can be in the second two bits.  So controllers come in high/low pairs.  This gives 128 bits for the third parameter.  MIDI not always following programming notation these are also known as course and fine.   The most common controller is 0x07 which is volume control fine.  There is also a volume control corse.
 
Some manufactures merge the corse and find parameters to create a 14 but result.   There are two ways to do this. One is to map the 14 bits as two 8 bit values for 16 bits.  Not all the 65000 binary positions are possible,  The other way is to shift the corse
parameter by 7 bits which is a multiply by 128 then add the fine parameter.  This gives a range of 2^14 -1 or 16384 possible values.
 
There is also a patch or 'instrument'  change event which starts with 0xC0 where the second byte is what patch any of the 16 possible channels of the lower 4 bits of a patch change specify.  These are sometimes called voices or instruments.  As there are more that 128 sound sample set something else was needed.  These became known as banks.  The first controller which is 0 became bank select fine.  A second controller which is 32 or 0x20 is bank select corse.  Not all sound card hardware could have 16384 sound samples, so there are hardware specific 'proprietary' ways that sounds can be loaded into cards to provide an infinite number of sample sets.  The 121 and the 123 are reset controller messages.  Since a given midi device can only affect the channel it is monitoring, there is again the issue with the lack of a global, reset all controllers message.   Bank and patch terms can be used intermixedly as there is no real hierarchy in selecting a given soudn across multiple manufactures hardware and computer operating systems. This is where experience and mentoring comes into play. One has to learn by doing.  
 
Many pipe organ programs like Allen or Hauptwerk use  NRPN to control the stops.  This is another way to affect bank selects and load sound samples into banks.   jOrgan originally used hardware cards from different manufactures.  So these MPL options are added to the rank selects, for a given card.  Typically the parameters of a Creative soundblaster, for which .sf2 sounfonts were written for.  When soft synths like fluidsynth and Hauptwerk came along, they either mimicked this behavior, or did something else. So it is necessary to read the documentation to see what MIDI events are used to  engage or disengage a given bank/patch combination.  I think the defaults in the jOrgan Customizer are for the Creative sound blaster card.   This is why they are exposed to the novice user, who is expected to be familiar with the spec sheets for the output device sound generation.
 
For 99 percent of MIDI users, there are some guidelines (think pirates of the carribean's pirate code.) called General MIDI.  These are compromises which mostly work across all manufactures.  This is where things like what sounds are in the first 128 patchs of bank 0 do.  This guideline also assigns the percussive effects to channel 10 and what they are.  Few go beyond this.
 
In a stage or studio, where many devices and instruments are mixed, there is a master sequencer.   This adds in the concept of ports, which were the outputs on the back of the devices and associated with a given MIDI hardware cables.  This is where the jack program comes into play on linux and window.  Apple in turn used OMS, then built this functionality into the OS through the IAC drivers which can mix audio and MIDI.  To make things even more interesting.  USB adds in the concept of a 'cable' which can have many ports, banks and patches associates with it.   Then one can send MIDI over Ethernet, which adds in another layer of Customization.  This is why when one looks at a mixing desk there are 100s of sliders, button indicators and even a built in computer screen to direct all this.  There are even boards, which still look like a 19th century telephone exchange.  The Hope-Jones brothers would be proud of their achievements.
 
JOrgan has to be able to handle all of this too.  And it does.  There are a number of folks here who have very complex routing of the sounds.  One can have an Allen organ (unmodified) as an input device, and a Hauptwerk  configured as a box of ranks as output.  These can even be on different computers.  Look at the traffic here, is is all about connecting what to where using off the shelf products.
 
This may be why it is so difficult to document jOrgan, as there are an infinite number of ways it can be configured, as long as one can continue to add amplifiers, repeaters and devices to the end of the cables.  At least the third party devices are reasonably well documented.
 
 
 
 
 
 
 
 
 
 



_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user


_______________________________________________
jOrgan-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jorgan-user