Kara-Moon Forum
April 28, 2024, 09:34:30 AM *
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: Note specification enhancements  (Read 8708 times)
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« on: July 01, 2010, 11:52:49 PM »


I'm working on some changes, the ultimate goal of which is to be able to take an existing midi file, import it via MidiInc, and shove it into a Solo track where it will be processed for all the nicities like Harmony, articulate, etc. My idea isn't that complicated:

   - read the extant midi file just like we are doing now
   - if a special flag is set (makeriff?? or something), instead of just shoving it into the midi track, we process it into bar/note data. Each bar would be converted into something a SOLO track can understand and shoved into the data stream as a RIFF.

The problem right now is that you can't (easily or accurately) convert midi to mma's note notation. So the solution is to extend the notation. My suggestion is that we do the following:

 - everywhere a note duration is used ('4' for quarter, etc) we permit a midi tick duration as well. So '4' would be specified as '196t'. This permits odd-ball durations in things like pattern definitions, as well as solos. In a solo you could have something like:

            4f; 22tg;

which is a quarter note 'f' and a 22 tick 'g'.

I have this working as seems to be fine.

- To the solo stuff, add <Offset=ticks> to permit the adjustment of the current bar pointer. Assuming the duration tick notation, above, one could also use odd-length rests ...but just moving via <offset> seems nicer. Probably only be used in machine generated code.

- in solo/melody only permit the note pitch to be specified as a midi value as well as pitch names.

The bottom line on this is that one could define a solo for a bar as:

        <offset=230> 22t 100; ...

Ugly to type, but nice for midiinc to use.

Only problem is that I still can't specify velocity. It'll use the existing volume settings. Might be easy enough to do something like Pitch/Velocity and have the 2nd part optional.

Neat part of all this is that things like harmony, harmonyonly, articulate, transpose, etc. all work on the new input. So, you could have mma's "smarts" (or "dumbs", depending on your attitude) apply to something you play on a keyboard.

I'd welcome your comments and suggestions!
Logged

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


WWW
« Reply #1 on: July 06, 2010, 02:20:46 AM »

Okay, I've been busy (too damned cold and wet to enjoy much outdoors!) and have made vast progress on the next set of enhancements.

 - All note duration (in a pattern/sequence as well as a solo note) can now be specified as a MIDI tick duration. Simply use a value followed by a 't'. So, instead of a logical and understandable '4' for a quarter note you can now use the cryptic notation '192t'. If you read further you'll see why this is neat and important.

 - In a solo line you can specify note pitches in the traditional 'a'...'g' AND you can use a MIDI pitch value (0..127).

 - A note in a solo line can also specify the midi velocity. Just append "/dd" to the pitch.

 - A option to the <> set in a solo line, Offset=dd, can set the current offset into the bar.

Examples of solos might include:

           4f/88, +g#; <Offset=200> 22t 100,80/30; ....

Which decodes to:
 
           4f/88  ... a quarter note f, velocity 88 (default is 90)
           +g#   --- quarter note g#, raised an octave (velocity 90)
            ; new chord
            move offset pointer from 192 to 200 (ticks!)
            100 --- duration 22 ticks, midi pitch 100 (velocity 90)
             80  --- duration still 22 ticks, midi pitch 80, velocity 30

In most cases (other than, perhaps, the velocity) you'll probably not care or ever use this stuff. BUT, my next bit of coding will make it all make sense. I plan to modify the MidiInc command so that you can have "Riff=Track" as an additional option. In this case, we'll read the included file just like before. But, then, the file will be modified so that the duration of each note is calculated (normally MIDI doesn't know about duration, just a time to start and another time to end).

Once we know what the notes are in the included file and their durations we can push that information into the specified solo track as a series of RIFF lines (they'll not be totally readable, but close). Now, as we work though the chords in the main song file, each riff line will be included (just like a manually created solo line), articulation, transpose, HARMONY, etc. will be applied.

Idea is that you can play a little melody line on a keyboard, record the midi and then import it and use mma to do the chording, etc.

Okay, that's not working yet ... but I don't see any major problems. Getting the solo stuff to accept something which the MidiInc will generate was the major leap.

Hope you are getting anxious! But, it'll be a little while yet Smiley
Logged

My online life: http://www.mellowood.ca
kara
Kara-Moon, a site built by and for musicians
Global Moderator
Kara-Moon Master
*****
Posts: 4907


Music is my middle name


WWW
« Reply #2 on: July 06, 2010, 06:37:57 AM »

Quote
Once we know what the notes are in the included file and their durations we can push that information into the specified solo track as a series of RIFF lines (they'll not be totally readable, but close). Now, as we work though the chords in the main song file, each riff line will be included (just like a manually created solo line), articulation, transpose, HARMONY, etc. will be applied.

Now I understand why you're doing this
This will be quite powerfull !
Imagine a good guitar rif that you like in the song.
You take the riff, let MMA do his magic and it will work on any chord ! Right ?

k
Logged

_____oOo______ http://www.myspace.com/kaazduo

www.kara-moon.com, a site built by and for musicians
Support us at : http://www.mymajorcompany.com/Artistes/kaaz/
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #3 on: July 06, 2010, 04:13:31 PM »


Umm, probably work with any chord ... well, so long as the melody notes work with the chord changes you'll be just fine. The harmony will be created (just like it is now) by adding notes from the chord to the melody notes ... the melody notes are the ones you just imported, and I assume you're not playing more than one at a time.

I don't think the first cut of this will be perfect ... but it should work pretty good. Gotta start the second part of the coding ... I'll keep you all informed of how it's going.
Logged

My online life: http://www.mellowood.ca
kara
Kara-Moon, a site built by and for musicians
Global Moderator
Kara-Moon Master
*****
Posts: 4907


Music is my middle name


WWW
« Reply #4 on: July 06, 2010, 05:01:51 PM »

Aha I understand now, the harmony will be created on the existing melody in function of the chord but the original melody will stay unmodified.
Dumb me, first I somehow understood that the melody would be transposed in function of the underlying chord

k
Logged

_____oOo______ http://www.myspace.com/kaazduo

www.kara-moon.com, a site built by and for musicians
Support us at : http://www.mymajorcompany.com/Artistes/kaaz/
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #5 on: July 06, 2010, 06:34:36 PM »


Dumb me, first I somehow understood that the melody would be transposed in function of the underlying chord


When I said transpose I was referring to the existing transpose function in mma.

However, your mis-think is actually an interesting idea. Give me some thoughts on it (for later). But suppose you have a simple "riff" ... let's make it 4 quarter notes c, e, g, e. You can play this forever over a Cmaj chord. But, if we want the riff adjusted for the underying chord ... I don't know what kind of an set of rules we'd use. Just off the top of my head:

    chord changes to Cm --> look a riff and see that 'e' is now 'eb' so change that?
    change back to Cmaj --> is our "root riff" still c,e,g,e? or c,eb,g,eb? either way, change that e again,
     change to Gmaj --> hmmm, no e or c in that chord c->b and e->d?
     change to Dmin --> now, assuming the riff is now b,d,g we just change the g to f.

Mind you, what I've done here is just arpeggiating over the chord. And mma already does that. Remember, you can use any "pattern" in the arpeggio tracks and that just follows the underlying chords. Somehow I'm missing the relationship between a user generated riff and changing chords. I think that the changing riff is the "creative" part placed on the user?

Logged

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


WWW
« Reply #6 on: July 10, 2010, 09:21:42 PM »

A little update for those following this thread. It Works!wOO

I just ran a short file with the following commands:

 Begin Solo
   Voice Marimba
   Harmony 3Above+8Below+16Above
   Articulate 200
   volume pp
   Mallet Rate=16 Decay=-3
End

Begin Solo-1
  Voice JazzGuitar
  VOlume fff
  Articulate 160
  HarmonyOnly OpenBelow
End

   MidiInc file=rec1.mid Solo=1,riff  Solo-1=1,riff Volume=70 octave=+1

Chords....

And, yes, very cool. In this case the existing melody (rec1.mid) was read and converted into a series of riff commands and inserted into the solo and solo-1 tracks (thankfully, this is all hidden from the user). Now, the melody is played (over chords):

   solo -- the imported melody converted to a marimba with about 6 hands/mallets
   solo-1 -- the same melody converted to a harmony played on a guitar.

I'm going to debug this for a few more days (yes, there are probably bugs!). Then we'll let it out into the real world. Before I do this, I'd love suggestions (hard, I know, since you don't have code to test).

Bob.
 wOO
Logged

My online life: http://www.mellowood.ca
kara
Kara-Moon, a site built by and for musicians
Global Moderator
Kara-Moon Master
*****
Posts: 4907


Music is my middle name


WWW
« Reply #7 on: July 14, 2010, 09:57:49 AM »

Yeah sounds good !
Something to test for me when I'm back from holidays

k
Logged

_____oOo______ http://www.myspace.com/kaazduo

www.kara-moon.com, a site built by and for musicians
Support us at : http://www.mymajorcompany.com/Artistes/kaaz/
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #8 on: July 14, 2010, 04:54:41 PM »

Okay, this is too much like eating peanuts ... I can't stop sometimes Smiley

Just added a neat little feature: arpeggiater. Mostly I don't like the effects, but there are those times when banjos sound good, I guess Smiley Now, on solo lines, you can arpeggiate the shit out of the line with the harmony notes added. my implementation lets you vary the rate, direction and the volume decay.

Still hammering on some bugs. Hopefully, before the weekend it'll be up for you guys to beat on.

Bob.
Logged

My online life: http://www.mellowood.ca
kara
Kara-Moon, a site built by and for musicians
Global Moderator
Kara-Moon Master
*****
Posts: 4907


Music is my middle name


WWW
« Reply #9 on: July 16, 2010, 03:09:50 PM »

Cool !

k
Logged

_____oOo______ http://www.myspace.com/kaazduo

www.kara-moon.com, a site built by and for musicians
Support us at : http://www.mymajorcompany.com/Artistes/kaaz/
folderol
Kara-Moon Master
****
Posts: 5308

Who? Me?


WWW
« Reply #10 on: July 16, 2010, 06:47:43 PM »

All this sounds fantastic, but is getting a bit beyond this ol' player Roll Eyes
Logged

If you have a poem, I have a tune, and we exchange these, we can both have a poem, a tune, and a song.
- Will
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #11 on: July 16, 2010, 08:47:13 PM »

All this sounds fantastic, but is getting a bit beyond this ol' player Roll Eyes

I really hope that isn't true! One of the reasons this taking longer than I wanted is that I want to make the interface and docs as "user friendly" as possible. And, that is not easy Smiley

Any program and any interface suffers from user-unfriendliness and/or complexity as the program becomes less trivial. And MMA is no different! If I could start over, I'd probably make things a bit more rational ... but I would still have a non-GUI program.

I suspect that users will just select a sub-set of feature and use them as needed. But, seriously, the new additions in this version are very cool. More to the point, they are very useful! You'll have to wait a few more days to try 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.054 seconds with 20 queries.