electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software
FSK synthesis
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 2 of 2 [41 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2
Author Message
Ricko



Joined: Dec 25, 2007
Posts: 251
Location: Sydney, Australia
Audio files: 27

PostPosted: Tue Jul 15, 2008 1:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

By the way, in my FSK, the synch pulse only is put out at the start of the mark (high), not the start of the space (low) which is what I think your diagram notes suggest.

The difference in tone would only be slight, but you would perhaps expect the double synch approach to have a more consistent 1st harmonic, less doppler effect during PWM, but more nasty high harmonics from the sharp transition.
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Tue Jul 15, 2008 1:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

The keyer NCO will be a simple phase accumulator type NCO, the threshhold is the numeric value of the phase accumulator at which point the PWM output will change state. This way, I can vary the keyer's pulse width by changing the threshhold value.
_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Ricko



Joined: Dec 25, 2007
Posts: 251
Location: Sydney, Australia
Audio files: 27

PostPosted: Tue Jul 15, 2008 1:45 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks. (I wasn't clear: I thought you meant having two syncs per keyer cycle, rather than one. But you didn't.)
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Tue Jul 15, 2008 2:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Actually, I was going to do that, a synch on both edges.

So you're saying (above) that I should do the synch pulse only on the threshhold crossing druing the ramp portion of phase accumulator "waveform" (sawtooth really)? That's easier...

I'm wondering, should it be switchable so that synch can occur on either edge (but not both) ?

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Ricko



Joined: Dec 25, 2007
Posts: 251
Location: Sydney, Australia
Audio files: 27

PostPosted: Thu Jul 17, 2008 7:43 am    Post subject: Reply with quote  Mark this post and the followings unread

One or both rather than one or the other, I think. It is not law where the synch goes.

Cheers
Rick
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Thu Jul 17, 2008 8:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Ricko wrote:
One or both rather than one or the other, I think. It is not law where the synch goes.

Cheers
Rick


Got it. One last question, if one, which is best or most effective, to synch when it switches to the low formant or to the high formant? (I get confused over mark and space...)

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Ricko



Joined: Dec 25, 2007
Posts: 251
Location: Sydney, Australia
Audio files: 27

PostPosted: Thu Jul 17, 2008 8:48 am    Post subject: Reply with quote  Mark this post and the followings unread

You would think there would be little difference, but there is a little difference.

When you change the pulse width to flip between the two frequencies you shift the phase of the second frequency formant. This gives a kind of Wow or doppler effect temporarily.

This is just the same as the effect you get when you have a pulse waveshaper driven by a triangle wave rather than a saw: moving the start edge is detected as a pitch variation.

So when the second format is low, changing PW will give a little instability on that low one; when the second formant is high, changing the PW will give a little instability on that high one.

Also, there may be a difference on notes that are higher than the formants, where you don't get a complete cycle. I don't know that it can be generalized, but different waveshapes will be generated.

Cheers
Rick
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Sun Jul 27, 2008 2:43 pm    Post subject: Reply with quote  Mark this post and the followings unread

My FPGA implementation looks like it's working. Needs more work, but it's working as a 2 FSK & synched pair per voice polysynth, 8 voices. Currently only 2 sections because PWM was already there.

For the keyer, are you generating your "sections" from a sawtooth? and do you synch the slave on that sawtooth's reset?

Anyway, it sounds pretty cool, I can get some metallic string sounds which I like, especially in the lower register, almost piano sounding (I use one FSK pair with no transpose, the 2nd with transpose=12, the 2nd also is fined tuned sharp enough to play phasing games).

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Ricko



Joined: Dec 25, 2007
Posts: 251
Location: Sydney, Australia
Audio files: 27

PostPosted: Sun Jul 27, 2008 10:28 pm    Post subject: Reply with quote  Mark this post and the followings unread

I'd love to hear a sample!

> For the keyer, are you generating your "sections" from a sawtooth? and do you synch the slave on that sawtooth's reset?

Yes and yes.

For the analog hardware design in my mind, I would have a three-section FSK system, presented as a waveshaper rather than an oscillator: front, middle and back sections. My VST emulations suggest that two sections is too plain, and four sections is only useful for baritone or base notes.

Input - Saw in, Front Section Width mod, Back Section Width mod
Pots - Base Freq, Front Section freq, Back Section Freq
Output - Three level FSK sine or tri or half-wave rectified sine

Function
- Triangle oscillator, synced to mid point on Input at highest voltage
- Comparator on Input to go high when higher than a certain voltage, set by Front Section Width.
- Comparator on Input to go high when lower than a certain voltage . set by Back Section Width must be less than the Front Section Width.
- The base frequency is shared by each section. The front and back sections have the deltas from their pots added or subtracted.

This design should give a minimal parts count of perhaps
4 x Op-amp for oscillator and sine shaper
2 x comparator
6 x pots
4 x input
3 x output
without VC control of the oscillator needed, and therefore no expo needed. (On the VST, I didn't find that VC of the section frequencies gave much value: it just sounded like a few sharp band-pass filters moving around, and disguised the central effect of having different tones but same formants no matter which pitch. But it is just taste.)

When doing a two-stage FSK digitally, it is preferable to use a band-limited square to reduce aliasing. Strictly, you need to filter out an octave or two below nyquist from the master and the slave to prevent generating harmonics aliased down into the signal. This need is certainly lessened by using sines on the slave (and you have a high sample rate, as you mentioned, so most aliasing should be above the audiable rate.)

Cheers
Rick
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Tue Jul 29, 2008 11:30 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is a sample, some notes and chords. This patch is 2 FSK NCOs, one an octave up, slightly detuned. Slave waveform is sawtooth. 2 sections.

There is no modulation of FSK values. A state variable filter was used with Q of 1.4.

This is just the beginning. I will be adding more to this, including 3 sections and being able to variously modulate the section levels.


fsk_demo_01.wav
 Description:
Polyphonic 8 voice Synched FSK synth, 2 FSK pairs per voice.

Download (listen)
 Filename:  fsk_demo_01.wav
 Filesize:  805.56 KB
 Downloaded:  1200 Time(s)


_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Ricko



Joined: Dec 25, 2007
Posts: 251
Location: Sydney, Australia
Audio files: 27

PostPosted: Wed Jul 30, 2008 2:25 am    Post subject: Reply with quote  Mark this post and the followings unread

Wow, firmware DIY synthesizers! Congratulations

I would be interested to hear a triangle version of this too. (As I mentioned, I think the richer waveforms tend to disguise the formant effect, but that is not to say that other effects are not pleasant too.)
Back to top
View user's profile Send private message Visit poster's website
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Wed Jul 30, 2008 11:07 am    Post subject: Reply with quote  Mark this post and the followings unread

Here is a comparison sample, the patch is the same in both the first and last halves except for the slave waveform. In the first half, triangle is used, in the second half, sawtooth.

Also - I've added a crude modulation for the FSK section values using an ADSR to modulate all 4 (2 for one NCO 2 for the other). You can hear this more in the saw half and also more in the lower register of both halves.


fsk_demo_02.wav
 Description:
Sample of both triangle and sawtooth slave waveforms.

Download (listen)
 Filename:  fsk_demo_02.wav
 Filesize:  3.15 MB
 Downloaded:  1231 Time(s)


_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Rykhaard



Joined: Sep 02, 2007
Posts: 1290
Location: Canada

PostPosted: Wed Jul 30, 2008 11:24 am    Post subject: Reply with quote  Mark this post and the followings unread

ScottG wrote:
Here is a comparison sample, the patch is the same in both the first and last halves except for the slave waveform. In the first half, triangle is used, in the second half, sawtooth.

Also - I've added a crude modulation for the FSK section values using an ADSR to modulate all 4 (2 for one NCO 2 for the other). You can hear this more in the saw half and also more in the lower register of both halves.


Wow! For digital, that sounds GREAT! Shocked Smile Very Happy
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
JovianPyx



Joined: Nov 20, 2007
Posts: 1988
Location: West Red Spot, Jupiter
Audio files: 224

PostPosted: Wed Jul 30, 2008 11:28 am    Post subject: Reply with quote  Mark this post and the followings unread

Sample rate is 250 KHz - no band limiting... Cool

Oh and only 12 bits... I should add that most internal computations are done in 18 bit signed arithmetic and that the phase accumulators in the NCOs are 33 bits...

_________________
FPGA, dsPIC and Fatman Synth Stuff

Time flies like a banana.
Fruit flies when you're having fun.
BTW, Do these genes make my ass look fat?
corruptio optimi pessima
Back to top
View user's profile Send private message Visit poster's website
Ricko



Joined: Dec 25, 2007
Posts: 251
Location: Sydney, Australia
Audio files: 27

PostPosted: Sun Aug 03, 2008 12:04 am    Post subject: Reply with quote  Mark this post and the followings unread

For the 12 bit DAC, one trick you can do is to add the thirteenth bit onto the 12th. IIRC, they call this 12 and a half bits.

This reduces the maximum error to (near) a half-bit rather than (near) a full bit.

In other words, if the sample was 0x000F @16 bits then the output is 0x001 @12 bits rather than 0x000


Cheers
Rick
Back to top
View user's profile Send private message Visit poster's website
Ricko



Joined: Dec 25, 2007
Posts: 251
Location: Sydney, Australia
Audio files: 27

PostPosted: Wed Aug 06, 2008 7:28 am    Post subject: Reply with quote  Mark this post and the followings unread

I just got to hear the new samples: well done Scott!

It is much less buzzy than my software version, presumably from the filter.

Cheers
Rick
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic Moderators: jksuperstar, Scott Stites, Uncle Krunkus
Page 2 of 2 [41 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use