alda

WE'VE MOVED! Join us at: http://slack.alda.io
dave 2016-07-26T14:24:49.000007Z

help wanted with this issue! https://github.com/alda-lang/alda/issues/243 could be fun, if you have experience with (or just like playing with) using core.async to schedule events and/or inter-process communication

2016-07-26T14:39:44.000009Z

as you can guess, it happens on windows too

dave 2016-07-26T14:47:19.000010Z

that's good to know. my theory is that this is JVM related

dave 2016-07-26T14:47:28.000011Z

like there is too much going on in a single alda server JVM

dave 2016-07-26T14:47:43.000012Z

it's running an HTTP server and managing multiple score-performance contexts

dave 2016-07-26T14:48:02.000013Z

each of which is doing audio stuff

2016-07-26T14:48:46.000014Z

but responses one? (i don't know much about how a JVM server work )

dave 2016-07-26T14:49:27.000015Z

?

2016-07-26T14:53:09.000016Z

sorry about my english(still working on it), yes too much going on alda JVM, but JVM do not wait to end and stops before one?

dave 2016-07-26T14:56:34.000017Z

i think i understand what you're asking

dave 2016-07-26T14:57:02.000018Z

because it takes a long time for the JVM + clojure runtime to start, alda is set up to run in the background as a server

dave 2016-07-26T14:57:16.000019Z

a single alda server should be able to handle playing multiple scores at once

dave 2016-07-26T14:57:34.000020Z

and each score has a separate "audio context," including its own JVM MIDI Synthesizer instance, etc.

dave 2016-07-26T14:57:51.000021Z

so all of this is running in the same JVM, the alda server process

2016-07-26T14:58:37.000022Z

everything sounds good but?

dave 2016-07-26T14:59:23.000023Z

i think this issue with sound breaking up might be related to the single JVM being overloaded

dave 2016-07-26T14:59:49.000024Z

i'm curious if it would help for the alda server to just be a server, and delegate playing audio to separate processes

2016-07-26T15:01:18.000025Z

what is the difference between alda server and "just server"

dave 2016-07-26T15:49:22.000026Z

by "just a server," i mean it would just run the HTTP server that the alda command-line client interacts with

dave 2016-07-26T15:49:36.000027Z

so it would just be listening for code to parse and play

dave 2016-07-26T15:49:57.000028Z

but it would delegate the parsing and playing part to one of the "performer" processes

2016-07-26T18:09:22.000030Z

(2 hours later)I get it now. And I realize you said same thing before "a single alda server should be able to handle..."

2016-07-26T18:34:16.000031Z

when i started 2 different command line program at the same time(i start second process before first finished), second process waiting for first one, when first one finish, second starts, after several time, it breaks somehow

dave 2016-07-26T19:32:36.000033Z

@etaylan: they were probably both trying to start on the same port (the default port is 27713)

dave 2016-07-26T19:32:51.000034Z

you could try starting multiple servers on different ports

dave 2016-07-26T19:33:09.000035Z

like alda -p 1234 up alda -p 2345 up etc.

dave 2016-07-26T19:33:38.000036Z

i'd be curious to know if the sound breaks when playing scores on several different servers at the same time

dave 2016-07-26T19:33:49.000037Z

that might confirm that running everything on a single server is the problem

2016-07-26T19:44:42.000039Z

I am going to try with different ports now

2016-07-26T19:50:09.000040Z

Changing port not making any difference, server still waits the other process

dave 2016-07-26T19:53:00.000041Z

that's interesting

2016-07-26T20:02:01.000042Z

I wrote other outputs to the GitHub issue.

2016-07-26T20:05:29.000043Z

Actually I've seen this issue before but I was playing on Sublime Text and I didn't mention this is a bug or something important. If I play more, sometimes sound mysteriously slows down and I cannot change with tempo. I write here before, and it play correctly when I play command in REPL

dave 2016-07-26T20:26:14.000044Z

i think overall, alda suffers from a handful of issues where memory isn't used in the most efficient way

dave 2016-07-26T20:26:37.000045Z

i think if we implement the things i mentioned in the github issue, hopefully that should help

2016-07-26T20:28:35.000046Z

Memory issue is different this problem? Because anytime I play a sound, my JVM memory usage increasing all time, but not decrease, I have to close JVM by my hand to release that memory, I hope it helps

2016-07-26T20:32:34.000047Z

dave: I have another question. I want to make a web site to play commands on a web site, I know we do not have a output file but is this possible?

dave 2016-07-26T21:11:26.000048Z

@etaylan: not currently. i've been wanting something like that for a while now, but haven't had the time to work on it

dave 2016-07-26T21:11:44.000049Z

basically, we would need to port alda to javascript

dave 2016-07-26T21:12:46.000050Z

the good news is that it won't take much effort -- clojure code is portable to something called clojurescript, which produces javascript

dave 2016-07-26T21:13:18.000051Z

there is a proof of concept here https://github.com/alda-lang/web-demo -- it's very limited though, and the version of alda is from 10-11 months ago

dave 2016-07-26T21:13:28.000053Z

http://alda.io/web-demo/

2016-07-26T21:38:35.000054Z

Thank you this is helpful enough, now I can send this magic link to my friends.

dave 2016-07-26T23:41:51.000056Z

awesome