I have redo Celestial Piano. It has 2 main apps. PianoC is to create pieces to practise. PianoP is to practise the songs with falling notes like Celestial Piano. They can be downloaded at
Here is the home page for Celestial Piano App. The iOS app is created so that I can learn to play piano without spending years. All that I want is to play Mozart Turkish March, Symphony No 40 and Liszt Liebestraum No 3. It will take me about 5 years to learn to play Mozart Turkish March which is a Grade 5 piano exam piece. And about 8 years to learn Liebestraum which is a concert piano grade. Fortunately, I have got myself a Korg 61 Microkey.
Connect Celestial Piano to your USB keyboard. It gives me a chance to find the right keys to play. And allows unlimited download of midi files and sound font. Sound font is the instrument sound that you can download from the internet. It is totally free. I hope many people will get the joy and serenity out of playing the keyboard.
Please post your comment and suggestion in the forum. Choose forum tab at the top.
1. https://learn.adafruit.com/trinket-audio-player/overview for her library. I am not using Adafruit trinket player .ino code but rather a basic code developed from below link. Adafruit also use an older version of Winbond memory Winbond 25Q80BV.
2. http://www.technoblogy.com/show?QBB Here is where I learn basic to play music from Attiny85
I am going into external Flash memory because using EEPROM is limited in size. 512KB is about the max in 2017 and it is way more expensive. My earlier post on SD player is big in term of physical size. I would want something similar to Attiny85 dip size.
Using Flash library for Attiny85, I choose AdaFruit over SPIFlash library because of AdaFruit very small footprint. AdaFruit sector erase and page write good enough for me. I do have to make changes to AdaFruit library because I am using a different model of Winbond Flash. I am using the following parts
1. Attiny85 Dip.
2. SD Card adapter with soldered on DIP pins
3. Winbond W25Q64FV. It has 8 MB of memory which is enough for my 20 seconds music. A music that I intend to use on her Barney stuffed toy. If you consider 8000 bytes a second, you can play about 15 min of music on W25Q64FV.
4. A led for testing and status. There is not enough pins on Attiny85 for a led with 2 SPI device (W25Q64FV and microSD).
5. A speaker 2 pin. I made one myself from old toy. You can made one from any toy that produce sound.
6. 2 x 1.5 AA batteries. Heavy duty.
1. A transistor N2222 and 100 Ohm resister to amplify the sound.
1. petit_fatfs.h (I have made changes on it, please see my earlier post on Attiny85 SD player
2. Adafruit_TinyFlash.h (I have make changes to work for my newer Winbond flash memory)
This is the minimum components. I have added a led connected to Attiny85 PB0 (DI) pin and to the ground. It is useful to have only 1 led to see the status of the operation or testing. PB0 is also used for the SPI operation. But you can switch it to output for the Led when you need it and turn it back to SPI function. See attached source code below.
The circuit consists of 2 main function. 1) To read music data from microSD card in the SD card adapter and write to the W25Q64FV external Flash memory. 2) To read music data from W25Q64FV and play the speaker.
The red mini breadboard has the external flash memory W25Q64FV and Attiny85.
The mini white breadboard has the SD adapter and speaker with transistor.
In the video, I am playing Barney I Love You which I intend to put in my daughter Barney toy. My work in electronic is driven by my daughter desire. And when I ask her if you want a barney to sing, she said, "I want a Barney also dance with me." Don't think it is possible like reaching for the moon for your daughter. :)
a) When playing, I have changed the Adafruit_TinyFlash.h near the back to
Adafruit_TinyFlash(uint8_t cs = 3); // used to be 3
b) I disconnect the cs line for SD card at PB3. Move the cs line for Flash from PB4 to PB3.
I find EEPROM easier to program than external Flash memory. Flash needs to be erase before you can write on it. EEPROM does not have this requirement. EEPROM has i2C which is only 2 wire wire Flash and SD need 4 wires SPI. Only thing is that EEPROM has very limited memory size at about 125k byte at about $5. Flash has about 8M byte at $1.50. And SD has 8G byte at $7.50. For my purpose on a small toy, I would go for Flash at the time being.
Next I will be making 1 wire LCD. It has been make but I would like to study the 595 ic used in it and the these future projects in my spare time.
Far Future Project:
1. Bluetooth to change toy music from iPhone or android
2. Play midi note to Korg TinyPiano
3. Play midi song in Korg TinyPiano and MicroPiano using Attiny85 and W25Q64FV.
After doing a SD player, I continue to do a EEPROM player. First, I use what I learn in my earlier post to build a SD to EEPROM WRITER using an Attiny85. Then, I turn on PWM to play the music from the EEPROM. So it is possible to use I2C and SPI together in Attiny85. I2C is used to talk to the external microchip memory 24LC256 DIP while SPI is used to talk to the SD card. The trick is to use beginTiny before each write (see source code below). The work is motivated by my 3 years old daughter who want a good Barney song in her Barney stuff toy. Next I will move to Winbond Flash with Attiny85 which I could hold the whole song.
Credit to :
1. http://www.jechavarria.com/2013/06/28/components-i-usually-use-ii-24lc256-i2c-eeprom-memory/ that i learn there need a delay of 5ms for each write. Once i got it, the rest is easy.
2. https://www.reddit.com/r/arduino/comments/19typ5/attiny85_with_external_i2c_eeprom/ that i learn to start with the circuit
Here is the photo:
I am using 2 x 1k ohm resistor to pull up insteads of the 4.7k ohm resister as recommended in the link above.
Writer - https://drive.google.com/open?id=0B1Ozs0W50qCpekFoMm14eDl1bVU
Player - https://drive.google.com/open?id=0B1Ozs0W50qCpWnVwSk5ZZ2tyRWc
I am using TinyWireM.h and make the following changes. As I am writing and reading 64 bytes at one time, I change the buffer to 67 in USI_TWI_Master.h below. And I find I do not need to change the clock speed from 1000.0 kHz to 8Mhz which my Attiny85 is running. It still runs!
#define USI_BUF_SIZE 67// bytes in message buffer
#define SYS_CLK 1000.0// [kHz]Default for ATtiny2313
Chan 2009 player has C and assembly code. I try to redo so that only I need only the Arduino IDE and Attiny85 with arduino or a USB tiny programmer. You need only to upload an .ino file to Attiny85 for it to play music from a SD card.
Credit for internet knowledge that lead to my work:
1. https://harizanov.com/2012/05/toying-with-attiny84-and-sd-card-in-arduino-ide/ for a link to the wrapper.
2. http://gizmosnack.blogspot.sg/2013/04/tutorial-usart-and-avr.html for spi pin connection
3. http://elm-chan.org/works/sd8p/report.html for the sd code
4. https://learn.adafruit.com/adafruit-wave-shield-audio-shield-for-arduino/overview for the double buffering code
2. SD card adapter
1. 200 uF capacitor to remove noise
2. a npn transistor to amplify the sound
3. a 100 ohm resistor
4. a push button
The above components are optional. You can leave them out in the circuit diagram below. It will still work.
Difficulties that I encounter:
1. There is no sound. I was struck at this problem for a day. And I found it is because of a short circuit in DI and CS port of the SD adapter. I remove the bad solder and there is sound.
2. Wrong connection from SD to Attiny85. SD DO pin (second pin from the left) should go to Attiny DI pin (PB0). SD DI pin (third pin from the right) should go to Attiny DO pin (PB1).
Here is the circuit diagram:
Here is the software .ino Please note the wav file is name love.wav in the source. Please get your own wav file by using iTune etc to produce a 8 bit 8000 hz wave file.
Turn your acoustic instrument into MIDI controller.
How it work?
As you play on your guitar, piano or violin, MIDI Enabled converts your playing into MIDI notes instantly and feed them to your DAW or synth apps.
- Use MIDI Enabled with DAW app (Garageband, Logic, Ableton etc).
- Use MIDI Enabled with synth app (bs-16, iProphet, Sunrizer etc).
- Use MIDI Enabled with music learning app (Synthesia etc).
1. For DAW recording and music learning, no extra hardware is required. MIDI Enabled uses your iPhone microphone to listen to your playing. You can see MIDI notes on your DAW.
2. For synth purpose, connect a headset or ear piece to your iPhone. MIDI Enabled uses your iPhone microphone to listen to your playing and send notes to your synth app. You can hear the synth sound in your headset.
MIDI Enabled works with all musical instruments such as Grand piano, guitar, flute, violin etc. Have fun!