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

Commit

Permalink
reset csound after playCSD, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
hlolli committed Aug 13, 2018
1 parent 2221046 commit d4cf5c8
Show file tree
Hide file tree
Showing 23 changed files with 17,108 additions and 10,818 deletions.
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ node_modules
package-lock.json
*~
*.wav
browser/cljs-runtime
browser/manifest.edn
release/browser/cljs-runtime
release/browser/manifest.edn
.shadow-cljs
yarn.lock
browser/main.js
browser/manifest.edn
release/browser/main.js
release/browser/manifest.edn
libcsound/libcsound_browser.js
1 change: 0 additions & 1 deletion browser/libcsound.wasm

This file was deleted.

3 changes: 0 additions & 3 deletions deps.cljs

This file was deleted.

1 change: 1 addition & 0 deletions examples/example1.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const beeper = `
instr 1
asig = poscil:a(0.3, 440)
outc asig, asig
prints "HÆÆ"
endin`

const makeBeep = `i 1 0 1`
Expand Down
Binary file modified libcsound.wasm
Binary file not shown.
51 changes: 51 additions & 0 deletions libcsound/datauri.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
'use strict';

const DataURI = require('datauri').promise;
const fs = require('fs');
const replace = require('replace-in-file');
// const stdin = process.argv[2];

// DataURI('libcsound/libcsound.wasm')
// .then(content =>
// {
// var replace_data = "'" + content + "';";
// // var append_data = "\nmodule.exports = Module;\n";

// const replace_options = {
// files: 'libcsound/libcsound.js',
// from: /'libcsound.wasm'/g,
// to: replace_data
// };

// try {
// replace.sync(replace_options);
// }
// catch (error) {
// console.error('Error occurred:', error);
// }

// // fs.appendFileSync('./libcsound.js', append_data)
// })
// .catch(err => { throw err; });

// DataURI('libcsound/libcsound.wasm')
// .then(content =>
// {
// console.log(content);
// })
// .catch(err => { throw err; });

DataURI('libcsound.wasm')
.then(content =>
{
var file1 = fs.readFileSync('libcsound/libcsound.js').toString();
var replc = file1.replace('libcsound.wasm', content);

try {
fs.writeFileSync('libcsound/libcsound_browser.js', replc);
}
catch (error) {
console.error('Error occurred:', error);
}
})
.catch(err => { throw err; });
Loading

0 comments on commit d4cf5c8

Please sign in to comment.