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

Thread: FM synthesis - 808 drumkit

  1. #1
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552

    FM synthesis - 808 drumkit

    Hi Everyone

    I'm wondering if we have any modular synth gurus who can help me improve the FM synthesis functionalities of the audio system.

    I bit off a big project which is going to take a lot of chewing - so I'm breaking it down into chunks.

    Chunk 1) 808 and 909 drum kits. - this is a low cpu solution for drums and takes up virtually no space - ideal for teensy-lc based drum machines for example.

    I've been following some tutorials online and it looks as if we might have enough inputs and outputs from the stock FM object for an 808 style bass kick - but I'm still not sure exactly what I'm doing which makes creating a software implementation complicated. I've been playing around with software based modular synths (synthedit) but I can't get a sound out of them half the time - it's beginners stupidity - i know.

    Does anyone have any links to working 808 SynthEdit patches which emulate the 808 sound? Or can anyone offer any advice? I'm happy to crack on but little nudges like "put an adjustable distortion to emulate component xxx" would be golden.

    I intend to contribute the result to the teensy verse - either by exposing the FM i/O in the Audio NodeRed interface and doing a tutorial, or by opensourcing the code (which I'm doing anyway).

    Starter for 10 is attached - roland TR 808 service manual has full component and circuit maps in it.

    https://www.dropbox.com/s/z1c6egm38d...notes.pdf?dl=0

    If anyone is already working on this I'd love to jump in on github and get this working together - my sphere of knowledge is a touch small on this one.

    cheers

    Jon

  2. #2
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    Here's an image of all the editable parameters for the various sounds:
    Click image for larger version. 

Name:	TS-808.jpg 
Views:	21 
Size:	189.4 KB 
ID:	15222

  3. #3
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    And the TS-808 notes which feature an interesting load of information about midi triggers and frequencies etc.

    Code:
    Tactile Sounds TS-808 
    ---------------------
    
    The TS-808 is a software emulation (VSTi plugin) of the Roland TR-808. In 
    (re)creating the sounds, I referred to the TR-808 service notes, which provide 
    full schematics for each voice, and analysed the best samples I could find (The 
    Tape808, by Goldbaby). Eric Archer, who has built hardware clones of various 808 
    voices, was kind enough to help me calculate the frequencies of the square wave 
    oscillators that are the basis of the CYmbal/HiHat sounds. I fine-tuned each 
    voice until I felt that it sounded the way that an 808 fresh off the assembly 
    line would have sounded in 1984, and then I added some useful mods. 
    
    There are two versions of the TS-808: Mono and Stereo. Tactile Sounds recommends 
    the Mono version for most purposes. The Stereo version was developed because 
    some hosts send mono signals to the left channel only.
    
    Author
    ------
    
    Jonathan Murphy
    http://tactilesounds.blogspot.com/
    
    Credits
    -------
    
    GUI designed by Limeflavour
    http://flavoursoflime.blogspot.com/
    
    Payment
    -------
    
    The TS-808 is free (see "Licensing" below), however if you use it a lot, and 
    especially if you derive an income from your use of it, please consider making a 
    donation.
    
    Installation
    ------------
    
    Copy TS-808 Mono.dll and/or TS-808 Stereo.dll to the folder in which you store 
    your VST plugins, typically something like 
    C:/Program Files/Steinberg/Cubase/VstPlugins.
    
    Licensing
    ---------
    
    This work is licensed under the Creative Commons Attribution-Noncommercial-No 
    Derivative Works 3.0 Australia License. 
    To view a copy of this license, either
    (a) visit http://creativecommons.org/licenses/by-nc-nd/2.5/au/; or 
    (b) send a letter to Creative Commons, 171 2nd Street, Suite 300, San Francisco, 
    California, 94105, USA.
    
    
    About the Sounds
    ----------------
    
    The MIDI notes that trigger the sounds are:
    
    BD - 35, 36, 60
    SD - 38, 40, 61
    LT - 41, 43, 45, 68
    MT - 47, 48, 69
    HT - 50, 70
    LC - 52, 71
    MC - 53, 72
    HC - 55, 73
    RS - 51, 62
    CL - 58, 64
    CP - 39, 63
    MA - 54, 75
    CB - 56, 74
    CY - 49, 57, 67
    CH - 42, 65
    OH - 46, 66
    
    All Voices
    ----------
    
    All voices have controls for Velocity, Level, and Output. TS-808 Stereo also has
    Pan controls. Any voice can be routed to any of the 8 outputs. All voices have a 
    red LED showing activity, and can be muted by turning off the green button.
    
    Bass Drum
    ---------
    
    The base frequency of the BD is 48.999 Hz, better known as G1 or MIDI note 31. 
    Tune alters the pitch by up to +-12 semitones, ie a value of +2 will raise the 
    base frequency of the BD by 2 semitones, to A1 (55 Hz). 
    
    Snare Drum
    ----------
    
    The base frequencies of the SD tone generators are 174.614 Hz (F3) and 349.228 
    Hz (F4). Tune alters the pitch of the tone generators by up to +-12 semitones.
    
    Toms
    ----
    
    The base frequencies of the toms are:
    LT - 97.999 Hz (G2)
    MT - 146.832 Hz (D3)
    HT - 220 Hz (A3)
    The Tune parameters alter the pitch by up to +-3 semitones.
    The Reverb parameters control the amount of pink noise mixed with the signal.
    
    Congas
    ------
    
    The base frequencies of the congas are:
    LC - 195.997 Hz (G3)
    MC - 293.664 Hz (D4)
    HC - 440 Hz (A4)
    The Tune parameters alter the pitch by up to +-3 semitones.
    The Decay parameters extend or reduce the decay time of the signal.
    
    Rim Shot
    --------
    
    There are two tone generators for the RS. The signals are half-wave rectified. 
    The rectified signal is mixed with the clean signal. Tone controls the mix. At 
    -5 only the rectified signal is present, at 5 only the clean signal. At 0 the 
    mix is equal and the sound is very close to that of the TR-808.
    
    CLave
    -----
    
    The base frequency of the CL is 2349.318 Hz (D7). Tune alters the pitch by up to 
    +-6 semitones.
    
    ClaP
    ----
    
    The CP is composed of a strike portion and a reverb portion. Rev Level controls 
    the amount of the reverb portion present in the mix. Decay and Rev Decay control 
    the decay times of the strike and reverb portions respectively.
     
    MAraca
    ------
    
    The MA is just bandpass filtered white noise shaped by an envelope. Tune varies 
    the frequency of the band pass filter from around 350Hz to 10500 Hz. Attack & 
    Decay control the envelope generator. When all controls are at 10 the sound is 
    all but identical to that of the TR-808. 
    
    Cow Bell
    --------
    
    The CB comprises two half-wave rectified square waves run through a bandpass 
    filter. According to the schematics, the frequencies are 540 Hz and 800 Hz. In 
    the samples I analysed, they were closer to 565 Hz and 849 Hz. I settled on base 
    frequencies of 523.251 Hz and 783.991 Hz - a perfect fifth, and in tune with the 
    rest of the voices. Tune alters these pitches by up to +-12 semitones. Buzz 
    controls the amount of the rectified signal in the final mix, and Clang controls 
    the amount by which the oscillators are detuned. 
    
    Hi Hats
    -------
    
    The CH and OH of the TR-808 have different envelopes and filters. In the TS-808 
    the envelopes are different but the filter is shared. Tune varies the cutoff 
    frequency of the filter, from ~8000 Hz to ~11000 Hz. Decay controls the decay 
    time of the OH.

  4. #4
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    also of note:
    This dude has done an excellent looking tutorial series - unfortunately i'll have to sit through a lot of basics to get the bits of info I'm missing but that's life

    His use of puredata to play with the audio system is a great idea which i'll be adopting.




    https://www.youtube.com/watch?v=UJcZxyB5rVc&t=3s


    Last edited by Pensive; 11-25-2018 at 04:51 PM.

  5. #5
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,691
    Is there any source code or puredata patch with the actual algorithm or more detailed info about the synthesis models?

  6. #6
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    Quote Originally Posted by PaulStoffregen View Post
    Is there any source code or puredata patch with the actual algorithm or more detailed info about the synthesis models?
    Not from that project - the author released the compiled VST DLL only unfortunately. His blog is down but I might do some digging and see if I can find him and whether he'd be willing to offer a suitable license on the code to port it to Teensy.

    I don't suspect the bass kick will be all that different to SimpleDrum but the rest of the elements could be made many ways.

  7. #7
    Hi, there is some great info on drum synthesis here: https://www.soundonsound.com/techniq...drum-synthesis

    For a simple 808 like kick (not an exact reproduction though) i would start with a sine wave oscillator (low frequency, e.g 50hz) and two envelopes: One to shape the amplitude and a second one to modulate the pitch of the sine wave oscillator through its FM input (the amount of pitch modulation should be controllable). Both Envelopes have a very short attack and controllable decay times. For percussive sounds in general, imo envelopes with an inverted-exponential slope are better than linear envelopes (creates more snappy sounds).

    As im also working on a teensy based drum-machine, i have implemented a 'Channel' that follows this concept (which is quite similar to the SimpleDrum, but maybe a bit more flexible).

    Its here: https://github.com/zueblin/Polaron/b.../BoomChannel.h
    (Check also the effect_shaped_envelope.h, which is a variable-slope Attack-Hold-Decay Envelope, currently configured for a inverted-exponential slope, ie. perfect for snappy percussion)

    @Paul, maybe this envelope could be a useful addition to the audio-library (it might need some optimization though)

  8. #8
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    Quote Originally Posted by a_guy_called_tom View Post
    Hi, there is some great info on drum synthesis here: https://www.soundonsound.com/techniq...drum-synthesis

    For a simple 808 like kick (not an exact reproduction though) i would start with a sine wave oscillator (low frequency, e.g 50hz) and two envelopes: One to shape the amplitude and a second one to modulate the pitch of the sine wave oscillator through its FM input (the amount of pitch modulation should be controllable). Both Envelopes have a very short attack and controllable decay times. For percussive sounds in general, imo envelopes with an inverted-exponential slope are better than linear envelopes (creates more snappy sounds).

    As im also working on a teensy based drum-machine, i have implemented a 'Channel' that follows this concept (which is quite similar to the SimpleDrum, but maybe a bit more flexible).

    Its here: https://github.com/zueblin/Polaron/b.../BoomChannel.h
    (Check also the effect_shaped_envelope.h, which is a variable-slope Attack-Hold-Decay Envelope, currently configured for a inverted-exponential slope, ie. perfect for snappy percussion)

    @Paul, maybe this envelope could be a useful addition to the audio-library (it might need some optimization though)
    Your project looks great Tom - thanks for the link too - its fascinating how 808 emulation is going from an electronic approximation of theory - to a modular analogue model - and now into a software emulation of a model of an emulation! Simples.

    I think i'll leave the adjustable curve ADSR bit for now - it sounds like it would be very cool in future to adapt the envelope types but not essential.


    i've probably got enough to build a Drum808Kick object now. I still think it's a shame the TS808 people have gone to all that work and it's not re-usable for other platforms. I'll do some digging....

  9. #9
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    Well I've checked the waybackmachine for the author and I've installed the VST as it implies that there are schematics in it - but there aren't.

    I've also emailed the author asking very nicely if he'd share his work for the Teensy community - so we'll see. IF not - I'll have to plow in all thumbs.

  10. #10
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    If the TS-808 detail doesn't come through I'll change direction; Heck I may change direction altogether for a more flexible way forward.

    Forget specifically emulating an 808 - I'll use the attached PDF as inspiration for more flexible blocks that can be patched to sound like an 808 and a 909 and more. Who knows - maybe an instrument patch engine can be defined so Teensy users can drop a packaged 808, 909, or any other FM based drum machine onto the audio gui - constructed of the basic code blocks with the patches already applied - or maybe simply sending a patch as an argument to the instrument (which would be better for resources).

    This PDF features some very clear diagrams for all the elements they've used to achieve sounds - the rest will be trial and error but could be good fun to tweak live with puredata (or an ipad based tool which I might look into - much more tactile).

    It looks clear that this will involve a new kind of ADSR envelope which features Attack Decay Retrigger and Slope instead - specifically for drum based synth sounds. This envelope would also be useful for playing back tracker MOD/IT/S3m files.

    So this creates 4 objects in the image of SimpleDrum:
    AdvFMDrum
    AdvFMSnare
    AdvFMClapCym
    AdvFMHiHat

    Each with it's own parameters and potentially a range of hard coded presets in the future - I'll worry about how patching can be implemented once we've got working objects.

    Most interestingly the LXR has very similiar buttons and knobs on it to my beatsbyteesny project which is awfully handy - it means its practical to deliver this function in my physical project as well as via puredata.

    This is from a Sonic Potions LXR - which is - wait for it - cortex M4 based and the source code is on github which could be handy...... I wonder if the license is usable?

    LxrVoices.pdf

    Click image for larger version. 

Name:	LXR - Drum v1-3.png 
Views:	14 
Size:	109.4 KB 
ID:	15230Click image for larger version. 

Name:	LXR- Snare v4.png 
Views:	6 
Size:	75.0 KB 
ID:	15231Click image for larger version. 

Name:	LXR - Clap-Cym v5.png 
Views:	6 
Size:	78.5 KB 
ID:	15232Click image for larger version. 

Name:	LXR - HiHat v6-7.png 
Views:	3 
Size:	75.1 KB 
ID:	15233
    Last edited by Pensive; 11-26-2018 at 11:24 AM.

  11. #11
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    I know I keep replying to my own thread but all this information will be useful in the long run;

    Jonathan (author of TS-808 VST) came back to em quickly - he's unfortunately deleted his source files - it's a long since completed project - which is a shame because his compiled VSTs won't run on my 64bit Ableton - I had to install 32bit reaper to get them working so I'm assuming they're 32bit only :-/

    Either way - no cigar.

    SO

    he had the following advice which I'll apply to the diagrams above as best I can.

    The key to a decent 808 emulation is to use a resonant filter as the "oscillator." This article explains what's going on:



    https://www.soundonsound.com/techniq...ynthesis#para5


    If you've got a filter that you can set to a really high resonance, and then supply it with a trigger, but no input signal, you should be able to get something like an 808 with a bit of fiddling around (you might need to put it inside an envelope, though). The same basic circuit is used for the snare, toms and congas.
    Also

    LXR code is on github - but the license is not teensy compatible. no commercial usage of any kind. So I won't use any of the code at all. I'm wondering if we can even use the diagrams now. I suspect not. IF it can't be committed to the Teensy-verse it's a waste of time.

    Perhaps we shall have to build our own diagrams in puredata and then port those to Teensy.

  12. #12
    You might want to look over what I was doing on the Teensyboom a couple years ago. It was informed by some of the analyses of 808 circuits that are floating around.

    Here's a demo video:


    And here's the writeup with links to source code, schematics, and related materials:
    https://www.sparkfun.com/news/2125

    The two "bendable" TR808 analysis papers are pretty informative.

    The hihat/cymbal/cowbell all use the same set of base waveforms, so I made a software module that generates those, which gets processed by a series of envelopes for each of the separate voices.

    The audio modules are declared in voice.cpp. There's a lot to it.

    I updated the simple synth drum to allow trigger amplitude control and multiple waveforms. If you constrain the parameters properly, you can make it act somewhat like the 808 kick, toms and congas. It also does a harmonized second waveform that takes it into a 909 tom or second-gen Simmons tom territory.

    There's also a handclap envelope generator. It makes a set of 4 sharkfins that you can use to envelope white noise...I read an analysis of the circuit somewhere, but it was ultimately informed by probing signals in a Tama Techstar clap circuit. The Tamas are cousins of the Rolands...

    I haven't touched any of it in a while...I'm not sure if the github project is in a buildable state.

  13. #13
    Senior Member Pensive's Avatar
    Join Date
    Aug 2014
    Location
    Basingstoke, UK
    Posts
    552
    Quote Originally Posted by B.Jacquot View Post
    You might want to look over what I was doing on the Teensyboom a couple years ago. It was informed by some of the analyses of 808 circuits that are floating around.

    Here's a demo video:
    I haven't touched any of it in a while...I'm not sure if the github project is in a buildable state.
    Wow - it's already done better than I would have hoped to

    ....thank you Byron - it's all MIT license so if you don't mind I'm going to strip out the synth effects and commit them to the audio library once working.

    Then I'll model them in puredata and maybe experiment with some tweaks and improvements here and there.

    Awesome work sir! I came across the same struggles as you for timing a sequencer - ended up using millis for my unztrument sequencer and it's not good enough. The next chunk of my work will be a XX step teensy compatible sequencer using interrupts which coexists with the audio library properly. Probably 32 step with integral swing functions, or even a 16 step with linked pattern mode like you referenced from xoxb0x.

    Anyway Synth first - looking forward to getting some noises and tweaking some sounds

    direct links to those papers are here:
    808 Bass - http://www.dafx14.fau.de/papers/dafx14_kurt_james_werner_a_physically_informed,_ci .pdf
    808 Cymbal - http://quod.lib.umich.edu/cgi/p/pod/...p2372.2014.221

  14. #14
    Senior Member
    Join Date
    Feb 2013
    Posts
    533
    fwiw / re 808-ish drums, it should be fairly easy to port some of relevant Mutable Instruments stuff into "audio library" objects. see e.g. https://github.com/pichenettes/euror...er/peaks/drums

    here's a half-baked/aborted attempt (used to work, but haven't tried to compile it in a couple of years):
    https://github.com/mxmxmx/minitrash/...th_fm_drum.cpp

    (the above uses clock signals / external interrupts to trigger the sound, that's probably not what you wanted)

Posting Permissions

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