Kara-Moon Forum
April 16, 2024, 08:48:29 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Auto channel allocation  (Read 2405 times)
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« on: May 11, 2020, 07:02:49 PM »

I've tweaked some code and have auto allocate working. No more will you see the message about no MIDI tracks being available. That's a good thing Smiley

I have left in a number of warning messages. So, when you now have a very long file with lots of different grooves (many more than you should have) MMA will find the least used track and allocate that to the newly needed one. I have left in warning messages, so you will see stuff like:

    Warning: <Line 387> <File:long.mma> Channel 7 is being reassigned to CHORD-ACCORDION

and

   Warning: <Line 164> <File:/home/bob/src/bv/mma/lib/stdlib/samba.mma> Track BASS-TRP is
    shared with CHORD-SUS. Changing voice may create conflict

I think we're better off with the warnings! Let me know what you think about that.

I did compile the file from the OP with all the groove changes and it seems to be playing fine. So that's a win! Let me play a bit more with this and clean up the code. I'll put a patch up later.

Logged

My online life: http://www.mellowood.ca
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #1 on: May 12, 2020, 06:35:15 PM »

Could you guys give this patch a go. It is against the developer 20.02c version of MMA.

  - fixes the import problem with tweaks.py
  - adds a bit of code to midi.py for searching out the least used track
  - changes a bit of code it pat.py.

This will permit the compilation of long files with lots of grooves. I've attached the patch and the "bad" file (long.mma) which started all this.

I've looked at the output and listened to most of it as well and it appears to be doing all the right things Smiley

* long.mma (2.67 KB - downloaded 183 times.)
* patch.txt (2.24 KB - downloaded 186 times.)
Logged

My online life: http://www.mellowood.ca
sciurius
Sr. Member
****
Posts: 443



« Reply #2 on: May 13, 2020, 09:50:50 AM »

Great you solved the track allocation conflicts. I do, however, believe it is best to avoid this situation if possible Smiley .

Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #3 on: May 13, 2020, 06:54:17 PM »

I don't think it'll happen all that often. That file was the first time I saw it ... most of the time one just doesn't use that many grooves. But, it was fairly easy to make the change and so long as it doesn't bugger up the result I'm happy enough.

But, I agree .. best to avoid Smiley
Logged

My online life: http://www.mellowood.ca
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.056 seconds with 19 queries.