2022 our 25th 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!

SEARCH
Piano Forums & Piano World
(ad)
Who's Online Now
56 members (Animisha, Burkhard, aphexdisklavier, benkeys, 1200s, akse0435, AlkansBookcase, Cheeto717, 12 invisible), 1,880 guests, and 264 robots.
Key: Admin, Global Mod, Mod
Previous Thread
Next Thread
Print Thread
Hop To
Page 12 of 13 1 2 10 11 12 13
Joined: Apr 2007
Posts: 7,268
7000 Post Club Member
OP Offline
7000 Post Club Member
Joined: Apr 2007
Posts: 7,268
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


I'm not around. You can find me here
My YouTube, My Soundcloud
Yamaha N1X, Cybrid DIY hybrid controller
Joined: Jul 2009
Posts: 508
P
500 Post Club Member
Offline
500 Post Club Member
P
Joined: Jul 2009
Posts: 508
well done!

Joined: Sep 2009
Posts: 14,439
Yikes! 10000 Post Club Member
Offline
Yikes! 10000 Post Club Member
Joined: Sep 2009
Posts: 14,439
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]

Joined: Jan 2017
Posts: 1,488
Gold Subscriber
1000 Post Club Member
Offline
Gold Subscriber
1000 Post Club Member
Joined: Jan 2017
Posts: 1,488
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: Debussy Clar de Lune, Mozart Sonata in C K. 545, Joplin The Chrysanthemum
Instruments: Yamaha N1X, Roland GO:PIANO, Piano de Voyage
Joined: Apr 2007
Posts: 7,268
7000 Post Club Member
OP Offline
7000 Post Club Member
Joined: Apr 2007
Posts: 7,268
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 🥳


I'm not around. You can find me here
My YouTube, My Soundcloud
Yamaha N1X, Cybrid DIY hybrid controller
Joined: Apr 2019
Posts: 2,067
A
2000 Post Club Member
Offline
2000 Post Club Member
A
Joined: Apr 2019
Posts: 2,067
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 04:40 PM.
Joined: Jun 2013
Posts: 383
M
Full Member
Offline
Full Member
M
Joined: Jun 2013
Posts: 383
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
Joined: Apr 2007
Posts: 7,268
7000 Post Club Member
OP Offline
7000 Post Club Member
Joined: Apr 2007
Posts: 7,268
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 11:41 AM.

I'm not around. You can find me here
My YouTube, My Soundcloud
Yamaha N1X, Cybrid DIY hybrid controller
Joined: Apr 2007
Posts: 7,268
7000 Post Club Member
OP Offline
7000 Post Club Member
Joined: Apr 2007
Posts: 7,268
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!


I'm not around. You can find me here
My YouTube, My Soundcloud
Yamaha N1X, Cybrid DIY hybrid controller
Joined: Apr 2007
Posts: 7,268
7000 Post Club Member
OP Offline
7000 Post Club Member
Joined: Apr 2007
Posts: 7,268
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.


I'm not around. You can find me here
My YouTube, My Soundcloud
Yamaha N1X, Cybrid DIY hybrid controller
Joined: May 2007
Posts: 2,215
M
2000 Post Club Member
Offline
2000 Post Club Member
M
Joined: May 2007
Posts: 2,215
An amazing project, well done. I've really enjoyed watching your progress on this.


Yamaha P90, Kawai GL-10
Joined: Apr 2007
Posts: 7,268
7000 Post Club Member
OP Offline
7000 Post Club Member
Joined: Apr 2007
Posts: 7,268
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 11:54 AM.

I'm not around. You can find me here
My YouTube, My Soundcloud
Yamaha N1X, Cybrid DIY hybrid controller
Joined: Jan 2016
Posts: 3,375
3000 Post Club Member
Offline
3000 Post Club Member
Joined: Jan 2016
Posts: 3,375
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.

Joined: Aug 2017
Posts: 1,756
E
1000 Post Club Member
Offline
1000 Post Club Member
E
Joined: Aug 2017
Posts: 1,756
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.
Joined: Apr 2019
Posts: 217
A
Full Member
Online Happy
Full Member
A
Joined: Apr 2019
Posts: 217
WHOW Cybergene this is amazing! Looks really great!!!


Kawai VPC1, Nektar Impact GXP61+88
Past: "Fazer" acoustic piano, Yamaha P120, Roland JV90, M-audio and Novation Midi Keyboards
other instruments: electric and acoustic violins, Wal custom 4 string e-bass, Sire V7 fretless e-bass, Musser vibraphone
Software: Logic Pro
Joined: Feb 2019
Posts: 3,297
L
3000 Post Club Member
Offline
3000 Post Club Member
L
Joined: Feb 2019
Posts: 3,297
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?

Joined: Jan 2017
Posts: 1,488
Gold Subscriber
1000 Post Club Member
Offline
Gold Subscriber
1000 Post Club Member
Joined: Jan 2017
Posts: 1,488
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: Debussy Clar de Lune, Mozart Sonata in C K. 545, Joplin The Chrysanthemum
Instruments: Yamaha N1X, Roland GO:PIANO, Piano de Voyage
Joined: Jan 2016
Posts: 3,375
3000 Post Club Member
Offline
3000 Post Club Member
Joined: Jan 2016
Posts: 3,375
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!

Joined: Jun 2013
Posts: 5,751
P
5000 Post Club Member
Offline
5000 Post Club Member
P
Joined: Jun 2013
Posts: 5,751
Truly impressive; congrats, CG!

Joined: Jul 2009
Posts: 508
P
500 Post Club Member
Offline
500 Post Club Member
P
Joined: Jul 2009
Posts: 508
how did you record it? mic, direct or both?

Page 12 of 13 1 2 10 11 12 13

Link Copied to Clipboard
What's Hot!!
Piano World Has Been Sold!
--------------------
Forums RULES, Terms of Service & HELP
(updated 06/06/2022)
---------------------
Posting Pictures on the Forums
(ad)
(ad)
New Topics - Multiple Forums
Estonia 1990
by Iberia - 04/16/24 11:01 AM
Very Cheap Piano?
by Tweedpipe - 04/16/24 10:13 AM
Practical Meaning of SMP
by rneedle - 04/16/24 09:57 AM
Country style lessons
by Stephen_James - 04/16/24 06:04 AM
How Much to Sell For?
by TexasMom1 - 04/15/24 10:23 PM
Forum Statistics
Forums43
Topics223,390
Posts3,349,248
Members111,632
Most Online15,252
Mar 21st, 2010

Our Piano Related Classified Ads
| Dealers | Tuners | Lessons | Movers | Restorations |

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


Copyright © VerticalScope Inc. All Rights Reserved.
No part of this site may be reproduced without prior written permission
Powered by UBB.threads™ PHP Forum Software 7.7.5
When you purchase through links on our site, we may earn an affiliate commission, which supports our community.