Jump to content

Trevor

Members
  • Posts

    63
  • Joined

  • Last visited

Posts posted by Trevor

  1. Johnc,

    Sorry I've been away from the forum for a while! The Java app runs completely independently from jOrgan. I just use Eclipse to run it in the background. Just create a project in your favorite IDC using the two .java files. SAMs.java is the main file. Some parts of the code will still have to be modified a bit to fit your project.

    Trevor

  2. TK (et al),

    In August, I am moving from Michigan to Oklahoma to go to school, and I need to sell my 7 rank Wurlitzer pipe organ before I go. Would it be ok to include the MIDIBox Cores (11), DINs (12), and DOUTs (27) in the sale? The MIDIBox boards are an integral part of the pipe organ and it would be nice to be able to provide a "plug and play" organ for the buyer. The organ is based on the MIDIO128 project, except for the swell shade project that I created with the help of MIDIBox/MidiTzer forum members. () and (http://site.virtualorgan.com/community/viewtopic.php?f=36&t=1950). Thank you for your consideration!

    -Trevor Dodd

  3. johnh,

    I'm using the original Wurlitzer "on and off machine". I ended up using a 200ms delay; 333ms was a bit long. I'm going to leave the code as it is for now, since jOrgan has SAM control now.

    xpa,

    Percussions don't need anything like this. They just need the standard note on/off from the keyboard/piston because they're only active as long as the piston or key is active.

  4. If anyone is interested, I threw together a little java app today that will handle SAMs from jOrgan. It's not MIOS-based of course, but it should do the trick until a better solution is found. It's set up to handle 64 SAMs on channel 10 (0-based); 0-63 are the ON magnets, and 64-127 are the off magnets.

    Here's an example:

    Stop #1

    Activated: 155 0 127

    Deactivated: 155 0 0

    Stop #2

    Activated 155 1 127

    Deactivated 155 1 0

    Stop #3

    etc....

    When Stop #1 is Activated, the app receives 155 0 127 (note 0 on, channel 10). The app then outputs 155 0 127, waits 333ms, then outputs 155 0 0.

    When Stop #1 is Deactivated, the app receives 155 0 0 (note 0 off, channel 10). The app then outputs 155 63 127, waits 333ms, then outputs 155 63 0.

    If anyone ends up building this from source, you'll have to change the two device name strings to the names of your input and output devices. Also you can change the delay time to fit your SAMs. I'm using a slightly longer time, because I'm using the original electro-pneumatic combination action. Eventually I'll make a GUI for this.

    SAMs.java

    
    import	javax.sound.midi.Transmitter;
    
    import	javax.sound.midi.Receiver;
    
    import	javax.sound.midi.MidiUnavailableException;
    
    import	javax.sound.midi.MidiDevice;
    
    import	javax.sound.midi.MidiSystem;
    
    
    
    public class SAMs {
    
    
    
    	private static boolean		DEBUG = false;
    
    
    	public static void main(String[] args)
    
    
     {
    
    		/* The device name to listen to.*/
    
    		String	strDeviceName = null;
    
    		DEBUG = true;
    
    
    		strDeviceName = "In From MIDI Yoke:  2";
    
    		if (DEBUG) { /*out("MidiInDump.main(): device name: " + strDeviceName);*/ }
    
    
    		if (strDeviceName == null) {
    
    			//out("device name not specified!");
    
    			System.exit(0);
    
    		}
    
    
    		MidiDevice.Info	info = getMidiDeviceInfo(strDeviceName);
    
    		if (info == null) {
    
    			//out("no device info found for name " + strDeviceName);
    
    			System.exit(1);
    
    		}
    
    		MidiDevice	inputDevice = null;
    
    
    		try {
    
    			inputDevice = MidiSystem.getMidiDevice(info);
    
    			inputDevice.open();
    
    		} catch (MidiUnavailableException e) {
    
    			if (DEBUG) {  }			
    
    		}
    
    
    		if (inputDevice == null) {
    
    			//out("wasn't able to retrieve MidiDevice");
    
    			System.exit(1);
    
    		} 
    
    
    		Receiver	r = new InReceiver();
    
    
    
    		try {
    
    			Transmitter	t = inputDevice.getTransmitter();
    
    			t.setReceiver(r);
    
    		} catch (MidiUnavailableException e) {
    
    			if (DEBUG) { out(e); }
    
    		}
    
    
    
    		/*	Now, we're entering an endless loop. Otherwise,
    
    			the program would exit and we won't have a chance
    
    			to see any results.
    
    		*/
    
    		while (true) {
    
    			try {
    
    				Thread.sleep(1000);
    
    			} catch (InterruptedException e) {
    
    				if (DEBUG) { out(e); }
    
    			}
    
    		}
    
    	}
    
    
    
    
    
    
    	/*
    
    	 *	This method tries to return a MidiDevice.Info whose name
    
    	 *	matches the passed name. If no matching MidiDevice.Info is
    
    	 *	found, null is returned.
    
    	 */
    
    
    	private static MidiDevice.Info getMidiDeviceInfo(String strDeviceName)
    
    
     {
    
    		MidiDevice.Info[]	aInfos = MidiSystem.getMidiDeviceInfo();
    
    		for (int i = 0; i < aInfos.length; i++)
    
    		{
    
    			if (aInfos[i].getName().equals(strDeviceName))
    
    			{
    
    				return aInfos[i];
    
    			}
    
    		}
    
    		return null;
    
    	}
    
    }
    
    
    InReceiver.java
    
    import javax.sound.midi.MidiDevice;
    
    import javax.sound.midi.MidiSystem;
    
    import javax.sound.midi.InvalidMidiDataException;
    
    import javax.sound.midi.MidiUnavailableException;
    
    import javax.sound.midi.MidiMessage;
    
    import javax.sound.midi.ShortMessage;
    
    import javax.sound.midi.Receiver;
    
    
    public class InReceiver implements Receiver 
    
    {
    
    	static Receiver rout;
    
    	public InReceiver()
    
    	{  
    
    		try
    
    		{
    
    			MidiDevice outputDevice = null;
    
    			String outputDev = "Out To MIDI Yoke:  1";
    
    			MidiDevice.Info	info = getMidiDeviceInfo(outputDev);
    
    			outputDevice = MidiSystem.getMidiDevice(info);
    
    			outputDevice.open();
    
    			rout = outputDevice.getReceiver();
    
    		}
    
    		catch (MidiUnavailableException e) 
    
    		{
    
    	          System.out.println(e);
    
    		}
    
    	}
    
    	public void close()
    
    	{ 
    
    
    	}
    
    	private static MidiDevice.Info getMidiDeviceInfo(String strDeviceName)
    
    
    	 {
    
    			MidiDevice.Info[]	aInfos = MidiSystem.getMidiDeviceInfo();
    
    			for (int i = 0; i < aInfos.length; i++)
    
    			{
    
    				if (aInfos[i].getName().equals(strDeviceName))
    
    				{
    
    					return aInfos[i];
    
    				}
    
    			}
    
    			return null;
    
    		}
    
    	public void send(MidiMessage message, long lTimeStamp)
    
    	{
    
    		int evnt0 = ((ShortMessage) message).getStatus();
    
    		int evnt1 = ((ShortMessage) message).getData1();
    
    		int evnt2 = ((ShortMessage) message).getData2();
    
    		if (message instanceof ShortMessage) 
    
    		{
    
    			if(evnt0 == 155)
    
    				new SetSAM(evnt1,evnt2,rout).start();
    
    		} 
    
    	}	
    
    }
    
    class SetSAM extends Thread
    
    {
    
    	int i;
    
    	int pinnum;
    
    	Receiver rec;
    
    	SetSAM(int evnt1, int evnt2, Receiver r)
    
    	{
    
    		rec = r;
    
    		if(evnt2>0)
    
    		{
    
    			pinnum=evnt1;
    
    		}
    
    		if(evnt2==0)
    
    		{
    
    			pinnum=evnt1+64;
    
    		}
    
    	}
    
    	public void run()
    
    	{
    
    		ShortMessage on = new ShortMessage();
    
    		ShortMessage off = new ShortMessage();
    
    		try {
    
    			//turn magnet on
    
    			on.setMessage(155,pinnum,127);
    
    			rec.send(on, -1);
    
    		} catch (InvalidMidiDataException e1) {
    
    			e1.printStackTrace();
    
    		}
    
    		try {
    
    			sleep(333);
    
    		} catch (InterruptedException e) {
    
    		e.printStackTrace();
    
    		}
    
    		try {
    
    			//turn magnet off
    
    			off.setMessage(155,pinnum,0);
    
    			rec.send(off, -1);
    
    		} catch (InvalidMidiDataException e1) {
    
    			e1.printStackTrace();
    
    		}
    
    	}
    
    }
    
    

  5. Here are some recordings of Wurlitzer opus 1614 installed in my basement. They are mostly of Wurlitzer Residence rolls converted to midi.

    http://www.acmeorgan.com/trevordodd/recordings.html

    It is controlled by jOrgan with MIDIbox input and output. There are a total of 12 COREs, 27 DOUTs, and 11 DINs. Almost everything uses the MIDIO128 project. The only exception are the swell shutters and tremulants which I wrote a special MIOS-based application for.

    The organ is still very much a work in progress, but it's getting there! I usually try to post new recordings at least once a week, so keep checking back if you like what you're hearing.

    http://www.acmeorgan.com/trevordodd/index.html (still under construction, but there is some info there)

    Enjoy!!!

    -Trevor

  6. Hey everyone!

    Would anyone happen to be interested in an application that uses CC volume data to drive swell shades?  I wrote one for 12 stages, but it could be configured for any number of stages.  I can also make a .hex file for anyone who doesn't have the ability to compile their own.  Just send me the number of stages and  which CC values each stage should be at.  I hope this can help someone.  I will post the code tomorrow since it's on the other computer.  In the meantime, here's a video of my swell shutters being controlled by MIDIBox with my application.

  7. hey all,

    I got all of the boards built and programmed for the Main, percussions, and traps!  On the Miditzer forum, Jim Henry and I have been discussing using CC messages from the swell output in Miditzer to drive shutters.  I think it would be best to have the discussion moved here since it's pretty much Midibox specific.

    Here's a link to the Miditzer topic: http://site.virtualorgan.com/community/viewtopic.php?f=36&t=1950

    Trevor

    n210901242_30634271_6410.jpg

  8. Here are some more pictures!  I have the two manuals and pedal midified now.  For now I have the console plugged into Miditzer (wonderful program, thanks Jim!!)

    n210901242_30629052_3685.jpg

    n210901242_30629053_3973.jpg

    Jim, if you're reading this, does Miditzer have the ability to drive pipes, percussions, traps, shades, etc.?  I read through the forum a little and didn't see any mention of this feature, but I saw that ranks can be assigned an output channel through the midi device. 

  9. thanks, sparx

    I have now tried 5 different DIN boards and two Cores that I know work.  I loaded a fresh midio128.syx file from an INI that I reconfigured for the correct MIDI note to pin numbers. I do have an LCD connected.  Everything works fine when I send messages in from my computer.  The LCD displays the incoming MIDI messages.  But when I short a pin to ground, nothing happens! ???

    Trevor

  10. Johnc, the console really isn't as nice as it looks in the picture, lol.  All but 3 ivories are cracked and the finish is original.

    Anywho, tonight I started hooking the keyboards up to the DINs.  I used one of my COREs from my last project to save having to load midio128 onto a new core and all that.  Unfortunately, I can't get it to work!  When I press keys, no MIDI messages are created.  I know the CORE is good, and I tried two different DIN boards.  The common on the keyboard is ground (0V).  [iNVERSE_INPUTS] is enabled.  Any ideas why this isn't working?  Thanks in advance!

    Trevor

×
×
  • Create New...