Poly instrument with microtonal update/converting midi into micorotonal pitch information.1/22/2021 this section of the patch converts and calculates pitch based on variables within the equation which allows you to change how many notes per octave you would like, but where you'd like to tune A. the first part of the calculation calculates frequency, (freq = A*2^(n/o) where A is middle A -usually 440Hz, n is number of notes away from middle A, and o is how many notes per octave -usually 12, and allows each variable to change.
then it takes that frequency and reverse caclualates the midi note number you would require to achieve that pitch. as such i have another patch that converts standard midi into microtonal pitch information aswell.
0 Comments
In anticipation to one of my units this year, i've been working on a number of arduino programs during the uni break.
when i started with arduino there were a few early programs that allowed you to create a blinking light on a variable timer. at first i wanted to create a program that would allow multiple lights to flash on indipendant timers, but i found that within arduino, you can only set a single loop of code, so writing the code was going to be very tedious.
each letter reprisents one line of code (blue on and black off) per 10ms with 5 variable lights if i had to write out the code for one continuous loop. i never actually found the point where they all meet up again but gave up this idea at this point because the lights would have to be on a set time and it wouldnt be as good to experiment with.
I began exploring the idea of metering audio and after watching a few tutorials, created a program that took information from max/MSP and sent it to the arduino for one channel of audio, and metered over 12 LED's. My journey became much more difficult when i tried to send two seperate integers through the programs (to meter a left and right channels).
I came across a kind of code called ASCII (American Standard Code for Information Interchange) that could sent multiple intergers, letters and symbols through the serial port as bytes. from there the arduino decodes the information and applies it to the program. This was the ultimate solution to most of my issues, but it took a bit of fine tuning for me to get the program running as quickly as it does now.
You can see pictures of the code set for 12 varible lights below.
This code sets 12 separate variables and turns on all the LED outputs.
Here the code says that if 12 bytes of information come through, set the the first byte as "vl", set the second as "va" etc. and then states that if a variable is 1, then the LED connected to that would react and turn on, and turn off if the variable is 0.
whenever the status of a switch is changed it sends a slightly delayed bang so that the information can enter the pack first. the information passes to a sprintf to add the full stop at the end of the 12 bytes of code (sending as 24 bytes including the spaces between the ones and zeros and for some strange reason it just works better with the full stop at the end).
updates include: vector plane for controlling gain of 4 oscillators, Low pass filter added, Reverb left and right, additive synthesis option (32 partials), Preset creator, Requires less processing power. before we continue and look inside, lets consider the harmonic step calculator on the right. the purpose of this tool is to send pitch information to the additional 3 oscillators. each number reprisents a partial and can send the coarse and fine tuning (in standard tuning) to whichever oscillator you want (a, b or c). The buttons have been coloured in relation to the interval from the fundamental. black is the fundamental, grey are the octaves, blue are the fifths/fourths, green are M3/m6, yellow is m7/M2, red is A4/D5, pink is M7/m2, light blue is M6/m3. Now lets take a closer look inside Above you can see the control panel for the Ohmsynth. these objects send information deeper into the patch and displays the controls in a nice neat configuration. at the top we have our controls for the additive synth, the adsr evelope controls, and a harmonic partial calculator which can send information to each additional oscilator. in the middle we have our low pass filter, a vector control, and then some number boxes which control the fine and coarse tuning for the additional oscillators. just undernath that we have our wave selection tools which offer us a selection of sine wave, triangle, rectangle, sawtooth, random, and an additive option. finally at the bottom left we have a reverb control for left and right. lets go a step deeper and see whats insode the poly object. our firts level of this poly synth deals with pitch information, adsr and gain control. on the left side there is a "full fine" adjustment which alters the pitch of everything by a certain amount of cents. on the right hand side we have our adsr objects and a low pass filter to remove any frequencies we cant hear in the low frequencies. the purpose of this is to eliminate loudness in places we cant perceive it and boost frequncies that we can hear. the middle section controls the fine and coarse adjustments for the additional oscillators and selects what wave form they produce. (see below for encapsulated parts) next we're going to go into the "additive sine 2" encapsulation these channels only turn on when the additive dial is turned up. you can see two seperate functions which can alter how each partials frequency is calculated, first a set variable (x2, x3, x4 etc.) then a second which can be altered by the partial ratio control. the reason why I've done it like this is because if you leave the switches open then the patch is constantly calculating numbers to send to the additive synthesiser, which increases the load on the computer. if you do it this way, the entire thing is isolated and doesnt work as hard until you turn it on. thats pretty much it! |
AuthorMy name is Daniel Ohm and this section will include my research into music theory, experimental ideas, Mixing techniques and lessons learned from creative forums and musical endeavors. Archives
September 2022
Categories |