Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 9 of 9

Thread: Monophonic Guitar Synthesizer with subtractive synthesis

  1. #1

    Monophonic Guitar Synthesizer with subtractive synthesis

    Hi,
    first.. many thanx for all the nice teensy stuff!

    The project i was working the last weeks results in an nice monophonic Guitar Synthesizer witch can really used. So I decide to share the project. I create an github repository. At the moment the repository is not complete. The schematic and maybe an pcb layout will follow.

    It based on an teensy3.6, an SGTL5000 Audio Shield and an small guitar buffer and mixer circuit which only need an 3dpd switch and only "ONE" transistor some resistors and caps.
    If the teensy run with 96Mhz the noise is at an acceptable level. At 180Mhz noise from the teensy onboard 3.3V regulator is audible in the guitar buffer circuit.

    The Synth need a little bit modified Audio Library which I also hosted on github.

    *Note, i am not an software or electronic engineer. the code is not so clean and structured as software developer will write code!

    Synth:
    https://github.com/wolkstein/GitSynth127

    Modified Audio Library:
    https://github.com/wolkstein/Audio

    German language Video on youtube(25 minutes)



    Features:
    • substractive synthesis
    • 4 OSC 's
    • 1 Noise Generator
    • 3 LFO 's
    • 1 Envelope AHDSR
    • 1 Filter DAHDSR
    • 2 parallel Filter
    • 32 Step pitch arp.
    • lfo's and 32 step arp. can sync to internal tempo or midi clock, envelope_attack also sync the lfo's or the arp.
    • USB Midi
    • USB Audio
    • Expression Pedal
    • Tap tempo
    • 127 user presets
    • Midi Gui based on PyQt and rtmidi


    The Gui first Tab (Synth Tab)


    edit:
    Add audio system design tool image
    Audio System


    Hopefully you like it.

    /Thx
    Wolke
    Last edited by wolke; 05-11-2017 at 12:57 AM.

  2. #2
    Senior Member
    Join Date
    Nov 2015
    Posts
    102
    Congratulations and thanks for this project!
    Can i ask which modifications you make at the original library?

  3. #3
    hi urbanspaceman ,
    1. i add an new analyse effect called "analyse_attack". this object detect an envelope attack in audio data. you can init the object with some arguments.
    myAnalyse_attack.set(int32_t treshold, int32_t falldown, uint16_t bouncetime,void myCallbackFunction(bool attack)). the callback function will called if an attack is detected.
    simple! in my project i use it to sync the lfo's and the sequencer to attacks. firstly i also use it to create my guitar envelope but later i found an faster method which run very well in main loop.
    so in further develop on my gitsynth this attack callback is deprecated and will be removed.

    2. i modify analyse_notefreq. i only change #define AUDIO_GUITARTUNER_BLOCKS 25 to #define AUDIO_GUITARTUNER_BLOCKS 9. this speed up detecting notefreg but upper the detection corner freq to ~80hz. this mean you can not detect note pitch lower than 80hz.

    3. i add an extra function to analyse_peak. i call it readFull(). this return the the negative cycle values as they are. the original call return only positive (abs) values. i use with lfo output to modify modulation and pitch values.

    4. i modify in audio synth waveform the arbitraryWaveform function. now it is possible to run it continuous as default (like it come from the original code) and to define a amount of cycles before it stop. now it is possible to start the lfo with a given frequency but only run for example "one cycle" and hold the last value. i use it for some lfo function for example "ramp down". for example if you sync the lfo to envelope attack it is possible to control an osc pitch sweep over 12 notes over an given time synced and multiplied to the internal clock tempo.

    5. i modify the filter state variable. i increase the resonance from max 5 to max 25. this is experimental and can produce noise and clipping. but i like it to overdrive the filter. mostly i connect the gitsynth to an valve amplifier which also overdrive the signal. that mean i have no need for hifi sound quality. digital clippings can not be identified on my over driven guitar amplifier with some 12" guitar speakers .

    /g
    wolke
    Last edited by wolke; 05-15-2017 at 06:31 PM.

  4. #4
    Senior Member
    Join Date
    Nov 2015
    Posts
    102
    Thank you Wolke, interesting works!

  5. #5

    improve envelope and pitch tracking

    hi,
    i improve the guitar envelope and pitch tracking a little bit, now the latency between plugging a string on guitar and first synth-output is between 3-5ms.
    the pitch tracking from colin duffy's Guitar and Bass Tuner library V3 is much faster than his older version currently available in original teensy audio library.
    Audiotuner V3 from colin duffy: https://github.com/duff2013/AudioTuner

    Images: compare guitar envelope vs. synth envelope.
    i record the guitar and the synth output using the usb audio interface function on teensy(gitsynth127). the left side record the guitar signal(upper track) while the right side(lower track) record the synth output. The synth use one OSC with an triangle waveform one octave higher than the guitar fundamental tone. the waveform from synth output is nearly sinus because the filter is active.
    Click image for larger version. 

Name:	envelope-tracking1-klein.jpg 
Views:	109 
Size:	263.7 KB 
ID:	10660Click image for larger version. 

Name:	envelope-tracking2-klein.jpg 
Views:	116 
Size:	273.8 KB 
ID:	10661Click image for larger version. 

Name:	envelope-tracking3-klein.jpg 
Views:	108 
Size:	200.3 KB 
ID:	10662

    Image: Envelope - Acceleration comparison guitar(upper track) vs. synth(lower track)
    Click image for larger version. 

Name:	envelope-tracking4-klein.jpg 
Views:	112 
Size:	268.1 KB 
ID:	10663


    edit:
    add an link to an small sound sample playing 4 OSC Pulses all ~8 cents out of tune. i use an renoise demo song called DBlue and remove the original bass. now the renoise bass track play midi notes connected to my Gitsynth127 usb midi input. The Gitsynth127 also acts as usb soundcard. The audio playback from renoise will recorded to ardour while the Synth playing midi notes(bass track) and record them also to Ardour at the same time.
    https://raw.githubusercontent.com/wo...ue-tension.mp3

    /g
    wolke
    Last edited by wolke; 05-23-2017 at 03:52 AM. Reason: add sound sample "BASS spread pulse"

  6. #6
    Administrator Robin's Avatar
    Join Date
    Oct 2012
    Location
    PJRC Global Headquarters
    Posts
    255
    I posted about this project on the PJRC home page.

  7. #7
    Senior Member
    Join Date
    Nov 2015
    Posts
    102
    Awesome! Official teensy blog!

  8. #8
    Quote Originally Posted by Robin View Post
    I posted about this project on the PJRC home page.
    thank you Robin .
    /g
    wolke

  9. #9
    Hi ,
    there is a new Gitsynth127 Video on Youtube. It shows how to create a preset with the help of the Qt based Midi-Gui.



    /g
    wolke

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •