In [2]:
import sys
sys.path.append('/Users/spacecoffin/Development')
import GravelKicker as gk
import os
import pandas as pd
from datetime import datetime
from supriya.tools import nonrealtimetools
In [3]:
this_dir = '/Users/spacecoffin/Development/GravelKicker/__gen_files'
In [1]:
import hurry.filesize
In [38]:
hurry.filesize.size(903168, system=hurry.filesize.alternative)
Out[38]:
In [40]:
hurry.filesize.size(882102, system=hurry.filesize.si)
Out[40]:
In [7]:
hurry.filesize.size(882000, system=hurry.filesize.si)
Out[7]:
In [43]:
hurry.filesize.size(1073741824, system=hurry.filesize.alternative)
Out[43]:
In [42]:
hurry.filesize.size(1073741824, system=hurry.filesize.si)
Out[42]:
In [44]:
1073741824 / 882102
Out[44]:
In [7]:
dir_list = os.listdir(path=this_dir)
if "df.p" in dir_list:
_pickle_path = os.path.join(this_dir, "df.p")
_old_df = pd.read_pickle(_pickle_path)
In [9]:
_old_df["hash"]
Out[9]:
In [11]:
_old_df.dtypes
Out[11]:
In [15]:
pmtx = gk.generator.gendy1.gen_params(rows=20)
df = gk.generator.gendy1.format_params(pmtx)
df.sort_values(["hash"])
Out[15]:
In [20]:
for i, row in df.iterrows():
session = nonrealtimetools.Session()
builder = gk.generator.gendy1.make_builder(row)
out = gk.generator.gendy1.build_out(builder)
synthdef = builder.build()
with session.at(0):
synth_a = session.add_synth(duration=10, synthdef=synthdef)
gk.util.render_session(session, this_dir, row["hash"])
In [47]:
dt = datetime.now().strftime("%Y_%m_%d") #_%H-%M-%S")
identifier = '{0}-len{1}'.format(dt, str(df.shape[0]))
In [53]:
df.to_pickle("{0}/df-{1}.p".format(this_dir, dt))
In [54]:
df.to_pickle("{0}/df.p".format(this_dir, dt))
Next, we need to:
In [ ]: