Kara-Moon Forum
April 28, 2024, 11:46:03 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: Quick track on command line  (Read 5751 times)
nileshtrivedi
Newbie
*
Posts: 4


« on: February 12, 2011, 08:47:35 PM »

I use this Ruby script to quicky play a short repeating pattern when I am trying out soloing ideas:

Code:
#!/usr/bin/env ruby
groove = ARGV.slice!(0)
tempo = ARGV.slice!(0)
count = ARGV.slice!(0)

puts "Generating MMA file"
File.open("/tmp/mmaout.mma","w") { |f|
  f.puts "Tempo #{tempo}"
  f.puts "Groove #{groove}"
  count.to_i.times {
   ARGV.each { |chord| f.puts chord }
  }
}
puts "Running MMA"
`mma /tmp/mmaout.mma`

puts "Running Timidity"
`timidity /tmp/mmaout.mid`

puts "Done"

You can run the script in the shell something like this:

Code:
mmacmd.rb Rhumba 130 20 G F C C

I hope someone finds this useful.
Logged
nileshtrivedi
Newbie
*
Posts: 4


« Reply #1 on: February 12, 2011, 09:21:46 PM »

It would be awesome if MMA supported these kind of quick accompanying tracks out of the box !
Logged
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #2 on: February 12, 2011, 09:34:27 PM »

Yes, cool.

Just some thoughts which might help you do it "out of the box".

1. You know that you can set a repeat count for a bar:

       C * 20

will give 20 bars of a C chord.

2. You can do this with the -V (preview) command. Just set the COUNT option for the number of loops. So, "mma -V Rhumba1 Chords=A,B,C,D Tempo=123  Count=20" should do the same as your example???

3. Instead of repeating the data bars, consider using a Repeat section...

    Repeat
     C
     D
     ...
     Repeatend 20

Would give you 20x of the pattern.

Hope this helps.
Logged

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


WWW
« Reply #3 on: February 12, 2011, 09:39:04 PM »

Forgot to mention that you can get mma to play a file it generates (and delete the file) with the -P option. I use that all the time. See the entry for SetMidiPlayer for details on how to configure the player to timidity.
Logged

My online life: http://www.mellowood.ca
nileshtrivedi
Newbie
*
Posts: 4


« Reply #4 on: February 12, 2011, 10:50:50 PM »

Thanks. I was using the older version (0.12) that is shipped with Ubuntu 10.10. Now using the latest .deb and the "-V' option works fine.  Smiley

Logged
Oren
Moderators Views
Kara-Moon Master
********
Posts: 5444


...just looking for clues...


« Reply #5 on: February 13, 2011, 06:45:43 PM »

Thanks. I was using the older version (0.12) that is shipped with Ubuntu 10.10. Now using the latest .deb and the "-V' option works fine.

Cool!
Logged

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.052 seconds with 19 queries.