# Hello world! (introduction)

**URL:** <https://forum.toplap.org/t/hello-world-introduction/1287>\
**Category:** Foxdot\
**Created:** [7 May 2020 10:32 UTC](https://forum.toplap.org/t/hello-world-introduction/1287 "2020-05-07T10:32:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![talicopow](https://forum.toplap.org/user_avatar/forum.toplap.org/talicopow/32/707_2.png) [@talicopow](https://forum.toplap.org/u/talicopow)\
**Post date:** [7 May 2020 10:32 UTC](https://forum.toplap.org/t/hello-world-introduction/1287/1 "2020-05-07T10:32:22Z")

</div>

Hello!

I just discovered FoxDot and it is great. I always dreamed of being able to make generative music using python.

Just as a warming up I coded “Clapping Music” by Steve Reich using FoxDot. Here is a link to the [YouTube Video](https://www.youtube.com/watch?v=tZGbcUbbHdI)

I’m also very interested in using FoxDot to control virtual synths in the iPad. `MidiOut` instrument is promising, but it lacks lots of parameters which could be achieved via CC. I’m doing some experimentation with this. Stay tuned 🙂

---

<div class="post-metadata">

**Author:** ![talicopow](https://forum.toplap.org/user_avatar/forum.toplap.org/talicopow/32/707_2.png) [@talicopow](https://forum.toplap.org/u/talicopow)\
**Post date:** [8 May 2020 20:18 UTC](https://forum.toplap.org/t/hello-world-introduction/1287/2 "2020-05-08T20:18:47Z")

</div>

I created a new version, based on the same rhythmic pattern, but adding some notes which create intricate counterpoints. I also added a bass line. I used FoxDot to drive via midi some iPad instruments (two oboes and one cello). The result is reminiscent of Phillip Glass.

This is the new [YouTube video](https://www.youtube.com/watch?v=d_iGmB_rWMM)

The script I used is:

```
def clapping():
    pattern = P[1,1,1,0,1,1,0,1,0,1,1,0]
    d1 >> MidiOut([0,2,4,5,4], dur=1/12, amp=pattern*PWhite(0.5,.7), 
                  pan=-.5, delay=PWhite(0, 0.01), channel=0)
    d2 >> MidiOut([7,6,5,2,1], dur=1/12, amp=pattern*PWhite(0.5,.7), 
                  pan=+.5, delay=PWhite(0, 0.01), channel=1)
    d3 >> MidiOut([0, -2, [-3, -4]], oct=4, dur=[4, [4,3]], channel=2)
    i = 0
    def rotate():
        nonlocal i
        d2.amp = pattern2 = pattern.rotate(i)
        print("{}\n{}".format(pattern, pattern2))
        i += 1
    rotate()
    Clock.every(8, rotate)
    Clock.future(8*13-.1, Clock.clear)

Clock.reset()
Clock.set_time(-1)
Clock.bpm = 32
Scale.default = "aeolian"
nextBar(clapping)
```

---

<div class="post-metadata">

**Author:** ![ryan](https://forum.toplap.org/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://forum.toplap.org/u/ryan)\
**Post date:** [14 May 2020 16:05 UTC](https://forum.toplap.org/t/hello-world-introduction/1287/3 "2020-05-14T16:05:20Z")

</div>

Hi there! Glad to see you’re getting stuck in and it’s cool to see the combination with MIDI also. Keep it up 🙂
