defaultxr / cl-patterns

Library for writing patterns to generate or process (a)musical sequences of mathematically (un)related (non-)compound values in Lisp.

Home Page:https://w.struct.ws/cl-patterns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning or error if something is `play`ed when the clock is stopped.

ntrocado opened this issue · comments

This is still connected to the following post:

No prob! Glad to hear it was something simple at least. Though it is strange that it would result in nils if the clock wasn't running. Maybe it would be a good idea for me to implement some kind of warning or error if something is played when the clock is stopped.

Originally posted by @defaultxr in #3 (comment)

I forgot to create the clock and got the following error:

There is no applicable method for the generic function
  #<STANDARD-GENERIC-FUNCTION (SB-PCL::SLOT-ACCESSOR :GLOBAL
                               CL-PATTERNS::TASKS
                               SB-PCL::READER) (1)>
when called with arguments
  (NIL).
   [Condition of type SB-PCL::NO-APPLICABLE-METHOD-ERROR]

Maybe it's possible to have a more descriptive message that suggests the missing clock?

Sure thing, good idea. I've added a check for clock being nil in 741bbbc . Let me know if you notice any other confusing/unhelpful error messages.