Jump to content
Sign in to follow this  

Freezing file

Recommended Posts

Hi everybody,


I'm working on different automatic composition projects, involving a lot of random use.


Is it possible to "freeze" a complete score, instead of fixing a seed for each "random generator" (rnd-order function) ?


I'd like to be in a "push button" situation, listening to a lot of versions and saving only the ones really working.


I can do that by saving the score as a pdf and exporting a midifile for each instance, but it would be wonderful to just save the opmo files for further processing.


Thanks for your help and suggestions.



Share this post

Link to post
Share on other sites

Something useful for automatic stuff generation, you can define a variable seed defined with random number and replace the value of the variable by it's value when you got an interesting result.



(setf seed (car (rnd-number 1 1 100000)))
(init-seed seed)



Share this post

Link to post
Share on other sites

As Stephane also pointed out earlier, if you want to create a number of randomised solutions, but then later want to fix the result to one solution/seed of your choice, one way to do that is to always print the current seed, and in the end to simply replace your randomly generated seed with a seed of your choice. 

  (setf seed (random 1000))
  (print seed)
  ;; replace seed below ultimately with seed generating a result you like
  (init-seed seed))



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this