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
as you can guess, it happens on windows too
that's good to know. my theory is that this is JVM related
like there is too much going on in a single alda server JVM
it's running an HTTP server and managing multiple score-performance contexts
each of which is doing audio stuff
but responses one? (i don't know much about how a JVM server work )
?
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?
i think i understand what you're asking
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
a single alda server should be able to handle playing multiple scores at once
and each score has a separate "audio context," including its own JVM MIDI Synthesizer instance, etc.
so all of this is running in the same JVM, the alda server process
everything sounds good but?
i think this issue with sound breaking up might be related to the single JVM being overloaded
i'm curious if it would help for the alda server to just be a server, and delegate playing audio to separate processes
what is the difference between alda server and "just server"
by "just a server," i mean it would just run the HTTP server that the alda command-line client interacts with
so it would just be listening for code to parse and play
but it would delegate the parsing and playing part to one of the "performer" processes
(2 hours later)I get it now. And I realize you said same thing before "a single alda server should be able to handle..."
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
@etaylan: they were probably both trying to start on the same port (the default port is 27713)
you could try starting multiple servers on different ports
like alda -p 1234 up
alda -p 2345 up
etc.
i'd be curious to know if the sound breaks when playing scores on several different servers at the same time
that might confirm that running everything on a single server is the problem
I am going to try with different ports now
Changing port not making any difference, server still waits the other process
that's interesting
I wrote other outputs to the GitHub issue.
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
i think overall, alda suffers from a handful of issues where memory isn't used in the most efficient way
i think if we implement the things i mentioned in the github issue, hopefully that should help
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
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?
@etaylan: not currently. i've been wanting something like that for a while now, but haven't had the time to work on it
basically, we would need to port alda to javascript
the good news is that it won't take much effort -- clojure code is portable to something called clojurescript, which produces javascript
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
Thank you this is helpful enough, now I can send this magic link to my friends.
awesome