• Register
  • Help
Results 1 to 4 of 4

Topic: Pipe organs coupling plugin for Reaper

Share/Bookmark
  1. #1

    Pipe organs coupling plugin for Reaper

    As I promised in the thread about bugs and feature request for Classic Pipe Organs, I created a simple JS plugin for Reaper which allows me to have realistic and easy couplings of manuals and pedal. So Reaper users don't have to wait for the advanced CPO user interface To use it:
    • copy the code below to a file in Reaper's Effects folder.
    • set up Manual 1, Manual 2 and Pedal as Sends to Aria channel 1, 2, 3
    • add the coupler JS effect to the Aria track and select the desired coupling

    Not extensively tested The essence of the plugin is to not send note on and note off messages, if the given note is already pressed from an other manual/channel. A must have for people using CPO with at least 2 (and at most 3 ) manuals.

    ---------------- use the code below -------------------
    Code:
    desc: Organ coupling
    
    slider1:0<0,2,1{No coupling, P+I, P+II}>Pedal coupling
    slider2:0<0,1,1{No coupling, II+I}>2nd manual coupling
    
    
    @init
    activeNotes=0;
    coupledChannels = 1000;
    
    
    @slider
    pedalCoupling=slider1;
    man2Coupling=slider2;
    
    
    @sample
    
    
    while(
      midirecv(ts,msg1,msg23) ? (
        event = msg1 & $xF0;
        note = msg23 & $xff;
        channel = msg1 & $xF;
        (event == $x90 || event == $x80) && channel <= 3 ? (
          coupledChannelCount = 0;    
          velocity = (msg23/256) & $xff;      
          noteOn = (event == $x90 && velocity > 0);
          !noteOn ? (
            activeNotes[channel*128+note] &= (255 - 2^channel);
            activeNotes[channel*128+note] == 0 ? midisend(ts,msg1,msg23);        
          ) : (
            activeNotes[channel*128+note] == 0 ? midisend(ts,msg1,msg23);      
            activeNotes[channel*128+note] |= 2^channel;
          );
          coupledChannelCount = 0;
          pedalCoupling > 0 && channel == 2 ? (
            coupledChannels[coupledChannelCount] = pedalCoupling - 1;
            coupledChannelCount+=1;
          );      
          man2Coupling > 0 && (channel == 1 || (pedalCoupling == 2 && channel == 2))  ? (
            coupledChannels[coupledChannelCount] = man2Coupling - 1;
            coupledChannelCount+=1;        
          );
          coupledChannelCount > 0 ? (
            i = 0;
            loop(coupledChannelCount,
              coupledChannel = coupledChannels[i];
              i+=1;
              coupledNote = activeNotes[coupledChannel * 128 + note];        
              coupledNote == 0 || coupledNote == 2^channel ? (
                midiSend(ts, event | coupledChannel , msg23);
              ); 
              noteOn ? (
                activeNotes[coupledChannel * 128 + note] |= 2^channel;
              ) : (
                activeNotes[coupledChannel * 128 + note] &= (255 - 2^channel);
              );
            );
          );                              
        ) : 
        midisend(ts,msg1,msg23);
      );
    )
    Last edited by briff; 07-25-2014 at 07:01 AM. Reason: Fixed a bug in the code

  2. #2

    Re: Pipe organs coupling plugin for Reaper

    That's really something, Briff! There seem to be a number of Reaper users in the Forum - If they also have Pipe Organs, they would Have to try out what you've programmed.

    Maybe some more info would help inspire people to try what you have. How do you deal with the different MIDI channels when playing live? And you said there's a limit of two manuals and a pedal - It isn't possible to expand the code so you could use more?

    Randy

  3. #3

    Re: Pipe organs coupling plugin for Reaper

    Quote Originally Posted by rbowser- View Post
    That's really something, Briff! There seem to be a number of Reaper users in the Forum - If they also have Pipe Organs, they would Have to try out what you've programmed.

    Maybe some more info would help inspire people to try what you have. How do you deal with the different MIDI channels when playing live? And you said there's a limit of two manuals and a pedal - It isn't possible to expand the code so you could use more?

    Randy
    It certainly is interesting.
    It's very similar to my SCPOP software which supports 3 incoming MIDI channels.

    The 'standard' organ configuration is two manuals, 'Great' and 'Swell', and pedals; typically 25 or 32 notes.
    Bigger organs have more manuals of course.

    The SCPOP s/w receives on channels 1 to 3, and sends on all 16 channels, broken down to 6 for great, 6 for swell and 4 for pedals. If you take a look at the picture I posted on the other thread you can see how pulling a stop below a G or an S assigns that voice or combination to the appropriate manual. Then there's a separate set for the pedals. These are all synthesised from Roland SC hardware; 55, 88 or 8850 using SysEx messages.

    It's a pretty accurate simulation of an organ but not, of course, a copy of any particular instrument.

    Since I have a copy of Reaper I might well 'give it a go' and see how CPO sounds.
    I have two manuals now, but not a set of pedals.

    Thanks for the info, Briff.
    Regards,
    John.
    Author of MIDI tutorials at http://midi-tutor.proboards.com/index.cgi

  4. #4

    Re: Pipe organs coupling plugin for Reaper

    Quote Originally Posted by rbowser- View Post
    Maybe some more info would help inspire people to try what you have. How do you deal with the different MIDI channels when playing live? And you said there's a limit of two manuals and a pedal - It isn't possible to expand the code so you could use more?
    It can be extended with not much work for more manuals, but I didn't want to do that, as I don't have 3 Also that would have made the user interface more complicated. Now you can only select: P+I, P+II and I+II couplings.
    The cool thing is that these can be automated in Reaper, that is they can be input after the recording or during the recording with a button or fader on a MIDI keyboard.
    If someone has only one manual changing the channel will change the played "manual".
    What is missing currently from a full interface is to have combinations or individual stops selectable live. I will think about that if I play something that needs that

Go Back to forum

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •