Jump to content

Organ Swell shoe volume control


Per S
 Share

Recommended Posts

This thread started towards the end here:

http://www.midibox.org/cgi-bin/yabb/YaBB.cgi?board=troubleshooting;action=display;num=1088260784

Short recap:

The standard MIDIO128 can have 128 inputs but there is no provision for an analog input which maybe needed in organ applications for controlling the volume. Thorsten had the solution, of course. I first hesitated to add some code since the MIOS looked awfully complicated but Thorsten served the solution on a silver platter so I had a go at it. To my surprise it was quite easy to include the “analog in†function even for a non programmer like me.

The hardware was a pot which was wired directly to pin RA0 of the PIC, no AIN module necessary.

Thanks Thorsten, great stuff this MIOS!

Jim Henry wrote:

Another approach would be to use switch contacts of the type used to control swell shades. That will probably give you about a dozen inputs which will reduce the flood of MIDI commands. I reduce expression input to a dozen steps in the Miditzer to mimic swell shades. Recently I noticed that some sounds don't seem to react well to that. I realized that while swell shades have discrete steps, they also have considerable inertia so they are more continuous in effect than the 12 step switch input would suggest. So perhaps you need that flood of commands. Are you sure it will be a problem?

If you decide it is a problem, you might be able to reduce the range produced by the analog input. For example, instead of 0-127 use 0-12 and then make whatever receives the expression input more sensitive. Of course, you don't really want to go to 0 for expression because no organ can be turned off by expression control.

I don’t know if the flood of commands will be a problem, future will tell. I have the feeling though that we don’t need the resolution of one. Maybe sending only every 5.

I think that we might need “somethingâ€-127. This is also depending on the type of virtual organ used. I don’t have Hauptwerk up and running just now, but I have the impression that the MIDI volume control represents the swell shoe position rather than the volume directly. This makes a setting of 0 valid.

Anyway, in the MIOS analog handling there is a parameter called “deadband†and is defined as:

DESCRIPTION: sets the difference between last and current pot value 
which has to be achieved to trigger the "NotifyChange" function

This looks promising and I will look into that later. Now I will be off for a week.

Per S

Link to comment
Share on other sites

  • 2 weeks later...

Jim Henry,

I am interested in your comments of using the 12 step switches of the traditional swell pedal to effect volume control for midizer.  I am completing midification of my console except for the swell pedal, and the expression pedal. Would be great to be able to operate the organ totally from the console. Per S and I have been having a running conversation about using fixed resistors in series, using the pedal contacts to short out one resistor at a time in order to get a variable voltage input to the Ain on the core. Both of us have a reservation about how successful this approach can be. Any Suggestions.

Regards,

Johnc

Link to comment
Share on other sites

I am not sure what you mean by "the expression pedal." Traditionally organs have one or more swell pedals that control the swell shades in front of a pipe chamber and possibly a crescendo pedal to the right of the swell pedals and set slightly higher. The crescendo pedal adds stops to the registration. I'll address the swell pedal. If this doesn't answer the question for "the expression pedal" let me know.

For the sake of discussion let's assume your swell pedal has 12 contacts numbered 1 to 12, 1 being almost closed and 12 full open.  You will connect each contact to a MIDIO128 input (or a Switched Matrix input).  The table entry for those contacts should be setup to produce a Control Change 11 (Expression message) of something like

0xB0 0x0B (n*10)+7 for on and

0xB0 0x0B ((n-1)*10)+7) for off

where n is the contact number. As you open the swell from full closed it will send expression values of 17, 27, ... 127 and as you close from full open it will send 117, ... 17, 7.

You should send 0xB0 0x0B 0x07 to set the swell shades to fully closed, 7, when you power up the console which should occur after the virtual organ is up. Be sure you setup the inputs so 1 is read before 2 etc. You want the system to send the Control Changes in order so that on initial power up the whole system will get to the initial position of the swell pedal no matter where it is. Thereafter changes to the swell pedal will send the appropriate Control Change as the swell pedal is opened and closed.

I can tell you that the expression values given above won't work right for the Miditzer as it currently stands. I can figure out the values you need; I'm just warning you it isn't the ones I gave. Hopefully that situation will be improved in the Miditzer. You need to check on other virtual organs you might use to see if there are any particular requirements on the expression values that they need. It really isn't onerous to replace the table in MIDIO128 if you need to change what the swell pedal does as you change virtual organs.

If it turns out that some "inertia" is needed as the swell changes, it wouldn't be too hard to add programming to send the expression changes in smaller steps over some period of time.  If we wanted the virtual swell shades to take 250 mSec to open, we could send a Control Change every 25 mSecs to increase the expression value by 1 unit to effect a 1 swell step change.  A larger change in swell steps could either send larger changes or send the changes more frequently.

Link to comment
Share on other sites

Jim,

Interesting information about your swell function. I have done some experiments with the MIDIO128 and the AIN function and the MIOS_AIN_DeadbandSet. Below is one example that works fine. However it doesn’t quite line up with your information but it doesn’t seem to matter.

MIOS_AIN_DeadbandSet = D’42’

(There is no science at all behind this figure)

22130060  9  --    176    11     5    1  ---  CC: Expression

22131132  9  --    176    11    10    1  ---  CC: Expression

22131549  9  --    176    11    16    1  ---  CC: Expression

22131649  9  --    176    11    21    1  ---  CC: Expression

22131718  9  --    176    11    26    1  ---  CC: Expression

22131786  9  --    176    11    32    1  ---  CC: Expression

22131860  9  --    176    11    37    1  ---  CC: Expression

22131930  9  --    176    11    42    1  ---  CC: Expression

What I don’t quite understand is this.

Be sure you setup the inputs so 1 is read before 2 etc. You want the system to send the Control Changes in order so that on initial power up the whole system will get to the initial position of the swell pedal no matter where it is.

The MIDO128 when powered up doesn’t send anything. This means that regardless of the swell shoe position, Miditzer is loaded with swells shades fully open. A light touch on the swell shoe will line up the shades with the shoe position. I can fire a 0xB0 0x0B 0x07 in the USER_Init with the only difference that the shades will be closed. I have not found a way to “read†the swell shoe during USER_Init which would be the correct operation. But I can live with this minor imperfection.

Per S

Link to comment
Share on other sites

Jimh and Per S,

Reflecting on both replys, if the swell shoe is part way open when the core is energized, then several of the switches are closed on power on.  Will the mios app read the contacts sequentially, such tht if contact 1, 2, 3, and 4 are used for the first 4 steps and are closed, the program would send 17, 27,37,47 in sequence, ramping up the volume rapidly. If so, this should not be a problem unless you rush to press down keys very quickly after turning the power on. On the Moller swell shoe one side of the switches is a ground potential, depressing the shoe actually grounds each of the 12 leads in sequence. Is this a problem?

Jim, I did mean cresendo pedal.  

regards.

Johnc

Link to comment
Share on other sites

I have done some experiments with the MIDIO128 and the AIN function and the MIOS_AIN_DeadbandSet. Below is one example that works fine. However it doesn’t quite line up with your information but it doesn’t seem to matter.
My comments were directed entirely toward real  ;) swell shoes that have discrete switch contacts rather than potentiometers. I'm sure that AIN will work fine too but I don't see much point in trying to convert the digital (switch) inputs to analog (resistor) inputs and back into digital (MIDI) outputs. By keeping everything digital we can control exactly what message is sent for every step on the swell shoe and that might be important if there are only a small number of steps.

The MIDO128 when powered up doesn’t send anything.
I am only really familiar with Switch Matrix, which I realize you aren't using because it isn't even released yet. I would have expected MIDIO128 to send messages for all the switches that are closed when it starts up. It also seems reasonable that it should send a message based on the value of the analog inputs when it starts up.  If MIDIO128 doesn't do that, it probably could be made to do so fairly easily.

You also need this so that any stops that are on initially send messages.

Will the mios app read the contacts sequentially, such tht if contact 1, 2, 3, and 4 are used for the first 4 steps and are closed, the program would send 17, 27,37,47 in sequence, ramping up the volume rapidly. If so, this should not be a problem unless you rush to press down keys very quickly after turning the power on.
MIDIO128 is a program so whatever order it reads things in, it's going to stay that way unless the program is changed. I would imagine that pins are read in the order of the pins on the shift registers and that the pin closest to the core gets read first. A quick test will confirm this. So yes, it should be possible to wire things so you get the quick ramp up at startup. You send the closed setting during initialization (this will require a code change in MIDIO128 ) in case there are no contacts closed. (Hmmm. If you don't want to change the MIDIO128 code you can just hardwire one pin to ground and use that to send the initial close message.)

I think the initial ramp up to even full open will happen as fast as the MIDI messages can be sent. It will happen in much less than 1 second. If you jump on the keys that fast you are going to have bigger problems than a fast change in expression.

On the Moller swell shoe one side of the switches is a ground potential, depressing the shoe actually grounds each of the 12 leads in sequence. Is this a problem?
The grounding of the contacts is the usual way of reading switch closures with digital logic so that will be fine.

The crescendo pedal can work the same way as far as sending messages. The problem is what messages does it send? Ideally it would send the same messages as the stops that are being added or taken off.

But there are a couple of problems with that. MIDIO128 only sends one MIDI message per switch change. You may add several stops in one step. You'll probably change organs from time to time and each will have its own arrangement for the crescendo. It's hardly ever changed but usually the crescendo is settable. Having to reload the message table might or might not be viewed as acceptable for changing the crescendo pedal.

If you can live with one stop per step of the crescendo pedal and with an occasional SysEx to reload the message table, then the crescendo is pretty easy. Otherwise you may want to send some arbitrary message that just indicates crescendo position and let something on the PC turn that into whatever is needed.

Link to comment
Share on other sites

Jim,

The MIDIO128 doesn’t send anything during power on. It does capture the switch status though. Thorsten explained this in another post.

during startup, MIOS captures the initial state of the shift register, waits for 1.5 mS and then clears all "changed" flags. Means: the internal MIOS registers are properly initialized with the button states, and the application won't get any change notification, regardless if the DINs are 0 or 1

I can live with these restrictions. After all it is a DIY project and as such there are some shortcomings. If I paid $$$ for commercial stuff such a behavior would be unacceptable.

Question to Thorsten: How complicated would it be to send out the initial DIN status upon power on?

Comment on the crescendo function. There is a function in the MIDIO128 called the Meta Handler (midio_meta.inc). It’s triggered by an 0xF0 instead of Note On or similar. There you can send out as many MIDI events as you like with one DIN.

Per S

Link to comment
Share on other sites

I can live with these restrictions. After all it is a DIY project and as such there are some shortcomings.
But this is an open source project so you don't have to live with shortcomings! ;D I'll try to look at what it takes to send messages for the initial state in MIDIO128 this weekend if Thorsten hasn't already answered.
Link to comment
Share on other sites

Per S, jhenry

So if you use maintained switches for stops, if the computer is turned on with stop switches already set, the ap will not read the switches and set the stops on power up?

Jim,

A stupid question - How did you insert the .jpg picture in your reply?  I have been trying to do that with no success.

regards

Johnc

Link to comment
Share on other sites

Per S,

The  discussion above is very interesting, but one question.  To my limited knowledge, the swell pedal works with the swell keyboard and on a real pipe organ, the ranks of pipes are within a swell chamber.

All approaches we have been discussing involve the total volume level coming from the sound card. Correct?

How can this be applied to only the swell keyboard and stops?

Regards,

Johnc

Link to comment
Share on other sites

So if you use maintained switches for stops, if the computer is turned on with stop switches already set, the ap will not read the switches and set the stops on power up?
That's what I understand Per S to be saying is the case with MIDIO128 as it is today. The initialization of stops is an even more important reason to change the behavior of MIDIO128 than the swell contacts.
To my limited knowledge, the swell pedal works with the swell keyboard and on a real pipe organ, the ranks of pipes are within a swell chamber.

All approaches we have been discussing involve the total volume level coming from the sound card. Correct?

How can this be applied to only the swell keyboard and stops?

For mechanical reasons, swell pedals control swell shades in front of a pipe chamber. In a classical organ each manual is usually associated with a division, which is some subset of the pipes. Having one complete division under expression and placing it on the Swell manual is a common traditional arrangement.

Theatre organs did away with the concept of divisions--one of the major points of contention between strict classicists and the TO people. Any rank might be controlled by any manual at a variety of pitches.  TOs have only a small fraction of the number of pipes as in a classical organ with a comparable number of stops.  Of course, the swell shoes on a TO are completely unrelated to the manuals.

Now back to your question. The inputs to a virtual organ do not simply pass through to the output. The virtual organ program has to generate new outputs based on the inputs. Whatever ranks are supposed to be under expression may be played using several MIDI channels. The virtual organ program will translate the swell input into expression messages for the channels that need to be controlled by the swell input.  The swell input doesn't go to the sound card at all. It is done in the same format as if was going to the sound card to maintain some sanity, but it is really just input to the virtual organ program.

Link to comment
Share on other sites

Johnc wrote:

So if you use maintained switches for stops, if the computer is turned on with stop switches already set, the ap will not read the switches and set the stops on power up?

True, but the MIDIO128 actually reads all the switches and stores it upon power on but it doesn’t send out any MIDI events. When Thorsten designed this he probably had a reason not to send out MIDI events. Unfortunately this is a disadvantage in the organ Midification application.

It’s not a major thing for me personally but, as Jim points out, it should be fixed and he will look into that.

Per S

Link to comment
Share on other sites

as Jim points out, it should be fixed and he will look into that.
Since I have apparently volunteered to make this minor enhancement to MIDIO128 ;D should it send just the messages for the switches that are on or a message for every switch based on whether it is on or off?

Is there someone who wants to test this in a real setting when it's ready to leave the bench?

Link to comment
Share on other sites

Jim,

IMHO it should be enough to send the "on" status. In other words if there is one stop key on, one MIDI Event will be sent.

I don't have my Trio up and running now but I have a pretty good test outfit where I could test it.

Per S

Link to comment
Share on other sites

  • 2 weeks later...

I have spent some time studying MIDIO128 and I have not been able to identify what stops MIDI messages from being sent at power up.  The flow of control is bouncing in and out of MIOS in what seems to be the relevant area.  I don't understand MIOS well enough to pinpoint what is needed to allow the MIDI messages to be sent at power up so that the initial state of the inputs is known.

I will keep this issue in mind and if I see the solution as I am working on the Switch Matrix, which uses a lot of the code from MIDIO128, I will take the appropriate action.  

Link to comment
Share on other sites

  • 4 weeks later...

About the original topic:

Organ Swell shoe volume control.

Soon I hope to build a shoe control myself, but for a board I ordered and which was probably not made with midibox. But I have the same problem: the shoe contorl cannot turn the potentiometer through all it's range.

Can't we do this:

Use a AD-converter to make the signal of the potentio meter digital. But use not an ordinary 0 V and 5 V for min / max value but 0 V and the maximum volt you have as output value.

Then you can built a circuit to cast the digital code to the right input pins of MIDIO128, or use a DA-converter with 0V and 5V to transfer the digital code back to the right voltage.

Comment on mimimum volume value:

In midio128 when adressing the pins, you can select minimum and maximum output (and all other values).

(ie no problem)

When using analog input you could set op the volume shoe in such a way that the minimum value is not 0V.

When using jOrgan (with soundfonts or Gigasampler)

( http://www.meiers.net/sven/jorgan/ )

you can set a cut-off and volume for closed swell, but I don't know if this is the maximum or minimum value.

I don't work with Hauptwork (yet), so I can't tell you about that.

I hope this works and will tell you when I have done it myself.

Link to comment
Share on other sites

About the original topic:

Use a AD-converter to make the signal of the potentio meter digital. But use not an ordinary 0 V and 5 V for min / max value but 0 V and the maximum volt you have as output value.

Then you can built a circuit to cast the digital code to the right input pins of MIDIO128, or use a DA-converter with 0V and 5V to transfer the digital code back to the right voltage.

I’m not sure I follow you on this one, it looks quite complicated. Here’s what I did:

On one of my MIDIO128 setups I connected the swell potentiometer directly to the Analog in pin of the PIC (pin RA0). The MIOS has all the necessary AD routines. See also my earlier posts on the subject.

No additional components or circuits are necessary!

Next step was to add some code to the MIDIO128 (http://www.ucapps.de/mios/ain_example1_v1_3.zip) and make necessary setup of the MIDI message to be sent (Bc 0B yy for example). Now MIDI Volume messages are sent through the MIDI interface whenever the swell potentiometer is moved.

This setup works great with Miditzer and Hauptwerk. I have not tried the jOrgan yet but it will work with this too. The controlling of the swell function is similar for all these three.

Per S

Link to comment
Share on other sites

  • 4 weeks later...

My midichip has arrvied and I'm building my first Swellpedal. I like to use more of the potentiometer than just the 60 degrees the shoe will turn. Therefore I'm thinking of a translation system that will convert the turning of the shoe into the turning of the potentiometer such that the p-meter rotates more than the shoe. This can be done with new build components of wood or with Lego or mecchano parts. I'll keep you posted.

Link to comment
Share on other sites

I like to use more of the potentiometer than just the 60 degrees the shoe will turn. Therefore I'm thinking of a translation system that will convert the turning of the shoe into the turning of the potentiometer such that the p-meter rotates more than the shoe. This can be done with new build components of wood or with Lego or mecchano parts.
Repeatability of the potentiometer output will be important. I would think 60 degrees would be enough to get the resolution needed for a swell pedal. Adding additional mechanical components could create lost motion that will more than offset any improvement from the increased electrical output. Keep in mind that I haven't done anything with potentiometer input, much less build a swell pedal. You might want to hook the pot to a MIDIO128 and see if the 60 degrees will be satisfactory before you begin mechanical construction.
Link to comment
Share on other sites

I agree completely with jimhenry. Hook it up with the MIDIO128 first and see what you get. You can then easily make a small translation table in the firmware to suit your needs. I’m quite confident that you don’t have to worry about the resolution, it will definitely be enough for the swell function. The chances of getting it right by adding fancy ratio changing hardware is remote, at best.

Link to comment
Share on other sites

I had ordered a chip for my pedal elsewhere, before I found a link to Midibox. I can connect three potentiometers to it, so I will make or buy three swells for that. For MIDIO128 it will indeed be easier to change the firmware, but for my chip maybe not. But it's a good idea to check it out first, so I will.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...