Jump to content

Denon controller build log


Wild_Weasel
 Share

Recommended Posts

Hi guys!

I plan to build an dedicated controller for Traktor DJ Studio.

I ebayed myself a Denon DN-2500F Controller which has got a nice jog-wheel and stuff.

Here is the datasheet [it's the A-type]

http://www.alpsstore.com/catalog/srgp.pdf

The encoder seems to be some standard piece of hardware but this thing has got an shuttle ring as well and I wonder how it can be attached to the midibox.

I did attach it to my DMM but it seems that there is no current gettin' through.

So if anybody could please take a look at the data sheet and explain to me how this works.

Regards Michael

Denon-dn2500f-lg.JPG

Link to comment
Share on other sites

Here I'm again. Brought some prictures of the denon disassemble online, also a few after the pcb was desoldered.

http://stud3.tuwien.ac.at/~e0327352/

The original PCB will be used as a template to fabricate the new one and since I want to reuse the buttons the had to be desolder (took me about one hour for all parts)

If you imagine the Denon controller as a left and a right deck only one pcb must be fabricated which fits on both sides. The buttons in the middle of the Denon controller will replaced by

- nothing [holes closed by epoxy and filler]

- or an LC-Display which shows additional informations. [anybody any ideas how to get infos out of traktor, for example the pitch or the BPM via midi??]

Link to comment
Share on other sites

Hi!

I added some scans of the now completely desoldered and cleaned PCBs.

http://stud3.tuwien.ac.at/~e0327352/

Next steps will be:

-> new pcb layout with the shiftregisters and stuff onboard.

-> getting those encoders hooked up to the midibox in a test setup

-> some panel layouts (trackball in the center section??)

-> usb hub inside the denon box

I plan to keep all further steps posted to my web site.

regards michael

p.s.: does nobody know about these encoders???

Link to comment
Share on other sites

Hi,

In the page 3 of the datasheet, you'll find a "truth table" for the "Shuffle Part".

I decrypted "A type" as:

Pin C.1 (or terminal, as they call it) is Common (the one that gets "shorted" to other pins).

Pin1 is used for direction information.

Pins 2,3,4 form a 3bit (8 step) code that represents the rotation angle.

I hope that helps you to see and test it by yourself?! :D

Now, some Midibox app. modification is needed, if you want to decode these Shuttle speed settings - and if tractor supports 'em. - Can't help you with that, I'm afraid.

Bye, Moebius  

Link to comment
Share on other sites

Hi!

Thanks for your answer!

I copied the mentioned parts out of the datasheet.

always_on.gif

This shematics do not mention the ring on the outer side of the encoder which was used to jump back and forward in the track on the cd-deck.

Must be pin J1 and J2 [J for jogwheel I think].

I painted how this thing was connected inside the denon on the shematics. Pin C1 and C2 gave power to this thing.

All output pins used to be connected to a little IC with an "AN" printed on it. This thing did have 3 pins, but  only 2 where used [i did paint this as well]

As I mentioned in a earlier post I don't get any voltage out if I connect my multimeter to the C1/C2 pins and one out pin.  I read that encoders give out some kind of rectangle-voltage. So maybe my DMM is to slow to detect this voltage jump !?!?!?

shematics.gif

Thanks

Michael

Link to comment
Share on other sites

Hi,

Must be pin J1 and J2 [J for jogwheel I think].

Yup, that's an encoder..

All output pins used to be connected to a little IC with an "AN" printed on it. This thing did have 3 pins, but  only 2 where used [i did paint this as well]

...And these were soldered from the pcb that has silk screening marked with "D201" ect. ;) Those are probably diodes in SOT-23 packages.

As I mentioned in a earlier post I don't get any voltage out if I connect my multimeter to the C1/C2 pins and one out pin. I read that encoders give out some kind of rectangle-voltage. So maybe my DMM is to slow to detect this voltage jump !?!?!?

Try measuring resistance? ;) Encoders are just electromechanical switches with common input to which 2 outputs are "shorted".. Voltages involved has to be brought in from the outside..

Bye, Moebius

Link to comment
Share on other sites

  • 2 weeks later...

Hi!

I examined my  encoders today.

Seems that the  wheel puts out some rectangular voltage as any standard encoder. I tested it with some LEDs attached. See video1 it you ever wondered how encoders work.

The ring seems to be the hardest part. It  knows 8 or  9  (depends on rotational direction)  different angles.  See alps2.mov  for  video.

Does anbody think that it is possible to  modify MIOS that much that it accepts such a ring and puts out  usefull midi signal?

http://stud3.tuwien.ac.at/~e0327352/midibox/alps%20movie/alps1.MOV

http://stud3.tuwien.ac.at/~e0327352/midibox/alps%20movie/alps2.MOV

Please excuse the movies. Made them with my  digital camera which is meant to take photos.

Regards

Michael

Link to comment
Share on other sites

Hi,

Actually those videos are kind of COOL ;) (And my comp even understands QT, unlike some recent M$ "standards"..)

pay attention, boys and girls: The wheel seems to be a perfect example of an encoder. ;D

"Shuttle" seems to output So-called "Grey code"-- BUT I'd still decode it as 8-positions (3-bits) (center+7 different degrees) and a direction bit.

There's no MIOS modification needed to use this information. It just 4 buttons for MIOS!

---

But WHAT should these center + 7 different reverse and 7 different forward positions output to midi? I have no clue, what kind of midi messages does Traktor support. (I didn't even see any controls that would benefit from this??)

Then the midibox application code must be modified, so DIN entries for this shuttle control are decoded as different positions and appropriate midi messages are sent..

Bye, MOebius

Link to comment
Share on other sites

But WHAT should these center + 7 different reverse and 7 different forward positions output to midi? I have no clue, what kind of midi messages does Traktor support. (I didn't even see any controls that would benefit from this??)

I connected my Korg MS2000 to Traktor once and I'm quite positive I used the Pan knob to do exactly what the jog wheel is supposed to do: rewind and fast-forward through the track as it's playing, at higher speeds the farther you go left or right. I don't use Traktor anymore so I can't test it.

But, if I'm right, then the MIDI message should be just a standard CC, assigned to the appropriate control in Traktor. The values transmitted would then be as follows:

Hard left=0; 9; 18; 27; 37; 46; 55; Center=64; 73; 82; 91; 101; 110; 119; Hard right=127

Good luck!

Link to comment
Share on other sites

  • 2 weeks later...

sounds like a good project

i also spent along time thinking about jog shuttles on a midi box traktor controller but in the end i decided that i can do what i need with buttons and sliders as i also have controlled forward or reverse in the track with a slider

but good look and i look forward to seeing the fineshed box

Link to comment
Share on other sites

  • 1 month later...

Hi folks!

Finished my core module today.

PICT0017.jpg

I still had an old one here which did not work properly so I ordered a new one from this german shop. See PICT0022 und PICT0023 for how this old one looked like. It was built on a bought PCB but with parts salvaged from an old Midibox 16 from 2001. Well, I think the cristal is not suitable, I think it is for RF-applications.

http://stud3.tuwien.ac.at/~e0327352/midibox/pics3/index.htm

As you can see I attached a heatspreader (had this one in my mighty  "old computer parts" box) to the 7805 cause it gets realy hot with the lc- background lighting on.

I have no clue about how to tell mios that there are faders connected (can't really do anything with this skeleton) - so there will be much more reading required.

PICT0024 shows my current setup, because I do not want to stick my audigy extension bay into my new glossy black tower.

So there is everything sticking out.

Best regards

M.

Link to comment
Share on other sites

Success!!

Hooked up a single fader directly to the midibox (I wont need the multioplexers at all because a have only got 2 to 4 potentiometers - more later - depends on how I hook up the Jog/shuttle wheel) and it worked!!! yeah!

Had to try out traktor with this single fader und checked out several functions.

1) pitch (see pictures)

What I noticed: Resolution (128 steps) are not that good. I used to spin with Numark TTX-1 turntables which have got digital read outs of the current pitch and I find myself adjusting the pitch plus or minus 0,1% percent sometimes. The closest I could reach with this setup where 0,2% in traktor, sometimes even 0,3%. Hmmmm. Is there any way to encrease the resolution??

2) transport (deck wind in traktor)

Veeeeery handy feature, when given a cc value above 64, deck will wind forward, if given 64 will do nothing (just spin along if you hit play) and if given a value under 64 will wind backwards.

I thought about connecting this feature to the transport rings on the alps encoders. If have no clue about MIOS or about pic programming, so I thought about a way to get decent values out of the ring.

If using IC-logical chips you could connect a certain resistor value to one AIN input and therefor get an CC value. Problems: I have no clue about logical circuits, not yet.

http://stud3.tuwien.ac.at/~e0327352/midibox/pics4/

regards

m.

Link to comment
Share on other sites

Hi,

1) pitch (see pictures)

What I noticed: Resolution (128 steps) are not that good. I used to spin with Numark TTX-1 turntables which have got digital read outs of the current pitch and I find myself adjusting the pitch plus or minus 0,1% percent sometimes. The closest I could reach with this setup where 0,2% in traktor, sometimes even 0,3%. Hmmmm. Is there any way to encrease the resolution??

you can increase the resolution to up to 10bit by modifying the AIN_DeadBand setting, but you also have to change the MIDI sending routine, since CC only supports a 7-bit resolution.

So - which events can be handled by Traktor?

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 9 months later...
  • 2 weeks later...
  • 2 weeks later...

Hi!

Got some work done. Piggy packed the core and DIN modules with the help of a piece of acrylic sheet.

Designed a little circuit which maps the pitch encoder to a second encoder input when the pushbutton underneath the encoder is pressed.

Unpressed the encoder is mapped to the traktor fine pitch function (called fine tempo in traktor) and increases/decreases in 0,1% steps and when pressed changes the pitch in 1,0 steps.

[Yes. I'm absolutely sure that this can be done within MIOS. But I have no clue]

Etched a second DIN module with the help of the toner transfer method and my before mentioned etching tank.

I'm missing the shift regsiters which should arrive early next week together witch some parts also needed.

http://stud3.tuwien.ac.at/~e0327352/

Regards

Michael

Link to comment
Share on other sites

  • 3 weeks later...

Hello midiboxers!

Yet another update..

Second DIN finished. Therefore all buttons could be connected. Seems that I'm missing 2 more inputs when all encoders are connected.

Mounted 4 pots and 4 buttons in the middle section to controll the Traktor 3 FX section. Therfore the faceplate had to be cut and welded in turned 90 degrees.

PICT0082.gif

PICT0083.gif

Mounted second pitch wheel.

http://stud3.tuwien.ac.at/~e0327352

Can someone please expain where to put this code in mios:

http://www.midibox.org/forum/index.php?topic=5794.0

Regards

Michael

Link to comment
Share on other sites

Bought a Midisport UNO yesterday for about 40€. It is very small an neat and I feel a bit guilty for breaking it apart.

However....it contains only 2 chips. 1 optocoupler and one of these http://www.stmicroelectronics.com/stonline/products/literature/ds/5521.pdf in an M-Audio OEM Version.

The pcb itself is only 60 by 25 millimeter so it will fit pefectly inside my box.

First had a bit of trouble because the midisport wouldn't like my front usb port but after plugin it into the back of my computer and updating the driver it worked.

http://stud3.tuwien.ac.at/~e0327352/ Pictures on my website

Regards

Michael

Link to comment
Share on other sites

  • 2 months later...

Hello everybody!

Update time again!

Finished the c code for use with the C interface.

Includes now a working pitch bend and shuttle ring (see first post) sollution.

A so called shift button is used to give the encoder and the shuttle further fuctionality -> shuttle_x_alt

Faceplate is also finished and sprayed. Pictures will follow.

regards

M.

/*
 * MIOS SDCC Wrapper
 *
 * ==========================================================================
 *
 * Copyright (C) 2004  Thorsten Klose (tk@midibox.org)
 * 
 * ==========================================================================
 * 
 * This file is part of a MIOS application
 *
 * This application is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This application is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with This application; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 *
 * coded by Wild_Weasel. see http://forum.midibox.org/ for further information
 *
 * http://www.midibox.org/forum/index.php?topic=3852.0
 * ==========================================================================
 */

#include "cmios.h"
#include "pic18f452.h"

unsigned char shuttle_1_alt;
unsigned char shuttle_2_alt;




/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS after startup to initialize the 
// application
/////////////////////////////////////////////////////////////////////////////
void Init(void) __wparam
{



	// define number of shift registers
	MIOS_SRIO_NumberSet(8);

	MIOS_AIN_UnMuxed();
	MIOS_AIN_NumberSet(8);
	MIOS_AIN_DeadbandSet(7);

	// update frequency of SRIO chain
	MIOS_SRIO_UpdateFrqSet(1); // ms
}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS in the mainloop when nothing else is to do
/////////////////////////////////////////////////////////////////////////////
void Tick(void) __wparam
{

}

/////////////////////////////////////////////////////////////////////////////
// This function is periodically called by MIOS. The frequency has to be
// initialized with MIOS_Timer_Set
/////////////////////////////////////////////////////////////////////////////
void Timer(void) __wparam
{

}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when the display content should be 
// initialized. Thats the case during startup and after a temporary message
// has been printed on the screen
/////////////////////////////////////////////////////////////////////////////
void DISPLAY_Init(void) __wparam
{
	MIOS_LCD_Clear();
	MIOS_LCD_CursorSet(0x00);
	MIOS_LCD_PrintCString("Traktor Midibox");
	MIOS_LCD_CursorSet(0x40);
	MIOS_LCD_PrintCString("by Wildweasel");
}

/////////////////////////////////////////////////////////////////////////////
//  This function is called in the mainloop when no temporary message is shown
//  on screen. Print the realtime messages here
/////////////////////////////////////////////////////////////////////////////
void DISPLAY_Tick(void) __wparam
{
}

/////////////////////////////////////////////////////////////////////////////
//  This function is called by MIOS when a complete MIDI event has been received
/////////////////////////////////////////////////////////////////////////////
void MPROC_NotifyReceivedEvnt(unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam
{
  // print received MIDI event
   MIOS_LCD_Clear();

   MIOS_LCD_PrintCString("Received:");

   MIOS_LCD_CursorSet(0x40);
   MIOS_LCD_PrintHex2(evnt0);
   MIOS_LCD_PrintHex2(evnt1);
   MIOS_LCD_PrintHex2(evnt2);
}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when a MIDI event has been received
// which has been specified in the MIOS_MPROC_EVENT_TABLE
/////////////////////////////////////////////////////////////////////////////
void MPROC_NotifyFoundEvent(unsigned entry, unsigned char evnt0, unsigned char evnt1, unsigned char evnt2) __wparam
{
}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when a MIDI event has not been completly
// received within 2 seconds
/////////////////////////////////////////////////////////////////////////////
void MPROC_NotifyTimeout(void) __wparam
{
}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when a MIDI byte has been received
/////////////////////////////////////////////////////////////////////////////
void MPROC_NotifyReceivedByte(unsigned char byte) __wparam
{
}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS before the shift register are loaded
/////////////////////////////////////////////////////////////////////////////
void SR_Service_Prepare(void) __wparam
{
}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS after the shift register have been loaded
/////////////////////////////////////////////////////////////////////////////
void SR_Service_Finish(void) __wparam
{
}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when an button has been toggled
// pin_value is 1 when button released, and 0 when button pressed
/////////////////////////////////////////////////////////////////////////////
void DIN_NotifyToggle(unsigned char pin, unsigned char pin_value) __wparam
{
	      unsigned char shuttle_1;
	      unsigned char shuttle_2;
	      shuttle_1_alt = MIOS_DIN_PinGet(31);
	      shuttle_2_alt = MIOS_DIN_PinGet(33);
	      
	      if (pin >= 8 && pin <= 15 || pin == 31 || pin == 33)
	      {
				      unsigned char A = MIOS_DIN_PinGet(8);
				      unsigned char B = MIOS_DIN_PinGet(9);
				      unsigned char C = MIOS_DIN_PinGet(10);
				      unsigned char D = MIOS_DIN_PinGet(11);
				      				      				      
	            unsigned char E = MIOS_DIN_PinGet(15);
				      unsigned char F = MIOS_DIN_PinGet(14);
				      unsigned char G = MIOS_DIN_PinGet(13);
				      unsigned char H = MIOS_DIN_PinGet(12);
	            
				      if (shuttle_1_alt == 1)
							      {
							      MIOS_MIDI_TxBufferPut(0xb1);
							      MIOS_MIDI_TxBufferPut(02);
							      
							      
							      if (A == 0 && B == 1 && C == 1 && D == 0){shuttle_1 = 7; MIOS_MIDI_TxBufferPut(0x0a);}
							      if (A == 0 && B == 0 && C == 1 && D == 0){shuttle_1 = 6; MIOS_MIDI_TxBufferPut(0x0a);}
								    if (A == 0 && B == 0 && C == 0 && D == 0){shuttle_1 = 5; MIOS_MIDI_TxBufferPut(0x13);}
								    if (A == 0 && B == 1 && C == 0 && D == 0){shuttle_1 = 4; MIOS_MIDI_TxBufferPut(0x1c);}
								    if (A == 1 && B == 1 && C == 0 && D == 0){shuttle_1 = 3; MIOS_MIDI_TxBufferPut(0x25);}
								    if (A == 1 && B == 0 && C == 0 && D == 0){shuttle_1 = 2; MIOS_MIDI_TxBufferPut(0x2e);}
								    if (A == 1 && B == 0 && C == 1 && D == 0){shuttle_1 = 1; MIOS_MIDI_TxBufferPut(0x37);}
								    if (A == 1 && B == 1 && C == 1 && D == 0){shuttle_1 = 1; MIOS_MIDI_TxBufferPut(0x37);}
							      if (A == 1 && B == 1 && C == 1 && D == 1){shuttle_1 = 0; MIOS_MIDI_TxBufferPut(0x40);}
							      if (A == 1 && B == 0 && C == 1 && D == 1){shuttle_1 = 1; MIOS_MIDI_TxBufferPut(0x49);}
								    if (A == 1 && B == 0 && C == 0 && D == 1){shuttle_1 = 2; MIOS_MIDI_TxBufferPut(0x52);}
								    if (A == 1 && B == 1 && C == 0 && D == 1){shuttle_1 = 3; MIOS_MIDI_TxBufferPut(0x5b);}
								    if (A == 0 && B == 1 && C == 0 && D == 1){shuttle_1 = 4; MIOS_MIDI_TxBufferPut(0x64);}
								    if (A == 0 && B == 0 && C == 0 && D == 1){shuttle_1 = 5; MIOS_MIDI_TxBufferPut(0x6d);}
								    if (A == 0 && B == 0 && C == 1 && D == 1){shuttle_1 = 6; MIOS_MIDI_TxBufferPut(0x76);}
								    if (A == 0 && B == 1 && C == 1 && D == 1){shuttle_1 = 7; MIOS_MIDI_TxBufferPut(0x7f);}
								    		    
								    MIOS_LCD_Clear();
								    MIOS_LCD_PrintCString("Shuttle 1 ");
								    MIOS_LCD_CursorSet(0x40);
								    MIOS_LCD_PrintBCD3(shuttle_1);
								    }
					       
					    else
					    {
								    MIOS_MIDI_TxBufferPut(0xb1);
							      MIOS_MIDI_TxBufferPut(10);
							      
							      
							      if (A == 0 && B == 1 && C == 1 && D == 0){shuttle_1 = 7; MIOS_MIDI_TxBufferPut(0x0a);}
							      if (A == 0 && B == 0 && C == 1 && D == 0){shuttle_1 = 6; MIOS_MIDI_TxBufferPut(0x0a);}
								    if (A == 0 && B == 0 && C == 0 && D == 0){shuttle_1 = 5; MIOS_MIDI_TxBufferPut(0x13);}
								    if (A == 0 && B == 1 && C == 0 && D == 0){shuttle_1 = 4; MIOS_MIDI_TxBufferPut(0x1c);}
								    if (A == 1 && B == 1 && C == 0 && D == 0){shuttle_1 = 3; MIOS_MIDI_TxBufferPut(0x25);}
								    if (A == 1 && B == 0 && C == 0 && D == 0){shuttle_1 = 2; MIOS_MIDI_TxBufferPut(0x2e);}
								    if (A == 1 && B == 0 && C == 1 && D == 0){shuttle_1 = 1; MIOS_MIDI_TxBufferPut(0x37);}
								    if (A == 1 && B == 1 && C == 1 && D == 0){shuttle_1 = 1; MIOS_MIDI_TxBufferPut(0x37);}	
							      if (A == 1 && B == 1 && C == 1 && D == 1){shuttle_1 = 0; MIOS_MIDI_TxBufferPut(0x40);}
							      if (A == 1 && B == 0 && C == 1 && D == 1){shuttle_1 = 1; MIOS_MIDI_TxBufferPut(0x49);}
								    if (A == 1 && B == 0 && C == 0 && D == 1){shuttle_1 = 2; MIOS_MIDI_TxBufferPut(0x52);}
								    if (A == 1 && B == 1 && C == 0 && D == 1){shuttle_1 = 3; MIOS_MIDI_TxBufferPut(0x5b);}
								    if (A == 0 && B == 1 && C == 0 && D == 1){shuttle_1 = 4; MIOS_MIDI_TxBufferPut(0x64);}
								    if (A == 0 && B == 0 && C == 0 && D == 1){shuttle_1 = 5; MIOS_MIDI_TxBufferPut(0x6d);}
								    if (A == 0 && B == 0 && C == 1 && D == 1){shuttle_1 = 6; MIOS_MIDI_TxBufferPut(0x76);}
								    if (A == 0 && B == 1 && C == 1 && D == 1){shuttle_1 = 7; MIOS_MIDI_TxBufferPut(0x7f);}
								    	
								    MIOS_LCD_Clear();
								    MIOS_LCD_PrintCString("Shuttle 1 alt ");
								    MIOS_LCD_CursorSet(0x40);
								    MIOS_LCD_PrintBCD3(shuttle_1);
		          }
		    	  if (shuttle_2_alt == 1)
							      {
							      MIOS_MIDI_TxBufferPut(0xb1);
							      MIOS_MIDI_TxBufferPut(03);
							      
							      
							      if (E == 0 && F == 1 && G == 1 && H == 0){shuttle_2 = 7; MIOS_MIDI_TxBufferPut(0x0E);}
							      if (E == 0 && F == 0 && G == 1 && H == 0){shuttle_2 = 6; MIOS_MIDI_TxBufferPut(0x0E);}
								    if (E == 0 && F == 0 && G == 0 && H == 0){shuttle_2 = 5; MIOS_MIDI_TxBufferPut(0x13);}
								    if (E == 0 && F == 1 && G == 0 && H == 0){shuttle_2 = 4; MIOS_MIDI_TxBufferPut(0x1c);}
								    if (E == 1 && F == 1 && G == 0 && H == 0){shuttle_2 = 3; MIOS_MIDI_TxBufferPut(0x25);}
								    if (E == 1 && F == 0 && G == 0 && H == 0){shuttle_2 = 2; MIOS_MIDI_TxBufferPut(0x2e);}
								    if (E == 1 && F == 0 && G == 1 && H == 0){shuttle_2 = 1; MIOS_MIDI_TxBufferPut(0x37);}
								    if (E == 1 && F == 1 && G == 1 && H == 0){shuttle_2 = 1; MIOS_MIDI_TxBufferPut(0x37);}
							      if (E == 1 && F == 1 && G == 1 && H == 1){shuttle_2 = 0; MIOS_MIDI_TxBufferPut(0x40);}
							      if (E == 1 && F == 0 && G == 1 && H == 1){shuttle_2 = 1; MIOS_MIDI_TxBufferPut(0x49);}
								    if (E == 1 && F == 0 && G == 0 && H == 1){shuttle_2 = 2; MIOS_MIDI_TxBufferPut(0x52);}
								    if (E == 1 && F == 1 && G == 0 && H == 1){shuttle_2 = 3; MIOS_MIDI_TxBufferPut(0x5b);}
								    if (E == 0 && F == 1 && G == 0 && H == 1){shuttle_2 = 4; MIOS_MIDI_TxBufferPut(0x64);}
								    if (E == 0 && F == 0 && G == 0 && H == 1){shuttle_2 = 5; MIOS_MIDI_TxBufferPut(0x6d);}
								    if (E == 0 && F == 0 && G == 1 && H == 1){shuttle_2 = 6; MIOS_MIDI_TxBufferPut(0x76);}
								    if (E == 0 && F == 1 && G == 1 && H == 1){shuttle_2 = 7; MIOS_MIDI_TxBufferPut(0x7f);}
								    		    
								    MIOS_LCD_Clear();
								    MIOS_LCD_PrintCString("Shuttle 2 ");
								    MIOS_LCD_CursorSet(0x40);
								    MIOS_LCD_PrintBCD3(shuttle_2);
								    }
					       
					    else
					    {
								    MIOS_MIDI_TxBufferPut(0xb1);
							      MIOS_MIDI_TxBufferPut(04);
							      
							      
							      if (E == 0 && F == 1 && G == 1 && H == 0){shuttle_2 = 7; MIOS_MIDI_TxBufferPut(0x0E);}
							      if (E == 0 && F == 0 && G == 1 && H == 0){shuttle_2 = 6; MIOS_MIDI_TxBufferPut(0x0E);}
								    if (E == 0 && F == 0 && G == 0 && H == 0){shuttle_2 = 5; MIOS_MIDI_TxBufferPut(0x13);}
								    if (E == 0 && F == 1 && G == 0 && H == 0){shuttle_2 = 4; MIOS_MIDI_TxBufferPut(0x1c);}
								    if (E == 1 && F == 1 && G == 0 && H == 0){shuttle_2 = 3; MIOS_MIDI_TxBufferPut(0x25);}
								    if (E == 1 && F == 0 && G == 0 && H == 0){shuttle_2 = 2; MIOS_MIDI_TxBufferPut(0x2e);}
								    if (E == 1 && F == 0 && G == 1 && H == 0){shuttle_2 = 1; MIOS_MIDI_TxBufferPut(0x37);}
								    if (E == 1 && F == 1 && G == 1 && H == 0){shuttle_2 = 1; MIOS_MIDI_TxBufferPut(0x37);}
							      if (E == 1 && F == 1 && G == 1 && H == 1){shuttle_2 = 0; MIOS_MIDI_TxBufferPut(0x40);}
							      if (E == 1 && F == 0 && G == 1 && H == 1){shuttle_2 = 1; MIOS_MIDI_TxBufferPut(0x49);}
								    if (E == 1 && F == 0 && G == 0 && H == 1){shuttle_2 = 2; MIOS_MIDI_TxBufferPut(0x52);}
								    if (E == 1 && F == 1 && G == 0 && H == 1){shuttle_2 = 3; MIOS_MIDI_TxBufferPut(0x5b);}
								    if (E == 0 && F == 1 && G == 0 && H == 1){shuttle_2 = 4; MIOS_MIDI_TxBufferPut(0x64);}
								    if (E == 0 && F == 0 && G == 0 && H == 1){shuttle_2 = 5; MIOS_MIDI_TxBufferPut(0x6d);}
								    if (E == 0 && F == 0 && G == 1 && H == 1){shuttle_2 = 6; MIOS_MIDI_TxBufferPut(0x76);}
								    if (E == 0 && F == 1 && G == 1 && H == 1){shuttle_2 = 7; MIOS_MIDI_TxBufferPut(0x7f);}
								    	
								    MIOS_LCD_Clear();
								    MIOS_LCD_PrintCString("Shuttle 2 alt ");
								    MIOS_LCD_CursorSet(0x40);
								    MIOS_LCD_PrintBCD3(shuttle_2);
		          }
		    	   
		    }
		           	
		    else 
		    {		   	   	  
	      MIOS_MIDI_TxBufferPut(0x90); 
  			MIOS_MIDI_TxBufferPut(pin);
  			MIOS_MIDI_TxBufferPut(pin_value ? 0x00 : 0x7f);
  
        MIOS_LCD_Clear();
			  MIOS_LCD_PrintCString("Taster ");
        MIOS_LCD_PrintBCD4(pin);
  	    }
}

/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when an encoder has been moved
// incrementer is positive when encoder has been turned clockwise, else
// it is negative
/////////////////////////////////////////////////////////////////////////////
void ENC_NotifyChange(unsigned char encoder, char incrementer) __wparam
{

		if (shuttle_2_alt == 1 && incrementer < 0 && encoder == 0)
			              {
										MIOS_MIDI_TxBufferPut(0x94);   
										MIOS_MIDI_TxBufferPut(0x70);
										MIOS_MIDI_TxBufferPut(0x7f);
										MIOS_LCD_Clear();
										MIOS_LCD_PrintCString("Encoder ");
										MIOS_LCD_PrintBCD4(encoder);
										MIOS_LCD_CursorSet(0x40);
										MIOS_LCD_PrintCString("negativ");
										MIOS_Delay(25);		
										MIOS_MIDI_TxBufferPut(0x94); 
										MIOS_MIDI_TxBufferPut(0x70);
										MIOS_MIDI_TxBufferPut(0x00);
			              }							
		if (shuttle_2_alt == 1 && incrementer > 0 && encoder == 0)				
										{
										MIOS_MIDI_TxBufferPut(0x94); 
										MIOS_MIDI_TxBufferPut(0x71);
										MIOS_MIDI_TxBufferPut(0x7f);  
										MIOS_LCD_Clear();
										MIOS_LCD_PrintCString("Encoder ");
										MIOS_LCD_PrintBCD4(encoder);
										MIOS_LCD_CursorSet(0x40);
										MIOS_LCD_PrintCString("positiv");
										MIOS_Delay(25);
									  MIOS_MIDI_TxBufferPut(0x94); 
									  MIOS_MIDI_TxBufferPut(0x71);
									  MIOS_MIDI_TxBufferPut(0x00); 
										}
		if (shuttle_2_alt == 0 && incrementer < 0 && encoder == 0)
			              {
										MIOS_MIDI_TxBufferPut(0x94);   
										MIOS_MIDI_TxBufferPut(0x72);
										MIOS_MIDI_TxBufferPut(0x7f);
										MIOS_LCD_Clear();
										MIOS_LCD_PrintCString("Encoder mode:alt ");
										MIOS_LCD_PrintBCD4(encoder);
										MIOS_LCD_CursorSet(0x40);
										MIOS_LCD_PrintCString("negativ");
										MIOS_Delay(75);		
										MIOS_MIDI_TxBufferPut(0x94); 
										MIOS_MIDI_TxBufferPut(0x72);
										MIOS_MIDI_TxBufferPut(0x00);
			              }							
		if (shuttle_2_alt == 0 && incrementer > 0 && encoder == 0)				
										{
										MIOS_MIDI_TxBufferPut(0x94); 
										MIOS_MIDI_TxBufferPut(0x73);
										MIOS_MIDI_TxBufferPut(0x7f);  
										MIOS_LCD_Clear();
										MIOS_LCD_PrintCString("Encoder mode:alt ");
										MIOS_LCD_PrintBCD4(encoder);
										MIOS_LCD_CursorSet(0x40);
										MIOS_LCD_PrintCString("positiv");
										MIOS_Delay(75);
									  MIOS_MIDI_TxBufferPut(0x94); 
									  MIOS_MIDI_TxBufferPut(0x73);
									  MIOS_MIDI_TxBufferPut(0x00); 
										}
		//---
		if (shuttle_1_alt == 1 && incrementer < 0 && encoder == 1)
			              {
										MIOS_MIDI_TxBufferPut(0x94);   
										MIOS_MIDI_TxBufferPut(0x04);
										MIOS_MIDI_TxBufferPut(0x7f);
										MIOS_LCD_Clear();
										MIOS_LCD_PrintCString("Encoder ");
										MIOS_LCD_PrintBCD4(encoder);
										MIOS_LCD_CursorSet(0x40);
										MIOS_LCD_PrintCString("negativ");
										MIOS_Delay(25);		
										MIOS_MIDI_TxBufferPut(0x94); 
										MIOS_MIDI_TxBufferPut(0x04);
										MIOS_MIDI_TxBufferPut(0x00);
			              }							
		if (shuttle_1_alt == 1 && incrementer > 0 && encoder == 1)				
										{
										MIOS_MIDI_TxBufferPut(0x94); 
										MIOS_MIDI_TxBufferPut(0x05);
										MIOS_MIDI_TxBufferPut(0x7f);  
										MIOS_LCD_Clear();
										MIOS_LCD_PrintCString("Encoder ");
										MIOS_LCD_PrintBCD4(encoder);
										MIOS_LCD_CursorSet(0x40);
										MIOS_LCD_PrintCString("positiv");
										MIOS_Delay(25);
									  MIOS_MIDI_TxBufferPut(0x94); 
									  MIOS_MIDI_TxBufferPut(0x05);
									  MIOS_MIDI_TxBufferPut(0x00); 
										}
		if (shuttle_1_alt == 0 && incrementer < 0 && encoder == 1)
			              {
										MIOS_MIDI_TxBufferPut(0x94);   
										MIOS_MIDI_TxBufferPut(0x06);
										MIOS_MIDI_TxBufferPut(0x7f);
										MIOS_LCD_Clear();
										MIOS_LCD_PrintCString("Encoder mode:alt ");
										MIOS_LCD_PrintBCD4(encoder);
										MIOS_LCD_CursorSet(0x40);
										MIOS_LCD_PrintCString("negativ");
										MIOS_Delay(75);		
										MIOS_MIDI_TxBufferPut(0x94); 
										MIOS_MIDI_TxBufferPut(0x06);
										MIOS_MIDI_TxBufferPut(0x00);
			              }							
		if (shuttle_1_alt == 0 && incrementer > 0 && encoder == 1)				
										{
										MIOS_MIDI_TxBufferPut(0x94); 
										MIOS_MIDI_TxBufferPut(0x07);
										MIOS_MIDI_TxBufferPut(0x7f);  
										MIOS_LCD_Clear();
										MIOS_LCD_PrintCString("Encoder mode:alt ");
										MIOS_LCD_PrintBCD4(encoder);
										MIOS_LCD_CursorSet(0x40);
										MIOS_LCD_PrintCString("positiv");
										MIOS_Delay(75);
									  MIOS_MIDI_TxBufferPut(0x94); 
									  MIOS_MIDI_TxBufferPut(0x07);
									  MIOS_MIDI_TxBufferPut(0x00); 
										}																


	  
}
/////////////////////////////////////////////////////////////////////////////
// This function is called by MIOS when a pot has been moved
/////////////////////////////////////////////////////////////////////////////
void AIN_NotifyChange(unsigned char pin, unsigned int pin_value) __wparam
{
	MIOS_LCD_Clear();
	MIOS_LCD_CursorSet(0x00); 
  MIOS_LCD_PrintCString("Potentiometer");
	MIOS_LCD_CursorSet(0x40);
	MIOS_LCD_PrintBCD4(pin);

	MIOS_LCD_PrintBCD4(MIOS_AIN_Pin7bitGet(pin));
	MIOS_MIDI_TxBufferPut(0xb0);
	MIOS_MIDI_TxBufferPut(pin);
	MIOS_MIDI_TxBufferPut(MIOS_AIN_Pin7bitGet(pin));
}

Could some please move this topic into the HUI section.

Thanks.

Link to comment
Share on other sites

  • 2 weeks later...

1) pitch (see pictures)

What I noticed: Resolution (128 steps) are not that good. I used to spin with Numark TTX-1 turntables which have got digital read outs of the current pitch and I find myself adjusting the pitch plus or minus 0,1% percent sometimes. The closest I could reach with this setup where 0,2% in traktor, sometimes even 0,3%. Hmmmm. Is there any way to encrease the resolution??

I'm REALLY new to this, but in the midi speciifications isn't there a "fine" setting for resolution that is higher than 128 levels? It goes up to 14bit resolution, although the MIDI specs page states that "most devices ignore the 'fine' setting"

Check out "Volume" here:

http://www.borg.com/~jglatt/tech/midispec.htm

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...