Kara-Moon Forum

Developers & Technology => Musical MIDI Accompaniment (MMA) => Topic started by: sciurius on January 17, 2021, 04:00:48 PM



Title: Plectrum exempt from RPitch
Post by: sciurius on January 17, 2021, 04:00:48 PM
In a Plectrum track with chords defined by Shape, RPitch doesn't seem to have any effect.

Not a problem, but just curious: Is this intentional or accidental?


Title: Re: Plectrum exempt from RPitch
Post by: bvdp on January 17, 2021, 05:43:46 PM
It was not a deliberate oversight :) But, it was deliberately not done :)

The random pitching is applied in MMA.pat.sendNote(). This routine is used by all tracks, except for plectrum. Why? Plectrum notes do not have a duration (all other track notes do). So, a special routine is contained in patPlectrum.trackBar() to send notes to the midi machine. Note that this code is also responsible for tracking the current state of the notes already playing.

I _think_ this could be added to plectrum fairly easily by inserting a call to MMA.rpitch.doRpitch() (refer to the sentNote() code to see how). You'd need this in fretboardNotes() and fretboardShapes().

If you're up to it ... have a go. In the meantime I'll make a doc note that it doesn't work for plectrum tracks :)


Title: Re: Plectrum exempt from RPitch
Post by: bvdp on January 17, 2021, 06:32:31 PM
I think I'll add a warning as well when setting that it is ignored by guitar players :) And, I promise not to say something like "if you want random/wrong pitches get a real guitar player".


Title: Re: Plectrum exempt from RPitch
Post by: sciurius on January 17, 2021, 07:45:51 PM
I agree that it is logical that plectrum tracks do not obey RPitch. RPitch applies to the notes (pitches) that MMA generate for chords. In the case of Plectrum, in particular in combination with Shape, the pitches are selected by the user, not MMA.


Title: Re: Plectrum exempt from RPitch
Post by: bvdp on January 17, 2021, 08:39:23 PM
Well, not quite. In the end chords are chords ... whether they were created by an algorithm or by a defined shape ... they are still just chords. I think there might be some use for random "mistakes" in deciding what notes should be in a chord ... one could argue that the "wrong" notes add color or reflect the fact that the player is "just human".

However, I think it'd be non-trivial to add to plectrum tracks so I'm going to leave it for now. Future project for the plectrum track developers/users :)