AlainJamot Posted May 11, 2017 Share Posted May 11, 2017 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. Alain Quote Link to comment Share on other sites More sharing options...
opmo Posted May 11, 2017 Share Posted May 11, 2017 At the beginning of the score: (init-seed 32) added 5 minutes later You could use few of them between blocks of expressions - more control :-) hujairi 1 Quote Link to comment Share on other sites More sharing options...
AlainJamot Posted May 11, 2017 Author Share Posted May 11, 2017 Really simple ! Thanks Quote Link to comment Share on other sites More sharing options...
Stephane Boussuge Posted May 12, 2017 Share Posted May 12, 2017 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. Example: (setf seed (car (rnd-number 1 1 100000))) (init-seed seed) SB. opmo 1 Quote Link to comment Share on other sites More sharing options...
torstenanders Posted May 13, 2017 Share Posted May 13, 2017 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. (progn (setf seed (random 1000)) (print seed) ;; replace seed below ultimately with seed generating a result you like (init-seed seed)) Best, Torsten Stephane Boussuge 1 Quote Link to comment Share on other sites More sharing options...
AlainJamot Posted May 18, 2017 Author Share Posted May 18, 2017 Thanks Stephane and Torsten, this is exactly what I was looking for ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.