Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import rdkit | |
from rdkit import Chem | |
from rdkit.Chem import ChemicalFeatures | |
from rdkit.Chem.Pharm2D.SigFactory import SigFactory | |
from rdkit.Chem.Pharm2D import Generate | |
from rdkit import RDConfig | |
import os | |
featFactory = ChemicalFeatures.BuildFeatureFactory(os.path.join(RDConfig.RDDataDir,'BaseFeatures.fdef')) | |
sigFactory = SigFactory(featFactory,minPointCount=2,maxPointCount=3,trianglePruneBins=False) | |
sigFactory.SetBins([(0,2),(2,5),(5,8)]) |
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
import itertools as it | |
import numpy as np | |
import midiutil | |
from midiutil.MidiFile import MIDIFile | |
#generates about half an h of modal fingerpicking tunes using a simple markov model | |
#change the seed with increments of about 100K to get a new one. | |
#lots of parameters to play around with but you can figure it out yourself. | |
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
import itertools as it | |
allsmi=[] | |
maxvalence=2 | |
def cl_ratio(Cl,C): | |
return Cl*35.45/((C*12.011)+(Cl*35.453)+((C*2-Cl+2)*1.008)) #ratio of chlorine vs total MW | |
for chainlength in [10,11,12,13]: | |
combinations = (list(i) for i in it.product(list(range(maxvalence+1)),repeat=chainlength) if tuple(reversed(i)) >= tuple(i)) #filter out mirror image molecules |
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
from scipy.io import wavfile | |
import scipy.io | |
from scipy.fft import fft, ifft | |
import numpy as np | |
""" | |
chord.wav should be a short sound, equivalent to carrier in vocoder | |
impulse.wav should be a quite sparse transient heavy sound, equivalent to modulator in vocoder | |
play with tsmear and asmear to tweak between vocoder and convolution like sound | |
""" | |
Tsmear = 1000 |