From 9612c7f0955a3c896acd60e8db22ec29c46db65d Mon Sep 17 00:00:00 2001 From: Maurizio Crescenzo <92685677+FonazzaStent@users.noreply.github.com> Date: Wed, 29 Mar 2023 12:33:18 +0200 Subject: [PATCH] Add files via upload --- 3xOsc_color_1.0.0.py | 91 ++++++++++++++++++++++++++++++++++++++++++++ ReadMe.txt | 14 +++++++ 2 files changed, 105 insertions(+) create mode 100644 3xOsc_color_1.0.0.py create mode 100644 ReadMe.txt diff --git a/3xOsc_color_1.0.0.py b/3xOsc_color_1.0.0.py new file mode 100644 index 0000000..2e0ee64 --- /dev/null +++ b/3xOsc_color_1.0.0.py @@ -0,0 +1,91 @@ +"""3xOsc color calculator 1.0.0 - Calculate volumes for colors with Fruity +Loops 3xOsc oscillators. +Copyright (C) 2023 Fonazza-Stent + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see .""" + +def inputRGB(): + global R + global G + global B + global quitcheck + print ("Input R, G, B values for a color in RGB format."+"\n") + R=input("R (q to quit): ") + if R=='q': + quit() + if R.isdigit()==False or int(R)<0: + R=0 + if int(R)>255: + R=255 + G=input("G (q to quit): ") + if G=='q': + quit() + if G.isdigit()==False or int(G)<0: + G=0 + if int(G)>255: + G=255 + B=input("B (q to quit): ") + if B=='q': + quit() + if B.isdigit()==False or int(B)<0: + B=0 + if int(B)>255: + B=255 + R=int(R) + G=int(G) + B=int(B) + CalculateVolumes(R,G,B) + +#GenerateChord + +def CalculateVolumes(R,G,B): + RGB=[R,G,B] + RGBmax=max(RGB) + saw=int(50/RGBmax*R) + square=int(50/RGBmax*G) + sine=int(50/RGBmax*B) + osclist=[saw,square,sine] + maxosc=max(osclist) + osc_one=False + print ("\n") + if saw==maxosc and osc_one==False: + print ("Saw: Oscillator 1") + osc_one=True + else: + print ("Saw: ",saw) + if square==maxosc and osc_one==False: + print ("Square: Oscillator 1") + osc_one=True + else: + print ("Square: ",square) + if sine==maxosc and osc_one==False: + print ("Sine: Oscillator 1") + osc_one=True + else: + print ("Sine: ",sine) + print ("\n") + RGBscale=[R/255*100,G/255*100,B/255*100] + RGBvalue=int(100-max(RGBscale)) + print ("Clone synth specified above, pitch it one octave below, invert polarity and set volume on: ", RGBvalue) + print ("\n") + +#main +def main(): + global R + global G + global B + while True: + inputRGB() + +main() diff --git a/ReadMe.txt b/ReadMe.txt new file mode 100644 index 0000000..48f3dc1 --- /dev/null +++ b/ReadMe.txt @@ -0,0 +1,14 @@ +3xOsc color calculator 1.0.0 + +A color calculator for the 3xOsc synth built in all copies of FL Studio from Image-Line. +The program will take channel values for an RGB color as an input and output volume parameters for each +oscillator on the 3xOsc synth found on all copies of FL Studio from Image-Line. Volume values for +Saw, Square and Sine waveshape correspond to the Red, Green and Blue channel of the color. The +highest volume value will be set on the top oscillator (Oscillator 1), where no volume control is +provided. Set this oscillator to the corresponding waveshape and the other two to the other +waveshapes, adjusting volumes as shown by the program. +Clone the synth with these settings and set its main volume to the volume shown by the program after +the "Clone synth specified above" message. +When played in a track with other presets, this presets will transfer to the brain the subliminal +synesthetic sensation of that particular color. +More info about this at the following link: www.fonazzastent.com \ No newline at end of file