Skip to content

Anchor sound #1500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 146 commits into
base: anchor
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
a7dcd40
Handle absolute as well as relative paths (issue #969)
Mar 19, 2018
8c2a025
Convert all paths to relative paths internally.
Apr 9, 2018
d76f2a1
simple synthesis for ref fields
jpolitz Aug 29, 2018
e84e48f
Merge remote-tracking branch 'upstream/horizon' into absolute-paths
SethPoulsen Aug 30, 2018
0e23826
Merge pull request #1317 from SethPoulsen/absolute-paths
jpolitz Aug 30, 2018
60b1845
Streamlined redundant conditional
mkolosick Sep 21, 2018
3cfaf09
Updates to patch security warning with old jasmine
jpolitz Oct 4, 2018
a549d43
Fix an issue with reassigning parameters in TRO calls
jpolitz Dec 21, 2018
5c5720b
comment out to comply with new WF rule
jpolitz Dec 21, 2018
a0532ea
Fixing #1441
Mar 5, 2019
d959027
table-from-column
jpolitz Jun 21, 2019
2fa2571
use old contract syntax (need a bootstrap for parameterics in standal…
jpolitz Jun 21, 2019
c1bd42a
fix tests, add constructor form for table-from-columns (plural)
jpolitz Jun 21, 2019
980eb41
Fixing a very strange bug in the tokenizer for certain programs, e.g.:
Jul 17, 2019
253524d
Merge pull request #1457 from brownplt/fix-comment-srcloc
jpolitz Jul 17, 2019
fc2a6af
Merge pull request #1442 from brownplt/fix-1441
jpolitz Jul 17, 2019
8da6c42
Refactor compile-module to avoid calculating provides on bogus progra…
jpolitz Jul 30, 2019
392fc93
these tests are now caught but unbound-ids-bad-assignments earlier in…
jpolitz Jul 30, 2019
da91ba2
fix previous refactoring; get-typed-provides needs to be in this cont…
jpolitz Jul 31, 2019
2af42d6
make sure to unique-ify the errors, as in other places
jpolitz Jul 31, 2019
f356b40
add stdev-sample (#1475)
jpolitz Aug 26, 2019
2316d78
add runtime function for fast sorting of numbers, and use it to speed…
Aug 27, 2019
fcb7ac0
Merge branch 'horizon' of https://github.com/brownplt/pyret-lang into…
Aug 27, 2019
601a980
fix bug in array sorting, and make test suite for median more robust
Sep 3, 2019
9ebd42d
fix: properly parse octal escape sequences
ayazhafiz Sep 9, 2019
7656aa3
fixup! fix: properly parse octal escape sequences
ayazhafiz Sep 9, 2019
ee8da84
fixup! fix: properly parse octal escape sequences
ayazhafiz Sep 9, 2019
1cdf264
fixup! fix: properly parse octal escape sequences
ayazhafiz Sep 9, 2019
8eff402
Merge pull request #1484 from ayazhafiz/fix/parse-escapes
jpolitz Sep 9, 2019
c529439
add sound demo
Sep 15, 2019
75187b9
remove spgo
Sep 15, 2019
bec3ea6
Converting audio to float array
soumyamahalakshmi Sep 15, 2019
e86bcd2
add basic urlSound functionn
Sep 16, 2019
adc11c0
pull update from upstream anchor
Sep 16, 2019
0275666
added overlay function and other changes, play function to be updated
Sep 25, 2019
123c1b6
test drawing on widget canvas
Sep 25, 2019
5a8b790
fix merge
Sep 25, 2019
6a7ac05
simple widget with progress bar
Sep 30, 2019
e366484
þMerge branch 'anchor' into anchor-sound
soumyamahalakshmi Sep 30, 2019
3ecd345
inputArray functions
soumyamahalakshmi Sep 30, 2019
8ad14cc
Implemented Stop&Start feature of playing sound
Oct 4, 2019
4015f87
add handling clicks currently buggy
Oct 4, 2019
855a679
fix clicking progress bug
Oct 5, 2019
5873a59
draw drag box for zoom
Oct 5, 2019
87ffe13
add overlay, concat, shorten, playbackspeed, and incomplete normalize
Oct 6, 2019
815af0b
merge and add functions
Oct 6, 2019
f4b4b2b
implement first iteration of zoom
Oct 9, 2019
9140364
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Oct 9, 2019
3ef69d7
Merge branch 'anchor' of https://github.com/brownplt/pyret-lang into …
soumyamahalakshmi Oct 11, 2019
4d30b71
index and amplitude data. Fix stop/start bugs with zoom
Oct 11, 2019
1846fd7
blue background widget
Oct 20, 2019
ef0bc5e
add time
Oct 20, 2019
568c3db
cherry pick
Sep 24, 2019
727142d
add problematic checkblock tests
Oct 21, 2019
3ed034c
minor bug fix for amplitude display
Oct 21, 2019
ce65742
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Oct 21, 2019
d539b28
travis and test
Oct 21, 2019
6af63e7
Merge branch 'anchor-sound' of github.com:soumyamahalakshmi/pyret-lan…
Oct 21, 2019
52cbee0
travis test
Oct 21, 2019
bf0add9
fix
Oct 21, 2019
581145b
fix safety issue
Oct 21, 2019
c5f5548
travis
Oct 21, 2019
bef3dc0
fix
Oct 21, 2019
23ff6a1
fix
Oct 21, 2019
edb1f53
fix
Oct 21, 2019
c99d2ee
Normalize and examples
soumyamahalakshmi Oct 21, 2019
d34a2a1
fix
Oct 21, 2019
d300a25
Merge remote-tracking branch 'origin' into anchor-sound
soumyamahalakshmi Oct 21, 2019
a4f17b1
Merge branch 'anchor' of https://github.com/brownplt/pyret-lang into …
soumyamahalakshmi Oct 21, 2019
c4b1459
fix
Oct 21, 2019
5d60d14
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
soumyamahalakshmi Oct 21, 2019
7f28509
fix
Oct 21, 2019
4f9e404
Merge branch 'anchor-sound' of github.com:soumyamahalakshmi/pyret-lan…
Oct 21, 2019
29ca318
fix
Oct 21, 2019
7cb2929
debug
Oct 21, 2019
089e445
fix
Oct 21, 2019
3188d95
whitespace push
soumyamahalakshmi Oct 21, 2019
22ba4d6
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
soumyamahalakshmi Oct 21, 2019
a5c17ee
merge
Oct 23, 2019
d6f3543
initial waveform refactor
Oct 26, 2019
2e99a5f
add multi-channel functionality
Oct 26, 2019
4fcc88e
zoom out log
Oct 28, 2019
29fc55b
Revert "Merge remote-tracking branch 'origin' into anchor-sound"
Oct 28, 2019
ee16e77
Revert "Merge remote-tracking branch 'origin' into anchor-sound"
Oct 28, 2019
6216e10
package json and fix bug for shorten and setplaybackspeed
Oct 28, 2019
251b9b5
fix zoom log bug
Oct 28, 2019
34e64e2
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Oct 28, 2019
0aac79d
chrome version???
Oct 28, 2019
decd3d9
fix concat
Oct 28, 2019
dd624b7
merge array render fix
jpolitz Oct 21, 2019
456bcb4
shifting functionality
Nov 1, 2019
2088428
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Nov 1, 2019
0c152c9
get rid of duration
Nov 1, 2019
52a5d50
int fix
Nov 1, 2019
3984952
sound download button
Nov 1, 2019
15b33f5
icons for shift and undo
Nov 1, 2019
8465107
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Nov 1, 2019
6634ed1
sine and cosine wave
soumyamahalakshmi Nov 3, 2019
020b11e
adding URL for sine wave reference
soumyamahalakshmi Nov 4, 2019
b98e357
clean up implementation of file download
Nov 11, 2019
db2ae5e
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Nov 11, 2019
4fa389a
Adding getTone function
soumyamahalakshmi Nov 15, 2019
a675448
Fading function
soumyamahalakshmi Nov 16, 2019
ebb62c2
removing vocals with decent performance
soumyamahalakshmi Nov 16, 2019
27d181d
removing vocals improved
soumyamahalakshmi Nov 16, 2019
bdab361
button navigation
Nov 18, 2019
6172cf0
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Nov 18, 2019
2aa10f6
exception handling
soumyamahalakshmi Nov 24, 2019
8ac1ed6
gdrive link
Nov 24, 2019
682f62a
hyphen-case alias
Nov 25, 2019
5d7df5e
fix zoom issues, formatting
Nov 25, 2019
9bbe76f
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Nov 25, 2019
c502615
fix bugs: off by one, not updating, small sound handling
Dec 1, 2019
60b0c80
fix update bug
Dec 1, 2019
954841c
remove derived state from props
Dec 2, 2019
c5fcc92
get note function
soumyamahalakshmi Dec 6, 2019
5fbcaef
error handling and type check
Dec 7, 2019
2cc5d67
Merge branch 'anchor-sound' of github.com:soumyamahalakshmi/pyret-lan…
Dec 7, 2019
b633b1b
clamp lines
Dec 7, 2019
7702886
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Dec 7, 2019
f19df4b
add error handling
Dec 9, 2019
1a468d1
Merge branch 'anchor-sound' of github.com:soumyamahalakshmi/pyret-lan…
Dec 9, 2019
1b1499f
possible bug fix
Dec 9, 2019
2e08913
add duration
Dec 9, 2019
68c05b7
crop
Dec 9, 2019
855e216
Merge branch 'anchor-sound' of https://github.com/soumyamahalakshmi/p…
Dec 9, 2019
294fd8e
getters, setters, get-array changes
Dec 9, 2019
0453d9e
change in fade
Dec 9, 2019
d45e8f8
Merge branch 'anchor-sound' of github.com:soumyamahalakshmi/pyret-lan…
Dec 9, 2019
76172d5
fade and normalize
Dec 11, 2019
4b15846
build
Dec 11, 2019
e34f596
package json
Dec 11, 2019
4c35eb4
fix bug
Dec 12, 2019
e90be9a
fix is-sound
Dec 12, 2019
c46ab8c
update examples, make copy array
Dec 12, 2019
26b05b8
max 3 minute sound
Dec 12, 2019
6d25977
bug fix get array
Dec 12, 2019
e7da9bf
get array final version
Dec 12, 2019
d0914da
Deleting manifest
soumyamahalakshmi Dec 13, 2019
693a61f
Delete index.html
soumyamahalakshmi Dec 13, 2019
20827b7
Delete 0.chunk.js
soumyamahalakshmi Dec 13, 2019
3924336
Delete 0.chunk.js.map
soumyamahalakshmi Dec 13, 2019
0ddbf71
Delete bundle.js
soumyamahalakshmi Dec 13, 2019
d9c5ba1
Delete bundle.js.map
soumyamahalakshmi Dec 13, 2019
deaf537
Delete main.chunk.js
soumyamahalakshmi Dec 13, 2019
aee9ad0
Delete main.chunk.js.map
h454482 Dec 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
env:
secure: HuMEH1MDVt0br36tMjkcpC520OIA+nWV5fACPSxUeRfB86lc+n3WDbsC1qC386QOv5hKREcREGTIGF591GY04ApUmQlWNJymk2JjAkVKO2Dp3/jtBeFPXDbQ+sOAkfgcTgoC2yRWOfAAj1nJi1hKw0sZAwLP2n3KMjGSCYN8zGw=
secure: VUzGIHwCM6SIsa/pbtcMOA8TSwhfomiRomlHYEPrJFyZ+2sgcNtOX5A67w+hV9LcTtQFwKGmXUwlr0gfo2O82ZBLqIJ/fEPztC7mJxZNe4Hh6sPA+EFQz0Zfbce0aMWJ/Xct6+tR5COBt1RhhYpM1xyol3xFKr8sO13pfAT5Qb7iQ/M8WcMivfqMMg7Ue/PadJ90BsgyAPtXPMdfJ/Sq8KvrBxxgxPM5bPIx+lDn85E3KCS5wV8dcHpjOYjotqW5klRioE0Br5vWOdYUeWndNq9oGiavHybuUZF44qoGTeREjiKPxC4CVzvM4M7dyxQgkH4H54X2AQwb7RBCgsuku7+KK7Vnn2F5v/5hsyLhNqo6qCwVU3xodZeikgaO4RKdgEY65qATsd7WeIvSQcOjvhnnXdIDoqI2U+9tclhAQKTwlgDzg5NU/2MM6q5NetRV70zKwKAzt8n6Bf/e8mD5vDbNGi2WJLBF3FQD0JQsU79tGkGw8q91exRSms7QFWX1pvpNZuf+AD+YEHw8WmDJRcWc8sbD5Lv0iKE3K7Dnipth1hDZh69WUrZSjhByFAVsDam2leZ2My/I8nlXxtdqhdAOIf14Pm+0/5uGDb5IMtBTCOoAONLzsuBddX/pjmdxdgeg8neLPLnk1y4tKScsSIIpyG/ymmcePJNBA7uEeOM=
global:
- BROWSER_BINARY=/usr/bin/google-chrome
- BROWSER="chrome"
- SHOW_BROWSER="false"
- BASE_URL="http://localhost:8080"
- secure: P1AJEh9DPWanaONF4A92bxVn1j+PQgtAJ2bcc4SSHH8o5hzjgcor8zM7E3g+lkrSLFVQH3K7ghny97+Bvl7CNGGypGhVjWNzRkWXflg8BcNTNSg0U4lKlVtOIfalczUCg2PNCt0I84Avwqw739ku4irNMbubPLkOdQpH1H9uKH4DTXE5Kw9m4r3iWxv3VYMC3qqyiaIhLNqu3694UroDSfgP23r8hqylzu3xmdRRBCeEbBJj5tedNAfk0/GNCLWRTtXQzq6pjj09gaSWJRZ2aJhKpefogdYzv45rw8qL7OyyzYy27Qo+bqSJYCvoHePdnisddU2l0D5bclDNkKIT4lyUL9FgGHUPdqTxiGex8suBrwxXbkgGUGcn4CwK6ihEMeI3JN0CoK7Lc1LA1l9wfztX6tZdWx+ygwi9TfOa8xDQ1tJ+LqByusIOyWHcLps3EizeWCIEKPUszG9dAlRKwl10LiKxZmY568YPt1RQ67Ghmc9oEYepKjWL+NqYYFprspn4zgeqfvIWaIiu+clNi3dnZALDkfns2Z3um6PptxC0vzaXUkEoDhY99UpK5HZIqged32Hy7V8cXN7nJlLoGcdEztxaL9sRR+EGX20OnzSTc1JKmkl5FYNWZ3aJ9Zdjsv1Hfjr/Nw3PY1k1vYPMe3CPl2wzYWYJDv3kMA8J/Fo=
git:
submodules: false
language: node_js
Expand All @@ -20,7 +21,7 @@ script:
- npm run all-tests
notifications:
slack:
secure: kHQvp3HZL5GRY58XrGdRhZKtUvGrxgsAKMawYYNO4PA9NXlr5EYwbYBCrud1DNJs6kdEPK48ItSnsWXKoDZTS+g96b56t8vjHl2d98EN4WwvORj3g9NNiZ0SESL2LUwFa5vCxlnTbxfCQcfNpStGrwYZZ9DnIGTDuLO2EqZxvP0=
secure: CGDy4Mshlf2q6RrHhn01HgTbtBZGQ8H0upbFeE7ONr2/YWH665/GB4+Dy9FliZyyfpK+H1zvK56MYyu+uOHPm5+CtbCi1GTsZeJMwHVlU110fZLaMdx9y0ze0KI0etp5CSG5YDHBtIFo4PViP4mkLtCogYgAfayln7+lw+ActtE2zaSE3SXH0oONM++dtqEJ7dya+//g/1rbk1qjHzrIEwc/LN/hbhIbGvsRqVc4lnoLJaX5iB/YFGPrysEIl9bMPLlrxZ4PT6sLFqWbSYNaEKmcFcow+mkuQ+5SSI25JRQVXSB2q/wmJiHUkS21RXf0Il5dCY0gvsmDMtawZTeidUxatNUG7kColNrrTLQ8fMRdSexSPXiS+yS23XcQW9znfHnRcmjj6HYi4tBzohPGjvDvv/zLIeKELnRyHJBYG1Qv45PX/1Ce9br47CrSNcXR1347rIyHFIvIIkfUJyoys2SEtnADFL1GuTf2oVElVB9/PysBlZ9483DMRhUEl/QRpR3gyWWhbq56KffdU+O9qeVvhjeU4jowbxsOFarRV5VPz+Trjw5DZ8Xl7o9pZkgzazqassa76Nq2biUzYbSKChYLg6nl40U1Tu7Xl92x4Ak9ly9XlJURADeZwH3VMeq6lmx3QH6vmvvWDlW9bTyXzompZZzgZ/jIsrBnOuAMb9g=
addons:
chrome: stable
after_failure:
Expand All @@ -29,21 +30,22 @@ after_failure:
before_deploy:
- cd ide
- npm install
- echo "JOE CI=false below avoids stopping the build on warnings from webpack about require targets"
- echo "JOE CI=false below avoids stopping the build on warnings from webpack about
require targets"
- echo "JOE We want to see them, but not be blocked on them"
- CI=false npm run build
deploy:
provider: s3
acl: public_read
access_key_id: "AKIAUCA3RRQKLUSZTBS5"
bucket: pyret-anchor
access_key_id:
secure: UUDuKKGL0AhD9QOTbmYgBFaBt4wVNvfkE2hGN2V10Lb+pj3uUXE/+SGoXP3Wh+EpPNUAnkrrsfS7qetRasQ0ytKSY/RPIDLqIcF/1cEP98rOXN7uybju1nmjgbSKctpyKSVGaNrEMstWR6y+/7ZzOeSj3ereP9n88Zq/UV7Fox8aiDmr/v+zQh8qXzma977u9ACSMoaAQvok0kImE33dvXD1YMXYeGiH10dMTVc50/q/K1NwHffTrBGtpm0vwlY3C67IbvHKGmCX4meljuAFTuiuNJqOMlBSN8C0jGc65vf6Xry+th1SeX6m/X68H2YUI4LxomSsUgYbukRHe1R6JrETAwxPqeOFVFeMqhdLXFugLse6pQApSY2xOp1Qh+NFc7La7QUUCJ219tUymaIIzTjHgn7pPdPFinczhx8e7Zuq7WRodjmMqytZG7C/sPARBTMi2cKb3KIPj0qgek12ngRJiESFOjHKOZ52b/T6oSYI+IuirPjCHGZV9GAcIIiOyV1rOnkk4+Luf7zXIO8LoJsnj0aYJBrWrKjljbf1pMlg9UfA/XiL1J7DKehjHA13bvY8B1Y/SpBlRkQZw7Lj0vEXnYixNF0TAGDQ0BO9bz/CqEBW/CLRgBp2FQjlLtC6dOEqjdMd929O8s9BkMaRdsmhWHdFZr1LhfYpI/HbGZI=
bucket: pyret-anchor-sound-deploy
local-dir: build
upload-dir: anchor
upload-dir: anchor-sound
skip_cleanup: true
detect_encoding: true
on:
repo: brownplt/pyret-lang
branch: anchor
repo: soumyamahalakshmi/pyret-lang
branch: anchor-sound
secret_access_key:
secure: treaayJygr/gh3flJ7kMSNNMkGkqqUefme19xMEXoR8UUJIYT+OT1YCH/YDJPm0sa+nHJL5gakxqmAFv2RWF1rHw9c7clAytJ1tu5Ed0arhFoPTC2lHKCXSYggQTEfRR2IigBy3hiVDLF2mPP5eZ0ByygN7toOuqg0WVDuKYJJs=

secure: g/SIwV2SxviJ5S8IMIAFVTtX9mGRXQEu1rJLoBoLOgWftdIFC8BSPo3BIF6b/V+fcjP1tqaiE3yG88PyRH403y7YZHEWZm2FoalVG8hPDdV/bSKen5O+m8f4FQttzzPCXTOu7A+5eyRu+MP0BvDdY/OdbyCAdo1ChiX/bw50uls/HYu00r1cU8fx+ftjT9IecK+msK/+CCL9lkMOeR+YxK7S3SLeP6+5GhWU2tTEz9uHvGfEyLzf6Ch1WivMh1jhvWawLJI26VcgTC1S6Z7N0y/IX7bJkqxueBJoj/Qm9yWRGqQZiZdATDqHlGj8ZfkD8ESowKqrFJyiT4jU4R/GQa7Y83z525YjmTuIAh0LH/TaH71r93mvmdJsnhkP16sSSfTxyw9VaBc32yl1rfeZReSg4Ov32vAR/PMTA5fspA5OOzEsLNceF8mE60a7heE5BxtAJOadCM+YSDxbxtheOoGnNNR17sKAYb6AK+ne7c9MjXJsscwY0Jo3hg90/JdOETcfHLLqSQuVXLMD+WvqJQhdB+2SkW3ELeTlOqLcAlacQA/LzJj/bG3kW4jWs2POzuryctHm+UnTgu0XW7ktIGH3IQ7g/7w0nlwBR+A0bJXmy7TQow2scZzebm8Rt9s5CVFuSG4CWXVPZ06A93n0lK8MUwLbqeE4P59dVHzDN0g=
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"git.ignoreLimitWarning": true
}
21 changes: 21 additions & 0 deletions examples/sound/concatSounds.arr
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import global as G
import sound as S

#Getting sound object from URL
#Output is a widget through which sound can be played, paused or downloaded
soundA = S.get-sound-from-url('http://bbcsfx.acropolis.org.uk/assets/07075055.wav')
soundB = S.get-sound-from-url('http://bbcsfx.acropolis.org.uk/assets/07075065.wav')

#concatenating a list of sounds
soundC = S.concat-list([G.raw-array: soundA, soundB, soundB])

#concatenating two sounds
soundD = S.concat(soundA, soundB)








17 changes: 17 additions & 0 deletions examples/sound/createSoundFromArray.arr
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import global as G
import sound as S

# creating a single channel sound
arr1 = [G.raw-array: 0.1, 0.3, -0.3, 0.1, -0.9, 0.2, 1.5] #this is a very short sound!
soundA = S.make-sound(44100, arr1)

#creating a multi-channel sound
arr2 = [G.raw-array: [G.raw-array: 0.1,0.5,0.1], [G.raw-array: -0.1, -0.5, -0.1]]
soundB = S.make-multi-channel-sound(44100, arr2)







28 changes: 28 additions & 0 deletions examples/sound/cropSound.arr
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import global as G
import sound as S

#Getting sound object from URL
#Output is a widget through which sound can be played, paused or downloaded
sound = S.getSoundFromURL('http://bbcsfx.acropolis.org.uk/assets/07075055.wav')

#Crop the sound between certain times
soundB = S.crop-by-time(sound,0.01,0.04)

#crop the sound between two indices
soundC = S.crop-by-index(sound, 0, 100)

#crop off the last n samples of a sound
n = 10
soundD = S.crop-by-index(sound, S.sound-num-samples(sound) - n - 1, S.sound-num-samples(sound))

#crop to only keep the first n samples
soundE = S.crop-by-index(sound, 0, n)









24 changes: 24 additions & 0 deletions examples/sound/overlaySounds.arr
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import global as G
import sound as S
import list as L

#Getting sound object from URL
#Output is a widget through which sound can be played, paused or downloaded
soundA = S.getSoundFromURL('http://bbcsfx.acropolis.org.uk/assets/07075055.wav')
soundB = S.getSoundFromURL('http://bbcsfx.acropolis.org.uk/assets/07075065.wav')


#overlay multiple sounds in a list
soundC = S.overlay-list([L.list: soundA, soundB, soundA])

#overlay two sounds
soundD = S.overlay(soundA, soundB)









Loading