- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've created a project based on some forum discussions regarding generating a polyphonic system.
Here is a project that can generate and mix up to 8 musical notes simultaneously.
It uses only one 8-bit VDAC and op-amp. It does however use 9 DMA channels with 9 TDs.
Although the project can invoke specific musical notes (A0, C#1, E1, A1, C#2, E2, A2, C#3) by UART command It can generate many musical notes from C0 (16.35 Hz) to C9 (15804.26 Hz) . It can also generate frequencies in-between the musical notes if you want.
The project uses a UART @ 115.2Kbps 8N1 to signal which notes to turn ON or OFF.
- '1' - note 1 ON at 110 Hz (A2)
- '!' - note 1 OFF.
- '2' - note 2 ON at 138.591 Hz (C#3)
- '@' - note 2 OFF
- '3' - note 3 ON at 164.814 Hz (E3)
- '#' - note 3 OFF.
- '4' - note 4 ON at 220.0 Hz (A3)
- '$' - note 4 OFF
- ... I hope you can see the pattern here ...
- 'O' - ALL notes OFF.
If all notes are turned on you should get A major chord across 2 2/3 octaves.
There is API calls where you can enter your own note frequencies and will try to scale them as best as possible.
The UART can be replaced with switches if you want.
The code may not be elegant (or bug free). However it is a proof of concept.
This project is a starting point for your projects. Enjoy!
Requirements:
- PSoC5LP
- CY8CKIT-059.
This project can be adapted to other kits and PSoCs such as the PSoC3.
Here are some scope plots of the output.
Fig 1 - 220Hz
Fig 2 - 110Hz + 220Hz
Fig 3 - FFT of 110Hz + 220Hz + 440Hz (500Hz span)
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Len,
Thanks for sharing the example project with the community.
Best Regards,
Vasanth