Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Generating specific Drum-tones through PMOD on Spartan 6

Not open for further replies.


Newbie level 2
Apr 13, 2015
Reaction score
Trophy points
Activity points
Hi all!

I'm doing a project on a Spartan FPGA board, wherein I need the board to generate specific audio tones at various triggering instances.

How do I get the board to generate those specific tones through the PMOD?

a) Reading it from a previosuly-stored SD card
b) Read it through a text file that has the text version of the tones
c) Any other thing that you can think of!

I'm at a total stand-still since the last few days, and any help would be much appreciated as this is quite urgent!

Thanks in advance for your time and consideration! :)


* Digitized sounds can be stored compressed (.mp3, etc.) or uncompressed (.wav, etc.), they can be stored as MIDI format (.mid). You will need an application which plays such formats.

* Sample real instruments yourself, or obtain such samples. Store them as digitized audio by above methods.

* If you wish to experiment, you can generate waveforms mathematically from software (synthesize), in real time, and send it (amplified) to your speakers.


    Points: 2
    Helpful Answer Positive Rating
Thanx mate! Your insights are really appreciated!
Also, I've stored the desired tones in wav format....I'm confused as to how I should feed it to the Spartan 6 board as input.
Alternatively, I've used the midi drum-tone maker at , and stored the file in the txt format. I'm not able to interpret the resultant is what its contents look like: 0.5,0.8,0.5,0.5,0.7,0.2|414.14|1|40
Hope somebody can help me understand what it signifies!
Thanx again!
Last edited by a moderator:

Sorry, I can't help beyond the basic concepts. No experience with Spartan, FPGA, PMOD, or SD cards.

Your row of numbers do not look the same as digitized audio. From seeing the word 'sequencer', I think they are codes which choose different settings in a drum machine sequencer.

Digitized audio has thousands of numbers per second. A single percussion burst might occupy several kBytes. (A sequencer contains a variety of these digitized sounds.)

If you wish to devise your own application, the general process is like this:
(a) read one number at a time,
(b) feed the number to a digital-to-analog converter (DAC),
(c) the output amplitude is low if the incoming number was low, high if the number was high (simplified explanation),
(d) apply this volt level to an audio amplifier.
(e) read the next number, etc.

By doing this thousands of times a second, it produces waveforms from the speakers.

I've stored the desired tones in wav format

You can read the data, and send the numbers to a DAC. I understand that microcontrollers contain a DAC, therefore you probably only need the software portion. If you cannot find an application that handles this, then you will need to learn how the format works, since it ought to be possible to write your own program. There may be message boards with helpful details for doing this.

I'm not able to interpret the resultant is what its contents look like: 0.5,0.8,0.5,0.5,0.7,0.2|414.14|1|40
It's a simple numerical coding of all parameters set in the sequencer panel (volumes, speed, sequence length, sequence pattern). You can easily figure it out by changing some settings and watch the file result. The code has nothing to do with the specific sound of the individual drums. They can be e.g. implemented by sound samples to be replayed.

Not open for further replies.

Part and Inventory Search

Welcome to