Thread Tools
This thread is privately moderated by Jack Crossfire, who may elect to delete unwanted replies.
Oct 18, 2013, 07:46 PM
Registered User
Jack Crossfire's Avatar
Thread OP

Yamaha CP33 digital output

Getting digital audio from the CP33 was extremely hard & pushed the limit of the available parts. It's still extremely hard to capture 2.8 megabits of loose data in a general purpose microcontroller. Ideally, it would be done with an FPGA. There's no regret in taking 4 years to do it. It couldn't have been done without an oscilloscope.

Once you solder the wrapping wire in the tight confines of the piano & get the bits streaming out USB, it's definitely worth it. The sound from the digital intermediate is amazing.

The CP33 outputs very hissy analog, but internally uses 24 bit 44.1khz. The internal signal is not adjusted based on volume, so the amplifier stage takes an extremely faint signal from the DAC for all volume levels.

Yamaha CP33 digital output (0 min 57 sec)

The digital intermediate contains the entire decay of each note all the way down to 0, with no hissing & barely any quantization noise. There is only a very slight hissing when the envelope is still loud enough to amplify the hissing of the original microphone. The digital output contains harmonics from the original CF-III not audible in the analog output.

It's a shame so many electronic instruments over the last 40 years were professionally recorded from their horrible analog outputs when a pristine digital intermediate was always available, inside the wiring. There was never an easy way to get at the digital intermediate.

There was no optical output or ethernet for instruments. The USB was purely for MIDI. It probably didn't matter, since most people played loud, fast notes, masked behind a band.

The I2S & SPI on the STM32 were no good. It couldn't frame the samples. Fortunately, there were just enough clockcycles to bit bang the data out. 8 unused bits occur after every sample, which last just long enough to handle a highly stripped down USB interface.

It's a matter of working with the opportunities you have. It wouldn't have worked any higher than with 2 channel, 24 bits, 8 padding bits, 44.1khz. If the STM32 couldn't do it, it would have taken a bulky, power sucking, slow booting, crash prone raspberry pi sending data over ethernet.

All the STM32 has enough time for is capturing the audio & sending it over USB. It depends on the USB host not doing anything funny. A more predictable solution is to have a timer interrupt force control of the microcontroller after the 8 padding bits, but the context switching would create an equally unknown latency.

There's probably a way to play the digital audio in realtime with processing, but the latency would be unacceptable. It was already tried with an analog soundcard. Some kind of processing is needed to better convey the dynamic range in headphones. What sounds even in headphones is always horribly uneven on speakers.

All the magic is done in silicon.

Just like the piano technicians of childhood, but now you're the one making it sound good & it's all electronic.

Capturing the internal bits.

There were no more USB connectors in the apartment.
Sign up now
to remove ads between posts

Quick Reply
Thread Tools