2017 was our 20th year online!

Welcome to the Piano World Piano Forums
Over 3 million posts about pianos, digital pianos, and all types of keyboard instruments.
Over 100,000 members from around the world.
Join the World's Largest Community of Piano Lovers (it's free)
It's Fun to Play the Piano ... Please Pass It On!

Shop our online store for music lovers
SEARCH
Piano Forums & Piano World
(ad)
Best of Piano Buyer
 Best of Piano Buyer
(ad)
Faust Harrison Pianos
Faust Harrison 100+ Steinway pianos
(ad)
Wessell Nickel & Gross
PianoForAll
Who's Online Now
41 members (c++, CharlesXX, brdwyguy, Beansparrow, AndrewJCW, Beowulf, Antho123, 9 invisible), 544 guests, and 542 robots.
Key: Admin, Global Mod, Mod
(ad)
Estonia Pianos
Estonia Pianos
Previous Thread
Next Thread
Print Thread
Hop To
Page 12 of 13 1 2 10 11 12 13
Re: DIY real grand action controller?
MacMacMac #2951830 02/26/20 11:43 AM
Joined: Apr 2007
Posts: 6,437
6000 Post Club Member
OP Offline
6000 Post Club Member
Joined: Apr 2007
Posts: 6,437
Originally Posted by MacMacMac
What? You didn't know the engineering part of this before you started? That's even more stunning.
So in the end you got an education, too. Not just a piano.
Originally Posted by CyberGene
... when I started this project I didn't know almost anything about electronics (I've studied it in the university but never paid attention), so basically had to learn Ohm's law, had to read how to design a PCB, what rules there are. I learned the hard way what pull-up resistor is and for that reason had to redesign my PCB.



That's what's great about this project, big part of it for fun because I learned a lot: about pianos, about working with wood (I never used a chisel before, glueing wood, cutting it, filing it...), about working with aluminum profiles (I have only assembled IKEA furniture and drilled holes in the wall with a drill to secure the furniture, that's the most "advance" handymen work I've done in my life). Well, as a kid I used to solder some radio kits, so I "could" solder but this didn't help much since SMD soldering turned out to be different laugh Even the programming was new to me, since I'm used to Java where I can do anything and I'm not penalized too much. Here, on the controller I realized that even an if-statement takes precious CPU counts laugh Forget about calculating a logarithmic MIDI velocity value on the fly! I pre-calculate it and store in a huge array, so that I produce corresponding MIDI value directly from the duration in microseconds, rather than doing math stuff. This is definitely the most fun project I've done in my life, the one that combines most varying subjects to learn and at the same time producing a result: a MIDI-controller smile What is not to like. Only my wife is not happy, since I decided to start this project almost at the same time my daughter was born, so it's kind of a midlife crisis, so to speak, but at least she admitted she prefers seeing me with a soldering iron in the bedroom than drinking with "friends" laugh


My YouTube, My Soundcloud
Currently: Yamaha N1X, DIY hybrid controller -> Garritan CFX
Previously: NU1X, ES7, MP6, CA63, RD-700SX, CDP-100, FP-5, P90, SP-200
(ad)
Sweetwater Gifts That Rock
Re: DIY real grand action controller?
CyberGene #2951848 02/26/20 01:04 PM
Joined: Jul 2009
Posts: 392
P
Full Member
Online Content
Full Member
P
Joined: Jul 2009
Posts: 392
well done!

Re: DIY real grand action controller?
CyberGene #2951853 02/26/20 01:25 PM
Joined: Sep 2009
Posts: 12,968
Yikes! 10000 Post Club Member
Offline
Yikes! 10000 Post Club Member
Joined: Sep 2009
Posts: 12,968
There was a time long ago (when manufacturing was still a thing here) that I would have hired you in a second. And you'd have had a lot of fun.

But these days we don't make things anymore. The Chinese make everything.
Originally Posted by CyberGene
Originally Posted by ]What? You didn't know the engineering part of this before you started? That's even more stunning.
So in the end you got an education, too. Not just a piano.[quote=CyberGene
... when I started this project I didn't know almost anything about electronics (I've studied it in the university but never paid attention), so basically had to learn Ohm's law, had to read how to design a PCB, what rules there are. I learned the hard way what pull-up resistor is and for that reason had to redesign my PCB.
That's what's great about this project, big part of it for fun because I learned a lot: about pianos, about working with wood (I never used a chisel before, glueing wood, cutting it, filing it...), about working with aluminum profiles (I have only assembled IKEA furniture and drilled holes in the wall with a drill to secure the furniture, that's the most "advance" handymen work I've done in my life). Well, as a kid I used to solder some radio kits, so I "could" solder but this didn't help much since SMD soldering turned out to be different laugh Even the programming was new to me, since I'm used to Java where I can do anything and I'm not penalized too much. Here, on the controller I realized that even an if-statement takes precious CPU counts laugh Forget about calculating a logarithmic MIDI velocity value on the fly! I pre-calculate it and store in a huge array, so that I produce corresponding MIDI value directly from the duration in microseconds, rather than doing math stuff. This is definitely the most fun project I've done in my life, the one that combines most varying subjects to learn and at the same time producing a result: a MIDI-controller smile What is not to like. Only my wife is not happy, since I decided to start this project almost at the same time my daughter was born, so it's kind of a midlife crisis, so to speak, but at least she admitted she prefers seeing me with a soldering iron in the bedroom than drinking with "friends" laugh[/quote]

Re: DIY real grand action controller?
CyberGene #2951859 02/26/20 01:38 PM
Joined: Jan 2017
Posts: 1,465
Gold Subscriber
1000 Post Club Member
Offline
Gold Subscriber
1000 Post Club Member
Joined: Jan 2017
Posts: 1,465
Great progress! It's really starting to come together and be "real." Have you considered adding "blinky lights" for the key presses, maybe drive some segmented LED meters? laugh Back when I was doing more home electronics projects, I'd always add blinky lights just because I could and it always made people appreciate the project!


Now learning: Chopin C# minor Nocturne (posth), Mozart Sonata in C K. 545, R. Schumann Fantasy Dance, Joplin The Chrysanthemum
Instruments: Yamaha N1X, Kawai ES110, Roland GO:PIANO, Piano de Voyage
Re: DIY real grand action controller?
Chrispy #2951861 02/26/20 01:52 PM
Joined: Apr 2007
Posts: 6,437
6000 Post Club Member
OP Offline
6000 Post Club Member
Joined: Apr 2007
Posts: 6,437
Originally Posted by Chrispy
Great progress! It's really starting to come together and be "real." Have you considered adding "blinky lights" for the key presses, maybe drive some segmented LED meters? laugh Back when I was doing more home electronics projects, I'd always add blinky lights just because I could and it always made people appreciate the project!

Haha, as a matter of fact I programmed the LED on the controller board to blink on each key press but I disabled that for the video, thinking it’s cheesy 🥳


My YouTube, My Soundcloud
Currently: Yamaha N1X, DIY hybrid controller -> Garritan CFX
Previously: NU1X, ES7, MP6, CA63, RD-700SX, CDP-100, FP-5, P90, SP-200
Re: DIY real grand action controller?
CyberGene #2951893 02/26/20 03:39 PM
Joined: Apr 2019
Posts: 990
A
500 Post Club Member
Offline
500 Post Club Member
A
Joined: Apr 2019
Posts: 990
Just wondering if you found the delay to be 1ms or so...? Answering it may solve some problems in this forum apparently.

Last edited by Abdol; 02/26/20 03:40 PM.

Kawai MP7SE, Yamaha MOTF XF6, Yamaha WX5, Yamaha Pacifica 112v
Re: DIY real grand action controller?
Abdol #2952176 02/27/20 10:09 AM
Joined: Jun 2013
Posts: 374
M
Full Member
Offline
Full Member
M
Joined: Jun 2013
Posts: 374
Originally Posted by Abdol
Just wondering if you found the delay to be 1ms or so...? Answering it may solve some problems in this forum apparently.

In the past, I did some tests with a Teensy 3.2 (slower microcontroller) and Hall sensors with little magnets and there was not significant difference between its MIDI over USB output and my Kawai CL35 MIDI output, anyway I was using just five notes, but the Teensy USB MIDI function uses (I don't remember exactly) a few microseconds, so if code is wisely written there should be not appreciable latency. Moreover, I used analog inputs, which are much slower than digital, as CyberGene uses. Who knows, with the new Teensy 4 perhaps you could use directly analog signals.


Pianoteq / Kawai CL 35 & MP11 / Old 1920's Upright Zimmerman
Re: DIY real grand action controller?
Marcos Daniel #2952191 02/27/20 10:40 AM
Joined: Apr 2007
Posts: 6,437
6000 Post Club Member
OP Offline
6000 Post Club Member
Joined: Apr 2007
Posts: 6,437
Originally Posted by Marcos Daniel
Originally Posted by Abdol
Just wondering if you found the delay to be 1ms or so...? Answering it may solve some problems in this forum apparently.

In the past, I did some tests with a Teensy 3.2 (slower microcontroller) and Hall sensors with little magnets and there was not significant difference between its MIDI over USB output and my Kawai CL35 MIDI output, anyway I was using just five notes, but the Teensy USB MIDI function uses (I don't remember exactly) a few microseconds, so if code is wisely written there should be not appreciable latency. Moreover, I used analog inputs, which are much slower than digital, as CyberGene uses. Who knows, with the new Teensy 4 perhaps you could use directly analog signals.


Actually, the things are a bit complicated when using USB MIDI, which is what I use with the Teensy. The USB topology consists of a host and slave devices. The computer on which the piano VST runs is the host and it's this computer, t.e. the host, that pings the slaves (BTW, I learned some people are offended by that terminology and there are some movements to not use the word "slave" in computer terminology 🤦🏻‍♂️). It seems that the USB spec (or maybe the USB MIDI in particular) says the host will poll the slave for new messages every 1ms. Which basically means that the MIDI latency over USB is 1ms. On the other hand, according to the specification, some devices support grouping of multiple MIDI events into one single USB data chunk and the Teensy MIDI implementation supports for that. Which means that I can play a chord and create a big USB data chunk that will wrap multiple MIDI events, and then the host can unwrap them at once. I'm not sure how supported that is, but it means that with proper implementation at both device and host level, MIDI over USB might be faster than the limited serial rate of DIN MIDI.

Last edited by CyberGene; 02/27/20 10:41 AM.

My YouTube, My Soundcloud
Currently: Yamaha N1X, DIY hybrid controller -> Garritan CFX
Previously: NU1X, ES7, MP6, CA63, RD-700SX, CDP-100, FP-5, P90, SP-200
Re: DIY real grand action controller?
CyberGene #2952359 02/27/20 07:31 PM
Joined: Apr 2007
Posts: 6,437
6000 Post Club Member
OP Offline
6000 Post Club Member
Joined: Apr 2007
Posts: 6,437
As I said, creating the long IDC34 cable turned out to be tricky. Usually the connector is clamped with a vice but apparently that applies to only the edge connector. I tried also making the intermediate connectors in the middle of the cable and it was close to impossible since the cable goes in the way of the vice jaws screw and needs to be twisted... Well, I gave up and instead created my own improvised tool:
[Linked Image]

Well, it worked pretty well, so after an hour and a half I had one long cable with 18 connectors:
[Linked Image]

Looks pretty nice, huh?

BTW, using imgur for image hosting now. Thanks, Mac!


My YouTube, My Soundcloud
Currently: Yamaha N1X, DIY hybrid controller -> Garritan CFX
Previously: NU1X, ES7, MP6, CA63, RD-700SX, CDP-100, FP-5, P90, SP-200
Re: DIY real grand action controller?
CyberGene #2952362 02/27/20 07:45 PM
Joined: Apr 2007
Posts: 6,437
6000 Post Club Member
OP Offline
6000 Post Club Member
Joined: Apr 2007
Posts: 6,437
Remaining stuff:
- As I said, I screwed up one of the PCB-s and have to create a new one. (I already hate soldering! 😢)
- Wire the power across all the boards
- Wire the ES7 single pedal (continuous) and test it with the ADC lib, calibrate values (fortunately I created a detailed map of pedal depth to MIDI CC values from the ES7 before selling it)
- Finish the fine regulation of half of the white keys and most of the black ones (escapement, aftertouch, hammer drop, backcheck, double-repetition spring)
- Test the entire piano with some real music

Possible problems:
- I transfer power supply from the controller board sequentially through all 17 modules. There might be too high voltage drop at the end, although calculations show it should be enough. If not enough, will split it and power in groups, possibly from multiple power adapters
- Currently I use an iPhone charger since it has 5mV p-p ripple and with that everything works great, however this charger can supply only 1A and I need 2A. Maybe I will split the power and use two iPhone chargers. Or I can test again with the iPad charger which is 2A but has 20mV ripple and that could not be great (although the comparators have hysteresis, so shouldn’t be a big problem but still needs to be checked).
- I’ve tested with simple chords and single notes mostly. Mayne the scanning speed will choke with huge and heavy playing across the keyboard, especially with very heavy clusters.


My YouTube, My Soundcloud
Currently: Yamaha N1X, DIY hybrid controller -> Garritan CFX
Previously: NU1X, ES7, MP6, CA63, RD-700SX, CDP-100, FP-5, P90, SP-200
Re: DIY real grand action controller?
CyberGene #2952378 02/27/20 08:54 PM
Joined: May 2007
Posts: 1,707
M
1000 Post Club Member
Offline
1000 Post Club Member
M
Joined: May 2007
Posts: 1,707
An amazing project, well done. I've really enjoyed watching your progress on this.


Yamaha P90, Kawai GL-10
Re: DIY real grand action controller?
CyberGene #2954770 03/06/20 10:50 AM
Joined: Apr 2007
Posts: 6,437
6000 Post Club Member
OP Offline
6000 Post Club Member
Joined: Apr 2007
Posts: 6,437
So, here's my latest demo video in this thread after which I will start a dedicated one. I think things are pretty finished right now and thought using this video as the first more serious presentation but since I didn't play anything flashy, let this stay here.

I've spent the entire night with almost no sleep to finalize everything. In the previous days I was on a holiday, then I had some family time, so couldn't work more but finally managed to go through the regulation finalization. I can still improve the back-checks but it's already good now. I also soldered a new note module since as I mentioned I screwed up one of the existing ones. Also I lost half a day debugging a weird problem thinking that two of the PCB-s might be faulty ultimately realizing that I have somehow shorted two of the signal lines of the IDC-cable. Fortunately my design is made to support 88-keys (hence an additional note module), so I could reuse a free signal line and didn't have to make the cable again. The Teensy controller PCB was made many months ago in a hurry, so I may have to redesign it, so that cables and sockets are on the correct side but that's minor.

Calibrating the keyboard is a tedious process that takes more than an hour. The trimpots have 25-turns end to end and so setting the predefined distances take time, as well as a bit of dexterity, since I hold hammers at the rail, or with various spacers, having to observe the LED of my calibration subroutine. Once done, they I had to go through all of them and fine tune. It's like voicing a real piano since I can very precisely set where the distances are measured across the hammer travel, also listening to the result and deciding how loud the note will be. It's both an exhausting process but also a very calming one since I am in complete control of every note and feel like a piano technician smile I've spent days thinking on how to optimize the code to be ultra-efficient and as a result the scanning is so quick through the entire keyboard that it allows for the velocity measurement to be performed after the escapement and still be very precise. As a result I can also play easily off the jack, unlike my Yamaha N1X (and unlike NV10 AFAIK).

It turned out if I just send the measured velocity, the higher keys will gradually sound unnaturally louder. So, although it called MIDI velocity, it's rather interpreted as hammer momentum, because the lighter hammers of the high notes can be more easily accelerated to higher velocities. To compensate for that audible discrepancies, I had to create "stretching" of the internal velocity map and since it's an optimized code, I had to multiply it for all the groups and it took almost the entire RAM of the controller smile But it's now SO BALANCED! With a bit more fine-tuning it can kind of match the N1X. The only difference is the 120 year old keyboard and piano action is still rather cr*ppy, despite all my efforts to restore and regulate it, especially compared to the ultra-smooth and brand new Yamaha action. But I'm sure if I have a good keyboard and action, I can easily match N1X in terms of feel and dynamics. I must admit I'm pleasantly surprised how well the entire thing reacts. I didn't expect it to be so good, TBH.

So, the only remaining thing now is the sustain pedal. It's a super easy task but I simply couldn't find more time and energy to do so, I'm totally exhausted frown Maybe tomorrow. I desperately need to sleep.

And now, the video. Apologies for the lame music and playing but I was already at my limits.


BTW, I will need a dedicated power supply for sure. It works great with the iPad charger but then I changed the USB cable to a longer one and had to recalibrate the entire keyboard because of the changed voltage drop... Since I rely on very precise voltage comparison, any little change immediately has a result. Which means I cannot rely on external power but should use an internal one, so that a change of power cables won't affect calibration smile It's a small thing but yeah, it's a disadvantage of this particular design.

Last edited by CyberGene; 03/06/20 10:54 AM.

My YouTube, My Soundcloud
Currently: Yamaha N1X, DIY hybrid controller -> Garritan CFX
Previously: NU1X, ES7, MP6, CA63, RD-700SX, CDP-100, FP-5, P90, SP-200
Re: DIY real grand action controller?
CyberGene #2954781 03/06/20 11:16 AM
Joined: Jan 2016
Posts: 2,691
2000 Post Club Member
Offline
2000 Post Club Member
Joined: Jan 2016
Posts: 2,691
What a video! The demo and DIY project, are fantastic CyberGene.

Have you thought up ideas to simplify and/or automate the trimpots and their calibration?

Interesting note on the iPad charger and cable. Mains voltage in my house sometimes swings +/-15 volts during the day, so that is a factor for small wall warts. I still like the idea of cheap old lab power supplies for now; just shut them down when not in use as they are not too efficient. Batteries can provide ultra low noise power but they are a pain to recharge, work down in voltage, and are expensive (well junk from dubious suppliers can be cheap), and need periodic replacement.

Re: DIY real grand action controller?
CyberGene #2954892 03/06/20 03:45 PM
Joined: Aug 2017
Posts: 1,079
E
1000 Post Club Member
Online Content
1000 Post Club Member
E
Joined: Aug 2017
Posts: 1,079
Beautiful!!! It sounds and looks great.

About the comparators, a better approach would be using a separate reference for the pots. Relying on the power supply voltage is not adviseable for a bunch of reasons.
There are some 4.096 ICs that work with 5V in the input. Not sure if your design would support such a change easily but, for a Mark II version of the electronics, you may consider it.


Kawai ES8, Roland RD2000, Yamaha AG06 mixer, Presonus Eris E5 monitors, Sennheiser HD598SR phones.
Re: DIY real grand action controller?
CyberGene #2954895 03/06/20 03:59 PM
Joined: Apr 2019
Posts: 117
A
Full Member
Offline
Full Member
A
Joined: Apr 2019
Posts: 117
WHOW Cybergene this is amazing! Looks really great!!!

Re: DIY real grand action controller?
CyberGene #2954905 03/06/20 04:49 PM
Joined: Feb 2019
Posts: 2,623
L
2000 Post Club Member
Offline
2000 Post Club Member
L
Joined: Feb 2019
Posts: 2,623
Super cool. How are you measuring velocity? Do you have flags on the hammer shanks like on a Disklavier?Are there flags under the keys?

Re: DIY real grand action controller?
CyberGene #2954959 03/06/20 07:47 PM
Joined: Jan 2017
Posts: 1,465
Gold Subscriber
1000 Post Club Member
Offline
Gold Subscriber
1000 Post Club Member
Joined: Jan 2017
Posts: 1,465
This has been such a fun project to watch, and thanks for keeping us all in the loop to follow your progress. Congratulations on getting it all working, that's a really huge achievement in my opinion!

Originally Posted by CyberGene

BTW, I will need a dedicated power supply for sure. It works great with the iPad charger but then I changed the USB cable to a longer one and had to recalibrate the entire keyboard because of the changed voltage drop... Since I rely on very precise voltage comparison, any little change immediately has a result. Which means I cannot rely on external power but should use an internal one, so that a change of power cables won't affect calibration smile It's a small thing but yeah, it's a disadvantage of this particular design.


Why not just keep using the iPod power supply with an extension cord so you can keep the same length USB cable? Or am I missing something?


Now learning: Chopin C# minor Nocturne (posth), Mozart Sonata in C K. 545, R. Schumann Fantasy Dance, Joplin The Chrysanthemum
Instruments: Yamaha N1X, Kawai ES110, Roland GO:PIANO, Piano de Voyage
Re: DIY real grand action controller?
Chrispy #2954964 03/06/20 08:00 PM
Joined: Jan 2016
Posts: 2,691
2000 Post Club Member
Offline
2000 Post Club Member
Joined: Jan 2016
Posts: 2,691
Originally Posted by Chrispy
Why not just keep using the iPod power supply with an extension cord so you can keep the same length USB cable?
good suggestion!

Re: DIY real grand action controller?
CyberGene #2954966 03/06/20 08:05 PM
Joined: Jun 2013
Posts: 3,548
P
3000 Post Club Member
Online Content
3000 Post Club Member
P
Joined: Jun 2013
Posts: 3,548
Truly impressive; congrats, CG!

Re: DIY real grand action controller?
CyberGene #2954985 03/06/20 09:59 PM
Joined: Jul 2009
Posts: 392
P
Full Member
Online Content
Full Member
P
Joined: Jul 2009
Posts: 392
how did you record it? mic, direct or both?

Page 12 of 13 1 2 10 11 12 13

Moderated by  Piano World 

Link Copied to Clipboard
What's Hot!!
News from the Piano World
Our January 2021 Free Newsletter for piano lovers is here now...
---------------------
NEW! Sell Your Piano on our world famous Piano Forums!
---------------------
Posting Pictures on the Forums
-------------------
Forums RULES & HELP
-------------------
ADVERTISE on Piano World
(ad)
Pianoteq
Steinway Spiro Layering
(ad)
PianoDisc

PianoDisc
(ad)
Piano Life Saver - Dampp Chaser
Dampp Chaser Piano Life Saver
(ad)
Mason & Hamlin Pianos
New Topics - Multiple Forums
Replacement for Kawai MP11?
by Dan Clark - 01/22/21 09:04 PM
How to sound like Scriabin
by pianoloverus - 01/22/21 08:10 PM
Most realistic Piano VST?
by Rickdiculous - 01/22/21 06:13 PM
An exemplary piano quiz
by Withindale - 01/22/21 05:57 PM
First DP -- PC Connectivity Question
by Mikex3 - 01/22/21 03:09 PM
Download Sheet Music
Virtual Sheet Music - Classical Sheet Music Downloads
Forum Statistics
Forums42
Topics204,471
Posts3,050,310
Members100,180
Most Online15,252
Mar 21st, 2010
Please Support Our Advertisers


Faust Harrison 100+ Steinways

Dampp Chaser Piano Life Saver

 Best of Piano Buyer

PianoTeq Bechstein
Visit our online store for gifts for music lovers

Virtual Sheet Music - Classical Sheet Music Downloads



 
Help keep the forums up and running with a donation, any amount is appreciated!
Or by becoming a Subscribing member! Thank-you.
Donate   Subscribe
 
Our Piano Related Classified Ads
| Dealers | Tuners | Lessons | Movers | Restorations | Pianos For Sale | Sell Your Piano |

Advertise on Piano World
| Subscribe | Piano World | PianoSupplies.com | Advertise on Piano World |
| |Contact | Privacy | Legal | About Us | Site Map | Free Newsletter |


© copyright 1997 - 2021 Piano World ® all rights reserved
No part of this site may be reproduced without prior written permission
Powered by UBB.threads™ PHP Forum Software 7.7.4