-
-
Notifications
You must be signed in to change notification settings - Fork 267
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Gwion support * Add in sccignore
- Loading branch information
Showing
7 changed files
with
908 additions
and
3,279 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,3 @@ | ||
examples | ||
.github | ||
dist |
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
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
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,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; | ||
} |
Oops, something went wrong.