mdedwards / slippery-chicken

slippery chicken: algorithmic composition software in common lisp and clos
http://michael-edwards.org/sc
72 stars 3 forks source link

added write-csound-score and csound-play methods #64

Closed rubenphilipp closed 1 year ago

rubenphilipp commented 1 year ago

Hello Michael,

here is, finally, the revised Csound implementation for slippery-chicken. As described in the (hopefully robodoc-compliant) documentation, it mainly consists of two methods, which bear quite some similarities to midi-play resp. write-lp-data-… and lp-display. These methods, namely write-csound-score and csound-play, are (obviously) capable of generating Csound-scores for sound synthesis and audio file generation based on the Csound command, requiring a user defined Csound-orchestra (cf. documentation of csound-play). In addition to these main methods, I have added the helper function csound-p-fields-simple, which generates a basic set of Csound p-fields (from p4 onwards) and is called by default when invoking write-csound-score. Of course, it can be overridden by the user, e.g. via lambda or a user-defined function. This pull request also adds RTs for all methods (and, 'inferentially', the function mentioned above) as well as a simple Csound-orchestra (mini-synth.orc) in the tests directory, obviously, for testing purposes. As I tried to transparently document the code, I'll skip further examples in this place and let the code have the final say.

Best Ruben

rubenphilipp commented 1 year ago

Hallo Michael,vielen Dank für das Feedback! Touché — ich habe nun mein Emacs trainiert, strenger mit dem Zeichenlimit zu sein. Ich ändere am Wochenende den Code, damit er sich an die 80-Zeichen-Limitation hält. Zu den Tests: Tatsächlich sollte es einen Fehler geben, wenn der Csound-Command nicht gefunden wird, da es einen RT für csound-play gibt. Ich finde auch hierfür eine Lösung. Ich wünsche dir einen schönen Freitagabend und ein angenehmes WochenendeRuben–––Ruben @. 03.03.2023 um 16:34 schrieb Michael Edwards @.>: Hallo Ruben,

Dein Code ist jetzt drin und kommt durch die Tests. Zwei Dinge:

Siehe Anhang. Bitte ändere dein Code damit es streng max. 80-Charakter breit ist.

Überleg dir was passieren wird, wenn jemand kein Csound installiert hat: die Tests müssen trotzdem durchkommen oder?

Mach git pull und dann vielleicht Änderungen.

Grüße, Michael

On 3 Mar 2023, at 14:48, Ruben Philipp @.***> wrote:

Hello Michael,

here is, finally, the revised Csound implementation for slippery-chicken. As described in the (hopefully robodoc-compliant) documentation, it mainly consists of two methods, which bear quite some similarities to midi-play resp. write-lp-data-… and lp-display. These methods, namely write-csound-score and csound-play, are (obviously) capable of generating Csound-scores for sound synthesis and audio file generation based on the Csound command as well as a user defined Csound-orchestra (cf. documentation of csound-play). In addition to these main methods, I have added the helper function csound-p-fields-simple, which generates a basic set of Csound p-fields (from p4 onwards) and is called by default when invoking write-csound-score. Of course, it can be overridden by the user, e.g. via lambda or a user-defined function. This pull request also adds RTs for all methods (and, 'inferentially', the function mentioned above) as well as a simple Csound-orchestra (mini-synth.orc) in the tests directory, obviously, for testing purposes. As I tried to transparently document the code, I'll skip further examples in this place and let the code have the final say.

Best Ruben

You can view, comment on, or merge this pull request online at:

https://github.com/mdedwards/slippery-chicken/pull/64 https://github.com/mdedwards/slippery-chicken/pull/64 Commit Summary

b822442 https://github.com/mdedwards/slippery-chicken/pull/64/commits/b822442880b78226ac615c352bc54cb4fd2b1ab3 added csound-play 1cc2013 https://github.com/mdedwards/slippery-chicken/pull/64/commits/1cc20132c224fd69fcd925993090d18b4c8c036c renamed csound-play to write-csound-score and added new csound-play method, analogous to lp-display 5bf9870 https://github.com/mdedwards/slippery-chicken/pull/64/commits/5bf9870c9a801c87c5824c0ee85e3728a04cffa6 added RTs for csound-play File Changes (4 files https://github.com/mdedwards/slippery-chicken/pull/64/files) M src/globals.lsp https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-2363db4d0086ac87bb207dab952382cd5fe0dcd498c39a646ee2e274e1b9f87a (11) M src/slippery-chicken.lsp https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-ee06624e436e3973873d595245e8de57803d42858401fc54819024ec7caadd73 (635) A tests/mini-synth.orc https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-f1d7faff1fab0746b386ebe4fd10a1c75899a1d477ae259b0b7e66367438f4b4 (63) M tests/sc-test-suite.lsp https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-b70645970dfbcae5bdad1a0e1990b19be1404708e857e332e6421b4780fad318 (240) Patch Links:

https://github.com/mdedwards/slippery-chicken/pull/64.patch https://github.com/mdedwards/slippery-chicken/pull/64.patch https://github.com/mdedwards/slippery-chicken/pull/64.diff https://github.com/mdedwards/slippery-chicken/pull/64.diff — Reply to this email directly, view it on GitHub https://github.com/mdedwards/slippery-chicken/pull/64, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3IOIQVEJOYAWNP24PPRZLW2HZDTANCNFSM6AAAAAAVOUKUDI. You are receiving this because you are subscribed to this thread.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

mdedwards commented 1 year ago

Danke Ruben.

(unless (probe-file (get-sc-config ‘csound-command ….

Grüße, Michael

On 3 Mar 2023, at 20:33, Ruben Philipp @.***> wrote:

Hallo Michael,vielen Dank für das Feedback! Touché — ich habe nun mein Emacs trainiert, strenger mit dem Zeichenlimit zu sein. Ich ändere am Wochenende den Code, damit er sich an die 80-Zeichen-Limitation hält. Zu den Tests: Tatsächlich sollte es einen Fehler geben, wenn der Csound-Command nicht gefunden wird, da es einen RT für csound-play gibt. Ich finde auch hierfür eine Lösung. Ich wünsche dir einen schönen Freitagabend und ein angenehmes WochenendeRuben–––Ruben @. 03.03.2023 um 16:34 schrieb Michael Edwards @.>: Hallo Ruben,

Dein Code ist jetzt drin und kommt durch die Tests. Zwei Dinge:

Siehe Anhang. Bitte ändere dein Code damit es streng max. 80-Charakter breit ist.

Überleg dir was passieren wird, wenn jemand kein Csound installiert hat: die Tests müssen trotzdem durchkommen oder?

Mach git pull und dann vielleicht Änderungen.

Grüße, Michael

On 3 Mar 2023, at 14:48, Ruben Philipp @.***> wrote:

Hello Michael,

here is, finally, the revised Csound implementation for slippery-chicken. As described in the (hopefully robodoc-compliant) documentation, it mainly consists of two methods, which bear quite some similarities to midi-play resp. write-lp-data-… and lp-display. These methods, namely write-csound-score and csound-play, are (obviously) capable of generating Csound-scores for sound synthesis and audio file generation based on the Csound command as well as a user defined Csound-orchestra (cf. documentation of csound-play). In addition to these main methods, I have added the helper function csound-p-fields-simple, which generates a basic set of Csound p-fields (from p4 onwards) and is called by default when invoking write-csound-score. Of course, it can be overridden by the user, e.g. via lambda or a user-defined function. This pull request also adds RTs for all methods (and, 'inferentially', the function mentioned above) as well as a simple Csound-orchestra (mini-synth.orc) in the tests directory, obviously, for testing purposes. As I tried to transparently document the code, I'll skip further examples in this place and let the code have the final say.

Best Ruben

You can view, comment on, or merge this pull request online at:

https://github.com/mdedwards/slippery-chicken/pull/64 https://github.com/mdedwards/slippery-chicken/pull/64 <https://github.com/mdedwards/slippery-chicken/pull/64 https://github.com/mdedwards/slippery-chicken/pull/64> Commit Summary

b822442 <https://github.com/mdedwards/slippery-chicken/pull/64/commits/b822442880b78226ac615c352bc54cb4fd2b1ab3 https://github.com/mdedwards/slippery-chicken/pull/64/commits/b822442880b78226ac615c352bc54cb4fd2b1ab3> added csound-play 1cc2013 <https://github.com/mdedwards/slippery-chicken/pull/64/commits/1cc20132c224fd69fcd925993090d18b4c8c036c https://github.com/mdedwards/slippery-chicken/pull/64/commits/1cc20132c224fd69fcd925993090d18b4c8c036c> renamed csound-play to write-csound-score and added new csound-play method, analogous to lp-display 5bf9870 <https://github.com/mdedwards/slippery-chicken/pull/64/commits/5bf9870c9a801c87c5824c0ee85e3728a04cffa6 https://github.com/mdedwards/slippery-chicken/pull/64/commits/5bf9870c9a801c87c5824c0ee85e3728a04cffa6> added RTs for csound-play File Changes (4 files <https://github.com/mdedwards/slippery-chicken/pull/64/files https://github.com/mdedwards/slippery-chicken/pull/64/files>) M src/globals.lsp <https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-2363db4d0086ac87bb207dab952382cd5fe0dcd498c39a646ee2e274e1b9f87a https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-2363db4d0086ac87bb207dab952382cd5fe0dcd498c39a646ee2e274e1b9f87a> (11) M src/slippery-chicken.lsp <https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-ee06624e436e3973873d595245e8de57803d42858401fc54819024ec7caadd73 https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-ee06624e436e3973873d595245e8de57803d42858401fc54819024ec7caadd73> (635) A tests/mini-synth.orc <https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-f1d7faff1fab0746b386ebe4fd10a1c75899a1d477ae259b0b7e66367438f4b4 https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-f1d7faff1fab0746b386ebe4fd10a1c75899a1d477ae259b0b7e66367438f4b4> (63) M tests/sc-test-suite.lsp <https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-b70645970dfbcae5bdad1a0e1990b19be1404708e857e332e6421b4780fad318 https://github.com/mdedwards/slippery-chicken/pull/64/files#diff-b70645970dfbcae5bdad1a0e1990b19be1404708e857e332e6421b4780fad318> (240) Patch Links:

https://github.com/mdedwards/slippery-chicken/pull/64.patch https://github.com/mdedwards/slippery-chicken/pull/64.patch <https://github.com/mdedwards/slippery-chicken/pull/64.patch https://github.com/mdedwards/slippery-chicken/pull/64.patch> https://github.com/mdedwards/slippery-chicken/pull/64.diff https://github.com/mdedwards/slippery-chicken/pull/64.diff <https://github.com/mdedwards/slippery-chicken/pull/64.diff https://github.com/mdedwards/slippery-chicken/pull/64.diff> — Reply to this email directly, view it on GitHub <https://github.com/mdedwards/slippery-chicken/pull/64 https://github.com/mdedwards/slippery-chicken/pull/64>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AC3IOIQVEJOYAWNP24PPRZLW2HZDTANCNFSM6AAAAAAVOUKUDI https://github.com/notifications/unsubscribe-auth/AC3IOIQVEJOYAWNP24PPRZLW2HZDTANCNFSM6AAAAAAVOUKUDI>. You are receiving this because you are subscribed to this thread.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/mdedwards/slippery-chicken/pull/64#issuecomment-1454030520, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC3IOIXZFNGYBNTVCM4SMGLW2JBO7ANCNFSM6AAAAAAVOUKUDI. You are receiving this because you modified the open/close state.