Wave Table Synthesizer(Occilator only). I will make Envelope Generator and MML for play music.

Dependencies:   mbed

Project: Synthesizer. It is using embed to Chip Tune Synthesizer for NXP LPC1768.

At First

Prepare an amplifier with volume wheel. The amplifier wire at pin1 to pin18(D/A converter) from IC Clip or Breedboard.

Play

Check out this project and deploy your mbed. And then push the reset key.

You hear a sound from amplifier.

Modify

First step, you can see main.cpp. This source file plays an occilator with "wait()". Modify frequency at

#define ADD 0x2000000

on the top of source.

Occilator select 7 waveforms.

  • OCC_NONE,
  • OCC_SQUARE,
  • OCC_SINE,
  • OCC_SAW,
  • OCC_WT,
  • OCC_NOISE,
  • OCC_TRIANGLE,

WT means WaveTable Synthesizer.Use "setWave()" function at first.Wavetable will copy in instance.

Change there for waveform.

    gOccilator[0]=Occilator::getInstance(OCC_SAW,INTERRUPT_TIME_US);

INTERRUPT_TIME_US depends sampling rate. Don't change.

Total volume of D/A converter is setting this place.

        gOccilator[0]->setVolume(volume);

By the way, this sample output 0 to 1V(not3.3V) for deforming distortion.

ToDo

  • Envelope generator and LFO(with delay)
  • MML(Music Macro Language)
  • Sample Song(I will make a Japanese Anime music,perhaps)

Project Goal Date

I will make for Comic Market 90(2016.Aug. in Tokyo).And these thing will be written in a Doujinshi.

Committer:
117Florian
Date:
Wed Feb 10 10:55:08 2016 +0000
Revision:
10:40bed7449a81
Parent:
8:dd2da7c0c4c7
Adjust volume saw.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
117Florian 8:dd2da7c0c4c7 1 #include "Noise.h"
117Florian 8:dd2da7c0c4c7 2
117Florian 8:dd2da7c0c4c7 3 Noise::Noise(long interrupt_us):WT(interrupt_us)
117Florian 8:dd2da7c0c4c7 4 {
117Florian 8:dd2da7c0c4c7 5 unsigned long src[]=
117Florian 8:dd2da7c0c4c7 6 {
117Florian 8:dd2da7c0c4c7 7 0xCECE,
117Florian 8:dd2da7c0c4c7 8 0x331,
117Florian 8:dd2da7c0c4c7 9 0xB3E8,
117Florian 8:dd2da7c0c4c7 10 0x642A,
117Florian 8:dd2da7c0c4c7 11 0xFEC6,
117Florian 8:dd2da7c0c4c7 12 0x1617,
117Florian 8:dd2da7c0c4c7 13 0x3DDE,
117Florian 8:dd2da7c0c4c7 14 0xD91,
117Florian 8:dd2da7c0c4c7 15 0x6BB,
117Florian 8:dd2da7c0c4c7 16 0xEA83,
117Florian 8:dd2da7c0c4c7 17 0x9D85,
117Florian 8:dd2da7c0c4c7 18 0x6FD,
117Florian 8:dd2da7c0c4c7 19 0xCDCC,
117Florian 8:dd2da7c0c4c7 20 0xE686,
117Florian 8:dd2da7c0c4c7 21 0x80A2,
117Florian 8:dd2da7c0c4c7 22 0xF86F,
117Florian 8:dd2da7c0c4c7 23
117Florian 8:dd2da7c0c4c7 24 };
117Florian 8:dd2da7c0c4c7 25 setWave(src);
117Florian 8:dd2da7c0c4c7 26 }