Kara-Moon Forum
April 25, 2024, 11:05:31 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: changing voice number for all drum tracks simultaneously  (Read 6119 times)
willemj
Newbie
*
Posts: 3


« on: July 16, 2012, 12:42:19 PM »

I'm using MMA with a Kurzweil SP4-7. This piano is not GM compatible and plays a grand piano on midi channel 10 when voice 0 is selected. The MMA manual says you can change the voice of the drums using 'Drum Voice <number>'. But this gives a warning 'Track drum-<name1>, drum-<name2>, etc are shared with DRUM' and the sound is still the grand piano. Adding all tracks separately works, I get drums, but is a bit cumbersome and every line gives a warning.

If I read the manual correctly I should be able to replace a voice using VoiceTr (ie. 'VoiceTr default_voice=my_new_voice' would replace all used of default_voice to my_new_voice) But I have no idea what the name of the default drum voice is. The docs say something about drum using 'voice 0' but 'VoiceTr voice0=68' has no effect.

So can I change the default drum voice using voicetr or is there another way to achieve this?

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


WWW
« Reply #1 on: July 16, 2012, 04:40:05 PM »

I think you are confusing 2 different concepts.

First off, let's talk about Voice. This is the what a MIDI manual will refer to as "Program Change". So, in GM a "Piano" sound will be Voice 1 (or 2 or 3). The only difference between GM and non-GM is that GM has standardized the "locations" of the names. IE, all GM compatible synths make 01 == Piano, etc.

Now, if we are talking about drums, things change a bit. Imagine a drum as a single instrument (a piano makes the comparison simple). So, on a Midi drum we have up to 128 keys, each key is a different "tone". Note 39 is a "handclap", etc.

You can select different drum sets (like different pianos), but setting the VOICE for a drum. You your synth might have a "jazz kit" as Voice 123, etc.

Next, we have the channel issue. Most synths capable of doing drums set the MIDI channel for drums to 10 (or 9 if you are counting from 0..15).

Now, I'm assuming that your inst. wants to either:

 - play drums on a channel other than 10.
 - needs an explicit voice setting to dial up the drum set.

It appears from you post that the problem is with the VOICE number.

Doing a voicetr might help. What voicetr is supposed to do is make it easy to change the NAME of a voice. So, if your piano things that the value for PIANO1 is 88 (not 1) then you can use Voicetr. So, the first thing I'd try is, assuming the the drumkit you want to use is VOICE 44:

        VoiceTr 0=44

But, you say that doesn't work.

Next, you can do the voice changes as you mention. You can delete the messages by setting Debug warning off/on. But, you still need to know what tracks are effected. Not an ideal solution.

The only other solution I see right now is to add a "default voice" command for drums. Before I do anything like that, would you try changing some python source code for me? There is a table around line1559 of pat.py. It looks like this:

 if self.vtype != 'SOLO' or not self.inited:
            self.artic        =  [90]
            self.chord        =  [[]]
            self.sequence     =  [None]
            self.seqRnd       =  0
            self.seqRndWeight =  [1]
            self.scaleType    =  ['AUTO']
            self.rVolume      =  [[0,0]]
            self.rSkip        =  
           self.rTime        =  [[0,0]]
            self.octave       =  [4 * 12]
            self.voice        =  
           self.chordRange   =  [1]
            self.harmony      =  [None]
            self.harmonyOnly  =  [None]
            self.harmonyVolume = [.8]
            self.strum        =  [None]
            self.volume       =  [MMA.volume.vols['M'] ]
        
If you change the default voice setting like this:

            self.octave       =  [4 * 12]
            if self.vtype == DRUM:
                  self.voice = [xyz]    # change xyz to the default for your inst.
            else:
                   self.voice =
            self.chordRange   =  [1]

and let me know if that works.

Drum tracks are a pain to work with Smiley
« Last Edit: July 16, 2012, 04:42:02 PM by bvdp » Logged

My online life: http://www.mellowood.ca
willemj
Newbie
*
Posts: 3


« Reply #2 on: July 16, 2012, 07:49:51 PM »

Thanks for your reply Bob. And for developing this great piece of software Smiley

I will read up on the terminology and try the changes you suggested in the python source. I am a software developer but I use Perl, C# and PHP. So I got some reading to do on Python and 'identation errors'. (No need for you to spend time on syntax lessons; I'll figure it out and Python was already on my short list of languages to learn)
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #3 on: July 16, 2012, 08:48:30 PM »

Yes, the code posted above is not indented properly. However, if you use a python aware editor it should be easy to do.

I can do it here and send a module to you if it gets down to that.

I think the defaultdrum command is something easy and nesc. But, I want to make sure I'm on the right track first.

BTW, it just occurred to me why the translations won't work. The default is set as "0" and completely ignores the translation tables. Plus, they would impact both regular voices (non-drum) and drum. Not really what we're after.

Let me know if the fix works and I'll wrap it into the next beta.

Oh, and do have fun learning Python. It's my #1 language these days ... if I can't do it in Python, I don't do it Smiley
Logged

My online life: http://www.mellowood.ca
willemj
Newbie
*
Posts: 3


« Reply #4 on: July 17, 2012, 08:59:01 AM »

After figuring out Python wants spaces, not tabs, I applied the changes and it now works Smiley
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #5 on: July 17, 2012, 04:17:19 PM »

For the next beta release (real soon, just doing a bit more testing!) a new command will let you do this from a mmarc file.

Thanks for testing this!

BTW, you can use tabs for spaces in python ... but tabs are NOT recommended.
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.068 seconds with 19 queries.