-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
334e000
commit 9612c7f
Showing
2 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <https://www.gnu.org/licenses/>.""" | ||
|
||
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |