# Changing Metro Frequency

**URL:** <https://forum.cabbageaudio.com/t/changing-metro-frequency/3941>\
**Category:** Csound Noobs\
**Created:** [10 November 2023 00:36 UTC](https://forum.cabbageaudio.com/t/changing-metro-frequency/3941 "2023-11-10T00:36:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amogh\_Dwivedi](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/amogh_dwivedi/32/4693_2.png) [@Amogh\_Dwivedi](https://forum.cabbageaudio.com/u/Amogh_Dwivedi)\
**Post date:** [10 November 2023 00:36 UTC](https://forum.cabbageaudio.com/t/changing-metro-frequency/3941/1 "2023-11-10T00:36:37Z")

</div>

Hello,

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](https://forum.cabbageaudio.com/uploads/short-url/1TWDfCEHC4PEFxZWnIeHsCr41AV.csd) (786 Bytes)

Best,  
Amogh

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [10 November 2023 13:22 UTC](https://forum.cabbageaudio.com/t/changing-metro-frequency/3941/2 "2023-11-10T13:22:52Z")

</div>

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
endin

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

---

<div class="post-metadata">

**Author:** ![Amogh\_Dwivedi](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/amogh_dwivedi/32/4693_2.png) [@Amogh\_Dwivedi](https://forum.cabbageaudio.com/u/Amogh_Dwivedi)\
**Post date:** [13 November 2023 03:51 UTC](https://forum.cabbageaudio.com/t/changing-metro-frequency/3941/3 "2023-11-13T03:51:44Z")

</div>

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,  
Amogh

---

<div class="post-metadata">

**Author:** ![rorywalsh](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/rorywalsh/32/165_2.png) [@rorywalsh](https://forum.cabbageaudio.com/u/rorywalsh)\
**Post date:** [13 November 2023 09:22 UTC](https://forum.cabbageaudio.com/t/changing-metro-frequency/3941/4 "2023-11-13T09:22:21Z")

</div>

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