Cabbage Logo
Back to Cabbage Site

Changing Metro Frequency


I am trying demonstrate how the frequency of a metro object can change over time. I know how to do this in Max/MSP but I am not achieving the results I want. I was hoping someone could help me with this.

keyConceptVariables.csd (786 Bytes)


I’m not sure why you’re using global variables, but that’s not the issue. The issue if you’re casting a k signal as an i constant. Hence no change to the metro frequency. Here is a tidied up version of what you have that woks fine.

event_i "i", "thing", 0, 100

instr thing
    kMetroSeg linseg 0, 20, 10
    kTrig metro kMetroSeg
    schedkwhen kTrig, 0, 4, "thing2", 1, 0.1

instr thing2
    aout oscil 0.1, 100
    aout2 oscil 0.1, 200
    aout3 oscil 0.1, 300
    aMix= aout+aout2+aout3
    outs aMix, aMix

Thank you Rory! It works!!!

I am actually going to do a Csound presentation at my college, I’d love to share it here if I manage to record it. Thanks for all your help.


Best of luck with it @Amogh_Dwivedi! I hope it goes well for you :slight_smile: