Skip to content

Commit

Permalink
Gwion Support (#518)
Browse files Browse the repository at this point in the history
* Gwion support

* Add in sccignore
  • Loading branch information
boyter authored Sep 30, 2024
1 parent c27f245 commit e23f027
Show file tree
Hide file tree
Showing 7 changed files with 908 additions and 3,279 deletions.
3 changes: 3 additions & 0 deletions .sccignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
examples
.github
dist
1 change: 1 addition & 0 deletions LANGUAGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ Go Template (tmpl,gohtml,gotxt)
Gradle (gradle)
GraphQL (graphql)
Groovy (groovy,grt,gtpl,gvy)
Gwion (gw)
HAML (haml)
Hamlet (hamlet)
Handlebars (hbs,handlebars)
Expand Down
68 changes: 29 additions & 39 deletions SCC-OUTPUT-REPORT.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
</tr></thead>
<tbody><tr>
<th>Go</th>
<th>28</th>
<th>9570</th>
<th>1462</th>
<th>452</th>
<th>7656</th>
<th>1528</th>
<th>255227</th>
<th>4068</th>
<th>27</th>
<th>9564</th>
<th>1458</th>
<th>447</th>
<th>7659</th>
<th>1529</th>
<th>253964</th>
<th>4067</th>
</tr><tr>
<td>processor/formatters.go</td>
<td></td>
Expand Down Expand Up @@ -63,23 +63,23 @@
</tr><tr>
<td>processor/processor.go</td>
<td></td>
<td>672</td>
<td>141</td>
<td>104</td>
<td>427</td>
<td>92</td>
<td>19457</td>
<td>439</td>
<td>679</td>
<td>143</td>
<td>105</td>
<td>431</td>
<td>93</td>
<td>19596</td>
<td>443</td>
</tr><tr>
<td>main.go</td>
<td></td>
<td>429</td>
<td>435</td>
<td>10</td>
<td>6</td>
<td>413</td>
<td>419</td>
<td>10</td>
<td>9693</td>
<td>271</td>
<td>9800</td>
<td>274</td>
</tr><tr>
<td>processor/detector_test.go</td>
<td></td>
Expand Down Expand Up @@ -270,16 +270,6 @@
<td>4</td>
<td>434</td>
<td>18</td>
</tr><tr>
<td>examples/language/go.go</td>
<td></td>
<td>19</td>
<td>6</td>
<td>6</td>
<td>7</td>
<td>0</td>
<td>165</td>
<td>12</td>
</tr><tr>
<td>processor/helpers.go</td>
<td></td>
Expand All @@ -298,21 +288,21 @@
<td>0</td>
<td>4</td>
<td>0</td>
<td>22969</td>
<td>21625</td>
<td>5</td>
</tr></tbody>
<tfoot><tr>
<th>Total</th>
<th>28</th>
<th>9570</th>
<th>1462</th>
<th>452</th>
<th>7656</th>
<th>1528</th>
<th>255227</th>
<th>4068</th>
<th>27</th>
<th>9564</th>
<th>1458</th>
<th>447</th>
<th>7659</th>
<th>1529</th>
<th>253964</th>
<th>4067</th>
</tr>
<tr>
<th colspan="9">Estimated Cost to Develop (organic) $228,979<br>Estimated Schedule Effort (organic) 7.85 months<br>Estimated People Required (organic) 2.59<br></th>
<th colspan="9">Estimated Cost to Develop (organic) $229,074<br>Estimated Schedule Effort (organic) 7.86 months<br>Estimated People Required (organic) 2.59<br></th>
</tr></tfoot>
</table></body></html>
35 changes: 35 additions & 0 deletions examples/language/gwion.gw
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#import Std
#import Math
#import Modules

fun int get_ncycles() {
if(me.args())
return me.arg(0) => Std.atoi;
return 2;
}

fun float get_user_duration() {
if(me.args() > 1)
return me.arg(1) => Std.atof;
return 1;
}

fun dur get_duration() {
return get_user_duration()::second;
}


get_ncycles() :=> const int ncycles;
get_duration() :=> var dur duration;

1 :=> var int compensate;
const SinOsc s ~> dac;

while(duration >= samp) {
repeat(ncycles * compensate) {
Math.rand2f(220, 880) :=> s.freq;
duration => now;
}
duration/2. :=> duration;
2 *=> compensate;
}
Loading

0 comments on commit e23f027

Please sign in to comment.