how to générate tone like piano note with wavedac8 ?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi every one,

I'm a french student in électronic and i have to do project for the class and i ll evaluate on it.

I'd like to create mini synthetizer .

I would like to know how could i generate tone like piano notes with the wave dac8 component?

I can't find the fonctions to set my values on the main C

I already set my frequency value for my DO note with the wavedac8

Thanks for your answer;

Best regards Kevin

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Kevin,

there is old Application Note by Dave Van Ess, which is no longer available on Cypress site. It describes simple piano simulation using PSoC1. You have to re-write the code, as it is not directly compatible with PSoC5.

I suggest not to use WaveDAC at this moment, but to do it simply in code (see example AN2024). WaveDAC is more useful for continuous generation of the Sine, which is not a note (a note is amplitude modulated sine, having rise, decay, sustain and fall).

Also take a look on Theremin project by Tom Minnich

Theremin made with Cypress PSoC - Hackster.io

It runs on PSoC4, so must be closely compatible with PSoC5. It produces continuous sound though (like WaveDAC), but introduces DDS concept of tone tuning.

View solution in original post

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

The note A is 440Hz. 12 notes make an octave, A' has 880Hz

Next tone from A is A#(or Bb) with a frequency of 440 * 12th root of 2. So you can build or calculate the required frequencies.

Bob

0 Likes
Anonymous
Not applicable

Thanks for your answer,

I had already set up all my frequency with an external clock and using my wavedac but still don't know how to program it

thank a lot

0 Likes

"I had already set up all my frequency with an external clock"

The WaveDac needs a table with the values to output. So you need to generate a table for each tone. The API WaveDAC8_Wave1Setup(uint8 *WavePtr, uint16 NumberOfSamples) is used to introduce the table. When you cannot provide a table for each tone in flash you will need to compute it in sram.

Bob

0 Likes
lock attach
Attachments are accessible only for community members.
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

Kevin,

there is old Application Note by Dave Van Ess, which is no longer available on Cypress site. It describes simple piano simulation using PSoC1. You have to re-write the code, as it is not directly compatible with PSoC5.

I suggest not to use WaveDAC at this moment, but to do it simply in code (see example AN2024). WaveDAC is more useful for continuous generation of the Sine, which is not a note (a note is amplitude modulated sine, having rise, decay, sustain and fall).

Also take a look on Theremin project by Tom Minnich

Theremin made with Cypress PSoC - Hackster.io

It runs on PSoC4, so must be closely compatible with PSoC5. It produces continuous sound though (like WaveDAC), but introduces DDS concept of tone tuning.

0 Likes

I posted a small piano demo here: Polyphonic piano basic demo using KIT-059 and MIDI Keyboard

It can help you to start.

odissey1

0 Likes