Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong forcing to i-rate in the k-rate loops #3

Open
anton-k opened this issue Sep 18, 2013 · 0 comments
Open

wrong forcing to i-rate in the k-rate loops #3

anton-k opened this issue Sep 18, 2013 · 0 comments
Labels

Comments

@anton-k
Copy link
Contributor

anton-k commented Sep 18, 2013

Example:

module Main where

import Csound.Base

evts :: Evt D
evts = fmap (\x -> (x + 2) / 9) $ filterE (<=* 7) $ range (0, 41) $ metroE (1000 / 17)

proc :: Sig -> Sig
proc x = (* 0.5) $ hp 4000 $ sum
    [ 100 * sum
        [ bp 4500 1200 y
        , bp 4550 1200 y
        , bp 4600 1200 y 
        ]
    , 42 * bp 9000 500  y
    ]
    where y = lp 1000 x

pulse :: D -> Sig
pulse amp = sig amp * linseg [0, 0.1/1000, 1, 0.1/1000, 0, 1, 0]

main = dac $ do
    asig <- schedule pulse $ fmap (\amp -> (0.2, amp)) evts
    return $ proc asig

Inside the if-then-else branch state of the event stream is forced to the i-rate, so no update happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant