HardwareHeaven.com

HardwareHeaven.com

Looking for the skin chooser?
 
 
  • Home

  • Hardware reviews

  • Articles

  • News

  • Tools

  • Gaming at HardwareHeaven

  • Forums

 

Go Back   HardwareHeaven.com > Forums > Hardware and Related Topics > kX Project Audio Driver Support Forum > General Discussion


Reply
 
Thread Tools
Old Oct 3, 2004, 02:48 PM   #1
DriverHeaven Newbie
 
Join Date: Mar 2003
Location: Romania
Posts: 14
Rep Power: 0
Lucean is on a distinguished road

DIY MIDI keyboard controller

Check-out http://www.geocities.com/kmidi_project
It's a do-it-yourself project.
It's for beginners (and not only).
Well, it works fine with kX too
Lucean is offline   Reply With Quote


Old Oct 3, 2004, 04:38 PM   #2
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,710
Rep Power: 0
TravelRec. will become famous soon enoughTravelRec. will become famous soon enough

Yeah, a way cool - but nothing for all that people without programming experience (like me!) and the necessary programmers. I started an own knob controller project successfully but also only with some high programmable logic so I cannot give advices to other users that don´t have exactly that (not free) software and the programmers. Seems that everybody has to find an own way to get a solution for that or similar projects. BTW: my controller pult also works really fine with kX. But the building of that thing was horrible and was taking 2 weeks of straight processing time . I don´t want to do this once more.
Thank you anyway for the link - my someone find this helpful.

Greetings!
TravelRec.
__________________
Always take a look behind.

TravelRec. is offline   Reply With Quote
Old Oct 3, 2004, 06:02 PM   #3
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

>>..that don´t have exactly that (not free) software and the programmers.

[color=yellow]Atmel software develop suites are free, flash programmers (Ponyprog et.) are free,[/color]
[color=yellow]and the physical ISP connection is very simple to build.[/color]
[color=yellow](a few wires from the parralel port, 2 resistors and a cap)[/color]
[color=yellow]Of course; one has to have some programming skills/experience.[/color]

[color=yellow]I must say TravelRec, you have my deepest respect in beeing able[/color]
[color=yellow]to succeed via hardwiring everything. (Believe me, I know how much work that is)[/color]

[color=yellow]/LeMury[/color]
Lex Nahumury is offline   Reply With Quote
Old Oct 3, 2004, 10:05 PM   #4
DriverHeaven Newbie
 
Join Date: Dec 2003
Posts: 13
Rep Power: 0
kingme is on a distinguished road

How would you mod the keyboard for velocity sensing? Capacitive contacts perhaps? Very cool indeed...
kingme is offline   Reply With Quote
Old Oct 4, 2004, 06:32 AM   #5
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

Quote:
Originally Posted by kingme
How would you mod the keyboard for velocity sensing? Capacitive contacts perhaps? Very cool indeed...
[color=yellow]Most common way is to use 2 contacts per key (upper row and lower row),[/color]
[color=yellow]and measure (in software) the elapsed time between upper contact[/color]
[color=yellow]and lower contact during key press.[/color]
[color=yellow]This time is then used as a measure for velocity calculation.[/color]
[color=#ffff00][/color]
[color=#ffff00]Of course, this solution is hard to implement in an existing keyboard[/color]
[color=#ffff00]without 2 contacts per key.[/color]
[color=#ffff00][/color]
[color=#ffff00]/LeMury[/color]
Lex Nahumury is offline   Reply With Quote
Old Oct 4, 2004, 07:06 AM   #6
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,710
Rep Power: 0
TravelRec. will become famous soon enoughTravelRec. will become famous soon enough

Hi!

LeMury, thanks for the tips, some things I know inbetween (nobody says to you that the MIDI-Byte is sent LSB first, so you have to do some oscillograph search with a controller-sending device to come behind ), but like I said earlier - I´m not a programmer these times and it´s hard for me to learn that as quick as I need. So I´ve done some implementation with CPLDs and with the help of a friend to minimize the external components. Finally it´s exactly what I want and that is the reward for all the hassle before. Unfortunately this way will only work for my desires and will not help other users as well...

For the velocity thing: with one contact this will be nearly impossible. The processor doesn´t know then with how many force the key is pressed down. The 2-contact method is the best I know, capacitor will not work. The only thing may be a rubber-contact that will have a higher resistance when pressed with low pressure, but this can vary from contact to contact and it isn´t sure that the result meets the desire...

Greetings!
TravelRec.
__________________
Always take a look behind.

TravelRec. is offline   Reply With Quote
Old Oct 4, 2004, 08:35 AM   #7
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

TravelRec,

Sorry to go on about this, but for someone with your skills it should not
be that hard to learn some 8-bit assemblar coding.
Programming an 8-bit MCU in assemblar "feels" very "close" to the actual hardware/electronics.
This kind of 'low Level' programming is totaly different then writing a MSWindows application
on the PC-platform in a "higher programming language" like C/C++.

The things you have established so far, (Analog and digital circuitry design)
are in most cases "more difficult" then writing a few lines of assemblar code.
(You are already programming PLDs)
Moreover; designing hardwired digital circuitry requires the same 'level of thinking'
as software programming.

Just like you I started out as an Electronics Engineer 24 years ago and had the same
attitude towards Micro proccesors as you do now.
Back then we hadn't neat MCU's like PICs and Atmels. A Z80 at best.
Everything had to be payed for, was very expensive and info hard to get and also not free.
(The Internet didn't even exist here in Europe. Darn, I sound like an old man)
Nevertheless, I'm glad I made the "jump" back then.
To make the "jump" these days is far more easier.
So get yourself one of those cheap development-boards (starter kits) or build one yourself to save money.
I'll promise you, you won't regret it.
(now I sound like a sailsman).

Ok, I'll stop now and won't bothering you with it again.

/LeMury
Lex Nahumury is offline   Reply With Quote
Old Oct 4, 2004, 03:37 PM   #8
DriverHeaven Newbie
 
Join Date: Dec 2003
Posts: 13
Rep Power: 0
kingme is on a distinguished road

My my...I wasn't even thinking...2 contact is enough for the job...How about aftertouch?

Another thing, I believe there's 'gcc' for most logic chips out there (at least atmel for sure); so if you don't know/don't care about assembly, that's an option.
kingme is offline   Reply With Quote
Old Oct 4, 2004, 06:19 PM   #9
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

[color=white]...How about aftertouch?
[/color]
[color=yellow]All keys share one long pressure sensitive rubberstrip underneat them.[/color]
[color=yellow]That's wy most keyboards are *not* poly-pressure aftertouch.[/color]

>>..'gcc'so if you don't know/don't care about assembly, that's an option.

[color=yellow]Yes it is. However, assembly gives a "direct feel" with the hardware.[/color]
[color=yellow]One knows exactly what's going on (or wrong)[/color]
[color=yellow]Especialy 'technicians' (like TravelRec perhaps) will most likely feel more comfortable with assembly then abstract higher programming languages.[/color]
[color=yellow]Besides that; on 8-bit MC's like pics and atmels, program memory usage is critical. Assembly (machine code) gives the most compact code possible.[/color]

[color=yellow]/LeMury[/color]
Lex Nahumury is offline   Reply With Quote
Old Oct 4, 2004, 10:06 PM Threadstarter Thread Starter   #10
DriverHeaven Newbie
 
Join Date: Mar 2003
Location: Romania
Posts: 14
Rep Power: 0
Lucean is on a distinguished road

Thanks for your replies in a so very short time.

"me must to say":
AT89C2051 is very cheap (about 3$ I guess), but it needs parallel code burning through 8 data pins. I've read that with the new AT89C2051 models you cannot program it directly with the PC parallel port. Search for Peter Averill on google, that's how you can find a programmer scheme for this chip.

But also AT89C2051 is MCS51 compatible!! This means that it could teoretically be replaced by any compatible chip from atmel, intel, siemens (www.infineon.com ), phillips ( www.semiconductors.phillips.com ), dallas ( www.dalsemi.com ) or cypress etc.
Even Atmel has in system programming chips through a serial line, like at89s8252, as LeMury said.

I have some plans for velocity, I even have an idea: I must use a base clock source from a timer, every note should have assigned a byte in memory for velocity (initialised to 0); when a key is pressed (the first contact is released), the velocity is initialised with 127, then decreased (linear or exponential/logarithmic ??) until the second contact. Even note-on_to_note_off midi messages depending on the backward velocity....

Everybody can learn programming microcontrollers in assembler. You may start with PICs from microchip, they have only 35 instructions. It's all about logic. And it gives you a lot of freedom to implement any ideas you have and with the minimum wiring/soldering/tearing. I don't realy recommend using C for microcontrollers, code in assembler is faster. In assembly you can still organize a project with different source files, macros or routines. automatically allocate an addres for a variable. The bad thing is that you must be carefull with what processor register you are using/modifying. But you can make a very lot of optimisation.

And, TravelRec, thanks for your DIY projects too. I think my microphone deserves something better than that squeezy mic-in.
Lucean is offline   Reply With Quote
Old Oct 5, 2004, 07:13 AM   #11
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,710
Rep Power: 0
TravelRec. will become famous soon enoughTravelRec. will become famous soon enough

Okay, guys - I see I have to learn once more - but why not ?

LeMury - If you have some time to give me some start sequences and some hints to begin, then contact me please via electricstart. I´m sure I find the right direction faster then, before I go to get all over the internet. Because I´m absolutely new in programming chips (the CPLDs I program over schematics ), I´m really thankful for every information!

Lucean: your velocity idea sounds cool - I would decrement the counter linearly, the frequency of the base clock seems to be the critical thing. And maybe a decrement delay is useful to get notes with up to 127 velocity. Time for testing .

BTW: if you want to take a look at my finished controller:

www.electricstart.de/pic/midiconl.jpg

Greetings!
TravelRec.
__________________
Always take a look behind.

TravelRec. is offline   Reply With Quote
Old Oct 5, 2004, 07:53 AM   #12
DH Senior Member
 
Join Date: Jan 2003
Location: The Netherlands
Posts: 1,932
Rep Power: 64
Lex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really niceLex Nahumury is just really nice

>>the velocity is initialised with 127, then decreased (linear or exponential/logarithmic ??)
[color=yellow]Increasing or decreasing doesn't realy matter.
As soon as you have determined the elapsed linear time
(which also depends on how fast your key scan routine executes),
you will have to scale/convert it into a usable velocity value anyway.
No MIDI keyboard I've seen actually uses all 127 velocity steps..!
16 at best, while even only 8 steps will do just fine.
(Midi Instruments with more then 8 velo-layers are rare).[/color]

[color=yellow]More critical is your key scan routine's speed..!
Using Interrupts on every key is also not handy.[/color]

[color=yellow](Just some thoughts)[/color]

>>LeMury - If you have some time to give me some start sequences and some hints to begin..
[color=yellow]Ok, but best thing is to get a cheap development board and development tools first.
Atmel has a nice free IDE. Everything runs on your PC.
Atmel docs are great too.
PICs are more expensive and a lot is not as free as with Atmel.
Also I think Atmel is easier to learn the PIC. But that's personal.
I like Atmel more, but PICs are still kinda "Industry standard".
The choise is yours to make and choose wise,
since you will have to learn it's architecture and instruction set.
Switching afterwards is a waiste of invested time and money.[/color]

[color=yellow]/LeMury
[/color]
Lex Nahumury is offline   Reply With Quote
Old Oct 5, 2004, 05:31 PM   #13
Alternative Audioproductions
 
TravelRec.'s Avatar
 
Join Date: Sep 2003
Location: Germany / Sachsen-Anhalt
Posts: 1,710
Rep Power: 0
TravelRec. will become famous soon enoughTravelRec. will become famous soon enough

Okee dokee!

I´ll write a short PM - please check.
__________________
Always take a look behind.

TravelRec. is offline   Reply With Quote
Reply

Thread Tools