Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
clean example files in release dir, fixed fetchToFs, logger now alway…
Browse files Browse the repository at this point in the history
…s an event listener, fixed fallback in chrome, 6.12.0-4 release
  • Loading branch information
hlolli committed Nov 11, 2018
1 parent 54f4d0d commit 8cc1887
Show file tree
Hide file tree
Showing 20 changed files with 326 additions and 626 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ yarn.lock
release/browser/main.js
release/browser/manifest.edn
release/browser/processor.js.map
release/browser/samples
release/browser/*.html
libcsound/libcsound_browser.js
19 changes: 15 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Download the latest `csound-wasm-browser.js` under [releases](https://github.com
```
Or alternatively (preferably for development) refer directly to the gihub releases within the html, like so.
```html
<script src="https://github.com/hlolli/csound-wasm/releases/download/6.12.0-3/csound-wasm-browser.js"></script>
<script src="https://github.com/hlolli/csound-wasm/releases/download/6.12.0-4/csound-wasm-browser.js"></script>
```
This file is minified via Google Closure Compiler and is intended to be used as is. If you're useing Webpack or Gulp, then add this file as a vendor resource.

Expand All @@ -86,7 +86,7 @@ require('csound-wasm/release/browser/csound-wasm-browser.js');
<h5>Click Start realtime once, gotta love chrome's new autoplay ban policy</h5>
<button id="start">Start realtime</button>
<button id="beeper">Make beep!</button>
<script src="https://github.com/hlolli/csound-wasm/releases/download/6.12.0-3/csound-wasm-browser.js">
<script src="https://github.com/hlolli/csound-wasm/releases/download/6.12.0-4/csound-wasm-browser.js">
</script>
<script>
const beeper = `
Expand Down Expand Up @@ -124,20 +124,31 @@ If you wish to host the needed AudioWorklet processor script yourself, you'll ne
# API
Many these functions are a direct implementation of the [Csound API](http://csound.com/docs/api/index.html). Some are `csound-wasm` specific.

## Default config

```json
{ nchnls: 2,
nchnls_i: 1,
zerodbfs: 1,
sr: 44100,
ksmps: 128,
buffer: 2048
messagelevel: 39 }
```

## Voids (without return values)

| Public Function | Parameters |Description |
| ----------------|-------------| -----------|
| csound.startRealtime(config*)| config::Object default: { nchnls: 2, zerodbfs: 1, sr: 44100, ksmps: 256, buffer: 2048 } | starts/initializes realtime as oppsed to rendering to file|
| csound.startRealtime(config*)| config::Object default-config | starts/initializes realtime as oppsed to rendering to file|
|csound.playCSD(csd, config*) | csd::String config::Object default-config | starts/initializes realtime and plays csd string |
|csound.compileOrc(orc)| orc::String | Compiles any orchestra code at k-rate without return value.|
|csound.renderToFile(csd, file) | csd::String, file::String| Renders CSD string, filepath for the file output, currently only supported on node|
|csound.evalCode(orc)|orc::String| like compileOrc but returns status number on i-rate (0 if successful)|
|csound.inputMessage(sco)|sco::String | sends (score) event(s) without pre-processing, use \n to seperate multiscore statements|
|csound.readScore(sco)| sco::String |like inputMessage but tries to pre-process the before emitting the event|
|csound.setControlChannel
|csound.setStringChannel
|csound.playCSD
|csound.reset
|csound.destroy
|csound.setOption
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "csound-wasm",
"version": "6.12.0-3",
"version": "6.12.0-4",
"author": "Hlödver Sigurdsson <[email protected]>",
"license": "GPL-3.0",
"keywords": [
Expand Down
31 changes: 0 additions & 31 deletions release/browser/benchmark.html

This file was deleted.

149 changes: 79 additions & 70 deletions release/browser/csound-wasm-browser.js

Large diffs are not rendered by default.

132 changes: 69 additions & 63 deletions release/browser/csound-wasm-worklet-processor.js

Large diffs are not rendered by default.

61 changes: 0 additions & 61 deletions release/browser/example1.html

This file was deleted.

61 changes: 0 additions & 61 deletions release/browser/example2.html

This file was deleted.

72 changes: 0 additions & 72 deletions release/browser/example3.html

This file was deleted.

30 changes: 0 additions & 30 deletions release/browser/example4.html

This file was deleted.

Loading

0 comments on commit 8cc1887

Please sign in to comment.