Skip to content

Commit

Permalink
Updated chain.data
Browse files Browse the repository at this point in the history
  • Loading branch information
eflynch committed Jan 5, 2016
1 parent 013f9bd commit d69af4e
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 48 deletions.
11 changes: 8 additions & 3 deletions chain.data/chain.data.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,14 @@ void chain_data_doread(t_chain_data *x, t_symbol *s)
} else {
strcpy(filename, s->s_name);
if (locatefile_extended(filename, &path, &outtype, &filetype, 1)){
chain_error("%s: not found", s->s_name);
// chain_error("%s: not found", s->s_name);
// CACHE MISS
outlet_anything(x->s_outlet2, gensym("read_miss"), 0L, NULL);
return;
}
}
chain_data_openfile(x, filename, path);
outlet_anything(x->s_outlet2, gensym("read_done"), 0L, NULL);
}

void chain_data_openfile(t_chain_data *x, char *filename, short path){
Expand Down Expand Up @@ -261,7 +264,7 @@ void chain_data_dowrite(t_chain_data *x, t_symbol *s)
{
if (!x->s_values || !x->s_offsets || !x->s_num_samples){
// Fail silently
chain_error("No data to write in chain.data");
outlet_anything(x->s_outlet2, gensym("write_miss"), 0L, NULL);
return;
}

Expand All @@ -277,6 +280,7 @@ void chain_data_dowrite(t_chain_data *x, t_symbol *s)
path = path_getdefault();
}
chain_data_writefile(x, filename, path);
outlet_anything(x->s_outlet2, gensym("write_done"), 0L, NULL);
}

void chain_data_writefile(t_chain_data *x, char *filename, short path)
Expand Down Expand Up @@ -410,9 +414,10 @@ void chain_data_output_resampled_interleaved_list(t_chain_data *x)
{
if (!x->s_values || !x->s_offsets || !x->s_num_samples){
// Fail silently
chain_debug("No data saved in chain.data.");
// chain_debug("No data saved in chain.data.");
return;
}
// NOT IMPLMENTED !!!!!!!!!!!!!!!!!!!!!!!!!!
}

void chain_data_clear(t_chain_data *x){
Expand Down
30 changes: 15 additions & 15 deletions package/maxchain/help/chain.data.maxhelp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"modernui" : 1
}
,
"rect" : [ 346.0, 79.0, 1165.0, 933.0 ],
"rect" : [ 172.0, 79.0, 1165.0, 933.0 ],
"bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
"editing_bgcolor" : [ 1.0, 1.0, 1.0, 1.0 ],
"bglocked" : 0,
Expand Down Expand Up @@ -298,7 +298,7 @@
"range" : 128,
"size" : 128,
"style" : "",
"table_data" : [ 0, 21, 21, 20, 19, 19, 18, 17, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 19, 19, 20, 21, 22, 23, 23, 23, 24, 23, 23, 22, 21, 20, 19, 19, 19, 18, 16, 15, 15, 15, 15, 15, 14, 13, 14, 15, 16, 16, 17, 19, 24, 31, 30, 28, 21, 8, 4, 120, 0, 2, 10, 24, 35, 37, 49, 48, 56, 62, 56, 58, 60, 66, 69, 74, 73, 81, 82, 85, 88, 88, 87, 87, 85, 86, 86, 87, 90, 93, 96, 95, 98, 98, 99, 100, 96, 98, 94, 97, 94, 97, 68, 59, 55, 55, 57, 56, 61, 77, 90, 70, 45, 36, 29, 23, 17, 12, 9, 8, 5, 0, 0, 0, 0 ]
"table_data" : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 7, 14, 21, 26, 31, 41, 52, 65, 72, 83, 87, 100, 60, 58, 81, 79, 30, 40, 36, 35, 24, 27, 23, 19, 23, 20, 20, 14, 12, 8, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
}

}
Expand Down Expand Up @@ -557,8 +557,8 @@
"id" : "obj-82",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "int", "" ],
"numoutlets" : 3,
"outlettype" : [ "int", "", "" ],
"patching_rect" : [ 280.0, 212.0, 147.0, 22.0 ],
"style" : "",
"text" : "chain.time datahelp"
Expand All @@ -583,8 +583,8 @@
"id" : "obj-78",
"maxclass" : "newobj",
"numinlets" : 1,
"numoutlets" : 2,
"outlettype" : [ "int", "" ],
"numoutlets" : 3,
"outlettype" : [ "int", "", "" ],
"patching_rect" : [ 127.0, 212.0, 147.0, 22.0 ],
"style" : "",
"text" : "chain.time datahelp"
Expand Down Expand Up @@ -1496,14 +1496,15 @@
"styles" : [ {
"name" : "maxchain",
"default" : {
"bgcolor" : [ 0.095481, 0.100396, 0.100293, 1.0 ],
"color" : [ 0.960784, 0.827451, 0.156863, 1.0 ],
"fontface" : [ 0 ],
"accentcolor" : [ 0.0, 0.0, 0.0, 1.0 ],
"elementcolor" : [ 0.282353, 0.309804, 0.266667, 1.0 ],
"textjustification" : [ 0 ],
"fontname" : [ "Courier" ],
"textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ],
"patchlinecolor" : [ 0.639216, 0.458824, 0.070588, 0.9 ],
"fontname" : [ "Courier" ],
"fontface" : [ 0 ],
"textjustification" : [ 0 ],
"bgfillcolor" : {
"type" : "color",
"color" : [ 0.639216, 0.458824, 0.070588, 1.0 ],
Expand All @@ -1513,8 +1514,7 @@
"proportion" : 0.39,
"autogradient" : 0
}
,
"bgcolor" : [ 0.095481, 0.100396, 0.100293, 1.0 ]

}
,
"parentstyle" : "",
Expand All @@ -1532,8 +1532,8 @@
, {
"name" : "maxchain-subtitle",
"default" : {
"fontsize" : [ 20.0 ],
"textcolor" : [ 0.870588, 0.415686, 0.062745, 1.0 ]
"textcolor" : [ 0.870588, 0.415686, 0.062745, 1.0 ],
"fontsize" : [ 20.0 ]
}
,
"parentstyle" : "",
Expand All @@ -1542,9 +1542,9 @@
, {
"name" : "maxchain-title",
"default" : {
"fontsize" : [ 48.0 ],
"textcolor" : [ 0.960784, 0.827451, 0.156863, 1.0 ],
"fontname" : [ "Courier Bold" ],
"textcolor" : [ 0.960784, 0.827451, 0.156863, 1.0 ],
"fontsize" : [ 48.0 ],
"clearcolor" : [ 0.317647, 0.654902, 0.976471, 0.0 ]
}
,
Expand Down
50 changes: 36 additions & 14 deletions package/maxchain/patchers/chain.datatable.maxpat
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@
"style" : "",
"subpatcher_template" : "",
"boxes" : [ {
"box" : {
"comment" : "Cashe Miss",
"id" : "obj-8",
"maxclass" : "outlet",
"numinlets" : 1,
"numoutlets" : 0,
"patching_rect" : [ 705.0, 375.0, 30.0, 30.0 ],
"style" : ""
}

}
, {
"box" : {
"id" : "obj-5",
"maxclass" : "newobj",
Expand Down Expand Up @@ -537,6 +549,16 @@
"source" : [ "obj-1", 0 ]
}

}
, {
"patchline" : {
"destination" : [ "obj-8", 0 ],
"disabled" : 0,
"hidden" : 0,
"midpoints" : [ 279.5, 158.5, 714.5, 158.5 ],
"source" : [ "obj-1", 1 ]
}

}
, {
"patchline" : {
Expand Down Expand Up @@ -632,14 +654,6 @@
"styles" : [ {
"name" : "maxchain",
"default" : {
"color" : [ 0.960784, 0.827451, 0.156863, 1.0 ],
"fontface" : [ 0 ],
"accentcolor" : [ 0.0, 0.0, 0.0, 1.0 ],
"elementcolor" : [ 0.282353, 0.309804, 0.266667, 1.0 ],
"textjustification" : [ 0 ],
"textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ],
"patchlinecolor" : [ 0.639216, 0.458824, 0.070588, 0.9 ],
"fontname" : [ "Courier" ],
"bgfillcolor" : {
"type" : "color",
"color" : [ 0.639216, 0.458824, 0.070588, 1.0 ],
Expand All @@ -650,7 +664,15 @@
"autogradient" : 0
}
,
"bgcolor" : [ 0.095481, 0.100396, 0.100293, 1.0 ]
"textjustification" : [ 0 ],
"bgcolor" : [ 0.095481, 0.100396, 0.100293, 1.0 ],
"accentcolor" : [ 0.0, 0.0, 0.0, 1.0 ],
"elementcolor" : [ 0.282353, 0.309804, 0.266667, 1.0 ],
"fontname" : [ "Courier" ],
"textcolor_inverse" : [ 1.0, 1.0, 1.0, 1.0 ],
"patchlinecolor" : [ 0.639216, 0.458824, 0.070588, 0.9 ],
"color" : [ 0.960784, 0.827451, 0.156863, 1.0 ],
"fontface" : [ 0 ]
}
,
"parentstyle" : "",
Expand All @@ -668,8 +690,8 @@
, {
"name" : "maxchain-subtitle",
"default" : {
"fontsize" : [ 20.0 ],
"textcolor" : [ 0.870588, 0.415686, 0.062745, 1.0 ]
"textcolor" : [ 0.870588, 0.415686, 0.062745, 1.0 ],
"fontsize" : [ 20.0 ]
}
,
"parentstyle" : "",
Expand All @@ -678,10 +700,10 @@
, {
"name" : "maxchain-title",
"default" : {
"fontsize" : [ 48.0 ],
"textcolor" : [ 0.960784, 0.827451, 0.156863, 1.0 ],
"fontname" : [ "Courier Bold" ],
"clearcolor" : [ 0.317647, 0.654902, 0.976471, 0.0 ]
"textcolor" : [ 0.960784, 0.827451, 0.156863, 1.0 ],
"clearcolor" : [ 0.317647, 0.654902, 0.976471, 0.0 ],
"fontsize" : [ 48.0 ]
}
,
"parentstyle" : "",
Expand Down
Loading

0 comments on commit d69af4e

Please sign in to comment.