Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [ID] Topic: Share knowledge and insight about instrument synthesization  (Read 6117 times)

0 Members and 1 Guest are viewing this topic.

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Share knowledge and insight about instrument synthesization
« on: November 05, 2011, 06:28:47 PM »
0
Last night I took it upon myself to waste my night googling and researching sound synthesis. Spent most of the time on one site:
Sound On Sound

The articles discuss in detail some of the factors that go into simulating real instruments on synthesizers. This doesn't pertain to sampled instruments, like I have a feeling many synthesizers use nowadays, but rather the fine-tunable synthesizers like Moog or Korg. Since FamiTracker doesn't use samples, this is a useful read, even if it doesn't tell you what you may want to know. There's no math, but lots of theory and simplified physics, and fortunately some diagrams. Of particular interest for me were the topics of envelopes (how volume varies from instrument to instrument), what waveforms are ideal for some types of instruments (figured this out on my own last night, though), and a refresher on the concept of attacks (blowing hard or softly into a trumpet, for example).

Another site I read, which was pretty simple but still insightful for me:
DrPetter's Basic Sound Theory and Synthesis

This article deals more with generating sounds for use in games. He talks a bit about waveforms and his thoughts on the psychology behind popular styles of sound effects, such as the coin from Mario, player deaths, lasers, and such. Again, it's pretty basic, but offers some decent insight.

Anyway, I started this topic so we could share links to sound synthesis guides, insight or summaries on what we've learned or discovered about sound synthesis, or any creations we've come up with ourselves. If you share instrument creations in FamiTracker, you can just copy/paste the MML data for Volume (V), Arpeggio (A), Pitch (P), Hi-Pitch (H), and Duty (D).


Some things I've learned last night:

Brass instruments tend to be plosive, that is, they have an attack at the beginning and then taper off to their sustained volume. In other words, a trumpet or trombone will not have a sustained V15. However in a slower song, maybe such as in a game over scene's music, the bugle (let's say) would have a gentler approach to the sustain. In order to make the plosives stand out in your song, you should keep all the sustains near the same level. But to make the plosive stand out, you need to drop below the sustain level (down to V8 or so) and then gradually crescendo up to the sustain.

Do not cut off your notes. In FamiTracker's instrument editor are two options, loop and release. When you record your notes, pressing \ adds a Release command. This will tell the note  to then play whatever is in the release section. What you should do is have an instrument loop the vibrato (volume fluctuation) or tremolo (pitch fluctuation) and then gradually fade to V0 on the release. Of course, you wouldn't need to do this when notes are in rapid succession, but if there is a rest after a note, you should make use of releases for a richer effect.

Many games used DPCM timpanis/kettle drums and bass drums. The reason for this is because timpanis and bass drums are harmonic drums, as opposed to snare drums and cymbals, which are enharmonic. The enharmonic drums can just use the Noise channel. Toms are routinely employed on the Triangle channel because they behave like tiny bass drums hit with drumsticks. However, a tom's notes will be succinct, making a Triangle tom somewhat logical, but a timpani or bass drum will reverberate longer, so a Square channel would be best. A Triangle tom suffers from cleanness not present in a real tom. This can be compensated for by synching the Triangle tom with a noise hit, but another alternative is a Square tom. I feel a Square wave is ideal for harmonic percussion because the percussive noise at the time of impact for a harmonic drum can be simulated roughly by alternating duty cycles.  Alternating between D1 and D3 then ending on D2 creates a percussive tom sound quite nicely. Repeating this flux works well for a bass drum. With any drum, D0 seems to be a poor choice at any point, but if you find a use for it, go for it.

On the topic of duty cycles...

D1 and D3 in the Square wave sound very much alike, but there is indeed a difference. Using a steady note, they sound alike, but with a pitch bend/tremolo or even vibrato, the difference becomes much clearer. With a tremolo, D1 sounds flatter and D3 sounds richer. We're talking the difference between a trumpet and a trombone, or viola and contra bass. The difference is very noticeable during a crescendo. D1 is better for slow attacks, while D3 is better for faster sweeps. In other words, D1 gives the sound more of a draw. Use D1 at the start of a viola's (for example) phrase and D3 whenever the notes are connected. With woodwinds and brass, D3 is useful for plosives or breaths, while D1 is hardly noticeable.

D2 is good for melodic percussion, like xylophones. However, as I say farther down this post, the Triangle wave is somewhat better for xylophones, in my opinion. Starting a duty cycle phrase with D2 will create a "ploink" every time a note is played. Alternating from D2 to D1 or D3 creates a low pop, possibly better suited for bass drums, timpani, or guitar slaps.

I've compiled this list of which waveform best suits which instrument (neglecting the VRC6's sawtooth, which is ideal for many of these) based on my poor hearing. I played a C3 or C4 or F3 or F4 in FamiTracker with no modulation for each duty cycle (except in the Triangle wave, which doesn't use duty cycles). These associations might not match other people's preferences, but again, these are based on what I heard on my Yamaha keyboard. And again, I have bad hearing, so...

Square Wave
Duty 0
Violin
Cello (C3 equals a cello at C5)
Smoke Alarm :D
Alto Sax
Duty 1
Viola
Contra bass (C3 equals a contra bass at C5)
Harpsichord
Organs and Accordions
Brass instruments
Harmonica
Bagpipes
Reed woodwinds (except Alto Sax)*
Piano sustain (remember, pianos are percussion)
Guitar sustain (haven't decided what to use for pluck/strum)
Duty 2
Pong sound :D
Simple woodwinds (for when vibrato is needed)
Square lead
Hawaiian Guitar
Harp
Pizzicato strings fade (use D0/D1 for the pluck)
Piano lead
Duty 3
See comments above
Triangle Wave
Organ (alternative)
Choral 'Ooh'
Simple woodwinds (no vibrato, requires high octaves)
Pan Flute (the only woodwind with the same octave)
Melodic Percussion sustain**

*Soprano sax is played at the same octave. Tenor sax is played one octave lower (i.e., C2 in FamiTracker is equivalent to C3 on the sax). Bari sax is played two octaves lower (i.e., C2 in FamiTracker is equivalent to C4 on the sax). Alto sax is closer to D0, although playing the same phrase on D0 and D1 using both Square channels may simulate an alto sax much better.

**Xylophones, marimbas and celestas can be simulated by playing phrases over all the channels with some timing differentials. Use the Triangle waveform for the middle of the note. Use Square and Noise for the percussive and fading parts. I know most people don't like taking up multiple channels for one instrument, but the great composers can do so without compromising their music. :p
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Jorge D. Fuentes

  • Boogeymen check under their beds for Julius Belmont.
  • Administrator
  • Master Hunter
  • *****
  • Posts: 15262
  • Gender: Male
  • It will always be Brinstar, dammit!
  • Awards A great musician and composer of various melodies both original and game-based. The Artist: Designs copious amounts of assorted artwork. 2015-03-3D Art Contest GOLD Award SuperOld Dungeonite: Members who have been around since the oldOLD days. ICVD Denizen: Those that dwell in the corrupted, mirror image of The Dungeon.
    • Jorge's DeviantArt Page
    • Awards
  • Favorite Game: Super Castlevania IV (SNES)
  • Likes:
Re: Share knowledge and insight about instrument synthesization
« Reply #1 on: November 05, 2011, 07:58:47 PM »
0
As a person who dabbles in music, I am... not fond... of the way Famitracker and other NES-style music synthesizers work.
Not the ADSR, mind you, but rather how cumbersome it is to work with them.
It's like the people who designed them have been programmers all their life and don't know how a musician's mind works.
Please give me a staff in which to plot notes, and let me assign an instrument change from a pool of instruments of my own design.

Famitracker (like many 'tracker' programs) is showing me all of these numbers and pattern programs running, but that doesn't help me compose.  I guess I just never can get into the mindset of it unless I have an user interface that actually is intuitive to a musical person.

As for the ADSR of instruments, you're mostly right with regards to emulating the sound of a saxophone, etc.  However, brasses cannot be generalized like that.  In the musical world, you have terms which in the programming/synthesizing world have existing counterparts.

"Attack" is still the same, generally.
A strong attack value is the same as saying 'an accented note'.
A weak attack value, depending on its rate of increase, in the musical world, can be 'crescendo', or 'sfortzando', and it's used with strings and brasses.

I've gotten pretty good at doing good guesses of what instruments the NES programmers were attempting to emulate, by hearing the ADSR of their samples and saying "Yeah this Pulsed Spiked Square Wave in a low octave... it's probably a Slap Bass" or "This high-pitched Triangle Wave is most likely an Ocarina or a Whistle", etc.
You must obey Da Rulez!
Jorge's Kickass VG Radio Station Open it in Winamp/MPClassic (broadband connection preferred)
Jorge's Kickass Youtube CV Music Channel
My Personal Minecraft Server (send me your In-Game Name so that I may Whitelist you)

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: Share knowledge and insight about instrument synthesization
« Reply #2 on: November 05, 2011, 08:27:09 PM »
0
It's taking me a while to get used to trackers, too. I think I prefer piano rolls over FamiTracker's interface, but I don't like piano rolls either. Point-and-click notation placement is the way to go, so if I want to make something in NSF, I first make it in MIDI with Anvil Studio so I can visualize what I'm doing better. So I hear you there.  And yeah I know you can't generalize brass that easily, that's why I added that bit about the bugle. I had both going while I was fiddling around with FamiTracker last night. I was like, "Ooh that kinda sounds like a trumpet" (I actually had a VERY GOOD trumpet effect going a while back, I hope I saved the FMI for it so I can synch it with the envelope) and, "Wow that's like what you could use to play Taps!" And also as that first site (Sound On Sound) was discussing, with some instruments you can't just make up a single ADSR for every octave, and that's one reason it's near impossible to synthesize guitars (because of all the factors that go into a guitar's harmonics).

Also, knowing how instruments make the sounds they make is useful in synthesizing them. For example, if a recorder and a whistle both use Square Duty 2, how do you distinguish between the two? Well, the recorder starts by having air blown into the mouthpiece then immediately deflects some of the air downward and expels the rest, putting the air inside the recorder in undulation in order to produce the sound. So an initial pitch slide should help there, I would think. Then you add a tremolo, the degree of which would serve to distinguish a recorder from a whistle.
« Last Edit: November 05, 2011, 08:36:44 PM by TheouAegis »
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Jorge D. Fuentes

  • Boogeymen check under their beds for Julius Belmont.
  • Administrator
  • Master Hunter
  • *****
  • Posts: 15262
  • Gender: Male
  • It will always be Brinstar, dammit!
  • Awards A great musician and composer of various melodies both original and game-based. The Artist: Designs copious amounts of assorted artwork. 2015-03-3D Art Contest GOLD Award SuperOld Dungeonite: Members who have been around since the oldOLD days. ICVD Denizen: Those that dwell in the corrupted, mirror image of The Dungeon.
    • Jorge's DeviantArt Page
    • Awards
  • Favorite Game: Super Castlevania IV (SNES)
  • Likes:
Re: Share knowledge and insight about instrument synthesization
« Reply #3 on: November 05, 2011, 09:21:14 PM »
0
Yeah, with certain instruments you can kinda tell.  I would base an Ocarina and a Whistle sound off of a Triangle Wave, while I would use a Recorder and a Flute based on a Square Wave.  It's kinda weird.  I can tell, but I cannot explain it.

As for an NSF program, I would love it if they were to just let me do this:

<a href="http://www.inverteddungeon.com/jorgefuentes/music/CV3-%20Clockwork%20for%20piano.pdf" target="_blank">http://www.inverteddungeon.com/jorgefuentes/music/CV3-%20Clockwork%20for%20piano.pdf</a>
You must obey Da Rulez!
Jorge's Kickass VG Radio Station Open it in Winamp/MPClassic (broadband connection preferred)
Jorge's Kickass Youtube CV Music Channel
My Personal Minecraft Server (send me your In-Game Name so that I may Whitelist you)

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Re: Share knowledge and insight about instrument synthesization
« Reply #4 on: November 07, 2011, 10:00:29 AM »
0
I thought it was Noteworthy (ooooold schoool Mac) or ... some other program I used to know. Looked like Noteworthy, but that's a Windows frame.

You can kinda do that with FamiTracker. Export that song as a MINI and import it into FT.

What I would love to see is someone with a good guitar instrument for FT. I made a rough draft based on what I skimmed over on that S.o.S. site that could pass for a folk guitar, but I'm looking for a good electric guitar. ... In case you're wondering, the folk guitar setup I used had a strong initial attack (like the trumpet I mentioned earlier), rapid drop down to the sustain, slow crescendo with a pitch slide blended with a tremolo, then slow release. The attack was a D2-D1-D2 pop, I think.
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Jorge D. Fuentes

  • Boogeymen check under their beds for Julius Belmont.
  • Administrator
  • Master Hunter
  • *****
  • Posts: 15262
  • Gender: Male
  • It will always be Brinstar, dammit!
  • Awards A great musician and composer of various melodies both original and game-based. The Artist: Designs copious amounts of assorted artwork. 2015-03-3D Art Contest GOLD Award SuperOld Dungeonite: Members who have been around since the oldOLD days. ICVD Denizen: Those that dwell in the corrupted, mirror image of The Dungeon.
    • Jorge's DeviantArt Page
    • Awards
  • Favorite Game: Super Castlevania IV (SNES)
  • Likes:
Re: Share knowledge and insight about instrument synthesization
« Reply #5 on: November 08, 2011, 06:36:54 AM »
0
That PDF is from Noteworthy Composer (for PC).  That's my main tool when I'm composing my MIDI files and my MP3 arrangements.

A guitar, huh?  Hmm...

A good trumpet sound from NES days is found in Batman (NES).  Specifically, this tune (listen between 0:13 and 0:24):
Batman (NES) Music - Stage 2

And a good Guitar sound can be also heard in Batman's boss tune.
Batman (NES) - Boss Theme
« Last Edit: November 08, 2011, 07:31:37 AM by Jorge D. Fuentes »
You must obey Da Rulez!
Jorge's Kickass VG Radio Station Open it in Winamp/MPClassic (broadband connection preferred)
Jorge's Kickass Youtube CV Music Channel
My Personal Minecraft Server (send me your In-Game Name so that I may Whitelist you)

Tags:
 

anything