Code to making a sound stars
Hello, I'm Kabuto.
I'm still learning English, so maybe you can't understand my sentence sometimes. But if you read this article, I would be very happy.
(If there is a mistake please teach me!)
Let's begin. One day I was watching Youtube, I found this video .
The language used in this video is Japanese so I explain in English, We can description regular polygons by fraction.
I'm attracted to mechanism. Then, I made this code.
Please take a look at this code.
Overview
This code creates a tuplet from this mechanism using pd and Processing. And also display a slider for that it can be changed in real time.
For example, If any number is 2.5,this code say apex is 5, and make a quintuplet sound.
Code
This is the code.
The libraly I'm using is "controlP5", "oscP5", "netP5".
This mechanism convert any number to fraction and reduction of fraction, after that calculate angle and apex.(line 18 to 57)
All that is left is sending data for Pd by OSC.
The libraly I'm using is "osc" only.
But this libraly have important point, that is The libraly may not work until you open sample codes. At least it did in my environment. If you bother about that, you should change the way. (If I fouund Solution, I teach in new article.)
This mechanism is so simple. Bpm is divides by figure sent from Processing and make a sound based on the results.
Practice video
That's all, thank you!
この記事が気に入ったらサポートをしてみませんか?