Frequency Modulation

Modulation works. Barely. I modified the Sine class to accept objects of type UGen as input. Though I think it might be possible to modify class UGen so that all child classes automatically support modulation by default. That’s probably my next step.

Since only the Sine class supports modulation, what better way to test it than to generate some classic FM tones. I created @Instr SimpleFM, which is just that, a simple FM instrument with one modulator oscillator being fed into a carrier oscillator. Here’s the file: And here’s the code:

from slipmat import *

def SimpleFM(dur, amp, pch, env, index=1, ratio=1):
    freq = cpspch(pch)                            # Convert pch to Hz
    env_1 = RiseFall(dur, env) * UVal(index)      # Index envelope
    env_2 = RiseFall(dur, 0) * UVal(amp)          # Amplitude envelope
    m = Sine(env_1, freq * ratio)                 # Modulator
    c = Sine(env_2, UVal(freq) + UVal(freq) * m)  # Carrier

s = ScoreEvents()
s.event(0, 2, SimpleFM(2, 0.5, 8.03, 0.125, 4))
s.event(2, 2, SimpleFM(2, 0.5, 8.07, 0.5, 16, 2))
s.event(4, 4, SimpleFM(4, 0.3, 7.00, 0.125, 16, 3))
s.event(4, 2, SimpleFM(4, 0.3, 8.05, 0.5, 4))
s.event(6, 2, SimpleFM(2, 0.3, 8.03, 0.5, 4))
ScoreEventsToWave(s, "./fm.wav")

Listen at SoundCloud

Clearly, this audio example is no Stria.

14 thoughts on “Frequency Modulation

  1. Hi Jacob,
    I’m slowly catching up to your thoughts… although I haven’t read through all your more recent entries, I wanted to ask you if you know these two projects I found recently:
    Also, if you have a look at this:
    at time 17:50, you will see some of the things I am adding to QuteCsound to make it a live python performance system, which I think could integrate Slipmat wonderfully…

  2. I’m actually a bit behind on posting my thoughts here. And I’m gearing up to rewrite all the classes to use vectors instead of Python generators. This first step was to get a sense of how malleable Python is as a language.

    I’ve played with ounk a bit. It’s quite nice. I’ve read up on nsound, though I haven’t played with, yet. It’s on my list of things to do, and will do so once I jump into the C/C++ side of things.

    I tried watching the video, but it keeps hanging start at 4 seconds in. I’ll try again soon. I’m very curious to what you have planned for QuteCsound.

  3. Maybe it’s a Theora issue? It’s working well on firefox on OS X.
    It will surely work on something like VLC.

  4. Jacob, I like so much your blogs! Congrats!
    I’m sneaking around slipmat source, it’s so interesting. Just a small fix to file to install correctly:
    from setuptools import setup
    I’m getting in contact with csound (I’ve did all my work on PD), and after your post about Lisp, I want to talk more with you about the power of both tools. I dream with a opensourced Impromptu.
    Please, let’s keep the talk.
    All the best.

  5. @Vilson Vieira: Thanks! Feel free to send me an email, or we can find a place to talk publicly, so others might join in.  Maybe I’ll just post an open discussion thread here. My email is
    I have a few things I want to talk about here on Slipmat. I’ve been working with the Csoundi API and Processing as of late, and I’m learning quite a bit that warrants some discussion here.
    And I definitely want to here everything you’ve been working on. There is so much I don’t know, and I’m always trying to fill me head with new ideas.


    Buy viagra with Extremely Low prices!
    We have CHEAPEST prices on viagra and other pills!!!
    This is the best choise to BUY viagra online!
    Accepting All credit cards!!!Very fast worldwide shipping!!
    Click link below to order viagra :

    America’s most popular impotence medications have never been that cheap! Try out!
    Everything you need to get rid of erectile dysfunction is here at your disposal! Come on!
    After I started taking these tine pills on the regular basis I have sex when and how I want!
    Sexual life is something that makes us feel happy and necessary. What’s life without sex?
    I have never believed in medications like Viagra, but I managed to get rid of impotence!
    How long have you been living with erectile dysfunction in your mind? Time to forget!
    It’s time to refill your home medicine chest with super-powerful impotence treatment!
    Impotence should have never occurred in your bedroom. Learn what to do if it did occur.
    Don’t be stupid to miss the chance to buy best erectile dysfunction drug at half price!
    Learn more about men’s most trusted methods of struggling with impotence now!
    It’s time to buy the items from your wish list – discount season arrived at your doorway!
    I know how to boost your sexual performance and never let it disappear forever!
    If you are one of our subscribed customers don’t miss your great opportunities!
    What are the top 5 secrets of natural medicine that work miracles on your potency?
    There’s no such thing as free lunch! You have to pay 10% for most effective medication!
    Does the duration of your sex depend on the length of your penis? Let’s find it out!
    Regular steady erections are waiting for a handsome owner just one pill away from you!
    Our Giant Sale season Starts today! Don’t miss your chance to boost your masculine potency!
    This offer will change your whole life! It will bring harmony and sex into your family life!
    New horizons of love will be open for you the moment you try this amazing sex medicine!
    Are you satisfied with the amount of sex you have every week? I can improve it 10 times!
    People who cherish their sexual life start impotence treatment before problems occur!
    Try out alternative methods of potency improvement before you decide to try surgery.
    Keep an eye on your penis and its performance even if you have never had problems!
    You are a lucky man & we have chosen you to try our most effective potency booster!
    This is an awesome deal! Buy two packs of impotence medication and pay only for one!
    Feel free to improve your sexual performance and live long and happy life of a womanizer!
    What are the most popular methods of erectile dysfunction treatment? Learn more now!
    This invaluable mixture of natural ingredients literally works miracles on impotence!
    Absolutely new edge of breathtaking sex is open for you with the help of our brand new drug!

    and flomax viagra
    men’s health natural viagra
    enhance viagra
    walmart viagra cost 2009
    18 takes viagra
    viagra and mastrubation
    uses of viagra in women
    usual dosage of viagra
    buy viagra online safe
    viagra sudden weight gain
    photo galleries porn viagra coitus
    genetic viagra
    pros and cons of taking viagra
    online generic viagra india
    cheap viagra ads
    viagra like medications
    viagra online drugstore
    viagra and pe
    viagra chemical
    do porn stars use viagra
    search viagra find cheap pages
    viagra babies
    reverse side effects of viagra overdose
    online viagra order
    viagra testosterone
    effective time for viagra
    viagra in cream
    norvasc viagra adverse reaction
    antidepressant female viagra
    viagra emails from your own address

  7. Вид на жительство в Эстонии
    Основанием для получения вида на жительство в Эстонии могут быть:

    Объединение семьи
    Работа в Эстонии
    Учеба в Эстонии
    Предпринимательство в Эстонии
    Наличие достаточного легального и постоянного дохода
    К гражданам Евросоюза применяются несколько иные, облегченные условия внж в Эстонии.

    Постоянный вид на жительство может быть выдан иностранцу,

    прожившему в Эстонии на основании срочного вида на жительство не менее трех из последних пяти лет и
    имеющему действительный в Эстонии вид на жительство, местожительство и постоянный легальный доход для проживания в Эстонии.
    Удостоверение личности (ID-карточка) – обязательный внутригосударственный документ для граждан Эстонии старше 15 лет и находящихся в Эстонии на основании вида на жительство иностранцев. В удостоверение личности иностранца, находящегося в Эстонии на основании действующего вида на жительство, вносятся также данные о виде на жительство и разрешении на работу.

  8. Shop the latest cowl neck dress handpicked by a global community of independent trendsetters and stylists.
    A chic and flattering dress with lots of great draping detail. Product Details. Shipping Weight: 1 pounds (View shipping rates and policies); Shipping: This
    jasmine bridemaids dresses

  9. You need music that will relax but not distract you – the choice is entirely up to you.During the printing process, a subeditor or copy editor may have reworded parts of your paper or rearranged your punctuation.

  10. Realty Manhattan solves real estate needs for corporate users of office, industrial, and retail space investment property in Manhattan resulting in cost savings of 15-20% or more.

    Why choose a tenant broker and not other types of brokers?
    – Tenant Broker or Adviser work exclusively for YOU, other brokers might work for the landlord.
    – When you are represented by a non-tenant broker, you generally might overpay by at about 10-20%.

    Why Realty Manhattan?
    – There is “No Commission or Fee” for services to our clients when renting or buying commercial property rent office NYC. We stand for your interests as a tenant.
    – We find and negotiate the best possible deal for you and your business will economize on New York office for leaseby 15 to 20% when compared with what you could do yourself or by utilizing services of a landlord broker.
    – We give you nearly all available and most complete listings matching your needs.
    – Our services are completely free of charge to our tenant clients.
    – We constantly show great results and professional track record.

    Why Search for Manhattan Commercial Realty with Us?
    – Access to both public multiple listing service and private listings for clients looking for rent offices in NYC .
    – Full commitment and personal attention of a broker, our efforts equate to 2-4 weeks of your time and energy saved.
    – Top experienced real estate professional handling your space requirements and property search versus giving the case to a junior agent.
    – Most attention for your real estate needs to get the best deal on the most important decision for the future of your business.