Kara-Moon Forum
August 18, 2019, 07:12:18 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] 2
  Print  
Author Topic: Capo  (Read 1173 times)
sciurius
Full Member
***
Posts: 144



« on: February 08, 2019, 08:55:32 PM »

According to TFM:

Quote
Depending on the tuning of the “instrument” a “C” chord with a CAPO 2 will be created as a “B” chord shape played above the second fret.

As I interpret this is that with CAPO 2, a D chord will be played with a C-shape.

A C chord (without CAPO) is fretted 0 3 2 0 1 0 so I expect the D chord (with CAPO) to become 2 5 4 2 3 2. But what I get is 2 0 0 2 3 2, in other words, a D-shape instead of a C-shape. In fact, no matter if I put a "Plectrum Capo 2" in the file, no matter where I put it, I get identical midi files.

I also tried to emulate a capo with "Plectrum Tuning f#- b- e a c# f#+" but still identical midi files.

It is so obvious that this should work that I'm probably doing something extremely stupid... But what.

The attached mma generates midi notes F#1 A1 D2 A2 D3 F#3 instead of (expected) F#1 D2 F#2 A2 D3 F#3.

* plcapo.mma (0.35 KB - downloaded 27 times.)
Logged
bvdp
Hero Member
*****
Posts: 998


WWW
« Reply #1 on: February 08, 2019, 10:40:06 PM »

Ya asking a sax player about capo Smiley Darned if I know ...

  1. I didn't write the code ... nice excuse!
  2. I'm tied up right now with concerts

But ... I'll have a look tomorrow and see if I can figure it out. Might be a manual problem ... can't imagine a bug in MMA  Huh
Logged

My online life: http://www.mellowood.ca
sciurius
Full Member
***
Posts: 144



« Reply #2 on: February 09, 2019, 09:05:41 PM »

What I found out is that
- the capo is saved and restored with grooves (as documented)
- capo is reset by SeqClear and Time (!)

So a Capo only works if it is specified inside of a groove definition, and after a possible Time setting.

Setting a Capo in the song only affects the current groove (as documented).

As a guitar player I was not prepared for capo's that appear and disappear during a song  Wink.

What I also found out is that Plectrum generates impossible chord fingerings. For example, a Bb chord (notes Bb, D, F) gets a fingering 1 1 0 3 3 1. This is not playable, you cannot have an open string under a barre. Bb is commonly fingered 1 1 3 3 3 1. Likewise an F chord (notes F A C) gets fingering 1 0 3 2 1 1. This should be 1 3 3 2 1 1.

I wish it were possible to define chord shapes for Plectrum...
« Last Edit: February 09, 2019, 09:38:46 PM by sciurius » Logged
bvdp
Hero Member
*****
Posts: 998


WWW
« Reply #3 on: February 09, 2019, 10:32:08 PM »

MMA is NOT a guitar.

The capo function may be a case of inappropriate naming.

Here's what's happening....

 - when the plectrum code figures what notes to play in a chord, it is NOT doing guitar shapes. After all, why should it? Guitar shapes are really only relevant on a guitar (or uke or banjo, etc) which has strings. MMA (and MIDI) doesn't have a strings which need to be shortened. Instead, we try to figure out an appropriate set of notes based on the number of strings in the instrument and try to get all the notes of the chord to sound. If the chord has 3 notes and the instrument has 6 strings, notes will be duplicated (I don't recall if octaves are considered?).

 - when the "capo" is applied all the strings are shortened (or lengthened). What this does is raise (or lower) overall pitch or sound of the fake guitar.

It's not designed to duplicate fingering on a real guitar.

There is a debug "Plectrum" option which will display the notes determined for each chord.

The really big difference between setting a CHORD track to use a guitar versus a PLECTRUM track is that plectrum notes do not have a duration. They continue to sound until they are muted or re-picked. Again, this is sort-of how a real plucked string instrument works.

Does this help and make sense (esp. coming from a sax player)?
Logged

My online life: http://www.mellowood.ca
sciurius
Full Member
***
Posts: 144



« Reply #4 on: February 11, 2019, 02:02:42 PM »

Thanks for the additional information.

I made the following additions to Plectrum for the benefit of guitar players:

   Plectrum StringCapo N

Sets a capo at the specificied location. This behaves like a guitar-like capo: it is groove independent and does not change chord shapes. So an A-chord with a StringCapo on 2 will have its familiar A-chord shape (0 0 2 2 2 0) and sound like a B-chord.

   Plectrum StringTuning notes...

Just like Plectrum Tuning, but groove independent.

   Plectrum Chord name frets...

Defines the shape (fret positions) for this chord. It ignores any tuning settings.

StringTuning can not be combined with Tuning, and StringCapo can not be combined with Capo.

I've also considered to extend the current Capo and Tuning commands by adding an additional Sticky parameter (Plectrum Capo 2 Sticky) instead of making new commands. I'm not sure which approach is most elegant.

An example:

   Plectrum StringCapo 2
    Plectrum Chord D  - - 0 2 3 2
    1      C
    2      D


will yield:

PLECTRUM C chord [0, 4, 7]
PLECTRUM    66 | - $ - - - - - - - - - - - - - - - - - 1   66
PLECTRUM    61 | - $ * - - - - - - - - - - - - - - - - 0   62
PLECTRUM    57 | - $ - - - - - - - - - - - - - - - - - 2   57
PLECTRUM    52 | - $ - * - - - - - - - - - - - - - - - 1   54
PLECTRUM    47 | - $ - - * - - - - - - - - - - - - - - 0   50
PLECTRUM    42 | - $ - - - - - - - - - - - - - - - - - 1   42

PLECTRUM D chord [2, 6, 9]
PLECTRUM    66 | - $ - * - - - - - - - - - - - - - - - 5   68
PLECTRUM    61 | - $ - - * - - - - - - - - - - - - - - 4   64
PLECTRUM    57 | - $ - * - - - - - - - - - - - - - - - 3   59
PLECTRUM    52 | - $ - - - - - - - - - - - - - - - - - 2   52
PLECTRUM    47 | - X - - - - - - - - - - - - - - - - - 1
PLECTRUM    42 | - X - - - - - - - - - - - - - - - - - 0


I'm convinced this will draw millions of guitar players to MMA, don't you think so  Grin ?
« Last Edit: February 11, 2019, 03:13:10 PM by sciurius » Logged
bvdp
Hero Member
*****
Posts: 998


WWW
« Reply #5 on: February 11, 2019, 04:26:15 PM »

Not sure if we want more guitar players Smiley

Seriously, why are the shapes being used important?
Logged

My online life: http://www.mellowood.ca
sciurius
Full Member
***
Posts: 144



« Reply #6 on: February 11, 2019, 07:57:31 PM »

When you fingerpick a chord, the shape of the chord determines the notes that will sound. That is especially important with slow strums.

For example, the B♭ chord played on a guitar strums b♭- f b♭ d+ f+. The plectrum algorithm generates b♭- d b♭ d+ f+. It sounds differently and has a different 'feel'.

With a 5-string picking pattern starting at the root note, a D-chord in x x d a d+ f#+ shape (the default) is one note too short. So the shape d f# a d+ f#+ is needed.

For string pickers it matters.
Logged
bvdp
Hero Member
*****
Posts: 998


WWW
« Reply #7 on: February 11, 2019, 10:46:07 PM »

Thanks. Makes sense. Not sure that I would hear the difference ... tuned to sax problems Smiley

I guess the downside of all this (and probably why the guy that wrote the code, didn't) is that it means you'll need explicit figures for each chord? Or are you doing it algorithmically?
Logged

My online life: http://www.mellowood.ca
sciurius
Full Member
***
Posts: 144



« Reply #8 on: February 12, 2019, 07:28:08 AM »

No, everything still works as always. Only if a particular chord has been defined a shape this shape will be used instead of the algorithmically calculated shape. For example, in a song I'm currently working on I need shape definitions for two chords. All other chords are okay as calculated.

The persistency of the capo and tuning depends on using new commands (or an additional command option). What is your opinion on this? For the tuning, a sticky option makes sense because it is just that, very similar to the sticky option for tracks.

    Plectrum Tuning d- a- d g a d+ Sticky

For the guitar capo it is not just the sticky behaviour, but is works differently so for this a distinct command would make sense.

    Plectrum StringCapo 3

If you agree on this I'll tidy up my implementation and send you a patch.
Logged
bvdp
Hero Member
*****
Posts: 998


WWW
« Reply #9 on: February 12, 2019, 04:27:35 PM »

No, everything still works as always. Only if a particular chord has been defined a shape this shape will be used instead of the algorithmically calculated shape. For example, in a song I'm currently working on I need shape definitions for two chords. All other chords are okay as calculated.

That sounds good. Forcing a user to maintain endless tables of guitar figures is painful.

Quote
The persistency of the capo and tuning depends on using new commands (or an additional command option). What is your opinion on this? For the tuning, a sticky option makes sense because it is just that, very similar to the sticky option for tracks.

    Plectrum Tuning d- a- d g a d+ Sticky

I'm not completely following this. Does it mean that if we use the STICKY option the tuning will stay the same no matter what CAPO setting we use? Not sure how that would work.

Quote
For the guitar capo it is not just the sticky behaviour, but is works differently so for this a distinct command would make sense.

    Plectrum StringCapo 3

If you agree on this I'll tidy up my implementation and send you a patch.

I'm not following how this is working between chords with and without defined shapes. If you set a shape for "C" and not for "Cm" and then set a Capo value is the effective "pitch" going to sound goofy? (I'm talking about how CAPO raises the apparent pitch range of the chord. I'm sure there is a name for it, but I can't think of it just now.)

Thanks for taking on this coding!
Logged

My online life: http://www.mellowood.ca
sciurius
Full Member
***
Posts: 144



« Reply #10 on: February 12, 2019, 08:11:49 PM »

Revised Feb 13, 13:30 CET

W.r.t. the tuning: Currently, tuning is saved/restored with grooves. While this may lead to interesting effects, it is counter-intuitive for guitar (and similar string) players. So I added the possibility for a tuning to persist, regardless of groove changes. Technically, the tuning is stored in the Plectrum structure but not saved/restored so it always stays the same. Think of the physical tuning of a guitar or banjo. The strings are tuned and stay that way.

For this we could introduce a new command, e.g.:

   Plectrum StringTuning d- a- d g a d+

or use the existing Tuning command and have it understand a Sticky option:

   Plectrum Tuning d- a- d g a d+ Sticky

(or both... Why not?)

Wrt. the Capo: A capo on a guitar shortens the strings and makes the tuning higher (okay, MMA can deal with negative capo values but that's not the point). Effectively, it is transposing the song. To get guitar like behaviour one can use Transpose instead of Plectrum Capo. (Note that I dropped the Plectrum StringCapo proposal, it has no added benefits over Transpose.)

As for your last question, when you define a shape for the C chord and not for the Cm chord, then for the C chord the defined shape will always be used, while for the Cm chord a calculated shape will be used. The chords will sound as C and Cm respectively.

If you set Plectrum Capo 2, the D chord will still use the D-shape (and sound like an E chord), while the second chord still sounds like a Dm chord but uses an alternate shape to fit the capo. So you have to think twice before mixing chord shape definitions with capo settings.

I hope this clarifies the issues.
« Last Edit: February 13, 2019, 12:19:59 PM by sciurius » Logged
bvdp
Hero Member
*****
Posts: 998


WWW
« Reply #11 on: February 13, 2019, 05:09:00 PM »

Just to clarify this whole issue of grooves and what gets restored and why.

A groove is a collection of various settings at a point in running a MMA program. These settings are saved into a buffer when a DEFGROOVE command is issued. When a GROOVE command is issued those settings are restored into the current MMA state.

The decisions as to what is and is not saved/restored is based on the logic that a groove represents a certain type of musical accompaniment. So, things like the instruments being used, the time signature (well, MMA time), the pitch (octave) and the sequences  are all part of the groove. And, when using a plectrum track, the tuning and capo values also set the "mood" so they are saved/restored as well.

If we did not save/restore things like capo we'd get the situation when a user (quite properly) uses a capo setting to make the string instrument sound higher or lower in pitch and then do a Defgroove and assume that the capo (or tuning) setting is saved as part of the groove. I think this is a reasonable expectation.

Now, user number two comes along and says: yes, but I don't what this behavior. Opps ... what now?

Actually, the solution is pretty simple: define a new groove with the settings you want. It's quite simple,

In  a song file:

    Groove A
       set some things which the lib has "wrong"
    DefGroove A

Now, for the rest of the song you can call Groove A and have your settings.

Want to toggle between grooves A and B? Just do the same thing for B.

And, an easier solution may be to use the allgrooves option. Simply load all the grooves into memory:

   Groove A
   Groove B
   Groove C
   AllGrooves Plectrum Capo 2

Having a Sticky option for capo and tuning may or may not be a good thing Smiley

But, remember: MMA is not a guitar. No matter what we do to make life simple, guitar players are going to be confused if they think along the line that MMA is a guitar emulation. It's not. It's not intended to be one.

A MMA capo does NOT transpose. A guitar capo does. I think I said in an earlier post that using the term "capo" is, perhaps, unfortunate. But, when you capo in MMA a C chord remains a C chord. All the notes are notes from a C chord and the sound is definitely "C"-ish. When you capo a guitar and use the same fingering a C chord becomes a C# or D or Eb or ... As long as the lib writing thinks in guitar terms with capo there will be a problem Smiley

The code for the plectrum track has its own save/restore routines for grooves so it is an easy matter to tie into them. If having a sticky option is a good thing, I don't see a problem. Hopefully this will not effect MMA code which already has a capo or tuning command in an existing lib? You might consider just having a special value for CAPO which is checked when doing a restore? I've not really thought this through or looked much at the bit of code.

Hope I'm making sense. I just got in from clearing off the driveway. We've had about 60cm of snow in the last 24 hours ... this is Canada and we love it!




 
Logged

My online life: http://www.mellowood.ca
bvdp
Hero Member
*****
Posts: 998


WWW
« Reply #12 on: February 13, 2019, 08:16:45 PM »

Just in case it's misssed ... having the ability to define figures for chords is a really good idea.
Logged

My online life: http://www.mellowood.ca
sciurius
Full Member
***
Posts: 144



« Reply #13 on: February 13, 2019, 09:25:18 PM »

Note that I already dropped the "sticky capo" aka "stringcapo" idea in reply #10.
Guitar players will need to learn to use Transpose instead of Capo. No problem. They'll find out very quickly that MMA's Capo does not transpose.

Your suggestion to use AllGrooves is quite useful. As far as I can see my proposal for a sticky tuning corresponds to AllGrooves Plectrum Tuning .... So I can drop this, too, even though it feels a bit unnatural for me to define the tuning after the grooves instead of before...

What remains is the proposal for chord shape definition. This is independent of everything else. It is a new Plectrum command, and only when a chord is used in Plectrum context that has a defined shape, this shape prevails over the shape that would otherwise have been calculated. Nothing else is affected.

Appended is the patch, and a demo program. I hope you like it.

* plcapo.mma (0.73 KB - downloaded 32 times.)
Logged
bvdp
Hero Member
*****
Posts: 998


WWW
« Reply #14 on: February 13, 2019, 10:03:37 PM »

No patch attached ... just the mma file Smiley

I'm still confused (remember, lots of back pressure in my brain from playing sax) ... are you still proposing that when a capo is set that a C chord will no longer sound C?
Logged

My online life: http://www.mellowood.ca
Pages: [1] 2
  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.059 seconds with 20 queries.