Microtonal polyphonic synthesizer

Status
Not open for further replies.

Ei_La

Member
Hello to the forum members,

I'm new to teensy, I have experience in Max/MSP and a little experience in Arduino.

I would like to build a polyphonic synthesizer that is capable of playing microtonal scales using the scala files.

I know I will have plenty of subjects I will need to deal with down the road but first I try to understand if and how I can do the following:

The scala files have two type of scales inside them - a scale degrees represented by ratios and scales represented by cents.
sometimes one scale file will consists both type - ratios and cents

here is two examples:

scale represented by ratios

Code:
! badings1.scl
!
Henk Badings, harmonic scale, Lydomixolydisch
 9
!
 9/8
 5/4
 11/8
 3/2
 13/8
 7/4
 2/1
 9/4
 5/2

Scale represented by cents and ratios:

Code:
! chin_wang-po.scl
!
Scale of Wang Po, 958 AD. H. Pischner: Musik in China, Berlin, 1955, p.20       
 7
!
 9/8
 403.22751
 609.26340
 3/2
 903.70231
 1106.39699
 1180.87015


My idea is to have a menu that storing all the scales file names and a lcd and encoder to scroll and choose a specific scales.
Then, when a scale is chosen, I would like to understand how I can iterate over the part of the file that is represented the scale degrees and store it into array of frequencies.
I will need to have a function that can do the calculation for each degree in the scale to transfer it to a specific frequency, then to generate a list of 127 frequencies based on that, in order, later on to be able to assign each midi key to a different frequency.

for doing so I will need to have a base note (middle C (60 in midi) - frequency of 261.626HZ) and make the calculation in relation to that note.

I will also would like to store the name, the description and the number of note of each scale and show it on the lcd screen.

I hope I manage to explain myself correctly.
Any tips and suggestions for doing the above?

Many thanks!
 
Sounds like you need to write an adboc parser. https://stackoverflow.com/questions/6899639/what-is-ad-hoc-parsing

Start by drawing out a state-machine that can navigate this file format at a high level (ie
in terms of "read string", "read number", etc. Then flesh out the innards of these steps
into functions you can call. You seem to have comment lines to ignore, a title line with description, a
note-count line, and then each note line is either a rational or floating point number
 
Thanks for your reply!
As I'm still waiting to my Teensy to arrive, and I've got no SD card reader - is there any other way I could store and read those type of files in arduino? I would like to start and try functions in order to extract and store the data I'll need from those files.
 
Status
Not open for further replies.
Back
Top