sonic-pi-net / sonic-pi

Code. Music. Live.
https://sonic-pi.net
Other
10.78k stars 922 forks source link

Microtonal scales #1689

Closed kivancguckiran closed 3 years ago

kivancguckiran commented 7 years ago

Hello and thanks for the library and the software.

I live in Turkey and our traditional music consists microtonal scales, makam as we call it. I'm planning a contribution around this idea. As you probably know, these microtonal scales consists sounds other than equal temperament system. As I've examined a bit, it seems scale system in the code is based on equal temperament which is perfectly normal. It means a half(1/2) step is 100 cents(12 notes, 1200 for an octave). I haven't figured out how to start for intervals smaller or bigger than 100 cents.

Anyway, I'm still trying to familiarize with the code. If anyone can point a way or suggest some topics, I'm up for it. I thought it would be a good idea to share my plan with you people.

Thanks again and keep up!

samaaron commented 7 years ago

@xavriley - do you have any thoughts on this?

kivancguckiran commented 7 years ago

I think I've found the way to do it. Library accepts values other than Integer in scale arrays. I've started to add microtonal scales as of now.

I will notify you time to time of my progress.

Thanks

kivancguckiran commented 7 years ago

I've made some progress, implemented most of "makams". I will work on variations of "makams" from now on.

It came out bigger than I thought at first glance. The implementation is based on "Koma" which is calculated first with splitting the octave to 53 komas. Then the intervals(bakiyye etc.) which are based on komas. After calculating intervals, the "dortlu" "besli" system is introduced. Which are basically translated as "four pack" and "five pack" respectively. Finally, "makams" are built with this packs.

Maybe it is better to implement its own class? Since chords are dependent to Scales, I thought it would not be appropriate to implement it as a different class outside it.

Tested it, works as I expected at the moment.

What do you think? I've atttached the code and I'm open to your suggestions. Thought it is early for a pull request before hearing your idea about it.

Thanks,

https://github.com/kivancguckiran/sonic-pi/blob/master/app/server/sonicpi/lib/sonicpi/scale.rb

kivancguckiran commented 3 years ago

This is part of the source code now! Closing.

wizofe commented 2 years ago

@kivancguckiran Can you please give some examples of makams implemented with Sonic Pi? I would love to try my own music but I am unsure how to utilise your support and library. Thank you!

kivancguckiran commented 2 years ago

@wizofe You can use them just like you use scales "ionian", "major" etc. Also they are hinted to the user AFAIK from the UI when you try to use a scale. It's been some time now since I've used SonicPi.

The only difference is microtonal. Each individual note's frequency is depending on the base note padded by some amount of "KOMA" which is 1/53 of an octave. You can check out the source if you want to understand more of this.

The makams are presented here with their basic ascending and descending patterns. But feel free to randomize them, or use their notes to compose a melodic structure, I was mainly using them like this.

Actual makam music, as we call it musiki, cannot be descripted by language, any other notation or digital system. It's passed onto generations orally. If you want to get familiar with the music, There is an oud player on YouTube who occasionally puts up a video in English. With subtitles: Baha Yetkin.

So, long story short:

If you are not familiar with the scales, I suggest sticking to the documentation. If you still have problems with them, feel free to reach out, I'll try my best to demonstrate. Also, I had a coding session with my friends, I'll also share it if I find it.

This is a jewel from 2017:

Trio Sonic Band - Live stage with Sonic Pi (Maker Faire Fest İstanbul 2017)

kivancguckiran commented 2 years ago

@wizofe I found it.

SonicPi Makam Music Collaboration

wizofe commented 2 years ago

That's amazing @kivancguckiran! Thank you for the useful videos and links which I am going to study. Actually I am playing Tanbur/Saz and Lavta so I am quite accustomed with the makams (although from the other side of the Mediterranean, Istanbul & Greek music of the time rather than Ottoman Classic).

I'll be happy to share if I could share some of my creations, let's keep in contact! I appreciate your time :)