Comments (4)
Hi, thanks for the issue!
Player logs are written into files in a directory whose location varies depending on your OS. To see the location, run alda-player info
.
Another thing you can do is run a player process in the foreground like this:
alda-player -v run
-v
is for verbose mode. There is also a very verbose mode, -vv
.
You can also include -p 12345
to run the player process on a specific port. (By default, a random open port is used.)
When running a player process in the foreground like this, the logs are printed to stdout.
The other piece of the puzzle is to ensure that that player is used, so that you can test what you wanted to test. There are two ways you can do this: one is to specify the port that you started the player on (if you didn't specify a port, you can see what port is used in the player logs):
alda play -p 12345 -c "piano: c8 d e f g a"
The other way is to look at the player logs and note the three-letter ID at the beginning of each line. This is an automatically generated player ID that you can specify instead of the port:
alda play -p xxx -c "piano: c8 d e f g a"
Either way, note that the player process will automatically shut down at the end of the first "play" command it receives. This is by design, to help ensure that fresh players are used and stale players aren't left running forever. The player process will also shut itself down after a period of inactivity, for the same reason.
Does that help?
from alda.
I'd like to be able to include debug messages in my scores; just echoing the notes that are being played (in text form) would be start.
An old idea that I had, possibly related: #430
from alda.
Hi, thanks; for example, I can see the output from the existing log.trace { "${address} ${args}" }
on line 223 of Parser.tk this way.
Potentially clarifying my initial question: I had been wondering about how to get player messages to appear alongside interactions on a REPL. Indeed, #430 would be an example feature of broader debugging suite, maybe adjusting the syntax there to (debug 'offset)
and also accommodating (debug "message")
. These could print out on the REPL rather than in the log we were talking about here.
from alda.
That's an interesting idea! I think it could be implemented in a way that would also allow us to do things like what @UlyssesZh was talking about in #451, where you could write an editor plugin that moves your cursor to the note in the score that was just played.
The thing that makes this challenging right now is that all of the communication is unidirectional from the client to the player. Aside from tailing logs, we don't have any way of receiving updates from player processes in real time. But we could add a separate stream of updates coming from the player, and build tooling to do all kinds of interesting things with that data, including debugging.
Because latency is important, and we're already using OSC for the client -> player communication, I think it would make sense for the player to broadcast OSC messages for this.
Hopefully there is some way to do this without a lot of performance overhead that would affect playback
from alda.
Related Issues (20)
- Build instruction in main readme.md HOT 5
- Alda on Raspberry Pi
- REPL :stop command fails for overly long segments HOT 14
- CLI output is wonky HOT 14
- Alda Processes are not independent of the shell HOT 1
- alda play --code misinterprets snippets with custom instrument names HOT 7
- Alda suddenly consume a huge amount of RAM HOT 1
- player processes get stuck HOT 14
- How to make Pedal On and Off in Alda HOT 4
- Can't Create Chord with Cram Expression HOT 6
- Alda REPL: "Play right away" offset calculation doesn't work with voices HOT 1
- Alda REPL server sometimes "claims" more than 1 player on startup
- Exiting Alda REPL in "server only" mode kills all player processes
- Alda REPL "skips" rests at the end of a line
- open /tmp/alda-doctor1917232005/1666820313.mid: no such file or directory HOT 6
- Are there any PORTABLE version of alda that can run without java? HOT 1
- Time to play is too long HOT 15
- `pitch` behavior changed from Alda 1 to Alda 2 HOT 4
- Lisp function `part` got deleted in Alda 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alda.